60 CHARACTER(CHRLEN) :: &
61 RCSIdentString =
'$RCSfile: RFLU_ModViscousFlux.F90,v $ $Revision: 1.10 $'
102 INTEGER,
INTENT(IN) :: tvindxcond
103 REAL(RFREAL),
DIMENSION(:,:) :: tv
104 TYPE(t_region
),
POINTER :: pregion
110 INTEGER :: c1,distrib,ifg,ifgbeg,ifgend,ifl,ipatch
111 REAL(RFREAL) :: cond,dtdn,dtdx,dtdy,dtdz,nx,ny,nz
112 REAL(RFREAL) :: tvf(tvindxcond)
114 TYPE(t_grid),
POINTER :: pgrid
115 TYPE(t_patch),
POINTER :: ppatch
121 global => pregion%global
124 'RFLU_ModViscousFlux.F90')
130 pgrid => pregion%grid
136 DO ipatch = 1,pgrid%nPatches
137 ppatch => pregion%patches(ipatch)
139 distrib = ppatch%mixt%distrib
145 SELECT CASE ( ppatch%bcType )
151 CASE ( bc_noslipwall_hflux )
155 DO ifl = 1,ppatch%nBFaces
156 c1 = ppatch%bf2c(ifl)
160 nx = ppatch%fn(xcoord,ifl)
161 ny = ppatch%fn(ycoord,ifl)
162 nz = ppatch%fn(zcoord,ifl)
166 cond = tv(tvindxcond,c1)
178 dtdn = -ppatch%mixt%vals(bcdat_noslip_q,distrib*ifl)/cond
186 ppatch%mixt%gradFace(xcoord,grbf_mixt_temp,ifl) = dtdx
187 ppatch%mixt%gradFace(ycoord,grbf_mixt_temp,ifl) = dtdy
188 ppatch%mixt%gradFace(zcoord,grbf_mixt_temp,ifl) = dtdz
247 INTEGER,
INTENT(IN) :: tvindxcond,tvindxvisc
248 REAL(RFREAL),
DIMENSION(:,:) :: tv
249 TYPE(t_region
),
POINTER :: pregion
256 REAL(RFREAL),
PARAMETER :: two_thirds = 2.0_rfreal/3.0_rfreal
257 REAL(RFREAL) :: beta,cond,divterm,dtdx,dtdy,dtdz,dudx,dudy,dudz,dvdx,dvdy, &
258 dvdz,dwdx,dwdy,dwdz,nm,nx,ny,nz,s11,s12,s13,s21,s22,s23, &
259 s31,s32,s33,u,
v,visc,w
260 REAL(RFREAL) :: fd(4)
261 REAL(RFREAL) :: cvf(cv_mixt_xvel:cv_mixt_zvel),tvf(tvindxvisc:tvindxcond)
262 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcv,pdiss
264 TYPE(t_grid),
POINTER :: pgrid
270 global => pregion%global
273 'RFLU_ModViscousFlux.F90')
279 pgrid => pregion%grid
280 pcv => pregion%mixt%cv
281 pdiss => pregion%mixt%diss
283 beta = pregion%mixtInput%betrk(pregion%irkStep)
289 IF ( pregion%mixt%cvState /= cv_mixt_state_duvwt )
THEN
290 CALL
errorstop(global,err_cv_state_invalid,__line__)
297 DO ifg = 1,pgrid%nFaces
298 c1 = pgrid%f2c(1,ifg)
299 c2 = pgrid%f2c(2,ifg)
305 nx = pgrid%fn(xcoord,ifg)
306 ny = pgrid%fn(ycoord,ifg)
307 nz = pgrid%fn(zcoord,ifg)
308 nm = pgrid%fn(xyzmag,ifg)
314 u = 0.5_rfreal*(pcv(cv_mixt_xvel,c1) + pcv(cv_mixt_xvel,c2))
315 v = 0.5_rfreal*(pcv(cv_mixt_yvel,c1) + pcv(cv_mixt_yvel,c2))
316 w = 0.5_rfreal*(pcv(cv_mixt_zvel,c1) + pcv(cv_mixt_zvel,c2))
318 visc = 0.5_rfreal*(tv(tvindxvisc,c1) + tv(tvindxvisc,c2))
319 cond = 0.5_rfreal*(tv(tvindxcond,c1) + tv(tvindxcond,c2))
342 dudx = pregion%mixt%gradFace(xcoord,grf_mixt_xvel,ifg)
343 dudy = pregion%mixt%gradFace(ycoord,grf_mixt_xvel,ifg)
344 dudz = pregion%mixt%gradFace(zcoord,grf_mixt_xvel,ifg)
346 dvdx = pregion%mixt%gradFace(xcoord,grf_mixt_yvel,ifg)
347 dvdy = pregion%mixt%gradFace(ycoord,grf_mixt_yvel,ifg)
348 dvdz = pregion%mixt%gradFace(zcoord,grf_mixt_yvel,ifg)
350 dwdx = pregion%mixt%gradFace(xcoord,grf_mixt_zvel,ifg)
351 dwdy = pregion%mixt%gradFace(ycoord,grf_mixt_zvel,ifg)
352 dwdz = pregion%mixt%gradFace(zcoord,grf_mixt_zvel,ifg)
354 dtdx = pregion%mixt%gradFace(xcoord,grf_mixt_temp,ifg)
355 dtdy = pregion%mixt%gradFace(ycoord,grf_mixt_temp,ifg)
356 dtdz = pregion%mixt%gradFace(zcoord,grf_mixt_temp,ifg)
362 divterm = two_thirds*(dudx + dvdy + dwdz)
364 s11 = 2.0_rfreal*dudx - divterm
369 s22 = 2.0_rfreal*dvdy - divterm
374 s33 = 2.0_rfreal*dwdz - divterm
376 fd(1) = visc*(s11*nx + s12*ny + s13*nz)*nm
377 fd(2) = visc*(s21*nx + s22*ny + s23*nz)*nm
378 fd(3) = visc*(s31*nx + s32*ny + s33*nz)*nm
380 fd(4) = u*fd(1) +
v*fd(2) + w*fd(3) + cond*(dtdx*nx + dtdy*ny + dtdz*nz)*nm
386 pdiss(cv_mixt_xmom,c1) = pdiss(cv_mixt_xmom,c1) + beta*fd(1)
387 pdiss(cv_mixt_ymom,c1) = pdiss(cv_mixt_ymom,c1) + beta*fd(2)
388 pdiss(cv_mixt_zmom,c1) = pdiss(cv_mixt_zmom,c1) + beta*fd(3)
389 pdiss(cv_mixt_ener,c1) = pdiss(cv_mixt_ener,c1) + beta*fd(4)
391 pdiss(cv_mixt_xmom,c2) = pdiss(cv_mixt_xmom,c2) - beta*fd(1)
392 pdiss(cv_mixt_ymom,c2) = pdiss(cv_mixt_ymom,c2) - beta*fd(2)
393 pdiss(cv_mixt_zmom,c2) = pdiss(cv_mixt_zmom,c2) - beta*fd(3)
394 pdiss(cv_mixt_ener,c2) = pdiss(cv_mixt_ener,c2) - beta*fd(4)
445 INTEGER,
INTENT(IN) :: tvindxcond,tvindxvisc
446 REAL(RFREAL),
DIMENSION(:,:) :: tv
447 TYPE(t_region
),
POINTER :: pregion
453 INTEGER :: c1,ifg,ifgbeg,ifgend,ifl,ipatch
454 REAL(RFREAL),
PARAMETER :: two_thirds = 2.0_rfreal/3.0_rfreal
455 REAL(RFREAL) :: beta,cond,divterm,dtdx,dtdy,dtdz,dudx,dudy,dudz,dvdx,dvdy, &
456 dvdz,dwdx,dwdy,dwdz,icfref,ichref,nm,nx,ny,nz,rref,s11, &
457 s12,s13,s21,s22,s23,s31,s32,s33,visc,vref
458 REAL(RFREAL) :: fd(4)
459 REAL(RFREAL) :: tvf(tvindxvisc:tvindxcond)
460 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcv,pdiss
462 TYPE(t_grid),
POINTER :: pgrid
463 TYPE(t_patch),
POINTER :: ppatch
469 global => pregion%global
472 'RFLU_ModViscousFlux.F90')
478 pgrid => pregion%grid
479 pcv => pregion%mixt%cv
480 pdiss => pregion%mixt%diss
482 beta = pregion%mixtInput%betrk(pregion%irkStep)
484 rref = global%refDensity
485 vref = global%refVelocity
487 icfref = 2.0_rfreal/(rref*vref*vref)
488 ichref = 2.0_rfreal/(rref*vref*vref*vref)
494 IF ( pregion%mixt%cvState /= cv_mixt_state_duvwt )
THEN
495 CALL
errorstop(global,err_cv_state_invalid,__line__)
502 DO ipatch = 1,pgrid%nPatches
503 ppatch => pregion%patches(ipatch)
509 SELECT CASE ( ppatch%bcType )
515 CASE ( bc_noslipwall_hflux,bc_noslipwall_temp )
519 DO ifl = 1,ppatch%nBFaces
520 c1 = ppatch%bf2c(ifl)
524 nx = ppatch%fn(xcoord,ifl)
525 ny = ppatch%fn(ycoord,ifl)
526 nz = ppatch%fn(zcoord,ifl)
527 nm = ppatch%fn(xyzmag,ifl)
531 visc = tv(tvindxvisc,c1)
532 cond = tv(tvindxcond,c1)
545 dudx = ppatch%mixt%gradFace(xcoord,grbf_mixt_xvel,ifl)
546 dudy = ppatch%mixt%gradFace(ycoord,grbf_mixt_xvel,ifl)
547 dudz = ppatch%mixt%gradFace(zcoord,grbf_mixt_xvel,ifl)
549 dvdx = ppatch%mixt%gradFace(xcoord,grbf_mixt_yvel,ifl)
550 dvdy = ppatch%mixt%gradFace(ycoord,grbf_mixt_yvel,ifl)
551 dvdz = ppatch%mixt%gradFace(zcoord,grbf_mixt_yvel,ifl)
553 dwdx = ppatch%mixt%gradFace(xcoord,grbf_mixt_zvel,ifl)
554 dwdy = ppatch%mixt%gradFace(ycoord,grbf_mixt_zvel,ifl)
555 dwdz = ppatch%mixt%gradFace(zcoord,grbf_mixt_zvel,ifl)
557 dtdx = ppatch%mixt%gradFace(xcoord,grbf_mixt_temp,ifl)
558 dtdy = ppatch%mixt%gradFace(ycoord,grbf_mixt_temp,ifl)
559 dtdz = ppatch%mixt%gradFace(zcoord,grbf_mixt_temp,ifl)
563 divterm = two_thirds*(dudx + dvdy + dwdz)
565 s11 = 2.0_rfreal*dudx - divterm
570 s22 = 2.0_rfreal*dvdy - divterm
575 s33 = 2.0_rfreal*dwdz - divterm
577 fd(1) = visc*(s11 *nx + s12 *ny + s13 *nz)
578 fd(2) = visc*(s21 *nx + s22 *ny + s23 *nz)
579 fd(3) = visc*(s31 *nx + s32 *ny + s33 *nz)
580 fd(4) = cond*(dtdx*nx + dtdy*ny + dtdz*nz)
584 ppatch%cf(xcoord,ifl) = -icfref*fd(1)
585 ppatch%cf(ycoord,ifl) = -icfref*fd(2)
586 ppatch%cf(zcoord,ifl) = -icfref*fd(3)
588 ppatch%ch(ifl) = ichref*fd(4)
592 pdiss(cv_mixt_xmom,c1) = pdiss(cv_mixt_xmom,c1) + beta*fd(1)*nm
593 pdiss(cv_mixt_ymom,c1) = pdiss(cv_mixt_ymom,c1) + beta*fd(2)*nm
594 pdiss(cv_mixt_zmom,c1) = pdiss(cv_mixt_zmom,c1) + beta*fd(3)*nm
595 pdiss(cv_mixt_ener,c1) = pdiss(cv_mixt_ener,c1) + beta*fd(4)*nm
subroutine, public rflu_viscousfluxespatches(pRegion, tv, tvIndxVisc, tvIndxCond)
subroutine registerfunction(global, funName, fileName)
subroutine, public rflu_enforceheatflux(pRegion, tv, tvIndxCond)
subroutine, public rflu_interpcells2face(pRegion, ifg, src, dst)
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS 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 v
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine, public rflu_interpcells2facepatch(pRegion, pPatch, ifl, src, dst)
subroutine deregisterfunction(global)
subroutine, public rflu_viscousfluxes(pRegion, tv, tvIndxVisc, tvIndxCond)