-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
src/abl/sgs/dynsmag.f
Outdated
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 |
There was a problem hiding this comment.
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:
There was a problem hiding this comment.
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
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tensor multiplication
src/abl/sgs/dynsmag.f
Outdated
call comp_mij(ur,us,nt,e) | ||
call comp_lij(vx,vy,vz,ur,us,ut,e) |
There was a problem hiding this comment.
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.
src/abl/sgs/dynsmag.f
Outdated
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 |
There was a problem hiding this comment.
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
e94c45d
to
be218dc
Compare
Also move common subroutines to sgs/utils.f See: Nek5000/NekExamples@1a5387c#diff-c8af13c2833a71991ab55ac28bec8d13
planar_average_r and wall_normal_average_s
be218dc
to
8b3c996
Compare
Uses Nek v19 API for averaging
Cosmetic: ctags verbose log
Remove unused variables in dynamic model
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.”
Write to spatial_means.txt
269a854
to
05b6ce1
Compare
No description provided.