74 TYPE(t_region
),
TARGET :: region
77 INTEGER ::
i,
j,
k,
ic, ipatch
80 CHARACTER(CHRLEN) :: rcsidentstring
83 TYPE(t_turb),
POINTER :: turb
85 INTEGER :: ijkc0,ijkc1,ijkn, indcp, ibn,ien
86 REAL(RFREAL) :: one6th,beta,engmodel,rprt,cpprt,muel,tcol,tcot
87 REAL(RFREAL) :: muf,tx,ty,tz,tgradf
88 REAL(RFREAL) :: velf(3),fd(4),sface(3),sij(3,3)
89 REAL(RFREAL) :: velc0(3),velc1(3),tfd(4),fd4,ucitauij,taukk
90 REAL(RFREAL),
POINTER :: diss(:,:),tv(:,:),gv(:,:),muet(:,:),srate(:,:)
91 REAL(RFREAL),
POINTER ::
trace(:),vol(:)
96 INTEGER :: ilev,icoff,ijcoff,inoff,ijnoff
97 REAL(RFREAL),
POINTER :: avgco(:,:), sf(:,:), dv(:,:), grad(:,:)
100 INTEGER,
POINTER :: f2c(:,:)
101 REAL(RFREAL) :: rdens0, rdens1
102 REAL(RFREAL),
POINTER :: fn(:,:), cv(:,:), grad(:,:,:)
107 rcsidentstring =
'$RCSfile: TURB_VisFluxEddy.F90,v $'
109 global => region%global
111 'TURB_VisFluxEddy.F90' )
117 ilev = region%currLevel
118 dv => region%levels(ilev)%mixt%dv
119 tv => region%levels(ilev)%mixt%tv
120 gv => region%levels(ilev)%mixt%gv
121 diss => region%levels(ilev)%mixt%diss
122 muet => region%levels(ilev)%turb%mueT
123 trace => region%levels(ilev)%turb%trace
124 vol => region%levels(ilev)%grid%vol
125 turb => region%levels(ilev)%turb
136 diss => region%mixt%diss
137 muet => region%turb%mueT
138 trace => region%turb%trace
139 vol => region%grid%vol
145 one6th = 1._rfreal/6._rfreal
147 IF (region%turbInput%engModel==off)
THEN
152 beta = region%mixtInput%betrk(region%irkStep)
155 rprt = 1._rfreal/region%levels(ilev)%mixt%prTurb
156 indcp = region%levels(ilev)%mixt%indCp
159 rprt = 1._rfreal/region%mixtInput%prTurb
160 indcp = region%mixtInput%indCp
167 ibn = lbound(
trace,1 )
168 ien = ubound(
trace,1 )
169 ALLOCATE( turb%stwork(2,ibn:ien) )
170 turb%stwork = 0._rfreal
181 DO ipatch=1,region%nPatches
182 patch => region%levels(ilev)%patches(ipatch)
185 DO ipatch=1,region%grid%nPatches
186 patch => region%patches(ipatch)
191 IF (
patch%bcType>=bc_noslipwall .AND. &
192 patch%bcType<=bc_noslipwall+bc_range)
THEN
193 IF (
patch%valBola%switches(wlm_input_model) /= wlm_model_nomodel)
THEN
213 IF ((region%turbInput%nSt > 0) .AND. (region%turbInput%engModel/=off))
THEN
214 turb%stwork(:,:) = one6th*turb%stwork(:,:)
217 DEALLOCATE( turb%stwork )
221 IF (region%turbInput%engModel/=off)
THEN
242 REAL(RFREAL) :: ac0, ac1
245 REAL(RFREAL) :: modstrain
262 srate => region%levels(ilev)%turb%mISij
263 grad => region%levels(ilev)%mixt%gradi
264 sf => region%levels(ilev)%grid%si
265 avgco => region%levels(ilev)%grid%c2fCoI
266 ELSEIF (ijk==dirj)
THEN
276 srate => region%levels(ilev)%turb%mJSij
277 grad => region%levels(ilev)%mixt%gradj
278 sf => region%levels(ilev)%grid%sj
279 avgco => region%levels(ilev)%grid%c2fCoJ
280 ELSEIF (ijk==dirk)
THEN
290 srate => region%levels(ilev)%turb%mKSij
291 grad => region%levels(ilev)%mixt%gradk
292 sf => region%levels(ilev)%grid%sk
293 avgco => region%levels(ilev)%grid%c2fCoK
298 iend = region%grid%nFaces
299 f2c => region%grid%f2c
300 srate => region%turb%mISij
301 grad => region%mixt%gradFace
310 ijkc0 = indijk(
i ,
j ,
k ,icoff,ijcoff)
311 ijkc1 = indijk(
i+iadd,
j+jadd,
k+kadd,icoff,ijcoff)
312 ijkn = indijk(
i ,
j ,
k ,inoff,ijnoff)
313 sface(1)= sf(xcoord,ijkn)
314 sface(2)= sf(ycoord,ijkn)
315 sface(3)= sf(zcoord,ijkn)
321 IF (region%mixt%cvState /= cv_mixt_state_cons) &
322 CALL
errorstop(global,err_reached_default,__line__)
329 sface(1)= fn(xcoord,ijkn)*fn(xyzmag,ijkn)
330 sface(2)= fn(ycoord,ijkn)*fn(xyzmag,ijkn)
331 sface(3)= fn(zcoord,ijkn)*fn(xyzmag,ijkn)
332 rdens0 = 1._rfreal/cv(cv_mixt_dens,ijkc0)
333 rdens1 = 1._rfreal/cv(cv_mixt_dens,ijkc1)
335 cpprt = (ac0*gv(gv_mixt_cp,ijkc0*indcp) + &
336 ac1*gv(gv_mixt_cp,ijkc1*indcp))*rprt
337 muel = ac0*tv(tv_mixt_muel,ijkc0)+ac1*tv(tv_mixt_muel,ijkc1)
338 tcol = ac0*tv(tv_mixt_tcol,ijkc0)+ac1*tv(tv_mixt_tcol,ijkc1)
339 tcot = cpprt*muet(ijk,ijkn)
341 velc0(1)= dv(dv_mixt_uvel,ijkc0)
342 velc0(2)= dv(dv_mixt_vvel,ijkc0)
343 velc0(3)= dv(dv_mixt_wvel,ijkc0)
344 velc1(1)= dv(dv_mixt_uvel,ijkc1)
345 velc1(2)= dv(dv_mixt_vvel,ijkc1)
346 velc1(3)= dv(dv_mixt_wvel,ijkc1)
347 velf(1) = ac0*dv(dv_mixt_uvel,ijkc0)+ac1*dv(dv_mixt_uvel,ijkc1)
348 velf(2) = ac0*dv(dv_mixt_vvel,ijkc0)+ac1*dv(dv_mixt_vvel,ijkc1)
349 velf(3) = ac0*dv(dv_mixt_wvel,ijkc0)+ac1*dv(dv_mixt_wvel,ijkc1)
350 tx = grad(gr_mixt_tx,ijkn)
351 ty = grad(gr_mixt_ty,ijkn)
352 tz = grad(gr_mixt_tz,ijkn)
355 velc0(1)= cv(cv_mixt_xmom,ijkc0)*rdens0
356 velc0(2)= cv(cv_mixt_ymom,ijkc0)*rdens0
357 velc0(3)= cv(cv_mixt_zmom,ijkc0)*rdens0
358 velc1(1)= cv(cv_mixt_xmom,ijkc1)*rdens1
359 velc1(2)= cv(cv_mixt_ymom,ijkc1)*rdens1
360 velc1(3)= cv(cv_mixt_zmom,ijkc1)*rdens1
361 velf(1) = ac0*velc0(1)+ac1*velc1(1)
362 velf(2) = ac0*velc0(2)+ac1*velc1(2)
363 velf(3) = ac0*velc0(3)+ac1*velc1(3)
364 tx = grad(xcoord,grf_mixt_temp,ijkn)
365 ty = grad(ycoord,grf_mixt_temp,ijkn)
366 tz = grad(zcoord,grf_mixt_temp,ijkn)
369 tgradf= (tx*sface(1)+ty*sface(2)+tz*sface(3))
371 sij(1,1) = srate(e11,ijkn)
372 sij(1,2) = srate(e12,ijkn)
373 sij(1,3) = srate(e13,ijkn)
376 sij(2,2) = srate(e22,ijkn)
377 sij(2,3) = srate(e23,ijkn)
381 sij(3,3) = srate(e33,ijkn)
383 fd(1) = muel*(sij(1,1)*sface(1)+sij(1,2)*sface(2)+sij(1,3)*sface(3))
384 fd(2) = muel*(sij(2,1)*sface(1)+sij(2,2)*sface(2)+sij(2,3)*sface(3))
385 fd(3) = muel*(sij(3,1)*sface(1)+sij(3,2)*sface(2)+sij(3,3)*sface(3))
386 fd(4) =
dot_product(fd(1:3),velf(1:3)) + tcol*tgradf
389 modstrain =
sqrt(sij(1,1)*sij(1,1) &
395 taukk = 2._rfreal*muet(ijk,ijkn)*modstrain
399 muf = -muet(ijk,ijkn)/muel
411 tfd(4) = ucitauij - tcot*tgradf
412 fd(4) = fd4 - engmodel*tfd(4)
415 turb%stwork(1,ijkc0)=turb%stwork(1,ijkc0)+ucitauij
416 turb%stwork(2,ijkc0)=turb%stwork(2,ijkc0)+tcot*tgradf
418 diss(cv_mixt_xmom,ijkc0) = diss(cv_mixt_xmom,ijkc0) + fd(1)*beta
419 diss(cv_mixt_ymom,ijkc0) = diss(cv_mixt_ymom,ijkc0) + fd(2)*beta
420 diss(cv_mixt_zmom,ijkc0) = diss(cv_mixt_zmom,ijkc0) + fd(3)*beta
421 diss(cv_mixt_ener,ijkc0) = diss(cv_mixt_ener,ijkc0) + fd(4)*beta
422 global%esg1Sum = global%esg1Sum + vol(ijkc0)*ucitauij
425 tfd(4) = ucitauij - tcot*tgradf
426 fd(4) = fd4 - engmodel*tfd(4)
429 turb%stwork(1,ijkc1)=turb%stwork(1,ijkc1)+ucitauij
430 turb%stwork(2,ijkc1)=turb%stwork(2,ijkc1)+tcot*tgradf
432 diss(cv_mixt_xmom,ijkc1) = diss(cv_mixt_xmom,ijkc1) - fd(1)*beta
433 diss(cv_mixt_ymom,ijkc1) = diss(cv_mixt_ymom,ijkc1) - fd(2)*beta
434 diss(cv_mixt_zmom,ijkc1) = diss(cv_mixt_zmom,ijkc1) - fd(3)*beta
435 diss(cv_mixt_ener,ijkc1) = diss(cv_mixt_ener,ijkc1) - fd(4)*beta
436 global%esg1Sum = global%esg1Sum - vol(ijkc1)*ucitauij
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE ibeg
subroutine turb_visfluxeddy(region)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE kpcbeg
subroutine registerfunction(global, funName, fileName)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE ic
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jpcbeg
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE ipcend
subroutine turb_wlmtauwallmapping(region, patch)
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
subroutine turb_wlmupdate(region, patch)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode iend
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE ipcbeg
subroutine rflo_getcelloffset(region, iLev, iCellOffset, ijCellOffset)
subroutine turb_statccollector(region, iBegSt, iEndSt, colVar)
subroutine turb_lesesgmodel4(region)
Tfloat trace() const
Return the trace of the image, viewed as a matrix.
subroutine turb_visfluxeddypatch(region, patch)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jpcend
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode jend
subroutine computefluxtot(ijk)
subroutine errorstop(global, errorCode, errorLine, addMessage)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode jbeg
long double dot_product(pnt vec1, pnt vec2)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode kbeg
subroutine deregisterfunction(global)
subroutine turb_wlmfluxpatch(region, patch)
subroutine rflo_getdimensphys(region, iLev, ipcbeg, ipcend, jpcbeg, jpcend, kpcbeg, kpcend)