58 TYPE(t_region
) :: region
61 INTEGER ::
i,ifc,ifcp,ipatch,
j,
k
64 CHARACTER(CHRLEN) :: rcsidentstring
66 INTEGER :: c1,c2,ic1l,ic1g,ic2l,ic2g,ncells,netmassfluxcntr
67 INTEGER,
DIMENSION(:),
POINTER :: f2fp
68 INTEGER,
DIMENSION(:,:),
POINTER :: fs,f2c
69 REAL(RFREAL) :: el,er,irl,irr,netmassflux,nm,nx,ny,nz,ql,qr,rl,rm,rr,vcont, &
70 ul,ur,vl,vr,wl,wr,pl,pr
71 REAL(RFREAL) :: fc(5),fl(3),fq(3),v1(3),v2(3)
72 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: cv,dv,
rhs,fn
73 REAL(RFREAL),
DIMENSION(:,:,:,:),
POINTER :: wtl
74 REAL(RFREAL),
DIMENSION(:,:,:,:,:,:),
POINTER :: wtq
79 rcsidentstring =
'$RCSfile: RFLU_ConvFluxOLES.F90,v $ $Revision: 1.7 $'
81 global => region%global
84 'RFLU_ConvFluxOLES.F90')
90 rhs => region%mixt%rhs
92 f2c => region%grid%f2c
95 fs => region%grid%fsOLES
96 f2fp => region%grid%f2fpOLES
97 wtl => region%grid%wtLinOLES
98 wtq => region%grid%wtQuadOLES
101 netmassflux = 0.0_rfreal
108 DO ifc = 1,region%grid%nFaces
119 rl = cv(cv_mixt_dens,c1)
122 ul = cv(cv_mixt_xmom,c1)*irl
123 vl = cv(cv_mixt_ymom,c1)*irl
124 wl = cv(cv_mixt_zmom,c1)*irl
125 el = cv(cv_mixt_ener,c1)*irl
126 pl = dv(dv_mixt_pres,c1)
128 ql = ul*nx + vl*ny + wl*nz
130 rr = cv(cv_mixt_dens,c2)
133 rm = 0.5_rfreal*(rl + rr)
135 ur = cv(cv_mixt_xmom,c2)*irr
136 vr = cv(cv_mixt_ymom,c2)*irr
137 wr = cv(cv_mixt_zmom,c2)*irr
138 er = cv(cv_mixt_ener,c2)*irr
139 pr = dv(dv_mixt_pres,c2)
141 qr = ur*nx + vr*ny + wr*nz
145 fc(1) = 0.5_rfreal*(ql* rl + qr* rr )*nm
146 fc(5) = 0.5_rfreal*(ql*(rl*el + pl) + qr*(rr*er + pr))*nm
157 v1(1:3) = cv(cv_mixt_xmom:cv_mixt_zmom,ic1g)/cv(cv_mixt_dens,ic1g)
160 fl(
i) = fl(
i) + wtl(
i,
j,ic1l,ifcp)*v1(
j)
165 v2(1:3) = cv(cv_mixt_xmom:cv_mixt_zmom,ic2g)/cv(cv_mixt_dens,ic2g)
169 fq(
i) = fq(
i) + wtq(
i,
j,
k,ic1l,ic2l,ifcp)*v1(
j)*v2(
k)
177 fq(
i) = rm*fq(
i)*nm*
sign(1.0_rfreal,fn(ifcp,ifc))
179 fc(
i+1) = fl(
i) + fq(
i)
184 fc(2) = fc(2) + 0.5_rfreal*(pl + pr)*nx*nm
185 fc(3) = fc(3) + 0.5_rfreal*(pl + pr)*ny*nm
186 fc(4) = fc(4) + 0.5_rfreal*(pl + pr)*nz*nm
190 rhs(cv_mixt_dens,c1) =
rhs(cv_mixt_dens,c1) + fc(1)
191 rhs(cv_mixt_xmom,c1) =
rhs(cv_mixt_xmom,c1) + fc(2)
192 rhs(cv_mixt_ymom,c1) =
rhs(cv_mixt_ymom,c1) + fc(3)
193 rhs(cv_mixt_zmom,c1) =
rhs(cv_mixt_zmom,c1) + fc(4)
194 rhs(cv_mixt_ener,c1) =
rhs(cv_mixt_ener,c1) + fc(5)
196 rhs(cv_mixt_dens,c2) =
rhs(cv_mixt_dens,c2) - fc(1)
197 rhs(cv_mixt_xmom,c2) =
rhs(cv_mixt_xmom,c2) - fc(2)
198 rhs(cv_mixt_ymom,c2) =
rhs(cv_mixt_ymom,c2) - fc(3)
199 rhs(cv_mixt_zmom,c2) =
rhs(cv_mixt_zmom,c2) - fc(4)
200 rhs(cv_mixt_ener,c2) =
rhs(cv_mixt_ener,c2) - fc(5)
204 IF (
max(c1,c2) > region%grid%nCells )
THEN
205 netmassfluxcntr = netmassfluxcntr + 1
206 netmassflux = netmassflux + fc(1)
static SURF_BEGIN_NAMESPACE double sign(double x)
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
subroutine registerfunction(global, funName, fileName)
subroutine rflu_convfluxoles(region)
subroutine deregisterfunction(global)