Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start adding WIP dynamic SGS model from NekExamples #25

Merged
merged 45 commits into from
Dec 9, 2020
Merged

Conversation

ashwinvis
Copy link
Member

No description provided.

@ashwinvis ashwinvis marked this pull request as draft September 16, 2020 15:38
@ashwinvis ashwinvis marked this pull request as ready for review September 18, 2020 16:15
src/abl/sgs/dynsmag.f Outdated Show resolved Hide resolved
Comment on lines 234 to 246
do k=1,3
do j=1,k
sym = sym_map(j, k)

call col3(fi, magS, sij(:,j,k), n) ! TODO: fix imap and for our 3D sij
call tens3d1(mij(1,sym), fi, fh, fht, nx1, nx1) ! fh x fh x fh x (|S| S_ij)
call tens3d1(fi, sij(:,j,k), fh, fht, nx1, nx1) ! fh x fh x fh x S_ij
do i=1,n
if (.not. wmles_sgs_delta_max) delta_sq = dg2(i*e,1,1,1)

mij(i, sym) = (a2**2 * fs(i)*fi(i) - mij(i, sym))*delta_sq
enddo
enddo
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The loop and the sym_map has been modified compared to the original code here:

https://github.com/Nek5000/NekExamples/blob/4f58969757dbf4f87a01df889bfc6e9e8caa71b8/turbChannel/turbChannel.usr#L512

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reason: sij has a different array shape in the NekExamples version

src/abl/sgs/dynsmag.f Outdated Show resolved Hide resolved
src/abl/sgs/utils.f Show resolved Hide resolved
Comment on lines 52 to 57
do i=1,ntot
ur(i) = mij(i,1)*lij(i,1)+mij(i,2)*lij(i,2)+mij(i,3)*lij(i,3)
$ + 2*(mij(i,4)*lij(i,4)+mij(i,5)*lij(i,5)+mij(i,6)*lij(i,6))
us(i) = mij(i,1)*mij(i,1)+mij(i,2)*mij(i,2)+mij(i,3)*mij(i,3)
$ + 2*(mij(i,4)*mij(i,4)+mij(i,5)*mij(i,5)+mij(i,6)*mij(i,6))
enddo
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tensor multiplication

Comment on lines 47 to 48
call comp_mij(ur,us,nt,e)
call comp_lij(vx,vy,vz,ur,us,ut,e)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved some arguments to the include file DYN since it is in a common block.

Comment on lines 227 to 230
c a2 is the test- to grid-filter ratio, squared

a2 = nx1-1 ! nx1-1 is number of spaces in grid
a2 = a2 /(nt-1) ! nt-1 is number of spaces in filtered grid
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? nt=-9 and is hard coded

@ashwinvis ashwinvis force-pushed the enh/dynsmag branch 3 times, most recently from e94c45d to be218dc Compare September 24, 2020 07:28
src/abl/bc/moeng.f Outdated Show resolved Hide resolved
@ashwinvis ashwinvis mentioned this pull request Oct 19, 2020
First average in z then x as pointed in the example of planar_avg.
Comment out planar_avg_horiz and try planar_avg_spanwise for now.
The subroutine seems to work well. Except for some periodicity near the wall
when plotting num and den output of the dyn_smag SGS model.
c.f.:
Gadde, Stieren, and Stevens, “Large-Eddy Simulations of Stratified Atmospheric Boundary Layers.”
@ashwinvis ashwinvis merged commit 221ebba into master Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant