76 TYPE(t_region
),
POINTER :: pregion
82 CHARACTER(CHRLEN) :: rcsidentstring
83 INTEGER :: c1,c2,distrib,gasmodel,icg,ifg,ifl,indcp,indgs,indmol,ipatch
84 INTEGER :: dtminloc(1)
85 REAL(RFREAL) :: as,a1,a2,cp,dtmin,dtscale,dummyrealout,fs,fsu,gam,hl,ir1, &
86 ir2,minj,mm,nm,nx,ny,nz,pl,pr,rgas,rl,rr,rur,rvr,rwr,srad, &
87 tinj,uinj,ul,u1,u2,vc,vinj,vl,vm2,v1,v2,winj,wl,w1,w2
88 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcv,pdv,pgv,pvals
90 TYPE(t_grid),
POINTER :: pgrid
91 TYPE(t_patch),
POINTER :: ppatch
97 rcsidentstring =
'$RCSfile: RFLU_TimeStepInviscid.F90,v $ $Revision: 1.23 $'
99 global => pregion%global
102 'RFLU_TimeStepInviscid.F90')
108 pgrid => pregion%grid
110 indcp = pregion%mixtInput%indCp
111 indmol = pregion%mixtInput%indMol
112 gasmodel = pregion%mixtInput%gasModel
114 pcv => pregion%mixt%cv
115 pdv => pregion%mixt%dv
116 pgv => pregion%mixt%gv
124 DO icg = 1,pgrid%nCellsTot
125 pregion%dt(icg) = 0.0_rfreal
136 DO ifg = 1,pregion%grid%nFaces
138 c1 = pgrid%f2c(1,ifg)
139 c2 = pgrid%f2c(2,ifg)
141 nx = pgrid%fn(xcoord,ifg)
142 ny = pgrid%fn(ycoord,ifg)
143 nz = pgrid%fn(zcoord,ifg)
144 nm = pgrid%fn(xyzmag,ifg)
146 fs = pgrid%gs(indgs*ifg)
149 ir1 = 1.0_rfreal/pcv(cv_mixt_dens,c1)
150 ir2 = 1.0_rfreal/pcv(cv_mixt_dens,c2)
152 u1 = pcv(cv_mixt_xmom,c1)*ir1
153 v1 = pcv(cv_mixt_ymom,c1)*ir1
154 w1 = pcv(cv_mixt_zmom,c1)*ir1
155 a1 = pdv(dv_mixt_soun,c1)
157 u2 = pcv(cv_mixt_xmom,c2)*ir2
158 v2 = pcv(cv_mixt_ymom,c2)*ir2
159 w2 = pcv(cv_mixt_zmom,c2)*ir2
160 a2 = pdv(dv_mixt_soun,c2)
162 vc = 0.5_rfreal*((u1+u2)*nx + (v1+v2)*ny + (w1+w2)*nz)
163 as = 0.5_rfreal*(a1+a2)
165 srad = (abs(vc - fsu) + as)*nm
167 pregion%dt(c1) = pregion%dt(c1) + srad
168 pregion%dt(c2) = pregion%dt(c2) + srad
175 DO ipatch = 1,pgrid%nPatches
177 ppatch => pregion%patches(ipatch)
179 SELECT CASE ( ppatch%bcType )
185 CASE ( bc_injection:bc_injection+bc_range )
186 pvals => ppatch%mixt%vals
188 distrib = ppatch%mixt%distrib
190 DO ifl = 1,ppatch%nBFaces
191 c1 = ppatch%bf2c(ifl)
193 nx = ppatch%fn(xcoord,ifl)
194 ny = ppatch%fn(ycoord,ifl)
195 nz = ppatch%fn(zcoord,ifl)
196 nm = ppatch%fn(xyzmag,ifl)
198 fs = ppatch%gs(indgs*ifl)
201 pl = pdv(dv_mixt_pres,c1)
203 minj = pvals(bcdat_inject_mfrate,distrib*ifl)
205 IF ( minj > 0.0_rfreal )
THEN
206 tinj = pvals(bcdat_inject_temp,distrib*ifl)
208 IF ( gasmodel == gas_model_tcperf )
THEN
209 cp = pgv(gv_mixt_cp ,indcp *c1)
210 mm = pgv(gv_mixt_mol,indmol*c1)
215 vc = ul*nx + vl*ny + wl*nz
220 CALL
errorstop(global,err_reached_default,__line__)
224 a1 = pdv(dv_mixt_soun,c1)
227 pregion%dt(c1) = pregion%dt(c1) + (abs(vc - fsu) + a1)*nm
235 DO ifl = 1,ppatch%nBFaces
236 c1 = ppatch%bf2c(ifl)
238 nx = ppatch%fn(xcoord,ifl)
239 ny = ppatch%fn(ycoord,ifl)
240 nz = ppatch%fn(zcoord,ifl)
241 nm = ppatch%fn(xyzmag,ifl)
243 fs = ppatch%gs(indgs*ifl)
246 ir1 = 1.0_rfreal/pcv(cv_mixt_dens,c1)
248 u1 = pcv(cv_mixt_xmom,c1)*ir1
249 v1 = pcv(cv_mixt_ymom,c1)*ir1
250 w1 = pcv(cv_mixt_zmom,c1)*ir1
251 a1 = pdv(dv_mixt_soun,c1)
253 vc = u1*nx + v1*ny + w1*nz
255 pregion%dt(c1) = pregion%dt(c1) + (abs(vc - fsu) + a1)*nm
266 DO icg = 1,pgrid%nCells
267 pregion%dt(icg) = pgrid%vol(icg)/pregion%dt(icg)
270 DO icg = pgrid%nCells+1,pgrid%nCellsTot
271 pregion%dt(icg) =
REAL(ABS(CRAZY_VALUE_INT),kind=rfreal)
278 IF ( global%solverType == solv_implicit_nk )
THEN
283 DO icg = 1,pgrid%nCells
284 pregion%dt(icg) = dtscale*pregion%dt(icg)
292 IF ( global%flowType == flow_unsteady )
THEN
293 dtmin = minval(pregion%dt(1:pgrid%nCells))
294 dtminloc = minloc(pregion%dt(1:pgrid%nCells))
296 pregion%dtMin = dtmin
297 pregion%dtMinLoc = dtminloc(1)
subroutine, public rflu_setrindstateinjectperf(cpGas, mmGas, nx, ny, nz, mInj, tInj, pl, fs, rl, ul, vl, wl, Hl)
real(rfreal) function mixtperf_r_m(M)
subroutine rflu_timestepinviscid(pRegion)
subroutine registerfunction(global, funName, fileName)
real(rfreal) function, public rflu_descalegridspeed(pRegion, fs)
subroutine, public rflu_petsc_getdtscale(global, dtscale)
real(rfreal) function mixtperf_c_grt(G, R, T)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)
real(rfreal) function mixtperf_g_cpr(Cp, R)