71 TYPE(t_region
),
TARGET :: region
77 CHARACTER(CHRLEN) :: rcsidentstring
78 INTEGER :: c1,distrib,gasmodel,ifl,indcp,indgs,indmol,ipatch,iv,ivg
79 REAL(RFREAL) :: chref,cp,dummyreal,fs,fsu,minj,mm,nx,ny,nz,pl,rl,rref,rul, &
81 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcv,pdv,pgv,pmixtvals
83 TYPE(t_grid),
POINTER :: pgrid
84 TYPE(t_patch),
POINTER :: ppatch
85 TYPE(t_region
),
POINTER :: pregion
91 rcsidentstring =
'$RCSfile: RFLU_PutBoundaryValues.F90,v $ $Revision: 1.21 $'
93 global => region%global
96 'RFLU_PutBoundaryValues.F90')
103 pgrid => pregion%grid
104 pcv => pregion%mixt%cv
105 pdv => pregion%mixt%dv
106 pgv => pregion%mixt%gv
108 indgs = region%grid%indGs
109 indcp = region%mixtInput%indCp
110 indmol = region%mixtInput%indMol
111 gasmodel = region%mixtInput%gasModel
113 rref = global%refDensity
114 vref = global%refVelocity
116 chref = 0.5_rfreal*(rref*vref*vref*vref)
122 IF ( global%myProcid == masterproc .AND. &
123 global%verbLevel >= verbose_high )
THEN
124 WRITE(stdout,
'(A,1X,A,1X,I3)') solver_name, &
125 'Putting values into GENX buffers...'
128 DO ipatch=1,pgrid%nPatches
129 ppatch => region%patches(ipatch)
131 distrib = ppatch%mixt%distrib
133 IF ( global%myProcid == masterproc .AND. &
134 global%checkLevel == check_high .AND. &
135 global%verbLevel >= verbose_high )
THEN
136 IF ( ppatch%bcCoupled == bc_not_coupled )
THEN
137 WRITE(stdout,
'(A,3X,A,1X,I3,1X,A)') solver_name,
'Patch:',ipatch, &
139 ELSE IF ( ppatch%bcCoupled == bc_not_burning )
THEN
140 WRITE(stdout,
'(A,3X,A,1X,I3,1X,A)') solver_name,
'Patch:',ipatch, &
142 ELSE IF ( ppatch%bcCoupled == bc_burning )
THEN
143 WRITE(stdout,
'(A,3X,A,1X,I3,1X,A)') solver_name,
'Patch:',ipatch, &
144 '(interacting and burning)'
152 DO iv = 1,ppatch%nBVert
155 ppatch%xyz(xcoord,iv) = pgrid%xyz(xcoord,ivg)
156 ppatch%xyz(ycoord,iv) = pgrid%xyz(ycoord,ivg)
157 ppatch%xyz(zcoord,iv) = pgrid%xyz(zcoord,ivg)
160 DO iv = ppatch%nBVert+1,ppatch%nBVertTot
161 ppatch%xyz(xcoord,iv) =
REAL(crazy_value_int,kind=rfreal)
162 ppatch%xyz(ycoord,iv) =
REAL(crazy_value_int,kind=rfreal)
163 ppatch%xyz(zcoord,iv) =
REAL(crazy_value_int,kind=rfreal)
166 IF ( global%myProcid == masterproc .AND. &
167 global%checkLevel == check_high .AND. &
168 global%verbLevel >= verbose_high )
THEN
169 IF ( ppatch%nBVert > 0 )
THEN
170 WRITE(stdout,
'(A,5X,A)') solver_name,
'Minimum/maximum values:'
171 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'xyz.x: ', &
172 minval(ppatch%xyz(xcoord,1:ppatch%nBVert)), &
173 maxval(ppatch%xyz(xcoord,1:ppatch%nBVert))
174 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'xyz.y: ', &
175 minval(ppatch%xyz(ycoord,1:ppatch%nBVert)), &
176 maxval(ppatch%xyz(ycoord,1:ppatch%nBVert))
177 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'xyz.z: ', &
178 minval(ppatch%xyz(zcoord,1:ppatch%nBVert)), &
179 maxval(ppatch%xyz(zcoord,1:ppatch%nBVert))
191 IF ( ppatch%bcCoupled == bc_not_burning )
THEN
192 DO ifl = 1,ppatch%nBFaces
193 c1 = ppatch%bf2c(ifl)
195 ppatch%rhofAlp(ifl) = pcv(cv_mixt_dens,c1)
196 ppatch%pf(ifl) = pdv(dv_mixt_pres,c1)
198 ppatch%qc(ifl) = chref*ppatch%ch(ifl)
199 ppatch%qr(ifl) = 0.0_rfreal
201 ppatch%nfAlp(xcoord,ifl) = ppatch%fn(xcoord,ifl)
202 ppatch%nfAlp(ycoord,ifl) = ppatch%fn(ycoord,ifl)
203 ppatch%nfAlp(zcoord,ifl) = ppatch%fn(zcoord,ifl)
205 ppatch%tracf(xcoord,ifl) = ppatch%pf(ifl)*ppatch%nfAlp(xcoord,ifl)
206 ppatch%tracf(ycoord,ifl) = ppatch%pf(ifl)*ppatch%nfAlp(ycoord,ifl)
207 ppatch%tracf(zcoord,ifl) = ppatch%pf(ifl)*ppatch%nfAlp(zcoord,ifl)
210 DO ifl = ppatch%nBFaces+1,ppatch%nBFacesTot
211 ppatch%rhofAlp(ifl) =
REAL(crazy_value_int,kind=rfreal)
212 ppatch%pf(ifl) =
REAL(crazy_value_int,kind=rfreal)
214 ppatch%qc(ifl) =
REAL(crazy_value_int,kind=rfreal)
215 ppatch%qr(ifl) =
REAL(crazy_value_int,kind=rfreal)
217 ppatch%nfAlp(xcoord,ifl) =
REAL(crazy_value_int,kind=rfreal)
218 ppatch%nfAlp(ycoord,ifl) =
REAL(crazy_value_int,kind=rfreal)
219 ppatch%nfAlp(zcoord,ifl) =
REAL(crazy_value_int,kind=rfreal)
221 ppatch%tracf(xcoord,ifl) =
REAL(crazy_value_int,kind=rfreal)
222 ppatch%tracf(ycoord,ifl) =
REAL(crazy_value_int,kind=rfreal)
223 ppatch%tracf(zcoord,ifl) =
REAL(crazy_value_int,kind=rfreal)
226 IF ( global%myProcid == masterproc .AND. &
227 global%checkLevel == check_high .AND. &
228 global%verbLevel >= verbose_high )
THEN
229 IF ( ppatch%nBFaces > 0 )
THEN
230 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'rhofAlp:', &
231 minval(ppatch%rhofAlp(1:ppatch%nBFaces)), &
232 maxval(ppatch%rhofAlp(1:ppatch%nBFaces))
233 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'pf: ', &
234 minval(ppatch%pf(1:ppatch%nBFaces)), &
235 maxval(ppatch%pf(1:ppatch%nBFaces))
236 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'qc: ', &
237 minval(ppatch%qc(1:ppatch%nBFaces)), &
238 maxval(ppatch%qc(1:ppatch%nBFaces))
239 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'qr: ', &
240 minval(ppatch%qr(1:ppatch%nBFaces)), &
241 maxval(ppatch%qr(1:ppatch%nBFaces))
242 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'nfAlp.x:', &
243 minval(ppatch%nfAlp(xcoord,1:ppatch%nBFaces)), &
244 maxval(ppatch%nfAlp(xcoord,1:ppatch%nBFaces))
245 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'nfAlp.y:', &
246 minval(ppatch%nfAlp(ycoord,1:ppatch%nBFaces)), &
247 maxval(ppatch%nfAlp(ycoord,1:ppatch%nBFaces))
248 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'nfAlp.z:', &
249 minval(ppatch%nfAlp(zcoord,1:ppatch%nBFaces)), &
250 maxval(ppatch%nfAlp(zcoord,1:ppatch%nBFaces))
251 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'tracf.x:', &
252 minval(ppatch%tracf(xcoord,1:ppatch%nBFaces)), &
253 maxval(ppatch%tracf(xcoord,1:ppatch%nBFaces))
254 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'tracf.y:', &
255 minval(ppatch%tracf(ycoord,1:ppatch%nBFaces)), &
256 maxval(ppatch%tracf(ycoord,1:ppatch%nBFaces))
257 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'tracf.z:', &
258 minval(ppatch%tracf(zcoord,1:ppatch%nBFaces)), &
259 maxval(ppatch%tracf(zcoord,1:ppatch%nBFaces))
268 IF ( ppatch%bcCoupled == bc_burning )
THEN
269 pmixtvals => ppatch%mixt%vals
271 DO ifl = 1,ppatch%nBFaces
272 c1 = ppatch%bf2c(ifl)
274 nx = ppatch%fn(xcoord,ifl)
275 ny = ppatch%fn(ycoord,ifl)
276 nz = ppatch%fn(zcoord,ifl)
278 fs = ppatch%gs(indgs*ifl)
281 IF ( gasmodel == gas_model_tcperf )
THEN
282 cp = pgv(gv_mixt_cp ,indcp *c1)
283 mm = pgv(gv_mixt_mol,indmol*c1)
285 minj = pmixtvals(bcdat_inject_mfrate,distrib*ifl)
287 IF ( minj > 0.0_rfreal )
THEN
288 tinj = pmixtvals(bcdat_inject_temp,distrib*ifl)
290 pl = pdv(dv_mixt_pres,c1)
293 fsu,rl,dummyreal,dummyreal, &
298 rl = pcv(cv_mixt_dens,c1)
299 rul = pcv(cv_mixt_xmom,c1)
300 rvl = pcv(cv_mixt_ymom,c1)
301 rwl = pcv(cv_mixt_zmom,c1)
302 pl = pdv(dv_mixt_pres,c1)
307 tl = pdv(dv_mixt_temp,c1)
310 CALL
errorstop(global,err_reached_default,__line__)
313 ppatch%rhofAlp(ifl) = rl
315 ppatch%tempf(ifl) = tl
317 ppatch%qc(ifl) = chref*ppatch%ch(ifl)
318 ppatch%qr(ifl) = 0.0_rfreal
320 ppatch%nfAlp(xcoord,ifl) = nx
321 ppatch%nfAlp(ycoord,ifl) = ny
322 ppatch%nfAlp(zcoord,ifl) = nz
324 ppatch%tracf(xcoord,ifl) = ppatch%pf(ifl)*ppatch%nfAlp(xcoord,ifl)
325 ppatch%tracf(ycoord,ifl) = ppatch%pf(ifl)*ppatch%nfAlp(ycoord,ifl)
326 ppatch%tracf(zcoord,ifl) = ppatch%pf(ifl)*ppatch%nfAlp(zcoord,ifl)
329 DO ifl = ppatch%nBFaces+1,ppatch%nBFacesTot
330 ppatch%rhofAlp(ifl) =
REAL(crazy_value_int,kind=rfreal)
331 ppatch%pf(ifl) =
REAL(crazy_value_int,kind=rfreal)
332 ppatch%tempf(ifl) =
REAL(crazy_value_int,kind=rfreal)
334 ppatch%qc(ifl) =
REAL(crazy_value_int,kind=rfreal)
335 ppatch%qr(ifl) =
REAL(crazy_value_int,kind=rfreal)
337 ppatch%nfAlp(xcoord,ifl) =
REAL(crazy_value_int,kind=rfreal)
338 ppatch%nfAlp(ycoord,ifl) =
REAL(crazy_value_int,kind=rfreal)
339 ppatch%nfAlp(zcoord,ifl) =
REAL(crazy_value_int,kind=rfreal)
341 ppatch%tracf(xcoord,ifl) =
REAL(crazy_value_int,kind=rfreal)
342 ppatch%tracf(ycoord,ifl) =
REAL(crazy_value_int,kind=rfreal)
343 ppatch%tracf(zcoord,ifl) =
REAL(crazy_value_int,kind=rfreal)
346 IF ( global%myProcid == masterproc .AND. &
347 global%checkLevel == check_high .AND. &
348 global%verbLevel >= verbose_high )
THEN
349 IF ( ppatch%nBFaces > 0 )
THEN
350 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'rhofAlp:', &
351 minval(ppatch%rhofAlp(1:ppatch%nBFaces)), &
352 maxval(ppatch%rhofAlp(1:ppatch%nBFaces))
353 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'pf: ', &
354 minval(ppatch%pf(1:ppatch%nBFaces)), &
355 maxval(ppatch%pf(1:ppatch%nBFaces))
356 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'tempf: ', &
357 minval(ppatch%tempf(1:ppatch%nBFaces)), &
358 maxval(ppatch%tempf(1:ppatch%nBFaces))
359 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'qc: ', &
360 minval(ppatch%qc(1:ppatch%nBFaces)), &
361 maxval(ppatch%qc(1:ppatch%nBFaces))
362 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'qr: ', &
363 minval(ppatch%qr(1:ppatch%nBFaces)), &
364 maxval(ppatch%qr(1:ppatch%nBFaces))
365 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'nfAlp.x:', &
366 minval(ppatch%nfAlp(xcoord,1:ppatch%nBFaces)), &
367 maxval(ppatch%nfAlp(xcoord,1:ppatch%nBFaces))
368 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'nfAlp.y:', &
369 minval(ppatch%nfAlp(ycoord,1:ppatch%nBFaces)), &
370 maxval(ppatch%nfAlp(ycoord,1:ppatch%nBFaces))
371 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'nfAlp.z:', &
372 minval(ppatch%nfAlp(zcoord,1:ppatch%nBFaces)), &
373 maxval(ppatch%nfAlp(zcoord,1:ppatch%nBFaces))
374 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'tracf.x:', &
375 minval(ppatch%tracf(xcoord,1:ppatch%nBFaces)), &
376 maxval(ppatch%tracf(xcoord,1:ppatch%nBFaces))
377 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'tracf.y:', &
378 minval(ppatch%tracf(ycoord,1:ppatch%nBFaces)), &
379 maxval(ppatch%tracf(ycoord,1:ppatch%nBFaces))
380 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'tracf.z:', &
381 minval(ppatch%tracf(zcoord,1:ppatch%nBFaces)), &
382 maxval(ppatch%tracf(zcoord,1:ppatch%nBFaces))
392 IF ( global%myProcid == masterproc .AND. &
393 global%verbLevel >= verbose_high )
THEN
394 WRITE(stdout,
'(A,1X,A,1X,I3)') solver_name, &
395 'Putting values into GENX buffers done.'
subroutine, public rflu_setrindstateinjectperf(cpGas, mmGas, nx, ny, nz, mInj, tInj, pl, fs, rl, ul, vl, wl, Hl)
subroutine, public rflu_setrindstateslipwallperf(cpGas, mmGas, nx, ny, nz, rl, rul, rvl, rwl, fs, pl)
subroutine registerfunction(global, funName, fileName)
subroutine rflu_putboundaryvalues(region)
real(rfreal) function, public rflu_descalegridspeed(pRegion, fs)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)