71 CHARACTER(CHRLEN) :: &
72 RCSIdentString =
'$RCSfile: RFLU_ModRoeFlux.F90,v $ $Revision: 1.10 $'
115 INTEGER,
INTENT(IN) :: fluxpart
116 TYPE(t_region
),
POINTER :: pregion
128 global => pregion%global
131 'RFLU_ModRoeFlux.F90')
137 SELECT CASE ( global%flowType )
143 CASE ( flow_unsteady )
144 SELECT CASE ( pregion%mixtInput%gasModel )
150 CASE ( gas_model_tcperf )
151 SELECT CASE ( pregion%mixtInput%spaceOrder )
152 CASE ( discr_order_1 )
154 CASE ( discr_order_2 )
157 CALL
errorstop(global,err_reached_default,__line__)
164 CASE ( gas_model_mixt_gasliq )
165 SELECT CASE ( pregion%mixtInput%spaceOrder )
166 CASE ( discr_order_1 )
168 CASE ( discr_order_2 )
171 CALL
errorstop(global,err_reached_default,__line__)
179 CALL
errorstop(global,err_reached_default,__line__)
188 SELECT CASE ( global%solverType )
194 CASE ( solv_explicit )
195 SELECT CASE ( fluxpart )
199 CASE ( flux_part_central )
200 SELECT CASE ( pregion%mixtInput%gasModel )
201 CASE ( gas_model_tcperf )
202 SELECT CASE ( pregion%mixtInput%spaceOrder )
203 CASE ( discr_order_1 )
205 CASE ( discr_order_2 )
208 CALL
errorstop(global,err_reached_default,__line__)
211 CALL
errorstop(global,err_reached_default,__line__)
216 CASE ( flux_part_dissip )
217 SELECT CASE ( pregion%mixtInput%gasModel )
218 CASE ( gas_model_tcperf )
219 SELECT CASE ( pregion%mixtInput%spaceOrder )
220 CASE ( discr_order_1 )
222 CASE ( discr_order_2 )
225 CALL
errorstop(global,err_reached_default,__line__)
228 CALL
errorstop(global,err_reached_default,__line__)
234 CALL
errorstop(global,err_reached_default,__line__)
241 CASE ( solv_implicit_nk )
242 SELECT CASE ( pregion%mixtInput%gasModel )
243 CASE ( gas_model_tcperf )
244 SELECT CASE ( pregion%mixtInput%spaceOrder )
245 CASE ( discr_order_1 )
247 CASE ( discr_order_2 )
250 CALL
errorstop(global,err_reached_default,__line__)
253 CALL
errorstop(global,err_reached_default,__line__)
261 CALL
errorstop(global,err_reached_default,__line__)
264 CALL
errorstop(global,err_reached_default,__line__)
312 TYPE(t_region
),
POINTER :: pregion
318 INTEGER :: c1,c2,ifg,indgs,ipatch
319 REAL(RFREAL) :: el,er,fs,irl,irr,nm,nx,ny,nz,ql,qr,rl,rr,ul,ur,vl,vr,wl,wr, &
321 REAL(RFREAL) :: flx(5)
322 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcv,pdv,prhs
324 TYPE(t_grid),
POINTER :: pgrid
325 TYPE(t_patch),
POINTER :: ppatch
331 global => pregion%global
334 'RFLU_ModRoeFlux.F90')
337 CALL fprofiler_begins(
"RFLU::ROE_ComputeFluxC1")
344 pgrid => pregion%grid
348 pcv => pregion%mixt%cv
349 pdv => pregion%mixt%dv
351 prhs => pregion%mixt%rhs
357 DO ifg = 1,pgrid%nFaces
358 c1 = pgrid%f2c(1,ifg)
359 c2 = pgrid%f2c(2,ifg)
365 nx = pgrid%fn(xcoord,ifg)
366 ny = pgrid%fn(ycoord,ifg)
367 nz = pgrid%fn(zcoord,ifg)
368 nm = pgrid%fn(xyzmag,ifg)
370 fs = pgrid%gs(indgs*ifg)
380 rl = pcv(cv_mixt_dens,c1)
383 ul = pcv(cv_mixt_xmom,c1)*irl
384 vl = pcv(cv_mixt_ymom,c1)*irl
385 wl = pcv(cv_mixt_zmom,c1)*irl
386 el = pcv(cv_mixt_ener,c1)*irl
387 pl = pdv(dv_mixt_pres,c1)
389 ql = ul*nx + vl*ny + wl*nz - fs
395 rr = pcv(cv_mixt_dens,c2)
398 ur = pcv(cv_mixt_xmom,c2)*irr
399 vr = pcv(cv_mixt_ymom,c2)*irr
400 wr = pcv(cv_mixt_zmom,c2)*irr
401 er = pcv(cv_mixt_ener,c2)*irr
402 pr = pdv(dv_mixt_pres,c2)
404 qr = ur*nx + vr*ny + wr*nz - fs
410 flx(1) = 0.5_rfreal*(ql* rl + qr* rr )*nm
411 flx(2) = 0.5_rfreal*(ql* rl*ul + pl*nx + qr* rr*ur + pr*nx)*nm
412 flx(3) = 0.5_rfreal*(ql* rl*vl + pl*ny + qr* rr*vr + pr*ny)*nm
413 flx(4) = 0.5_rfreal*(ql* rl*wl + pl*nz + qr* rr*wr + pr*nz)*nm
414 flx(5) = 0.5_rfreal*(ql*(rl*el + pl) + pl*fs + qr*(rr*er + pr) + pr*fs)*nm
420 prhs(cv_mixt_dens,c1) = prhs(cv_mixt_dens,c1) + flx(1)
421 prhs(cv_mixt_xmom,c1) = prhs(cv_mixt_xmom,c1) + flx(2)
422 prhs(cv_mixt_ymom,c1) = prhs(cv_mixt_ymom,c1) + flx(3)
423 prhs(cv_mixt_zmom,c1) = prhs(cv_mixt_zmom,c1) + flx(4)
424 prhs(cv_mixt_ener,c1) = prhs(cv_mixt_ener,c1) + flx(5)
426 prhs(cv_mixt_dens,c2) = prhs(cv_mixt_dens,c2) - flx(1)
427 prhs(cv_mixt_xmom,c2) = prhs(cv_mixt_xmom,c2) - flx(2)
428 prhs(cv_mixt_ymom,c2) = prhs(cv_mixt_ymom,c2) - flx(3)
429 prhs(cv_mixt_zmom,c2) = prhs(cv_mixt_zmom,c2) - flx(4)
430 prhs(cv_mixt_ener,c2) = prhs(cv_mixt_ener,c2) - flx(5)
437 DO ipatch = 1,pregion%grid%nPatches
438 ppatch => pregion%patches(ipatch)
440 IF ( ppatch%bcKind == bc_kind_nscbc )
THEN
452 CALL fprofiler_ends(
"RFLU::ROE_ComputeFluxC1")
503 TYPE(t_region
),
POINTER :: pregion
509 INTEGER :: c1,c2,ifg,indgs,ipatch
510 REAL(RFREAL) ::
dx,
dy,
dz,el,er,fs,
g,irl,irr,nm,nx,ny,nz,ql,qr,rl,rr,ul,ur, &
511 vl,vr,wl,wr,pl,pr,xc,yc,zc
512 REAL(RFREAL) :: flx(5)
513 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcv,pdv,pgv,prhs
514 REAL(RFREAL),
DIMENSION(:,:,:),
POINTER :: pgc
516 TYPE(t_grid),
POINTER :: pgrid
517 TYPE(t_patch),
POINTER :: ppatch
523 global => pregion%global
526 'RFLU_ModRoeFlux.F90')
529 CALL fprofiler_begins(
"RFLU::ROE_ComputeFluxC2_TCP")
536 pgrid => pregion%grid
540 pcv => pregion%mixt%cv
541 pdv => pregion%mixt%dv
543 pgc => pregion%mixt%gradCell
544 prhs => pregion%mixt%rhs
556 DO ifg = 1,pgrid%nFaces
557 c1 = pgrid%f2c(1,ifg)
558 c2 = pgrid%f2c(2,ifg)
564 nx = pgrid%fn(xcoord,ifg)
565 ny = pgrid%fn(ycoord,ifg)
566 nz = pgrid%fn(zcoord,ifg)
567 nm = pgrid%fn(xyzmag,ifg)
569 xc = pgrid%fc(xcoord,ifg)
570 yc = pgrid%fc(ycoord,ifg)
571 zc = pgrid%fc(zcoord,ifg)
573 fs = pgrid%gs(indgs*ifg)
583 rl = pcv(cv_mixt_dens,c1)
586 ul = pcv(cv_mixt_xmom,c1)*irl
587 vl = pcv(cv_mixt_ymom,c1)*irl
588 wl = pcv(cv_mixt_zmom,c1)*irl
589 pl = pdv(dv_mixt_pres,c1)
591 dx = xc - pgrid%cofg(xcoord,c1)
592 dy = yc - pgrid%cofg(ycoord,c1)
593 dz = zc - pgrid%cofg(zcoord,c1)
595 rl = rl + pgc(xcoord,grc_mixt_dens,c1)*
dx &
596 + pgc(ycoord,grc_mixt_dens,c1)*
dy &
597 + pgc(zcoord,grc_mixt_dens,c1)*
dz
598 ul = ul + pgc(xcoord,grc_mixt_xvel,c1)*
dx &
599 + pgc(ycoord,grc_mixt_xvel,c1)*
dy &
600 + pgc(zcoord,grc_mixt_xvel,c1)*
dz
601 vl = vl + pgc(xcoord,grc_mixt_yvel,c1)*
dx &
602 + pgc(ycoord,grc_mixt_yvel,c1)*
dy &
603 + pgc(zcoord,grc_mixt_yvel,c1)*
dz
604 wl = wl + pgc(xcoord,grc_mixt_zvel,c1)*
dx &
605 + pgc(ycoord,grc_mixt_zvel,c1)*
dy &
606 + pgc(zcoord,grc_mixt_zvel,c1)*
dz
607 pl = pl + pgc(xcoord,grc_mixt_pres,c1)*
dx &
608 + pgc(ycoord,grc_mixt_pres,c1)*
dy &
609 + pgc(zcoord,grc_mixt_pres,c1)*
dz
612 ql = ul*nx + vl*ny + wl*nz - fs
618 rr = pcv(cv_mixt_dens,c2)
621 ur = pcv(cv_mixt_xmom,c2)*irr
622 vr = pcv(cv_mixt_ymom,c2)*irr
623 wr = pcv(cv_mixt_zmom,c2)*irr
624 pr = pdv(dv_mixt_pres,c2)
626 dx = xc - pgrid%cofg(xcoord,c2)
627 dy = yc - pgrid%cofg(ycoord,c2)
628 dz = zc - pgrid%cofg(zcoord,c2)
630 rr = rr + pgc(xcoord,grc_mixt_dens,c2)*
dx &
631 + pgc(ycoord,grc_mixt_dens,c2)*
dy &
632 + pgc(zcoord,grc_mixt_dens,c2)*
dz
633 ur = ur + pgc(xcoord,grc_mixt_xvel,c2)*
dx &
634 + pgc(ycoord,grc_mixt_xvel,c2)*
dy &
635 + pgc(zcoord,grc_mixt_xvel,c2)*
dz
636 vr = vr + pgc(xcoord,grc_mixt_yvel,c2)*
dx &
637 + pgc(ycoord,grc_mixt_yvel,c2)*
dy &
638 + pgc(zcoord,grc_mixt_yvel,c2)*
dz
639 wr = wr + pgc(xcoord,grc_mixt_zvel,c2)*
dx &
640 + pgc(ycoord,grc_mixt_zvel,c2)*
dy &
641 + pgc(zcoord,grc_mixt_zvel,c2)*
dz
642 pr = pr + pgc(xcoord,grc_mixt_pres,c2)*
dx &
643 + pgc(ycoord,grc_mixt_pres,c2)*
dy &
644 + pgc(zcoord,grc_mixt_pres,c2)*
dz
647 qr = ur*nx + vr*ny + wr*nz - fs
653 flx(1) = 0.5_rfreal*(ql* rl + qr* rr )*nm
654 flx(2) = 0.5_rfreal*(ql* rl*ul + pl*nx + qr* rr*ur + pr*nx)*nm
655 flx(3) = 0.5_rfreal*(ql* rl*vl + pl*ny + qr* rr*vr + pr*ny)*nm
656 flx(4) = 0.5_rfreal*(ql* rl*wl + pl*nz + qr* rr*wr + pr*nz)*nm
657 flx(5) = 0.5_rfreal*(ql*(rl*el + pl) + pl*fs + qr*(rr*er + pr) + pr*fs)*nm
663 prhs(cv_mixt_dens,c1) = prhs(cv_mixt_dens,c1) + flx(1)
664 prhs(cv_mixt_xmom,c1) = prhs(cv_mixt_xmom,c1) + flx(2)
665 prhs(cv_mixt_ymom,c1) = prhs(cv_mixt_ymom,c1) + flx(3)
666 prhs(cv_mixt_zmom,c1) = prhs(cv_mixt_zmom,c1) + flx(4)
667 prhs(cv_mixt_ener,c1) = prhs(cv_mixt_ener,c1) + flx(5)
669 prhs(cv_mixt_dens,c2) = prhs(cv_mixt_dens,c2) - flx(1)
670 prhs(cv_mixt_xmom,c2) = prhs(cv_mixt_xmom,c2) - flx(2)
671 prhs(cv_mixt_ymom,c2) = prhs(cv_mixt_ymom,c2) - flx(3)
672 prhs(cv_mixt_zmom,c2) = prhs(cv_mixt_zmom,c2) - flx(4)
673 prhs(cv_mixt_ener,c2) = prhs(cv_mixt_ener,c2) - flx(5)
680 DO ipatch = 1,pregion%grid%nPatches
681 ppatch => pregion%patches(ipatch)
683 IF ( ppatch%bcKind == bc_kind_nscbc )
THEN
684 SELECT CASE ( ppatch%spaceOrder )
690 CALL
errorstop(global,err_reached_default,__line__)
693 SELECT CASE ( ppatch%spaceOrder )
699 CALL
errorstop(global,err_reached_default,__line__)
709 CALL fprofiler_ends(
"RFLU::ROE_ComputeFluxC2_TCP")
753 TYPE(t_region
),
POINTER :: pregion
759 INTEGER :: c1,c2,ifg,indgs
760 REAL(RFREAL) :: ah,betrk,cp,dissfact,dp,dq,dr,du,de,dv1,dv2,dv5,dw,efc, &
761 epsentr,fs,
g,hh,hl,hr,irl,irr,l1,l2,l5,nm,nx,ny,nz,pl, &
762 pr,qh,ql,qr,rl,rh,rr,sh,
term,tl,tr,t1,t2,t3,t5,ul,uh,ur, &
764 REAL(RFREAL) :: flx(5)
765 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcv,pdiss,pdv
767 TYPE(t_grid),
POINTER :: pgrid
773 global => pregion%global
776 'RFLU_ModRoeFlux.F90')
779 CALL fprofiler_begins(
"RFLU::ROE_ComputeFluxD1_TCP")
786 pgrid => pregion%grid
790 pcv => pregion%mixt%cv
791 pdv => pregion%mixt%dv
793 pdiss => pregion%mixt%diss
802 epsentr = pregion%mixtInput%epsentr
803 betrk = pregion%mixtInput%betrk(pregion%irkStep)
804 dissfact = pregion%mixtInput%dissFact
805 term = 0.5_rfreal*betrk*dissfact
811 DO ifg = 1,pgrid%nFaces
812 c1 = pgrid%f2c(1,ifg)
813 c2 = pgrid%f2c(2,ifg)
819 nx = pgrid%fn(xcoord,ifg)
820 ny = pgrid%fn(ycoord,ifg)
821 nz = pgrid%fn(zcoord,ifg)
822 nm = pgrid%fn(xyzmag,ifg)
824 fs = pgrid%gs(indgs*ifg)
834 rl = pcv(cv_mixt_dens,c1)
836 ul = pcv(cv_mixt_xmom,c1)*irl
837 vl = pcv(cv_mixt_ymom,c1)*irl
838 wl = pcv(cv_mixt_zmom,c1)*irl
839 pl = pdv(dv_mixt_pres,c1)
840 tl = pdv(dv_mixt_temp,c1)
848 rr = pcv(cv_mixt_dens,c2)
850 ur = pcv(cv_mixt_xmom,c2)*irr
851 vr = pcv(cv_mixt_ymom,c2)*irr
852 wr = pcv(cv_mixt_zmom,c2)*irr
853 pr = pdv(dv_mixt_pres,c2)
854 tr = pdv(dv_mixt_temp,c2)
865 uh = wt*ul + (1.0_rfreal-wt)*ur
866 vh = wt*vl + (1.0_rfreal-wt)*vr
867 wh = wt*wl + (1.0_rfreal-wt)*wr
868 hh = wt*hl + (1.0_rfreal-wt)*hr
870 qh = uh*nx + vh*ny + wh*nz - fs
871 sh = 0.5_rfreal*(uh*uh + vh*vh + wh*wh)
901 dq = du*nx + de*ny + dw*nz
903 dv1 = (dp - rh*ah*dq)/(2.0_rfreal*ah*ah)
904 dv5 = (dp + rh*ah*dq)/(2.0_rfreal*ah*ah)
905 dv2 = dr - dp/(ah*ah)
916 flx(1) =
term*(t1 + t2 + t5 )*nm
917 flx(2) =
term*(t1*(uh-nx*ah) + t2*uh + t3*(du-nx*dq) + t5*(uh+nx*ah))*nm
918 flx(3) =
term*(t1*(vh-ny*ah) + t2*vh + t3*(de-ny*dq) + t5*(vh+ny*ah))*nm
919 flx(4) =
term*(t1*(wh-nz*ah) + t2*wh + t3*(dw-nz*dq) + t5*(wh+nz*ah))*nm
920 flx(5) =
term*(t1*(hh-qh*ah) + t2*sh + t3*(uh*du+vh*de+wh*dw-qh*dq) + t5*(hh+qh*ah))*nm
926 pdiss(cv_mixt_dens,c1) = pdiss(cv_mixt_dens,c1) + flx(1)
927 pdiss(cv_mixt_xmom,c1) = pdiss(cv_mixt_xmom,c1) + flx(2)
928 pdiss(cv_mixt_ymom,c1) = pdiss(cv_mixt_ymom,c1) + flx(3)
929 pdiss(cv_mixt_zmom,c1) = pdiss(cv_mixt_zmom,c1) + flx(4)
930 pdiss(cv_mixt_ener,c1) = pdiss(cv_mixt_ener,c1) + flx(5)
932 pdiss(cv_mixt_dens,c2) = pdiss(cv_mixt_dens,c2) - flx(1)
933 pdiss(cv_mixt_xmom,c2) = pdiss(cv_mixt_xmom,c2) - flx(2)
934 pdiss(cv_mixt_ymom,c2) = pdiss(cv_mixt_ymom,c2) - flx(3)
935 pdiss(cv_mixt_zmom,c2) = pdiss(cv_mixt_zmom,c2) - flx(4)
936 pdiss(cv_mixt_ener,c2) = pdiss(cv_mixt_ener,c2) - flx(5)
944 CALL fprofiler_ends(
"RFLU::ROE_ComputeFluxD1_TCP")
992 TYPE(t_region
),
POINTER :: pregion
998 INTEGER :: c1,c2,ifg,indgs
999 REAL(RFREAL) :: ah,betrk,cp,de,dissfact,dp,dq,dr,du,dv1,dv2,dv5,dw,
dx, &
1000 dy,
dz,efc,epsentr,fs,
g,gc,hh,hl,hr,irl,irr,l1,l2,l5,nm,nx, &
1001 ny,nz,pl,pr,qh,ql,qr,rl,rh,rr,sh,
term,tl,tr,t1,t2,t3, &
1002 t5,ul,uh,ur,vl,vh,vr,wl,wh,wr,wt,xc,yc,zc
1003 REAL(RFREAL) :: flx(5)
1004 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcv,pdiss,pdv
1005 REAL(RFREAL),
DIMENSION(:,:,:),
POINTER :: pgc
1007 TYPE(t_grid),
POINTER :: pgrid
1013 global => pregion%global
1016 'RFLU_ModRoeFlux.F90')
1019 CALL fprofiler_begins(
"RFLU::ROE_ComputeFluxD2_TCP")
1026 pgrid => pregion%grid
1030 pcv => pregion%mixt%cv
1031 pdv => pregion%mixt%dv
1033 pgc => pregion%mixt%gradCell
1034 pdiss => pregion%mixt%diss
1044 epsentr = pregion%mixtInput%epsentr
1045 betrk = pregion%mixtInput%betrk(pregion%irkStep)
1046 dissfact = pregion%mixtInput%dissFact
1047 term = 0.5_rfreal*betrk*dissfact
1053 DO ifg = 1,pgrid%nFaces
1054 c1 = pgrid%f2c(1,ifg)
1055 c2 = pgrid%f2c(2,ifg)
1061 nx = pgrid%fn(xcoord,ifg)
1062 ny = pgrid%fn(ycoord,ifg)
1063 nz = pgrid%fn(zcoord,ifg)
1064 nm = pgrid%fn(xyzmag,ifg)
1066 xc = pgrid%fc(xcoord,ifg)
1067 yc = pgrid%fc(ycoord,ifg)
1068 zc = pgrid%fc(zcoord,ifg)
1070 fs = pgrid%gs(indgs*ifg)
1080 rl = pcv(cv_mixt_dens,c1)
1083 ul = pcv(cv_mixt_xmom,c1)*irl
1084 vl = pcv(cv_mixt_ymom,c1)*irl
1085 wl = pcv(cv_mixt_zmom,c1)*irl
1086 pl = pdv(dv_mixt_pres,c1)
1088 dx = xc - pgrid%cofg(xcoord,c1)
1089 dy = yc - pgrid%cofg(ycoord,c1)
1090 dz = zc - pgrid%cofg(zcoord,c1)
1092 rl = rl + pgc(xcoord,grc_mixt_dens,c1)*
dx &
1093 + pgc(ycoord,grc_mixt_dens,c1)*
dy &
1094 + pgc(zcoord,grc_mixt_dens,c1)*
dz
1095 ul = ul + pgc(xcoord,grc_mixt_xvel,c1)*
dx &
1096 + pgc(ycoord,grc_mixt_xvel,c1)*
dy &
1097 + pgc(zcoord,grc_mixt_xvel,c1)*
dz
1098 vl = vl + pgc(xcoord,grc_mixt_yvel,c1)*
dx &
1099 + pgc(ycoord,grc_mixt_yvel,c1)*
dy &
1100 + pgc(zcoord,grc_mixt_yvel,c1)*
dz
1101 wl = wl + pgc(xcoord,grc_mixt_zvel,c1)*
dx &
1102 + pgc(ycoord,grc_mixt_zvel,c1)*
dy &
1103 + pgc(zcoord,grc_mixt_zvel,c1)*
dz
1104 pl = pl + pgc(xcoord,grc_mixt_pres,c1)*
dx &
1105 + pgc(ycoord,grc_mixt_pres,c1)*
dy &
1106 + pgc(zcoord,grc_mixt_pres,c1)*
dz
1115 rr = pcv(cv_mixt_dens,c2)
1117 ur = pcv(cv_mixt_xmom,c2)*irr
1118 vr = pcv(cv_mixt_ymom,c2)*irr
1119 wr = pcv(cv_mixt_zmom,c2)*irr
1120 pr = pdv(dv_mixt_pres,c2)
1122 dx = xc - pgrid%cofg(xcoord,c2)
1123 dy = yc - pgrid%cofg(ycoord,c2)
1124 dz = zc - pgrid%cofg(zcoord,c2)
1126 rr = rr + pgc(xcoord,grc_mixt_dens,c2)*
dx &
1127 + pgc(ycoord,grc_mixt_dens,c2)*
dy &
1128 + pgc(zcoord,grc_mixt_dens,c2)*
dz
1129 ur = ur + pgc(xcoord,grc_mixt_xvel,c2)*
dx &
1130 + pgc(ycoord,grc_mixt_xvel,c2)*
dy &
1131 + pgc(zcoord,grc_mixt_xvel,c2)*
dz
1132 vr = vr + pgc(xcoord,grc_mixt_yvel,c2)*
dx &
1133 + pgc(ycoord,grc_mixt_yvel,c2)*
dy &
1134 + pgc(zcoord,grc_mixt_yvel,c2)*
dz
1135 wr = wr + pgc(xcoord,grc_mixt_zvel,c2)*
dx &
1136 + pgc(ycoord,grc_mixt_zvel,c2)*
dy &
1137 + pgc(zcoord,grc_mixt_zvel,c2)*
dz
1138 pr = pr + pgc(xcoord,grc_mixt_pres,c2)*
dx &
1139 + pgc(ycoord,grc_mixt_pres,c2)*
dy &
1140 + pgc(zcoord,grc_mixt_pres,c2)*
dz
1152 uh = wt*ul + (1.0_rfreal-wt)*ur
1153 vh = wt*vl + (1.0_rfreal-wt)*vr
1154 wh = wt*wl + (1.0_rfreal-wt)*wr
1155 hh = wt*hl + (1.0_rfreal-wt)*hr
1157 qh = uh*nx + vh*ny + wh*nz - fs
1158 sh = 0.5_rfreal*(uh*uh + vh*vh + wh*wh)
1188 dq = du*nx + de*ny + dw*nz
1190 dv1 = (dp - rh*ah*dq)/(2.0_rfreal*ah*ah)
1191 dv5 = (dp + rh*ah*dq)/(2.0_rfreal*ah*ah)
1192 dv2 = dr - dp/(ah*ah)
1203 flx(1) =
term*(t1 + t2 + t5 )*nm
1204 flx(2) =
term*(t1*(uh-nx*ah) + t2*uh + t3*(du-nx*dq) + t5*(uh+nx*ah))*nm
1205 flx(3) =
term*(t1*(vh-ny*ah) + t2*vh + t3*(de-ny*dq) + t5*(vh+ny*ah))*nm
1206 flx(4) =
term*(t1*(wh-nz*ah) + t2*wh + t3*(dw-nz*dq) + t5*(wh+nz*ah))*nm
1207 flx(5) =
term*(t1*(hh-qh*ah) + t2*sh + t3*(uh*du+vh*de+wh*dw-qh*dq) + t5*(hh+qh*ah))*nm
1213 pdiss(cv_mixt_dens,c1) = pdiss(cv_mixt_dens,c1) + flx(1)
1214 pdiss(cv_mixt_xmom,c1) = pdiss(cv_mixt_xmom,c1) + flx(2)
1215 pdiss(cv_mixt_ymom,c1) = pdiss(cv_mixt_ymom,c1) + flx(3)
1216 pdiss(cv_mixt_zmom,c1) = pdiss(cv_mixt_zmom,c1) + flx(4)
1217 pdiss(cv_mixt_ener,c1) = pdiss(cv_mixt_ener,c1) + flx(5)
1219 pdiss(cv_mixt_dens,c2) = pdiss(cv_mixt_dens,c2) - flx(1)
1220 pdiss(cv_mixt_xmom,c2) = pdiss(cv_mixt_xmom,c2) - flx(2)
1221 pdiss(cv_mixt_ymom,c2) = pdiss(cv_mixt_ymom,c2) - flx(3)
1222 pdiss(cv_mixt_zmom,c2) = pdiss(cv_mixt_zmom,c2) - flx(4)
1223 pdiss(cv_mixt_ener,c2) = pdiss(cv_mixt_ener,c2) - flx(5)
1231 CALL fprofiler_ends(
"RFLU::ROE_ComputeFluxD2_TCP")
1285 TYPE(t_region
),
POINTER :: pregion
1291 INTEGER :: c1,c2,ifg,indgs,indmf,ipatch
1292 REAL(RFREAL) :: bgh2,blh2,bp,bt,bvh2,cmh,cml,cmr,cvg,cvl,cvv,cgh2,clh2, &
1293 cvh2,cvm,dissfact,de,dp,dq,dr,dtemp,du,dv1,dv2,dv3,dv4, &
1294 dv5,dvfg,dvfv,dw,efc,egh,el,elh,epsentr,er,evh,factor1, &
1295 factor2,factor4,factor5,fdv1,fdv2,fdv3,fs,fxn1,fxn2, &
1296 fxn3,fxn4,fxn5,fxn6,invc2p,invc2pb,irl,irr,l1,l2,l3,l4, &
1297 l5,nm,nx,ny,nz,ph,pl,po,pr,qh,ql,qr,ra11,ra12x,ra12y, &
1298 ra12z,ra13,ra14,ra15,ra21,ra22x,ra22y,ra22z,ra23,ra24, &
1299 ra25,ra31,ra32x,ra32y,ra32z,ra33,ra34,ra35,ra41,ra42x, &
1300 ra42y,ra42z,ra43,ra44,ra45,ra51,ra52x,ra52y,ra52z,ra53, &
1301 ra54,ra55,rgh,rgl,rgr,rh,rl,rlh,ro,rr,rvh,rvl,rvr, &
1302 rygl,rygr,ryvl,ryvr,rg,rv,sh,t1,t2,t3,t4,t5,t6,th,tl, &
1303 to,tr,uh,ul,ur,vfgh,vfgl,vfgr,vflh,vfvh,vfvl,vfvr,vh, &
1305 REAL(RFREAL) :: flxconv(5),flxdiss(5)
1306 REAL(RFREAL),
DIMENSION(:),
POINTER :: pmf
1307 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: fn,pcvmixt,pcvspec,pdvmixt,prhs
1309 TYPE(t_patch),
POINTER :: ppatch
1310 TYPE(t_grid),
POINTER :: pgrid
1316 global => pregion%global
1319 'RFLU_ModRoeFlux.F90')
1325 pgrid => pregion%grid
1327 indgs = pregion%grid%indGs
1328 indmf = pregion%mixtInput%indMfMixt
1329 epsentr = pregion%mixtInput%epsentr
1330 dissfact = pregion%mixtInput%dissFact
1332 pcvmixt => pregion%mixt%cv
1333 pdvmixt => pregion%mixt%dv
1334 pcvspec => pregion%spec%cv
1336 pmf => pregion%mixt%mfMixt
1337 prhs => pregion%mixt%rhs
1343 ro = global%refDensityLiq
1344 po = global%refPressLiq
1345 to = global%refTempLiq
1346 bp = global%refBetaPLiq
1347 bt = global%refBetaTLiq
1348 cvl = global%refCvLiq
1350 rg =
mixtperf_r_m(pregion%specInput%specType(1)%pMaterial%molw)
1351 cvg =
mixtperf_cv_cpr(pregion%specInput%specType(1)%pMaterial%spht,rg)
1353 rv =
mixtperf_r_m(pregion%specInput%specType(2)%pMaterial%molw)
1354 cvv =
mixtperf_cv_cpr(pregion%specInput%specType(2)%pMaterial%spht,rv)
1360 DO ifg = 1,pgrid%nFaces
1361 c1 = pgrid%f2c(1,ifg)
1362 c2 = pgrid%f2c(2,ifg)
1368 nx = pgrid%fn(xcoord,ifg)
1369 ny = pgrid%fn(ycoord,ifg)
1370 nz = pgrid%fn(zcoord,ifg)
1371 nm = pgrid%fn(xyzmag,ifg)
1373 fs = pgrid%gs(indgs*ifg)
1383 rl = pcvmixt(cv_mixt_dens,c1)
1386 ul = pcvmixt(cv_mixt_xmom,c1)*irl
1387 vl = pcvmixt(cv_mixt_ymom,c1)*irl
1388 wl = pcvmixt(cv_mixt_zmom,c1)*irl
1389 el = pcvmixt(cv_mixt_ener,c1)*irl
1390 pl = pdvmixt(dv_mixt_pres,c1)
1391 tl = pdvmixt(dv_mixt_temp,c1)
1392 cml = pdvmixt(dv_mixt_soun,c1)
1394 rygl = pcvspec(1,c1)
1395 ryvl = pcvspec(2,c1)
1401 ql = ul*nx + vl*ny + wl*nz - fs
1407 rr = pcvmixt(cv_mixt_dens,c2)
1410 ur = pcvmixt(cv_mixt_xmom,c2)*irr
1411 vr = pcvmixt(cv_mixt_ymom,c2)*irr
1412 wr = pcvmixt(cv_mixt_zmom,c2)*irr
1413 er = pcvmixt(cv_mixt_ener,c2)*irr
1414 pr = pdvmixt(dv_mixt_pres,c2)
1415 tr = pdvmixt(dv_mixt_temp,c2)
1416 cmr = pdvmixt(dv_mixt_soun,c2)
1418 rygr = pcvspec(1,c2)
1419 ryvr = pcvspec(2,c2)
1425 qr = ur*nx + vr*ny + wr*nz - fs
1433 uh = wt*ul + (1.0_rfreal-wt)*ur
1434 vh = wt*vl + (1.0_rfreal-wt)*vr
1435 wh = wt*wl + (1.0_rfreal-wt)*wr
1436 ph = wt*pl + (1.0_rfreal-wt)*pr
1437 th = wt*tl + (1.0_rfreal-wt)*tr
1439 vfgh = wt*vfgl + (1.0_rfreal-wt)*vfgr
1440 vfvh = wt*vfvl + (1.0_rfreal-wt)*vfvr
1441 vflh = 1.0_rfreal - vfvh - vfgh
1443 qh = uh*nx + vh*ny + wh*nz - fs
1444 sh = 0.5_rfreal*(uh*uh + vh*vh + wh*wh)
1462 cvm = (rlh*vflh*cvl + rvh*vfvh*cvv + rgh*vfgh*cvg)/rh
1464 cmh =
mixtgasliq_c(cvm,rh,ph,rlh,rvh,rgh,vflh,vfvh,vfgh,clh2,cvh2,cgh2, &
1496 dq = du*nx + de*ny + dw*nz
1502 fdv1 = ph/(rh*cmh*cmh*rh*cvm*th)
1503 fdv2 = (vfgh*(rgh*cgh2 - rh*cmh*cmh &
1504 + (bgh2*ph)/(rh*cvm)))/(rgh*cgh2*rh*cmh*cmh)
1505 fdv3 = (vfvh*(rvh*cvh2 - rh*cmh*cmh &
1506 + (bvh2*ph)/(rh*cvm)))/(rvh*cvh2*rh*cmh*cmh)
1508 dv1 = (dtemp/th) - (dp*fdv1)
1509 dv2 = dvfg - dp*fdv2
1510 dv3 = dvfv - dp*fdv3
1511 dv4 = -dq/cmh + dp/(rh*cmh*cmh)
1512 dv5 = dq/cmh + dp/(rh*cmh*cmh)
1514 invc2p = vflh/clh2 + vfgh/cgh2 + vfvh/cvh2
1515 invc2pb = (blh2*vflh)/clh2 + (bgh2*vfgh)/cgh2 &
1519 ra12x = -th*invc2pb*uh
1520 ra12y = -th*invc2pb*vh
1521 ra12z = -th*invc2pb*wh
1522 ra13 = rlh*vflh*cvl*th + bt*cvl*th*th*vflh - th*invc2pb*sh
1523 ra14 = -(bgh2*vfgh*th)/cgh2
1524 ra15 = -(bvh2*vfvh*th)/cvh2
1527 ra22x = (rgh - rlh)*uh
1528 ra22y = (rgh - rlh)*vh
1529 ra22z = (rgh - rlh)*wh
1530 ra23 = rgh*egh - rlh*elh
1535 ra32x = (rvh - rlh)*uh
1536 ra32y = (rvh - rlh)*vh
1537 ra32z = (rvh - rlh)*wh
1538 ra33 = rvh*evh - rlh*elh
1542 fxn1 = ((rgh - rlh)*vfgh*(rgh*cgh2 - rh*cmh*cmh &
1543 + (bgh2*ph)/(rh*cvm)))/(2.0_rfreal*rgh*cgh2)
1544 fxn2 = ((rvh - rlh)*vfvh*(rvh*cvh2 - rh*cmh*cmh &
1545 + (bvh2*ph)/(rh*cvm)))/(2.0_rfreal*rvh*cvh2)
1546 factor1 = 0.5_rfreal*rh*cmh*cmh*invc2p &
1547 - (ph*invc2pb)/(2.0_rfreal*rh*cvm) + fxn1 + fxn2
1549 fxn3 = 0.5_rfreal*rh*cmh*cmh*((elh*vflh)/clh2 &
1550 + (egh*vfgh)/cgh2 + (evh*vfvh)/cvh2)
1551 fxn4 = (ph*(rlh*vflh*cvl + bt*cvl*th*vflh &
1552 - (sh*invc2pb)))/(2.0_rfreal*rh*cvm)
1553 fxn5 = ((rgh*egh - rlh*elh)*vfgh*(rgh*cgh2 - rh*cmh*cmh &
1554 + (bgh2*ph)/(rh*cvm)))/(2.0_rfreal*rgh*cgh2)
1555 fxn6 = ((rvh*evh - rlh*elh)*vfvh*(rvh*cvh2 - rh*cmh*cmh &
1556 + (bvh2*ph)/(rh*cvm)))/(2.0_rfreal*rvh*cvh2)
1557 factor2 = fxn3 + fxn4 + fxn5 + fxn6
1559 factor4 = 0.5_rfreal*rgh*vfgh
1560 factor5 = 0.5_rfreal*rvh*vfvh
1563 ra42x = factor1*uh - 0.5_rfreal*rh*cmh*nx
1564 ra42y = factor1*vh - 0.5_rfreal*rh*cmh*ny
1565 ra42z = factor1*wh - 0.5_rfreal*rh*cmh*nz
1566 ra43 = factor2 - 0.5_rfreal*rh*cmh*qh
1571 ra52x = factor1*uh + 0.5_rfreal*rh*cmh*nx
1572 ra52y = factor1*vh + 0.5_rfreal*rh*cmh*ny
1573 ra52z = factor1*wh + 0.5_rfreal*rh*cmh*nz
1574 ra53 = factor2 + 0.5_rfreal*rh*cmh*qh
1593 flxconv(1) = 0.5_rfreal*(ql*rl + qr*rr )*nm
1594 flxconv(2) = 0.5_rfreal*(ql*rl*ul + pl*nx + qr*rr*ur + pr*nx)*nm
1595 flxconv(3) = 0.5_rfreal*(ql*rl*vl + pl*ny + qr*rr*vr + pr*ny)*nm
1596 flxconv(4) = 0.5_rfreal*(ql*rl*wl + pl*nz + qr*rr*wr + pr*nz)*nm
1597 flxconv(5) = 0.5_rfreal*(ql*(rl*el + pl) + pl*fs + qr*(rr*er + pr) &
1604 flxdiss(1) = 0.5_rfreal*dissfact*(ra11*t1 + ra21*t2 + ra31*t3 &
1605 + ra41*t4 + ra51*t5)*nm
1606 flxdiss(2) = 0.5_rfreal*dissfact*(ra12x*t1 + ra22x*t2 + ra32x*t3 &
1607 + ra42x*t4 + ra52x*t5 + t6*(du-nx*dq))*nm
1608 flxdiss(3) = 0.5_rfreal*dissfact*(ra12y*t1 + ra22y*t2 + ra32y*t3 &
1609 + ra42y*t4 + ra52y*t5 + t6*(de-ny*dq))*nm
1610 flxdiss(4) = 0.5_rfreal*dissfact*(ra12z*t1 + ra22z*t2 + ra32z*t3 &
1611 + ra42z*t4 + ra52z*t5 + t6*(dw-nz*dq))*nm
1612 flxdiss(5) = 0.5_rfreal*dissfact*(ra13*t1 + ra23*t2 + ra33*t3 &
1613 + ra43*t4 + ra53*t5 &
1614 + t6*(uh*du+vh*de+wh*dw-qh*dq))*nm
1620 pmf(indmf*ifg) = flxconv(1) - flxdiss(1)
1626 prhs(cv_mixt_dens,c1) = prhs(cv_mixt_dens,c1) + (flxconv(1) - flxdiss(1))
1627 prhs(cv_mixt_xmom,c1) = prhs(cv_mixt_xmom,c1) + (flxconv(2) - flxdiss(2))
1628 prhs(cv_mixt_ymom,c1) = prhs(cv_mixt_ymom,c1) + (flxconv(3) - flxdiss(3))
1629 prhs(cv_mixt_zmom,c1) = prhs(cv_mixt_zmom,c1) + (flxconv(4) - flxdiss(4))
1630 prhs(cv_mixt_ener,c1) = prhs(cv_mixt_ener,c1) + (flxconv(5) - flxdiss(5))
1632 prhs(cv_mixt_dens,c2) = prhs(cv_mixt_dens,c2) - (flxconv(1) - flxdiss(1))
1633 prhs(cv_mixt_xmom,c2) = prhs(cv_mixt_xmom,c2) - (flxconv(2) - flxdiss(2))
1634 prhs(cv_mixt_ymom,c2) = prhs(cv_mixt_ymom,c2) - (flxconv(3) - flxdiss(3))
1635 prhs(cv_mixt_zmom,c2) = prhs(cv_mixt_zmom,c2) - (flxconv(4) - flxdiss(4))
1636 prhs(cv_mixt_ener,c2) = prhs(cv_mixt_ener,c2) - (flxconv(5) - flxdiss(5))
1643 DO ipatch = 1,pregion%grid%nPatches
1644 ppatch => pregion%patches(ipatch)
1696 TYPE(t_region
),
POINTER :: pregion
1702 INTEGER :: c1,c2,ifg,indgs,indmf,indsd,ipatch
1703 REAL(RFREAL) :: ah,cp,dissfact,dp,dq,dr,du,de,dv1,dv2,dv5,dw,efc, &
1704 epsentr,fs,
g,hh,hl,hr,irl,irr,l1,l2,l5,nm,nx,ny,nz,pl, &
1705 pr,qh,ql,qr,rl,rh,rr,sh,
term,tl,tr,t1,t2,t3,t5,ul,uh,ur,vl, &
1707 REAL(RFREAL) :: flxconv(5),flxdiss(5)
1708 REAL(RFREAL),
DIMENSION(:),
POINTER :: pmf
1709 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcv,pdv,pgv,prhs,psd
1711 TYPE(t_grid),
POINTER :: pgrid
1712 TYPE(t_patch),
POINTER :: ppatch
1718 global => pregion%global
1721 'RFLU_ModRoeFlux.F90')
1724 CALL fprofiler_begins(
"RFLU::ROE_ComputeFlux1_TCP")
1731 pgrid => pregion%grid
1733 indgs = pregion%grid%indGs
1734 indmf = pregion%mixtInput%indMfMixt
1735 indsd = pregion%mixtInput%indSd
1736 epsentr = pregion%mixtInput%epsentr
1737 dissfact = pregion%mixtInput%dissFact
1739 pcv => pregion%mixt%cv
1740 pdv => pregion%mixt%dv
1742 pmf => pregion%mixt%mfMixt
1743 prhs => pregion%mixt%rhs
1744 psd => pregion%mixt%sd
1757 DO ifg = 1,pgrid%nFaces
1758 c1 = pgrid%f2c(1,ifg)
1759 c2 = pgrid%f2c(2,ifg)
1765 nx = pgrid%fn(xcoord,ifg)
1766 ny = pgrid%fn(ycoord,ifg)
1767 nz = pgrid%fn(zcoord,ifg)
1768 nm = pgrid%fn(xyzmag,ifg)
1770 fs = pgrid%gs(indgs*ifg)
1780 rl = pcv(cv_mixt_dens,c1)
1783 ul = pcv(cv_mixt_xmom,c1)*irl
1784 vl = pcv(cv_mixt_ymom,c1)*irl
1785 wl = pcv(cv_mixt_zmom,c1)*irl
1786 pl = pdv(dv_mixt_pres,c1)
1787 tl = pdv(dv_mixt_temp,c1)
1791 ql = ul*nx + vl*ny + wl*nz - fs
1797 rr = pcv(cv_mixt_dens,c2)
1800 ur = pcv(cv_mixt_xmom,c2)*irr
1801 vr = pcv(cv_mixt_ymom,c2)*irr
1802 wr = pcv(cv_mixt_zmom,c2)*irr
1803 pr = pdv(dv_mixt_pres,c2)
1804 tr = pdv(dv_mixt_temp,c2)
1808 qr = ur*nx + vr*ny + wr*nz - fs
1817 uh = wt*ul + (1.0_rfreal-wt)*ur
1818 vh = wt*vl + (1.0_rfreal-wt)*vr
1819 wh = wt*wl + (1.0_rfreal-wt)*wr
1820 hh = wt*hl + (1.0_rfreal-wt)*hr
1822 qh = uh*nx + vh*ny + wh*nz - fs
1823 sh = 0.5_rfreal*(uh*uh + vh*vh + wh*wh)
1853 dq = du*nx + de*ny + dw*nz
1855 dv1 = (dp - rh*ah*dq)/(2.0_rfreal*ah*ah)
1856 dv5 = (dp + rh*ah*dq)/(2.0_rfreal*ah*ah)
1857 dv2 = dr - dp/(ah*ah)
1872 flxconv(1) = 0.5_rfreal*(ql*rl + qr*rr )*nm
1873 flxconv(2) = 0.5_rfreal*(ql*rl*ul + pl*nx + qr*rr*ur + pr*nx)*nm
1874 flxconv(3) = 0.5_rfreal*(ql*rl*vl + pl*ny + qr*rr*vr + pr*ny)*nm
1875 flxconv(4) = 0.5_rfreal*(ql*rl*wl + pl*nz + qr*rr*wr + pr*nz)*nm
1876 flxconv(5) = 0.5_rfreal*(ql*rl*hl + pl*fs + qr*rr*hr + pr*fs)*nm
1882 flxdiss(1) = 0.5_rfreal*dissfact*(t1 + t2 + t5 )*nm
1883 flxdiss(2) = 0.5_rfreal*dissfact*(t1*(uh-nx*ah) + t2*uh + t3*(du-nx*dq) + t5*(uh+nx*ah))*nm
1884 flxdiss(3) = 0.5_rfreal*dissfact*(t1*(vh-ny*ah) + t2*vh + t3*(de-ny*dq) + t5*(vh+ny*ah))*nm
1885 flxdiss(4) = 0.5_rfreal*dissfact*(t1*(wh-nz*ah) + t2*wh + t3*(dw-nz*dq) + t5*(wh+nz*ah))*nm
1886 flxdiss(5) = 0.5_rfreal*dissfact*(t1*(hh-qh*ah) + t2*sh + t3*(uh*du+vh*de+wh*dw-qh*dq) + t5*(hh+qh*ah))*nm
1892 pmf(indmf*ifg) = flxconv(1) - flxdiss(1)
1898 prhs(cv_mixt_dens,c1) = prhs(cv_mixt_dens,c1) + (flxconv(1) - flxdiss(1))
1899 prhs(cv_mixt_xmom,c1) = prhs(cv_mixt_xmom,c1) + (flxconv(2) - flxdiss(2))
1900 prhs(cv_mixt_ymom,c1) = prhs(cv_mixt_ymom,c1) + (flxconv(3) - flxdiss(3))
1901 prhs(cv_mixt_zmom,c1) = prhs(cv_mixt_zmom,c1) + (flxconv(4) - flxdiss(4))
1902 prhs(cv_mixt_ener,c1) = prhs(cv_mixt_ener,c1) + (flxconv(5) - flxdiss(5))
1904 prhs(cv_mixt_dens,c2) = prhs(cv_mixt_dens,c2) - (flxconv(1) - flxdiss(1))
1905 prhs(cv_mixt_xmom,c2) = prhs(cv_mixt_xmom,c2) - (flxconv(2) - flxdiss(2))
1906 prhs(cv_mixt_ymom,c2) = prhs(cv_mixt_ymom,c2) - (flxconv(3) - flxdiss(3))
1907 prhs(cv_mixt_zmom,c2) = prhs(cv_mixt_zmom,c2) - (flxconv(4) - flxdiss(4))
1908 prhs(cv_mixt_ener,c2) = prhs(cv_mixt_ener,c2) - (flxconv(5) - flxdiss(5))
1914 psd(sd_xmom,c1*indsd) = psd(sd_xmom,c1*indsd) + uh*pmf(indmf*ifg)
1915 psd(sd_ymom,c1*indsd) = psd(sd_ymom,c1*indsd) + vh*pmf(indmf*ifg)
1916 psd(sd_zmom,c1*indsd) = psd(sd_zmom,c1*indsd) + wh*pmf(indmf*ifg)
1918 psd(sd_xmom,c2*indsd) = psd(sd_xmom,c2*indsd) - uh*pmf(indmf*ifg)
1919 psd(sd_ymom,c2*indsd) = psd(sd_ymom,c2*indsd) - vh*pmf(indmf*ifg)
1920 psd(sd_zmom,c2*indsd) = psd(sd_zmom,c2*indsd) - wh*pmf(indmf*ifg)
1927 DO ipatch = 1,pregion%grid%nPatches
1928 ppatch => pregion%patches(ipatch)
1930 IF ( ppatch%bcKind == bc_kind_nscbc )
THEN
1942 CALL fprofiler_ends(
"RFLU::ROE_ComputeFlux1_TCP")
1996 TYPE(t_region
),
POINTER :: pregion
2002 INTEGER :: c1,c2,ifg,indgs,indmf,ipatch
2003 REAL(RFREAL) :: bgh2,bgl2,bgr2,blh2,bll2,blr2,bp,bt,bvh2,bvl2,bvr2,cmh, &
2004 cml,cmr,cvg,cvl,cvv,cgh2,cgl2,cgr2,clh2,cll2,clr2,cvh2, &
2005 cvl2,cvr2,cvm,dissfact,de,dp,dq,dr,dtemp,du,dv1,dv2,dv3, &
2006 dv4,dv5,dvfg,dvfv,dw,
dx,
dy,
dz,efc,egh,el,elh,epsentr,er, &
2007 evh,factor1,factor2,factor4,factor5,fdv1,fdv2,fdv3,fs, &
2008 fxn1,fxn2,fxn3,fxn4,fxn5,fxn6,invc2p,invc2pb,irl,irr,l1, &
2009 l2,l3,l4,l5,nm,nx,ny,nz,ph,pl,po,pr,qh,ql,qr,ra11,ra12x, &
2010 ra12y,ra12z,ra13,ra14,ra15,ra21,ra22x,ra22y,ra22z,ra23, &
2011 ra24,ra25,ra31,ra32x,ra32y,ra32z,ra33,ra34,ra35,ra41, &
2012 ra42x,ra42y,ra42z,ra43,ra44,ra45,ra51,ra52x,ra52y,ra52z, &
2013 ra53,ra54,ra55,rel,rer,rgh,rgl,rgr,rh,rl,rlh,rll,rlr,ro, &
2014 rr,rvh,rvl,rvr,rygl,rygr,ryvl,ryvr,rg,rv,sh,t1,t2,t3,t4, &
2015 t5,t6,th,tl,to,tr,uh,ul,ur,vfgh,vfgl,vfgr,vflh,vfll,vflr, &
2016 vfvh,vfvl,vfvr,vh,vl,vr,vl2,vr2,ygl,ygr,yll,ylr,yvl,yvr, &
2017 wh,wl,wr,wt,xc,yc,zc
2018 REAL(RFREAL) :: flxconv(5),flxdiss(5)
2019 REAL(RFREAL),
DIMENSION(:),
POINTER :: pmf
2020 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcvmixt,pcvspec,pdvmixt,prhs
2021 REAL(RFREAL),
DIMENSION(:,:,:),
POINTER :: pgradmixt,pgradspec
2023 TYPE(t_grid),
POINTER :: pgrid
2024 TYPE(t_patch),
POINTER :: ppatch
2030 global => pregion%global
2033 'RFLU_ModRoeFlux.F90')
2039 pgrid => pregion%grid
2041 indgs = pregion%grid%indGs
2042 indmf = pregion%mixtInput%indMfMixt
2043 epsentr = pregion%mixtInput%epsentr
2044 dissfact = pregion%mixtInput%dissFact
2046 pcvmixt => pregion%mixt%cv
2047 pdvmixt => pregion%mixt%dv
2048 pcvspec => pregion%spec%cv
2050 pgradmixt => pregion%mixt%gradCell
2051 pgradspec => pregion%spec%gradCell
2053 pmf => pregion%mixt%mfMixt
2054 prhs => pregion%mixt%rhs
2060 ro = global%refDensityLiq
2061 po = global%refPressLiq
2062 to = global%refTempLiq
2063 bp = global%refBetaPLiq
2064 bt = global%refBetaTLiq
2065 cvl = global%refCvLiq
2067 rg =
mixtperf_r_m(pregion%specInput%specType(1)%pMaterial%molw)
2068 cvg =
mixtperf_cv_cpr(pregion%specInput%specType(1)%pMaterial%spht,rg)
2070 rv =
mixtperf_r_m(pregion%specInput%specType(2)%pMaterial%molw)
2071 cvv =
mixtperf_cv_cpr(pregion%specInput%specType(2)%pMaterial%spht,rv)
2077 DO ifg = 1,pgrid%nFaces
2078 c1 = pgrid%f2c(1,ifg)
2079 c2 = pgrid%f2c(2,ifg)
2085 nx = pgrid%fn(xcoord,ifg)
2086 ny = pgrid%fn(ycoord,ifg)
2087 nz = pgrid%fn(zcoord,ifg)
2088 nm = pgrid%fn(xyzmag,ifg)
2090 xc = pgrid%fc(xcoord,ifg)
2091 yc = pgrid%fc(ycoord,ifg)
2092 zc = pgrid%fc(zcoord,ifg)
2094 fs = pgrid%gs(indgs*ifg)
2104 rl = pcvmixt(cv_mixt_dens,c1)
2107 ul = pcvmixt(cv_mixt_xmom,c1)*irl
2108 vl = pcvmixt(cv_mixt_ymom,c1)*irl
2109 wl = pcvmixt(cv_mixt_zmom,c1)*irl
2110 pl = pdvmixt(dv_mixt_pres,c1)
2111 tl = pdvmixt(dv_mixt_temp,c1)
2113 ygl = pcvspec(1,c1)*irl
2114 yvl = pcvspec(2,c1)*irl
2116 dx = xc - pgrid%cofg(xcoord,c1)
2117 dy = yc - pgrid%cofg(ycoord,c1)
2118 dz = zc - pgrid%cofg(zcoord,c1)
2120 pl = pl + pgradmixt(xcoord,grc_mixt_pres,c1)*
dx &
2121 + pgradmixt(ycoord,grc_mixt_pres,c1)*
dy &
2122 + pgradmixt(zcoord,grc_mixt_pres,c1)*
dz
2123 ul = ul + pgradmixt(xcoord,grc_mixt_xvel,c1)*
dx &
2124 + pgradmixt(ycoord,grc_mixt_xvel,c1)*
dy &
2125 + pgradmixt(zcoord,grc_mixt_xvel,c1)*
dz
2126 vl = vl + pgradmixt(xcoord,grc_mixt_yvel,c1)*
dx &
2127 + pgradmixt(ycoord,grc_mixt_yvel,c1)*
dy &
2128 + pgradmixt(zcoord,grc_mixt_yvel,c1)*
dz
2129 wl = wl + pgradmixt(xcoord,grc_mixt_zvel,c1)*
dx &
2130 + pgradmixt(ycoord,grc_mixt_zvel,c1)*
dy &
2131 + pgradmixt(zcoord,grc_mixt_zvel,c1)*
dz
2132 tl = tl + pgradmixt(xcoord,grc_mixt_temp,c1)*
dx &
2133 + pgradmixt(ycoord,grc_mixt_temp,c1)*
dy &
2134 + pgradmixt(zcoord,grc_mixt_temp,c1)*
dz
2136 ygl = ygl + pgradspec(xcoord,1,c1)*
dx &
2137 + pgradspec(ycoord,1,c1)*
dy &
2138 + pgradspec(zcoord,1,c1)*
dz
2139 yvl = yvl + pgradspec(xcoord,2,c1)*
dx &
2140 + pgradspec(ycoord,2,c1)*
dy &
2141 + pgradspec(zcoord,2,c1)*
dz
2143 yll = 1.0_rfreal - ygl - yvl
2145 vl2 = ul*ul + vl*vl + wl*wl
2146 ql = ul*nx + vl*ny + wl*nz - fs
2151 rl = 1.0_rfreal/(yll/rll + yvl/rvl + ygl/rgl)
2155 vfll = 1.0_rfreal - vfgl - vfvl
2157 rel = (rll*vfll*cvl + rgl*vfgl*cvg + rvl*vfvl*cvv)*tl + 0.5_rfreal*rl*vl2
2168 cvm = (rll*vfll*cvl + rvl*vfvl*cvv + rgl*vfgl*cvg)/rl
2170 cml =
mixtgasliq_c(cvm,rl,pl,rll,rvl,rgl,vfll,vfvl,vfgl,cll2,cvl2,cgl2, &
2177 rr = pcvmixt(cv_mixt_dens,c2)
2180 ur = pcvmixt(cv_mixt_xmom,c2)*irr
2181 vr = pcvmixt(cv_mixt_ymom,c2)*irr
2182 wr = pcvmixt(cv_mixt_zmom,c2)*irr
2183 pr = pdvmixt(dv_mixt_pres,c2)
2184 tr = pdvmixt(dv_mixt_temp,c2)
2186 ygr = pcvspec(1,c2)*irr
2187 yvr = pcvspec(2,c2)*irr
2189 dx = xc - pgrid%cofg(xcoord,c2)
2190 dy = yc - pgrid%cofg(ycoord,c2)
2191 dz = zc - pgrid%cofg(zcoord,c2)
2193 pr = pr + pgradmixt(xcoord,grc_mixt_pres,c2)*
dx &
2194 + pgradmixt(ycoord,grc_mixt_pres,c2)*
dy &
2195 + pgradmixt(zcoord,grc_mixt_pres,c2)*
dz
2196 ur = ur + pgradmixt(xcoord,grc_mixt_xvel,c2)*
dx &
2197 + pgradmixt(ycoord,grc_mixt_xvel,c2)*
dy &
2198 + pgradmixt(zcoord,grc_mixt_xvel,c2)*
dz
2199 vr = vr + pgradmixt(xcoord,grc_mixt_yvel,c2)*
dx &
2200 + pgradmixt(ycoord,grc_mixt_yvel,c2)*
dy &
2201 + pgradmixt(zcoord,grc_mixt_yvel,c2)*
dz
2202 wr = wr + pgradmixt(xcoord,grc_mixt_zvel,c2)*
dx &
2203 + pgradmixt(ycoord,grc_mixt_zvel,c2)*
dy &
2204 + pgradmixt(zcoord,grc_mixt_zvel,c2)*
dz
2205 tr = tr + pgradmixt(xcoord,grc_mixt_temp,c2)*
dx &
2206 + pgradmixt(ycoord,grc_mixt_temp,c2)*
dy &
2207 + pgradmixt(zcoord,grc_mixt_temp,c2)*
dz
2209 ygr = ygr + pgradspec(xcoord,1,c2)*
dx &
2210 + pgradspec(ycoord,1,c2)*
dy &
2211 + pgradspec(zcoord,1,c2)*
dz
2212 yvr = yvr + pgradspec(xcoord,2,c2)*
dx &
2213 + pgradspec(ycoord,2,c2)*
dy &
2214 + pgradspec(zcoord,2,c2)*
dz
2216 ylr = 1.0_rfreal - ygr - yvr
2218 vr2 = ur*ur + vr*vr + wr*wr
2219 qr = ur*nx + vr*ny + wr*nz - fs
2224 rr = 1.0_rfreal/(ylr/rlr + yvr/rvr + ygr/rgr)
2228 vflr = 1.0_rfreal - vfgr - vfvr
2230 rer = (rlr*vflr*cvl + rgr*vfgr*cvg + rvr*vfvr*cvv)*tr + 0.5_rfreal*rr*vr2
2241 cvm = (rlr*vflr*cvl + rvr*vfvr*cvv + rgr*vfgr*cvg)/rr
2243 cmr =
mixtgasliq_c(cvm,rr,pr,rlr,rvr,rgr,vflr,vfvr,vfgr,clr2,cvr2,cgr2, &
2252 uh = wt*ul + (1.0_rfreal-wt)*ur
2253 vh = wt*vl + (1.0_rfreal-wt)*vr
2254 wh = wt*wl + (1.0_rfreal-wt)*wr
2255 ph = wt*pl + (1.0_rfreal-wt)*pr
2256 th = wt*tl + (1.0_rfreal-wt)*tr
2258 vfgh = wt*vfgl + (1.0_rfreal-wt)*vfgr
2259 vfvh = wt*vfvl + (1.0_rfreal-wt)*vfvr
2260 vflh = 1.0_rfreal - vfvh - vfgh
2262 qh = uh*nx + vh*ny + wh*nz - fs
2263 sh = 0.5_rfreal*(uh*uh + vh*vh + wh*wh)
2281 cvm = (rlh*vflh*cvl + rvh*vfvh*cvv + rgh*vfgh*cvg)/rh
2283 cmh =
mixtgasliq_c(cvm,rh,ph,rlh,rvh,rgh,vflh,vfvh,vfgh,clh2,cvh2,cgh2, &
2315 dq = du*nx + de*ny + dw*nz
2321 fdv1 = ph/(rh*cmh*cmh*rh*cvm*th)
2322 fdv2 = (vfgh*(rgh*cgh2 - rh*cmh*cmh &
2323 + (bgh2*ph)/(rh*cvm)))/(rgh*cgh2*rh*cmh*cmh)
2324 fdv3 = (vfvh*(rvh*cvh2 - rh*cmh*cmh &
2325 + (bvh2*ph)/(rh*cvm)))/(rvh*cvh2*rh*cmh*cmh)
2327 dv1 = (dtemp/th) - (dp*fdv1)
2328 dv2 = dvfg - dp*fdv2
2329 dv3 = dvfv - dp*fdv3
2330 dv4 = -dq/cmh + dp/(rh*cmh*cmh)
2331 dv5 = dq/cmh + dp/(rh*cmh*cmh)
2333 invc2p = vflh/clh2 + vfgh/cgh2 + vfvh/cvh2
2334 invc2pb = (blh2*vflh)/clh2 + (bgh2*vfgh)/cgh2 &
2338 ra12x = -th*invc2pb*uh
2339 ra12y = -th*invc2pb*vh
2340 ra12z = -th*invc2pb*wh
2341 ra13 = rlh*vflh*cvl*th + bt*cvl*th*th*vflh - th*invc2pb*sh
2342 ra14 = -(bgh2*vfgh*th)/cgh2
2343 ra15 = -(bvh2*vfvh*th)/cvh2
2346 ra22x = (rgh - rlh)*uh
2347 ra22y = (rgh - rlh)*vh
2348 ra22z = (rgh - rlh)*wh
2349 ra23 = rgh*egh - rlh*elh
2354 ra32x = (rvh - rlh)*uh
2355 ra32y = (rvh - rlh)*vh
2356 ra32z = (rvh - rlh)*wh
2357 ra33 = rvh*evh - rlh*elh
2361 fxn1 = ((rgh - rlh)*vfgh*(rgh*cgh2 - rh*cmh*cmh &
2362 + (bgh2*ph)/(rh*cvm)))/(2.0_rfreal*rgh*cgh2)
2363 fxn2 = ((rvh - rlh)*vfvh*(rvh*cvh2 - rh*cmh*cmh &
2364 + (bvh2*ph)/(rh*cvm)))/(2.0_rfreal*rvh*cvh2)
2365 factor1 = 0.5_rfreal*rh*cmh*cmh*invc2p &
2366 - (ph*invc2pb)/(2.0_rfreal*rh*cvm) + fxn1 + fxn2
2368 fxn3 = 0.5_rfreal*rh*cmh*cmh*((elh*vflh)/clh2 &
2369 + (egh*vfgh)/cgh2 + (evh*vfvh)/cvh2)
2370 fxn4 = (ph*(rlh*vflh*cvl + bt*cvl*th*vflh &
2371 - (sh*invc2pb)))/(2.0_rfreal*rh*cvm)
2372 fxn5 = ((rgh*egh - rlh*elh)*vfgh*(rgh*cgh2 - rh*cmh*cmh &
2373 + (bgh2*ph)/(rh*cvm)))/(2.0_rfreal*rgh*cgh2)
2374 fxn6 = ((rvh*evh - rlh*elh)*vfvh*(rvh*cvh2 - rh*cmh*cmh &
2375 + (bvh2*ph)/(rh*cvm)))/(2.0_rfreal*rvh*cvh2)
2376 factor2 = fxn3 + fxn4 + fxn5 + fxn6
2378 factor4 = 0.5_rfreal*rgh*vfgh
2379 factor5 = 0.5_rfreal*rvh*vfvh
2382 ra42x = factor1*uh - 0.5_rfreal*rh*cmh*nx
2383 ra42y = factor1*vh - 0.5_rfreal*rh*cmh*ny
2384 ra42z = factor1*wh - 0.5_rfreal*rh*cmh*nz
2385 ra43 = factor2 - 0.5_rfreal*rh*cmh*qh
2390 ra52x = factor1*uh + 0.5_rfreal*rh*cmh*nx
2391 ra52y = factor1*vh + 0.5_rfreal*rh*cmh*ny
2392 ra52z = factor1*wh + 0.5_rfreal*rh*cmh*nz
2393 ra53 = factor2 + 0.5_rfreal*rh*cmh*qh
2412 flxconv(1) = 0.5_rfreal*(ql*rl + qr*rr )*nm
2413 flxconv(2) = 0.5_rfreal*(ql*rl*ul + pl*nx + qr*rr*ur + pr*nx)*nm
2414 flxconv(3) = 0.5_rfreal*(ql*rl*vl + pl*ny + qr*rr*vr + pr*ny)*nm
2415 flxconv(4) = 0.5_rfreal*(ql*rl*wl + pl*nz + qr*rr*wr + pr*nz)*nm
2416 flxconv(5) = 0.5_rfreal*(ql*(rl*el + pl) + pl*fs + qr*(rr*er + pr) &
2423 flxdiss(1) = 0.5_rfreal*dissfact*(ra11*t1 + ra21*t2 + ra31*t3 &
2424 + ra41*t4 + ra51*t5)*nm
2425 flxdiss(2) = 0.5_rfreal*dissfact*(ra12x*t1 + ra22x*t2 + ra32x*t3 &
2426 + ra42x*t4 + ra52x*t5 + t6*(du-nx*dq))*nm
2427 flxdiss(3) = 0.5_rfreal*dissfact*(ra12y*t1 + ra22y*t2 + ra32y*t3 &
2428 + ra42y*t4 + ra52y*t5 + t6*(de-ny*dq))*nm
2429 flxdiss(4) = 0.5_rfreal*dissfact*(ra12z*t1 + ra22z*t2 + ra32z*t3 &
2430 + ra42z*t4 + ra52z*t5 + t6*(dw-nz*dq))*nm
2431 flxdiss(5) = 0.5_rfreal*dissfact*(ra13*t1 + ra23*t2 + ra33*t3 &
2432 + ra43*t4 + ra53*t5 &
2433 + t6*(uh*du+vh*de+wh*dw-qh*dq))*nm
2439 pmf(indmf*ifg) = flxconv(1) - flxdiss(1)
2445 prhs(cv_mixt_dens,c1) = prhs(cv_mixt_dens,c1) + (flxconv(1) - flxdiss(1))
2446 prhs(cv_mixt_xmom,c1) = prhs(cv_mixt_xmom,c1) + (flxconv(2) - flxdiss(2))
2447 prhs(cv_mixt_ymom,c1) = prhs(cv_mixt_ymom,c1) + (flxconv(3) - flxdiss(3))
2448 prhs(cv_mixt_zmom,c1) = prhs(cv_mixt_zmom,c1) + (flxconv(4) - flxdiss(4))
2449 prhs(cv_mixt_ener,c1) = prhs(cv_mixt_ener,c1) + (flxconv(5) - flxdiss(5))
2451 prhs(cv_mixt_dens,c2) = prhs(cv_mixt_dens,c2) - (flxconv(1) - flxdiss(1))
2452 prhs(cv_mixt_xmom,c2) = prhs(cv_mixt_xmom,c2) - (flxconv(2) - flxdiss(2))
2453 prhs(cv_mixt_ymom,c2) = prhs(cv_mixt_ymom,c2) - (flxconv(3) - flxdiss(3))
2454 prhs(cv_mixt_zmom,c2) = prhs(cv_mixt_zmom,c2) - (flxconv(4) - flxdiss(4))
2455 prhs(cv_mixt_ener,c2) = prhs(cv_mixt_ener,c2) - (flxconv(5) - flxdiss(5))
2462 DO ipatch = 1,pregion%grid%nPatches
2463 ppatch => pregion%patches(ipatch)
2465 IF ( ppatch%bcKind == bc_kind_nscbc )
THEN
2466 SELECT CASE ( ppatch%spaceOrder )
2472 CALL
errorstop(global,err_reached_default,__line__)
2475 SELECT CASE ( ppatch%spaceOrder )
2481 CALL
errorstop(global,err_reached_default,__line__)
2538 TYPE(t_region
),
POINTER :: pregion
2544 INTEGER :: c1,c2,ifg,indgs,indmf,indsd,ipatch
2545 REAL(RFREAL) :: ah,cp,de,dissfact,dp,dq,dr,du,dv1,dv2,dv5,dw,
dx,
dy,
dz, &
2546 efc,epsentr,fs,
g,gc,hh,hl,hr,irl,irr,l1,l2,l5,nm,nx,ny,nz, &
2547 pl,pr,qh,ql,qr,rl,rh,rr,sh,
term,tl,tr,t1,t2,t3,t5,ul, &
2548 uh,ur,vl,vh,vr,wl,wh,wr,wt,xc,yc,zc
2549 REAL(RFREAL) :: flxconv(5),flxdiss(5)
2550 REAL(RFREAL),
DIMENSION(:),
POINTER :: pmf
2551 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcv,pdv,prhs,psd
2552 REAL(RFREAL),
DIMENSION(:,:,:),
POINTER :: pgc
2554 TYPE(t_grid),
POINTER :: pgrid
2555 TYPE(t_patch),
POINTER :: ppatch
2561 global => pregion%global
2564 'RFLU_ModRoeFlux.F90')
2567 CALL fprofiler_begins(
"RFLU::ROE_ComputeFlux2_TCP")
2574 pgrid => pregion%grid
2576 indgs = pregion%grid%indGs
2577 indmf = pregion%mixtInput%indMfMixt
2578 indsd = pregion%mixtInput%indSd
2579 epsentr = pregion%mixtInput%epsentr
2580 dissfact = pregion%mixtInput%dissFact
2582 pcv => pregion%mixt%cv
2583 pdv => pregion%mixt%dv
2585 pgc => pregion%mixt%gradCell
2586 pmf => pregion%mixt%mfMixt
2587 prhs => pregion%mixt%rhs
2588 psd => pregion%mixt%sd
2602 DO ifg = 1,pgrid%nFaces
2603 c1 = pgrid%f2c(1,ifg)
2604 c2 = pgrid%f2c(2,ifg)
2610 nx = pgrid%fn(xcoord,ifg)
2611 ny = pgrid%fn(ycoord,ifg)
2612 nz = pgrid%fn(zcoord,ifg)
2613 nm = pgrid%fn(xyzmag,ifg)
2615 xc = pgrid%fc(xcoord,ifg)
2616 yc = pgrid%fc(ycoord,ifg)
2617 zc = pgrid%fc(zcoord,ifg)
2619 fs = pgrid%gs(indgs*ifg)
2629 rl = pcv(cv_mixt_dens,c1)
2632 ul = pcv(cv_mixt_xmom,c1)*irl
2633 vl = pcv(cv_mixt_ymom,c1)*irl
2634 wl = pcv(cv_mixt_zmom,c1)*irl
2635 pl = pdv(dv_mixt_pres,c1)
2637 dx = xc - pgrid%cofg(xcoord,c1)
2638 dy = yc - pgrid%cofg(ycoord,c1)
2639 dz = zc - pgrid%cofg(zcoord,c1)
2641 rl = rl + pgc(xcoord,grc_mixt_dens,c1)*
dx &
2642 + pgc(ycoord,grc_mixt_dens,c1)*
dy &
2643 + pgc(zcoord,grc_mixt_dens,c1)*
dz
2644 ul = ul + pgc(xcoord,grc_mixt_xvel,c1)*
dx &
2645 + pgc(ycoord,grc_mixt_xvel,c1)*
dy &
2646 + pgc(zcoord,grc_mixt_xvel,c1)*
dz
2647 vl = vl + pgc(xcoord,grc_mixt_yvel,c1)*
dx &
2648 + pgc(ycoord,grc_mixt_yvel,c1)*
dy &
2649 + pgc(zcoord,grc_mixt_yvel,c1)*
dz
2650 wl = wl + pgc(xcoord,grc_mixt_zvel,c1)*
dx &
2651 + pgc(ycoord,grc_mixt_zvel,c1)*
dy &
2652 + pgc(zcoord,grc_mixt_zvel,c1)*
dz
2653 pl = pl + pgc(xcoord,grc_mixt_pres,c1)*
dx &
2654 + pgc(ycoord,grc_mixt_pres,c1)*
dy &
2655 + pgc(zcoord,grc_mixt_pres,c1)*
dz
2660 ql = ul*nx + vl*ny + wl*nz - fs
2666 rr = pcv(cv_mixt_dens,c2)
2669 ur = pcv(cv_mixt_xmom,c2)*irr
2670 vr = pcv(cv_mixt_ymom,c2)*irr
2671 wr = pcv(cv_mixt_zmom,c2)*irr
2672 pr = pdv(dv_mixt_pres,c2)
2674 dx = xc - pgrid%cofg(xcoord,c2)
2675 dy = yc - pgrid%cofg(ycoord,c2)
2676 dz = zc - pgrid%cofg(zcoord,c2)
2678 rr = rr + pgc(xcoord,grc_mixt_dens,c2)*
dx &
2679 + pgc(ycoord,grc_mixt_dens,c2)*
dy &
2680 + pgc(zcoord,grc_mixt_dens,c2)*
dz
2681 ur = ur + pgc(xcoord,grc_mixt_xvel,c2)*
dx &
2682 + pgc(ycoord,grc_mixt_xvel,c2)*
dy &
2683 + pgc(zcoord,grc_mixt_xvel,c2)*
dz
2684 vr = vr + pgc(xcoord,grc_mixt_yvel,c2)*
dx &
2685 + pgc(ycoord,grc_mixt_yvel,c2)*
dy &
2686 + pgc(zcoord,grc_mixt_yvel,c2)*
dz
2687 wr = wr + pgc(xcoord,grc_mixt_zvel,c2)*
dx &
2688 + pgc(ycoord,grc_mixt_zvel,c2)*
dy &
2689 + pgc(zcoord,grc_mixt_zvel,c2)*
dz
2690 pr = pr + pgc(xcoord,grc_mixt_pres,c2)*
dx &
2691 + pgc(ycoord,grc_mixt_pres,c2)*
dy &
2692 + pgc(zcoord,grc_mixt_pres,c2)*
dz
2697 qr = ur*nx + vr*ny + wr*nz - fs
2706 uh = wt*ul + (1.0_rfreal-wt)*ur
2707 vh = wt*vl + (1.0_rfreal-wt)*vr
2708 wh = wt*wl + (1.0_rfreal-wt)*wr
2709 hh = wt*hl + (1.0_rfreal-wt)*hr
2711 qh = uh*nx + vh*ny + wh*nz - fs
2712 sh = 0.5_rfreal*(uh*uh + vh*vh + wh*wh)
2742 dq = du*nx + de*ny + dw*nz
2744 dv1 = (dp - rh*ah*dq)/(2.0_rfreal*ah*ah)
2745 dv5 = (dp + rh*ah*dq)/(2.0_rfreal*ah*ah)
2746 dv2 = dr - dp/(ah*ah)
2761 flxconv(1) = 0.5_rfreal*(ql*rl + qr*rr )*nm
2762 flxconv(2) = 0.5_rfreal*(ql*rl*ul + pl*nx + qr*rr*ur + pr*nx)*nm
2763 flxconv(3) = 0.5_rfreal*(ql*rl*vl + pl*ny + qr*rr*vr + pr*ny)*nm
2764 flxconv(4) = 0.5_rfreal*(ql*rl*wl + pl*nz + qr*rr*wr + pr*nz)*nm
2765 flxconv(5) = 0.5_rfreal*(ql*rl*hl + pl*fs + qr*rr*hr + pr*fs)*nm
2771 flxdiss(1) = 0.5_rfreal*dissfact*(t1 + t2 + t5 )*nm
2772 flxdiss(2) = 0.5_rfreal*dissfact*(t1*(uh-nx*ah) + t2*uh + t3*(du-nx*dq) + t5*(uh+nx*ah))*nm
2773 flxdiss(3) = 0.5_rfreal*dissfact*(t1*(vh-ny*ah) + t2*vh + t3*(de-ny*dq) + t5*(vh+ny*ah))*nm
2774 flxdiss(4) = 0.5_rfreal*dissfact*(t1*(wh-nz*ah) + t2*wh + t3*(dw-nz*dq) + t5*(wh+nz*ah))*nm
2775 flxdiss(5) = 0.5_rfreal*dissfact*(t1*(hh-qh*ah) + t2*sh + t3*(uh*du+vh*de+wh*dw-qh*dq) + t5*(hh+qh*ah))*nm
2781 pmf(indmf*ifg) = flxconv(1) - flxdiss(1)
2787 prhs(cv_mixt_dens,c1) = prhs(cv_mixt_dens,c1) + (flxconv(1) - flxdiss(1))
2788 prhs(cv_mixt_xmom,c1) = prhs(cv_mixt_xmom,c1) + (flxconv(2) - flxdiss(2))
2789 prhs(cv_mixt_ymom,c1) = prhs(cv_mixt_ymom,c1) + (flxconv(3) - flxdiss(3))
2790 prhs(cv_mixt_zmom,c1) = prhs(cv_mixt_zmom,c1) + (flxconv(4) - flxdiss(4))
2791 prhs(cv_mixt_ener,c1) = prhs(cv_mixt_ener,c1) + (flxconv(5) - flxdiss(5))
2793 prhs(cv_mixt_dens,c2) = prhs(cv_mixt_dens,c2) - (flxconv(1) - flxdiss(1))
2794 prhs(cv_mixt_xmom,c2) = prhs(cv_mixt_xmom,c2) - (flxconv(2) - flxdiss(2))
2795 prhs(cv_mixt_ymom,c2) = prhs(cv_mixt_ymom,c2) - (flxconv(3) - flxdiss(3))
2796 prhs(cv_mixt_zmom,c2) = prhs(cv_mixt_zmom,c2) - (flxconv(4) - flxdiss(4))
2797 prhs(cv_mixt_ener,c2) = prhs(cv_mixt_ener,c2) - (flxconv(5) - flxdiss(5))
2803 psd(sd_xmom,c1*indsd) = psd(sd_xmom,c1*indsd) + uh*pmf(indmf*ifg)
2804 psd(sd_ymom,c1*indsd) = psd(sd_ymom,c1*indsd) + vh*pmf(indmf*ifg)
2805 psd(sd_zmom,c1*indsd) = psd(sd_zmom,c1*indsd) + wh*pmf(indmf*ifg)
2807 psd(sd_xmom,c2*indsd) = psd(sd_xmom,c2*indsd) - uh*pmf(indmf*ifg)
2808 psd(sd_ymom,c2*indsd) = psd(sd_ymom,c2*indsd) - vh*pmf(indmf*ifg)
2809 psd(sd_zmom,c2*indsd) = psd(sd_zmom,c2*indsd) - wh*pmf(indmf*ifg)
2816 DO ipatch = 1,pregion%grid%nPatches
2817 ppatch => pregion%patches(ipatch)
2819 IF ( ppatch%bcKind == bc_kind_nscbc )
THEN
2820 SELECT CASE ( ppatch%spaceOrder )
2826 CALL
errorstop(global,err_reached_default,__line__)
2829 SELECT CASE ( ppatch%spaceOrder )
2835 CALL
errorstop(global,err_reached_default,__line__)
2845 CALL fprofiler_ends(
"RFLU::ROE_ComputeFlux2_TCP")
subroutine, public rflu_roe_computeflux2_gl(pRegion)
subroutine rflu_centralsecondpatch(pRegion, pPatch)
real(rfreal) function mixtperf_r_m(M)
subroutine registerfunction(global, funName, fileName)
real(rfreal) function mixtperf_d_prt(P, R, T)
subroutine, public rflu_roe_computeflux(pRegion, fluxPart)
real(rfreal) function mixtperf_c_ghovm2(G, Ho, Vm2)
real(rfreal) function mixtperf_r_cpg(Cp, G)
real(rfreal) function, public entropyfixhartenhyman(l, d)
subroutine rflu_centralsecondpatch_gl(pRegion, pPatch)
subroutine rflu_centralfirstpatch_gl(pRegion, pPatch)
real(rfreal) function mixtperf_c2_grt(G, R, T)
real(rfreal) function mixtperf_ho_cptuvw(Cp, T, U, V, W)
real(rfreal) function mixtliq_c2_bp(Bp)
subroutine, public rflu_roe_computefluxc1(pRegion)
real(rfreal) function mixtperf_t_dpr(D, P, R)
subroutine, public rflu_nscbc_compsecondpatchflux(pRegion, pPatch)
subroutine, public rflu_roe_computeflux2_tcp(pRegion)
real(rfreal) function mixtliq_d_dobpppobttto(Dz, Bp, Bt, P, Po, T, To)
real(rfreal) function mixtgasliq_c(Cvm, D, P, Dl, Dv, Dg, VFl, VFv, VFg, Cl2, Cv2, Cg2, Bl2, Bv2, Bg2)
subroutine, public rflu_roe_computeflux1_gl(pRegion)
real(rfreal) function mixtperf_eo_dgpuvw(D, G, P, U, V, W)
subroutine rflu_centralfirstpatch(pRegion, pPatch)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine, public rflu_roe_computefluxd1_tcp(pRegion)
subroutine deregisterfunction(global)
subroutine, public rflu_nscbc_compfirstpatchflux(pRegion, pPatch)
real(rfreal) function mixtperf_cv_cpr(Cp, R)
subroutine, public rflu_roe_computefluxd2_tcp(pRegion)
subroutine, public rflu_roe_computeflux1_tcp(pRegion)
subroutine, public rflu_roe_computefluxc2_tcp(pRegion)