78 TYPE(t_region
),
POINTER :: pregion
84 CHARACTER(CHRLEN) :: rcsidentstring
85 INTEGER :: errorflag,ifc,ifcl,ipatch,iv,v1,v1l,v2,v2l,v3,v3l,v4,v4l
86 REAL(RFREAL),
PARAMETER :: thrd = 1.0_rfreal/3.0_rfreal
87 REAL(RFREAL) :: fcx,fcy,fcz,fnx,fny,fnz,
term
88 REAL(RFREAL) :: xyzavg(xcoord:zcoord)
89 REAL(RFREAL) :: xyzhex(xcoord:zcoord,8),xyznodes(xcoord:zcoord,4), &
90 xyzpri(xcoord:zcoord,6)
91 REAL(RFREAL) :: vsnew, vsold
92 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pxyz,pxyzold,pxyzold2
94 TYPE(t_grid),
POINTER :: pgrid,pgridold,pgridold2
95 TYPE(t_patch),
POINTER :: ppatch
101 rcsidentstring =
'$RCSfile: RFLU_ComputeGridSpeeds.F90,v $ $Revision: 1.9 $'
103 global => pregion%global
106 'RFLU_ComputeGridSpeeds.F90')
108 IF ( global%myProcid == masterproc .AND. &
109 global%verbLevel >= verbose_high )
THEN
110 WRITE(stdout,
'(A,1X,A)') solver_name,
'Computing grid speeds...'
111 WRITE(stdout,
'(A,3X,A)') solver_name,
'Grid speed extrema:'
118 pgrid => pregion%grid
119 pgridold => pregion%gridOld
120 pgridold2 => pregion%gridOld2
123 pxyzold => pgridold%xyz
124 pxyzold2 => pgridold2%xyz
130 DO ifc = 1,pgrid%nFaces
131 v1 = pgrid%f2v(1,ifc)
132 v2 = pgrid%f2v(2,ifc)
133 v3 = pgrid%f2v(3,ifc)
134 v4 = pgrid%f2v(4,ifc)
136 pgrid%gs(ifc) = 0.0_rfreal
138 IF ( global%solverType == solv_implicit_nk )
THEN
147 IF ( v4 == vert_none )
THEN
148 xyzpri(xcoord,1) = pxyzold(xcoord,v1)
149 xyzpri(xcoord,2) = pxyzold(xcoord,v2)
150 xyzpri(xcoord,3) = pxyzold(xcoord,v3)
152 xyzpri(ycoord,1) = pxyzold(ycoord,v1)
153 xyzpri(ycoord,2) = pxyzold(ycoord,v2)
154 xyzpri(ycoord,3) = pxyzold(ycoord,v3)
156 xyzpri(zcoord,1) = pxyzold(zcoord,v1)
157 xyzpri(zcoord,2) = pxyzold(zcoord,v2)
158 xyzpri(zcoord,3) = pxyzold(zcoord,v3)
160 xyzpri(xcoord,4) = pxyz(xcoord,v1)
161 xyzpri(xcoord,5) = pxyz(xcoord,v2)
162 xyzpri(xcoord,6) = pxyz(xcoord,v3)
164 xyzpri(ycoord,4) = pxyz(ycoord,v1)
165 xyzpri(ycoord,5) = pxyz(ycoord,v2)
166 xyzpri(ycoord,6) = pxyz(ycoord,v3)
168 xyzpri(zcoord,4) = pxyz(zcoord,v1)
169 xyzpri(zcoord,5) = pxyz(zcoord,v2)
170 xyzpri(zcoord,6) = pxyz(zcoord,v3)
176 xyzavg(xcoord) = 0.0_rfreal
177 xyzavg(ycoord) = 0.0_rfreal
178 xyzavg(zcoord) = 0.0_rfreal
180 term = 1.0_rfreal/6.0_rfreal
183 xyzavg(xcoord) = xyzavg(xcoord) + xyzpri(xcoord,iv)
184 xyzavg(ycoord) = xyzavg(ycoord) + xyzpri(ycoord,iv)
185 xyzavg(zcoord) = xyzavg(zcoord) + xyzpri(zcoord,iv)
188 xyzavg(xcoord) =
term*xyzavg(xcoord)
189 xyzavg(ycoord) =
term*xyzavg(ycoord)
190 xyzavg(zcoord) =
term*xyzavg(zcoord)
203 xyznodes(xcoord,1) = xyzpri(xcoord,v1l) - xyzavg(xcoord)
204 xyznodes(xcoord,2) = xyzpri(xcoord,v2l) - xyzavg(xcoord)
205 xyznodes(xcoord,3) = xyzpri(xcoord,v3l) - xyzavg(xcoord)
207 xyznodes(ycoord,1) = xyzpri(ycoord,v1l) - xyzavg(ycoord)
208 xyznodes(ycoord,2) = xyzpri(ycoord,v2l) - xyzavg(ycoord)
209 xyznodes(ycoord,3) = xyzpri(ycoord,v3l) - xyzavg(ycoord)
211 xyznodes(zcoord,1) = xyzpri(zcoord,v1l) - xyzavg(zcoord)
212 xyznodes(zcoord,2) = xyzpri(zcoord,v2l) - xyzavg(zcoord)
213 xyznodes(zcoord,3) = xyzpri(zcoord,v3l) - xyzavg(zcoord)
218 xyznodes(xcoord,1) = xyzpri(xcoord,v1l) - xyzavg(xcoord)
219 xyznodes(xcoord,2) = xyzpri(xcoord,v2l) - xyzavg(xcoord)
220 xyznodes(xcoord,3) = xyzpri(xcoord,v3l) - xyzavg(xcoord)
221 xyznodes(xcoord,4) = xyzpri(xcoord,v4l) - xyzavg(xcoord)
223 xyznodes(ycoord,1) = xyzpri(ycoord,v1l) - xyzavg(ycoord)
224 xyznodes(ycoord,2) = xyzpri(ycoord,v2l) - xyzavg(ycoord)
225 xyznodes(ycoord,3) = xyzpri(ycoord,v3l) - xyzavg(ycoord)
226 xyznodes(ycoord,4) = xyzpri(ycoord,v4l) - xyzavg(ycoord)
228 xyznodes(zcoord,1) = xyzpri(zcoord,v1l) - xyzavg(zcoord)
229 xyznodes(zcoord,2) = xyzpri(zcoord,v2l) - xyzavg(zcoord)
230 xyznodes(zcoord,3) = xyzpri(zcoord,v3l) - xyzavg(zcoord)
231 xyznodes(zcoord,4) = xyzpri(zcoord,v4l) - xyzavg(zcoord)
237 IF ( global%solverType == solv_implicit_nk )
THEN
238 vsnew = vsnew + (fcx*fnx + fcy*fny + fcz*fnz)
240 pgrid%gs(ifc) = pgrid%gs(ifc) + (fcx*fnx + fcy*fny + fcz*fnz)
250 xyzhex(xcoord,1) = pxyzold(xcoord,v1)
251 xyzhex(xcoord,2) = pxyzold(xcoord,v2)
252 xyzhex(xcoord,3) = pxyzold(xcoord,v3)
253 xyzhex(xcoord,4) = pxyzold(xcoord,v4)
255 xyzhex(ycoord,1) = pxyzold(ycoord,v1)
256 xyzhex(ycoord,2) = pxyzold(ycoord,v2)
257 xyzhex(ycoord,3) = pxyzold(ycoord,v3)
258 xyzhex(ycoord,4) = pxyzold(ycoord,v4)
260 xyzhex(zcoord,1) = pxyzold(zcoord,v1)
261 xyzhex(zcoord,2) = pxyzold(zcoord,v2)
262 xyzhex(zcoord,3) = pxyzold(zcoord,v3)
263 xyzhex(zcoord,4) = pxyzold(zcoord,v4)
265 xyzhex(xcoord,5) = pxyz(xcoord,v1)
266 xyzhex(xcoord,6) = pxyz(xcoord,v2)
267 xyzhex(xcoord,7) = pxyz(xcoord,v3)
268 xyzhex(xcoord,8) = pxyz(xcoord,v4)
270 xyzhex(ycoord,5) = pxyz(ycoord,v1)
271 xyzhex(ycoord,6) = pxyz(ycoord,v2)
272 xyzhex(ycoord,7) = pxyz(ycoord,v3)
273 xyzhex(ycoord,8) = pxyz(ycoord,v4)
275 xyzhex(zcoord,5) = pxyz(zcoord,v1)
276 xyzhex(zcoord,6) = pxyz(zcoord,v2)
277 xyzhex(zcoord,7) = pxyz(zcoord,v3)
278 xyzhex(zcoord,8) = pxyz(zcoord,v4)
284 xyzavg(xcoord) = 0.0_rfreal
285 xyzavg(ycoord) = 0.0_rfreal
286 xyzavg(zcoord) = 0.0_rfreal
288 term = 1.0_rfreal/8.0_rfreal
291 xyzavg(xcoord) = xyzavg(xcoord) + xyzhex(xcoord,iv)
292 xyzavg(ycoord) = xyzavg(ycoord) + xyzhex(ycoord,iv)
293 xyzavg(zcoord) = xyzavg(zcoord) + xyzhex(zcoord,iv)
296 xyzavg(xcoord) =
term*xyzavg(xcoord)
297 xyzavg(ycoord) =
term*xyzavg(ycoord)
298 xyzavg(zcoord) =
term*xyzavg(zcoord)
310 xyznodes(xcoord,1) = xyzhex(xcoord,v1l) - xyzavg(xcoord)
311 xyznodes(xcoord,2) = xyzhex(xcoord,v2l) - xyzavg(xcoord)
312 xyznodes(xcoord,3) = xyzhex(xcoord,v3l) - xyzavg(xcoord)
313 xyznodes(xcoord,4) = xyzhex(xcoord,v4l) - xyzavg(xcoord)
315 xyznodes(ycoord,1) = xyzhex(ycoord,v1l) - xyzavg(ycoord)
316 xyznodes(ycoord,2) = xyzhex(ycoord,v2l) - xyzavg(ycoord)
317 xyznodes(ycoord,3) = xyzhex(ycoord,v3l) - xyzavg(ycoord)
318 xyznodes(ycoord,4) = xyzhex(ycoord,v4l) - xyzavg(ycoord)
320 xyznodes(zcoord,1) = xyzhex(zcoord,v1l) - xyzavg(zcoord)
321 xyznodes(zcoord,2) = xyzhex(zcoord,v2l) - xyzavg(zcoord)
322 xyznodes(zcoord,3) = xyzhex(zcoord,v3l) - xyzavg(zcoord)
323 xyznodes(zcoord,4) = xyzhex(zcoord,v4l) - xyzavg(zcoord)
328 IF ( global%solverType == solv_implicit_nk )
THEN
329 vsnew = vsnew + (fcx*fnx + fcy*fny + fcz*fnz)
331 pgrid%gs(ifc) = pgrid%gs(ifc) + (fcx*fnx + fcy*fny + fcz*fnz)
341 IF ( global%solverType == solv_implicit_nk )
THEN
347 IF ( v4 == vert_none )
THEN
348 xyzpri(xcoord,1) = pxyzold2(xcoord,v1)
349 xyzpri(xcoord,2) = pxyzold2(xcoord,v2)
350 xyzpri(xcoord,3) = pxyzold2(xcoord,v3)
352 xyzpri(ycoord,1) = pxyzold2(ycoord,v1)
353 xyzpri(ycoord,2) = pxyzold2(ycoord,v2)
354 xyzpri(ycoord,3) = pxyzold2(ycoord,v3)
356 xyzpri(zcoord,1) = pxyzold2(zcoord,v1)
357 xyzpri(zcoord,2) = pxyzold2(zcoord,v2)
358 xyzpri(zcoord,3) = pxyzold2(zcoord,v3)
360 xyzpri(xcoord,4) = pxyzold(xcoord,v1)
361 xyzpri(xcoord,5) = pxyzold(xcoord,v2)
362 xyzpri(xcoord,6) = pxyzold(xcoord,v3)
364 xyzpri(ycoord,4) = pxyzold(ycoord,v1)
365 xyzpri(ycoord,5) = pxyzold(ycoord,v2)
366 xyzpri(ycoord,6) = pxyzold(ycoord,v3)
368 xyzpri(zcoord,4) = pxyzold(zcoord,v1)
369 xyzpri(zcoord,5) = pxyzold(zcoord,v2)
370 xyzpri(zcoord,6) = pxyzold(zcoord,v3)
376 xyzavg(xcoord) = 0.0_rfreal
377 xyzavg(ycoord) = 0.0_rfreal
378 xyzavg(zcoord) = 0.0_rfreal
380 term = 1.0_rfreal/6.0_rfreal
383 xyzavg(xcoord) = xyzavg(xcoord) + xyzpri(xcoord,iv)
384 xyzavg(ycoord) = xyzavg(ycoord) + xyzpri(ycoord,iv)
385 xyzavg(zcoord) = xyzavg(zcoord) + xyzpri(zcoord,iv)
388 xyzavg(xcoord) =
term*xyzavg(xcoord)
389 xyzavg(ycoord) =
term*xyzavg(ycoord)
390 xyzavg(zcoord) =
term*xyzavg(zcoord)
403 xyznodes(xcoord,1) = xyzpri(xcoord,v1l) - xyzavg(xcoord)
404 xyznodes(xcoord,2) = xyzpri(xcoord,v2l) - xyzavg(xcoord)
405 xyznodes(xcoord,3) = xyzpri(xcoord,v3l) - xyzavg(xcoord)
407 xyznodes(ycoord,1) = xyzpri(ycoord,v1l) - xyzavg(ycoord)
408 xyznodes(ycoord,2) = xyzpri(ycoord,v2l) - xyzavg(ycoord)
409 xyznodes(ycoord,3) = xyzpri(ycoord,v3l) - xyzavg(ycoord)
411 xyznodes(zcoord,1) = xyzpri(zcoord,v1l) - xyzavg(zcoord)
412 xyznodes(zcoord,2) = xyzpri(zcoord,v2l) - xyzavg(zcoord)
413 xyznodes(zcoord,3) = xyzpri(zcoord,v3l) - xyzavg(zcoord)
418 xyznodes(xcoord,1) = xyzpri(xcoord,v1l) - xyzavg(xcoord)
419 xyznodes(xcoord,2) = xyzpri(xcoord,v2l) - xyzavg(xcoord)
420 xyznodes(xcoord,3) = xyzpri(xcoord,v3l) - xyzavg(xcoord)
421 xyznodes(xcoord,4) = xyzpri(xcoord,v4l) - xyzavg(xcoord)
423 xyznodes(ycoord,1) = xyzpri(ycoord,v1l) - xyzavg(ycoord)
424 xyznodes(ycoord,2) = xyzpri(ycoord,v2l) - xyzavg(ycoord)
425 xyznodes(ycoord,3) = xyzpri(ycoord,v3l) - xyzavg(ycoord)
426 xyznodes(ycoord,4) = xyzpri(ycoord,v4l) - xyzavg(ycoord)
428 xyznodes(zcoord,1) = xyzpri(zcoord,v1l) - xyzavg(zcoord)
429 xyznodes(zcoord,2) = xyzpri(zcoord,v2l) - xyzavg(zcoord)
430 xyznodes(zcoord,3) = xyzpri(zcoord,v3l) - xyzavg(zcoord)
431 xyznodes(zcoord,4) = xyzpri(zcoord,v4l) - xyzavg(zcoord)
437 vsold = vsold + (fcx*fnx + fcy*fny + fcz*fnz)
446 xyzhex(xcoord,1) = pxyzold2(xcoord,v1)
447 xyzhex(xcoord,2) = pxyzold2(xcoord,v2)
448 xyzhex(xcoord,3) = pxyzold2(xcoord,v3)
449 xyzhex(xcoord,4) = pxyzold2(xcoord,v4)
451 xyzhex(ycoord,1) = pxyzold2(ycoord,v1)
452 xyzhex(ycoord,2) = pxyzold2(ycoord,v2)
453 xyzhex(ycoord,3) = pxyzold2(ycoord,v3)
454 xyzhex(ycoord,4) = pxyzold2(ycoord,v4)
456 xyzhex(zcoord,1) = pxyzold2(zcoord,v1)
457 xyzhex(zcoord,2) = pxyzold2(zcoord,v2)
458 xyzhex(zcoord,3) = pxyzold2(zcoord,v3)
459 xyzhex(zcoord,4) = pxyzold2(zcoord,v4)
461 xyzhex(xcoord,5) = pxyzold(xcoord,v1)
462 xyzhex(xcoord,6) = pxyzold(xcoord,v2)
463 xyzhex(xcoord,7) = pxyzold(xcoord,v3)
464 xyzhex(xcoord,8) = pxyzold(xcoord,v4)
466 xyzhex(ycoord,5) = pxyzold(ycoord,v1)
467 xyzhex(ycoord,6) = pxyzold(ycoord,v2)
468 xyzhex(ycoord,7) = pxyzold(ycoord,v3)
469 xyzhex(ycoord,8) = pxyzold(ycoord,v4)
471 xyzhex(zcoord,5) = pxyzold(zcoord,v1)
472 xyzhex(zcoord,6) = pxyzold(zcoord,v2)
473 xyzhex(zcoord,7) = pxyzold(zcoord,v3)
474 xyzhex(zcoord,8) = pxyzold(zcoord,v4)
480 xyzavg(xcoord) = 0.0_rfreal
481 xyzavg(ycoord) = 0.0_rfreal
482 xyzavg(zcoord) = 0.0_rfreal
484 term = 1.0_rfreal/8.0_rfreal
487 xyzavg(xcoord) = xyzavg(xcoord) + xyzhex(xcoord,iv)
488 xyzavg(ycoord) = xyzavg(ycoord) + xyzhex(ycoord,iv)
489 xyzavg(zcoord) = xyzavg(zcoord) + xyzhex(zcoord,iv)
492 xyzavg(xcoord) =
term*xyzavg(xcoord)
493 xyzavg(ycoord) =
term*xyzavg(ycoord)
494 xyzavg(zcoord) =
term*xyzavg(zcoord)
506 xyznodes(xcoord,1) = xyzhex(xcoord,v1l) - xyzavg(xcoord)
507 xyznodes(xcoord,2) = xyzhex(xcoord,v2l) - xyzavg(xcoord)
508 xyznodes(xcoord,3) = xyzhex(xcoord,v3l) - xyzavg(xcoord)
509 xyznodes(xcoord,4) = xyzhex(xcoord,v4l) - xyzavg(xcoord)
511 xyznodes(ycoord,1) = xyzhex(ycoord,v1l) - xyzavg(ycoord)
512 xyznodes(ycoord,2) = xyzhex(ycoord,v2l) - xyzavg(ycoord)
513 xyznodes(ycoord,3) = xyzhex(ycoord,v3l) - xyzavg(ycoord)
514 xyznodes(ycoord,4) = xyzhex(ycoord,v4l) - xyzavg(ycoord)
516 xyznodes(zcoord,1) = xyzhex(zcoord,v1l) - xyzavg(zcoord)
517 xyznodes(zcoord,2) = xyzhex(zcoord,v2l) - xyzavg(zcoord)
518 xyznodes(zcoord,3) = xyzhex(zcoord,v3l) - xyzavg(zcoord)
519 xyznodes(zcoord,4) = xyzhex(zcoord,v4l) - xyzavg(zcoord)
524 vsold = vsold + (fcx*fnx + fcy*fny + fcz*fnz)
533 IF ( global%solverType == solv_implicit_nk )
THEN
537 pgrid%gs(ifc) = (3.0_rfreal*vsnew - vsold)/ &
538 (2.0_rfreal*pgrid%fn(xyzmag,ifc)*global%dtMin)
540 pgrid%gs(ifc) = thrd*pgrid%gs(ifc)/(pgrid%fn(xyzmag,ifc)*global%dtMin)
548 IF ( global%myProcid == masterproc .AND. &
549 global%verbLevel >= verbose_high )
THEN
550 IF ( pgrid%nFaces > 0 )
THEN
551 WRITE(stdout,
'(A,5X,A,2(1X,E24.15),2(1X,I9))') &
552 solver_name,
'Interior:', &
553 minval(pgrid%gs),maxval(pgrid%gs), &
554 minloc(pgrid%gs),maxloc(pgrid%gs)
562 DO ipatch = 1,pgrid%nPatches
563 ppatch => pregion%patches(ipatch)
569 IF ( ppatch%movePatchDir /= movepatch_dir_none )
THEN
570 DO ifc = 1,ppatch%nBFaces
571 v1 = ppatch%bv(ppatch%bf2v(1,ifc))
572 v2 = ppatch%bv(ppatch%bf2v(2,ifc))
573 v3 = ppatch%bv(ppatch%bf2v(3,ifc))
575 ppatch%gs(ifc) = 0.0_rfreal
577 IF ( global%solverType == solv_implicit_nk )
THEN
586 IF ( ppatch%bf2v(4,ifc) == vert_none )
THEN
587 xyzpri(xcoord,1) = pxyzold(xcoord,v1)
588 xyzpri(xcoord,2) = pxyzold(xcoord,v2)
589 xyzpri(xcoord,3) = pxyzold(xcoord,v3)
591 xyzpri(ycoord,1) = pxyzold(ycoord,v1)
592 xyzpri(ycoord,2) = pxyzold(ycoord,v2)
593 xyzpri(ycoord,3) = pxyzold(ycoord,v3)
595 xyzpri(zcoord,1) = pxyzold(zcoord,v1)
596 xyzpri(zcoord,2) = pxyzold(zcoord,v2)
597 xyzpri(zcoord,3) = pxyzold(zcoord,v3)
599 xyzpri(xcoord,4) = pxyz(xcoord,v1)
600 xyzpri(xcoord,5) = pxyz(xcoord,v2)
601 xyzpri(xcoord,6) = pxyz(xcoord,v3)
603 xyzpri(ycoord,4) = pxyz(ycoord,v1)
604 xyzpri(ycoord,5) = pxyz(ycoord,v2)
605 xyzpri(ycoord,6) = pxyz(ycoord,v3)
607 xyzpri(zcoord,4) = pxyz(zcoord,v1)
608 xyzpri(zcoord,5) = pxyz(zcoord,v2)
609 xyzpri(zcoord,6) = pxyz(zcoord,v3)
613 xyzavg(xcoord) = 0.0_rfreal
614 xyzavg(ycoord) = 0.0_rfreal
615 xyzavg(zcoord) = 0.0_rfreal
617 term = 1.0_rfreal/6.0_rfreal
620 xyzavg(xcoord) = xyzavg(xcoord) + xyzpri(xcoord,iv)
621 xyzavg(ycoord) = xyzavg(ycoord) + xyzpri(ycoord,iv)
622 xyzavg(zcoord) = xyzavg(zcoord) + xyzpri(zcoord,iv)
625 xyzavg(xcoord) =
term*xyzavg(xcoord)
626 xyzavg(ycoord) =
term*xyzavg(ycoord)
627 xyzavg(zcoord) =
term*xyzavg(zcoord)
638 xyznodes(xcoord,1) = xyzpri(xcoord,v1l) - xyzavg(xcoord)
639 xyznodes(xcoord,2) = xyzpri(xcoord,v2l) - xyzavg(xcoord)
640 xyznodes(xcoord,3) = xyzpri(xcoord,v3l) - xyzavg(xcoord)
642 xyznodes(ycoord,1) = xyzpri(ycoord,v1l) - xyzavg(ycoord)
643 xyznodes(ycoord,2) = xyzpri(ycoord,v2l) - xyzavg(ycoord)
644 xyznodes(ycoord,3) = xyzpri(ycoord,v3l) - xyzavg(ycoord)
646 xyznodes(zcoord,1) = xyzpri(zcoord,v1l) - xyzavg(zcoord)
647 xyznodes(zcoord,2) = xyzpri(zcoord,v2l) - xyzavg(zcoord)
648 xyznodes(zcoord,3) = xyzpri(zcoord,v3l) - xyzavg(zcoord)
653 xyznodes(xcoord,1) = xyzpri(xcoord,v1l) - xyzavg(xcoord)
654 xyznodes(xcoord,2) = xyzpri(xcoord,v2l) - xyzavg(xcoord)
655 xyznodes(xcoord,3) = xyzpri(xcoord,v3l) - xyzavg(xcoord)
656 xyznodes(xcoord,4) = xyzpri(xcoord,v4l) - xyzavg(xcoord)
658 xyznodes(ycoord,1) = xyzpri(ycoord,v1l) - xyzavg(ycoord)
659 xyznodes(ycoord,2) = xyzpri(ycoord,v2l) - xyzavg(ycoord)
660 xyznodes(ycoord,3) = xyzpri(ycoord,v3l) - xyzavg(ycoord)
661 xyznodes(ycoord,4) = xyzpri(ycoord,v4l) - xyzavg(ycoord)
663 xyznodes(zcoord,1) = xyzpri(zcoord,v1l) - xyzavg(zcoord)
664 xyznodes(zcoord,2) = xyzpri(zcoord,v2l) - xyzavg(zcoord)
665 xyznodes(zcoord,3) = xyzpri(zcoord,v3l) - xyzavg(zcoord)
666 xyznodes(zcoord,4) = xyzpri(zcoord,v4l) - xyzavg(zcoord)
672 IF ( global%solverType == solv_implicit_nk )
THEN
673 vsnew = vsnew + (fcx*fnx + fcy*fny + fcz*fnz)
675 ppatch%gs(ifc) = ppatch%gs(ifc) + (fcx*fnx + fcy*fny + fcz*fnz)
685 v4 = ppatch%bv(ppatch%bf2v(4,ifc))
687 xyzhex(xcoord,1) = pxyzold(xcoord,v1)
688 xyzhex(xcoord,2) = pxyzold(xcoord,v2)
689 xyzhex(xcoord,3) = pxyzold(xcoord,v3)
690 xyzhex(xcoord,4) = pxyzold(xcoord,v4)
692 xyzhex(ycoord,1) = pxyzold(ycoord,v1)
693 xyzhex(ycoord,2) = pxyzold(ycoord,v2)
694 xyzhex(ycoord,3) = pxyzold(ycoord,v3)
695 xyzhex(ycoord,4) = pxyzold(ycoord,v4)
697 xyzhex(zcoord,1) = pxyzold(zcoord,v1)
698 xyzhex(zcoord,2) = pxyzold(zcoord,v2)
699 xyzhex(zcoord,3) = pxyzold(zcoord,v3)
700 xyzhex(zcoord,4) = pxyzold(zcoord,v4)
702 xyzhex(xcoord,5) = pxyz(xcoord,v1)
703 xyzhex(xcoord,6) = pxyz(xcoord,v2)
704 xyzhex(xcoord,7) = pxyz(xcoord,v3)
705 xyzhex(xcoord,8) = pxyz(xcoord,v4)
707 xyzhex(ycoord,5) = pxyz(ycoord,v1)
708 xyzhex(ycoord,6) = pxyz(ycoord,v2)
709 xyzhex(ycoord,7) = pxyz(ycoord,v3)
710 xyzhex(ycoord,8) = pxyz(ycoord,v4)
712 xyzhex(zcoord,5) = pxyz(zcoord,v1)
713 xyzhex(zcoord,6) = pxyz(zcoord,v2)
714 xyzhex(zcoord,7) = pxyz(zcoord,v3)
715 xyzhex(zcoord,8) = pxyz(zcoord,v4)
719 xyzavg(xcoord) = 0.0_rfreal
720 xyzavg(ycoord) = 0.0_rfreal
721 xyzavg(zcoord) = 0.0_rfreal
723 term = 1.0_rfreal/8.0_rfreal
726 xyzavg(xcoord) = xyzavg(xcoord) + xyzhex(xcoord,iv)
727 xyzavg(ycoord) = xyzavg(ycoord) + xyzhex(ycoord,iv)
728 xyzavg(zcoord) = xyzavg(zcoord) + xyzhex(zcoord,iv)
731 xyzavg(xcoord) =
term*xyzavg(xcoord)
732 xyzavg(ycoord) =
term*xyzavg(ycoord)
733 xyzavg(zcoord) =
term*xyzavg(zcoord)
743 xyznodes(xcoord,1) = xyzhex(xcoord,v1l) - xyzavg(xcoord)
744 xyznodes(xcoord,2) = xyzhex(xcoord,v2l) - xyzavg(xcoord)
745 xyznodes(xcoord,3) = xyzhex(xcoord,v3l) - xyzavg(xcoord)
746 xyznodes(xcoord,4) = xyzhex(xcoord,v4l) - xyzavg(xcoord)
748 xyznodes(ycoord,1) = xyzhex(ycoord,v1l) - xyzavg(ycoord)
749 xyznodes(ycoord,2) = xyzhex(ycoord,v2l) - xyzavg(ycoord)
750 xyznodes(ycoord,3) = xyzhex(ycoord,v3l) - xyzavg(ycoord)
751 xyznodes(ycoord,4) = xyzhex(ycoord,v4l) - xyzavg(ycoord)
753 xyznodes(zcoord,1) = xyzhex(zcoord,v1l) - xyzavg(zcoord)
754 xyznodes(zcoord,2) = xyzhex(zcoord,v2l) - xyzavg(zcoord)
755 xyznodes(zcoord,3) = xyzhex(zcoord,v3l) - xyzavg(zcoord)
756 xyznodes(zcoord,4) = xyzhex(zcoord,v4l) - xyzavg(zcoord)
761 IF ( global%solverType == solv_implicit_nk )
THEN
762 vsnew = vsnew + (fcx*fnx + fcy*fny + fcz*fnz)
764 ppatch%gs(ifc) = ppatch%gs(ifc) + (fcx*fnx + fcy*fny + fcz*fnz)
774 IF ( global%solverType == solv_implicit_nk )
THEN
780 IF ( ppatch%bf2v(4,ifc) == vert_none )
THEN
781 xyzpri(xcoord,1) = pxyzold2(xcoord,v1)
782 xyzpri(xcoord,2) = pxyzold2(xcoord,v2)
783 xyzpri(xcoord,3) = pxyzold2(xcoord,v3)
785 xyzpri(ycoord,1) = pxyzold2(ycoord,v1)
786 xyzpri(ycoord,2) = pxyzold2(ycoord,v2)
787 xyzpri(ycoord,3) = pxyzold2(ycoord,v3)
789 xyzpri(zcoord,1) = pxyzold2(zcoord,v1)
790 xyzpri(zcoord,2) = pxyzold2(zcoord,v2)
791 xyzpri(zcoord,3) = pxyzold2(zcoord,v3)
793 xyzpri(xcoord,4) = pxyzold(xcoord,v1)
794 xyzpri(xcoord,5) = pxyzold(xcoord,v2)
795 xyzpri(xcoord,6) = pxyzold(xcoord,v3)
797 xyzpri(ycoord,4) = pxyzold(ycoord,v1)
798 xyzpri(ycoord,5) = pxyzold(ycoord,v2)
799 xyzpri(ycoord,6) = pxyzold(ycoord,v3)
801 xyzpri(zcoord,4) = pxyzold(zcoord,v1)
802 xyzpri(zcoord,5) = pxyzold(zcoord,v2)
803 xyzpri(zcoord,6) = pxyzold(zcoord,v3)
807 xyzavg(xcoord) = 0.0_rfreal
808 xyzavg(ycoord) = 0.0_rfreal
809 xyzavg(zcoord) = 0.0_rfreal
811 term = 1.0_rfreal/6.0_rfreal
814 xyzavg(xcoord) = xyzavg(xcoord) + xyzpri(xcoord,iv)
815 xyzavg(ycoord) = xyzavg(ycoord) + xyzpri(ycoord,iv)
816 xyzavg(zcoord) = xyzavg(zcoord) + xyzpri(zcoord,iv)
819 xyzavg(xcoord) =
term*xyzavg(xcoord)
820 xyzavg(ycoord) =
term*xyzavg(ycoord)
821 xyzavg(zcoord) =
term*xyzavg(zcoord)
832 xyznodes(xcoord,1) = xyzpri(xcoord,v1l) - xyzavg(xcoord)
833 xyznodes(xcoord,2) = xyzpri(xcoord,v2l) - xyzavg(xcoord)
834 xyznodes(xcoord,3) = xyzpri(xcoord,v3l) - xyzavg(xcoord)
836 xyznodes(ycoord,1) = xyzpri(ycoord,v1l) - xyzavg(ycoord)
837 xyznodes(ycoord,2) = xyzpri(ycoord,v2l) - xyzavg(ycoord)
838 xyznodes(ycoord,3) = xyzpri(ycoord,v3l) - xyzavg(ycoord)
840 xyznodes(zcoord,1) = xyzpri(zcoord,v1l) - xyzavg(zcoord)
841 xyznodes(zcoord,2) = xyzpri(zcoord,v2l) - xyzavg(zcoord)
842 xyznodes(zcoord,3) = xyzpri(zcoord,v3l) - xyzavg(zcoord)
847 xyznodes(xcoord,1) = xyzpri(xcoord,v1l) - xyzavg(xcoord)
848 xyznodes(xcoord,2) = xyzpri(xcoord,v2l) - xyzavg(xcoord)
849 xyznodes(xcoord,3) = xyzpri(xcoord,v3l) - xyzavg(xcoord)
850 xyznodes(xcoord,4) = xyzpri(xcoord,v4l) - xyzavg(xcoord)
852 xyznodes(ycoord,1) = xyzpri(ycoord,v1l) - xyzavg(ycoord)
853 xyznodes(ycoord,2) = xyzpri(ycoord,v2l) - xyzavg(ycoord)
854 xyznodes(ycoord,3) = xyzpri(ycoord,v3l) - xyzavg(ycoord)
855 xyznodes(ycoord,4) = xyzpri(ycoord,v4l) - xyzavg(ycoord)
857 xyznodes(zcoord,1) = xyzpri(zcoord,v1l) - xyzavg(zcoord)
858 xyznodes(zcoord,2) = xyzpri(zcoord,v2l) - xyzavg(zcoord)
859 xyznodes(zcoord,3) = xyzpri(zcoord,v3l) - xyzavg(zcoord)
860 xyznodes(zcoord,4) = xyzpri(zcoord,v4l) - xyzavg(zcoord)
866 vsold = vsold + (fcx*fnx + fcy*fny + fcz*fnz)
875 v4 = ppatch%bv(ppatch%bf2v(4,ifc))
877 xyzhex(xcoord,1) = pxyzold(xcoord,v1)
878 xyzhex(xcoord,2) = pxyzold(xcoord,v2)
879 xyzhex(xcoord,3) = pxyzold(xcoord,v3)
880 xyzhex(xcoord,4) = pxyzold(xcoord,v4)
882 xyzhex(ycoord,1) = pxyzold(ycoord,v1)
883 xyzhex(ycoord,2) = pxyzold(ycoord,v2)
884 xyzhex(ycoord,3) = pxyzold(ycoord,v3)
885 xyzhex(ycoord,4) = pxyzold(ycoord,v4)
887 xyzhex(zcoord,1) = pxyzold(zcoord,v1)
888 xyzhex(zcoord,2) = pxyzold(zcoord,v2)
889 xyzhex(zcoord,3) = pxyzold(zcoord,v3)
890 xyzhex(zcoord,4) = pxyzold(zcoord,v4)
892 xyzhex(xcoord,5) = pxyz(xcoord,v1)
893 xyzhex(xcoord,6) = pxyz(xcoord,v2)
894 xyzhex(xcoord,7) = pxyz(xcoord,v3)
895 xyzhex(xcoord,8) = pxyz(xcoord,v4)
897 xyzhex(ycoord,5) = pxyz(ycoord,v1)
898 xyzhex(ycoord,6) = pxyz(ycoord,v2)
899 xyzhex(ycoord,7) = pxyz(ycoord,v3)
900 xyzhex(ycoord,8) = pxyz(ycoord,v4)
902 xyzhex(zcoord,5) = pxyz(zcoord,v1)
903 xyzhex(zcoord,6) = pxyz(zcoord,v2)
904 xyzhex(zcoord,7) = pxyz(zcoord,v3)
905 xyzhex(zcoord,8) = pxyz(zcoord,v4)
909 xyzavg(xcoord) = 0.0_rfreal
910 xyzavg(ycoord) = 0.0_rfreal
911 xyzavg(zcoord) = 0.0_rfreal
913 term = 1.0_rfreal/8.0_rfreal
916 xyzavg(xcoord) = xyzavg(xcoord) + xyzhex(xcoord,iv)
917 xyzavg(ycoord) = xyzavg(ycoord) + xyzhex(ycoord,iv)
918 xyzavg(zcoord) = xyzavg(zcoord) + xyzhex(zcoord,iv)
921 xyzavg(xcoord) =
term*xyzavg(xcoord)
922 xyzavg(ycoord) =
term*xyzavg(ycoord)
923 xyzavg(zcoord) =
term*xyzavg(zcoord)
933 xyznodes(xcoord,1) = xyzhex(xcoord,v1l) - xyzavg(xcoord)
934 xyznodes(xcoord,2) = xyzhex(xcoord,v2l) - xyzavg(xcoord)
935 xyznodes(xcoord,3) = xyzhex(xcoord,v3l) - xyzavg(xcoord)
936 xyznodes(xcoord,4) = xyzhex(xcoord,v4l) - xyzavg(xcoord)
938 xyznodes(ycoord,1) = xyzhex(ycoord,v1l) - xyzavg(ycoord)
939 xyznodes(ycoord,2) = xyzhex(ycoord,v2l) - xyzavg(ycoord)
940 xyznodes(ycoord,3) = xyzhex(ycoord,v3l) - xyzavg(ycoord)
941 xyznodes(ycoord,4) = xyzhex(ycoord,v4l) - xyzavg(ycoord)
943 xyznodes(zcoord,1) = xyzhex(zcoord,v1l) - xyzavg(zcoord)
944 xyznodes(zcoord,2) = xyzhex(zcoord,v2l) - xyzavg(zcoord)
945 xyznodes(zcoord,3) = xyzhex(zcoord,v3l) - xyzavg(zcoord)
946 xyznodes(zcoord,4) = xyzhex(zcoord,v4l) - xyzavg(zcoord)
951 vsold = vsold + (fcx*fnx + fcy*fny + fcz*fnz)
962 IF ( global%solverType == solv_implicit_nk )
THEN
965 ppatch%gs(ifc) = (3.0_rfreal*vsnew - vsold)/(2.0_rfreal*ppatch%fn(xyzmag,ifc)*global%dtMin)
967 ppatch%gs(ifc) = thrd*ppatch%gs(ifc)/ (ppatch%fn(xyzmag,ifc)*global%dtMin)
977 DO ifc = 1,ppatch%nBFaces
978 ppatch%gs(ifc) = 0.0_rfreal
986 IF ( global%myProcid == masterproc .AND. &
987 global%verbLevel >= verbose_high )
THEN
988 IF ( ppatch%nBFaces > 0 )
THEN
989 WRITE(stdout,
'(A,5X,A,I3,A,2(1X,E24.15),2(1X,I9))') &
990 solver_name,
'Patch',ipatch,
':', &
991 minval(ppatch%gs(1:ppatch%nBFaces)), &
992 maxval(ppatch%gs(1:ppatch%nBFaces)), &
993 minloc(ppatch%gs(1:ppatch%nBFaces)), &
994 maxloc(ppatch%gs(1:ppatch%nBFaces))
1003 IF ( global%myProcid == masterproc .AND. &
1004 global%verbLevel >= verbose_high )
THEN
1005 WRITE(stdout,
'(A,1X,A)') solver_name,
'Computing grid speeds done.'
subroutine facevectortria(xyzNodes, fVecX, fVecY, fVecZ)
subroutine registerfunction(global, funName, fileName)
subroutine rflu_computegridspeeds(pRegion)
subroutine facevectorquad(xyzNodes, fVecX, fVecY, fVecZ)
subroutine deregisterfunction(global)
subroutine facecentroidtria(xyz, fCenX, fCenY, fCenZ)
subroutine facecentroidquad(xyz, fCenX, fCenY, fCenZ)