60 CHARACTER(CHRLEN),
PRIVATE :: &
61 RCSIdentString =
'$RCSfile: RFLU_ModForcesMoments.F90,v $ $Revision: 1.11 $'
125 TYPE(t_region
),
DIMENSION(:),
POINTER :: regions
131 INTEGER :: errorflag,icomp,ipatch,ipatchglobal,ireg,ixyz,nvals2,nvals3
133 REAL(RFREAL),
DIMENSION(:,:),
ALLOCATABLE :: globalvals2,localvals2
134 REAL(RFREAL),
DIMENSION(:,:,:),
ALLOCATABLE :: globalvals3,localvals3
135 REAL(RFREAL),
DIMENSION(:,:,:),
POINTER :: pcoeff
137 TYPE(t_grid),
POINTER :: pgrid
138 TYPE(t_patch),
POINTER :: ppatch
139 TYPE(t_region
),
POINTER :: pregion
145 global => regions(1)%global
148 'RFLU_ModForcesMoments.F90')
150 nvals2 = (mass_out-mass_in+1)*global%nPatches
151 nvals3 = (zcoord-xcoord+1)*(comp_visc-comp_mom+1)*global%nPatches
157 ALLOCATE(globalvals3(xcoord:zcoord,comp_mom:comp_visc,global%nPatches), &
159 global%error = errorflag
160 IF ( global%error /= err_none )
THEN
161 CALL
errorstop(global,err_allocate,__line__,
'globalVals3')
164 ALLOCATE(localvals3(xcoord:zcoord,comp_mom:comp_visc,global%nPatches), &
166 global%error = errorflag
167 IF ( global%error /= err_none )
THEN
168 CALL
errorstop(global,err_allocate,__line__,
'localVals3')
175 DO ipatch = 1,global%nPatches
176 globalvals3(xcoord,comp_mom ,ipatch) = 0.0_rfreal
177 globalvals3(xcoord,comp_pres,ipatch) = 0.0_rfreal
178 globalvals3(xcoord,comp_visc,ipatch) = 0.0_rfreal
179 globalvals3(ycoord,comp_mom ,ipatch) = 0.0_rfreal
180 globalvals3(ycoord,comp_pres,ipatch) = 0.0_rfreal
181 globalvals3(ycoord,comp_visc,ipatch) = 0.0_rfreal
182 globalvals3(zcoord,comp_mom ,ipatch) = 0.0_rfreal
183 globalvals3(zcoord,comp_pres,ipatch) = 0.0_rfreal
184 globalvals3(zcoord,comp_visc,ipatch) = 0.0_rfreal
186 localvals3(xcoord,comp_mom ,ipatch) = 0.0_rfreal
187 localvals3(xcoord,comp_pres,ipatch) = 0.0_rfreal
188 localvals3(xcoord,comp_visc,ipatch) = 0.0_rfreal
189 localvals3(ycoord,comp_mom ,ipatch) = 0.0_rfreal
190 localvals3(ycoord,comp_pres,ipatch) = 0.0_rfreal
191 localvals3(ycoord,comp_visc,ipatch) = 0.0_rfreal
192 localvals3(zcoord,comp_mom ,ipatch) = 0.0_rfreal
193 localvals3(zcoord,comp_pres,ipatch) = 0.0_rfreal
194 localvals3(zcoord,comp_visc,ipatch) = 0.0_rfreal
201 DO ireg = 1,global%nRegionsLocal
202 pregion => regions(ireg)
203 pgrid => pregion%grid
205 DO ipatch = 1,pgrid%nPatches
206 ppatch => pregion%patches(ipatch)
208 ipatchglobal = ppatch%iPatchGlobal
210 localvals3(xcoord,comp_mom ,ipatchglobal) &
211 = localvals3(xcoord,comp_mom ,ipatchglobal) &
212 + ppatch%forceCoeffs(xcoord,comp_mom )
214 localvals3(xcoord,comp_pres,ipatchglobal) &
215 = localvals3(xcoord,comp_pres,ipatchglobal) &
216 + ppatch%forceCoeffs(xcoord,comp_pres)
218 localvals3(xcoord,comp_visc,ipatchglobal) &
219 = localvals3(xcoord,comp_visc,ipatchglobal) &
220 + ppatch%forceCoeffs(xcoord,comp_visc)
222 localvals3(ycoord,comp_mom ,ipatchglobal) &
223 = localvals3(ycoord,comp_mom ,ipatchglobal) &
224 + ppatch%forceCoeffs(ycoord,comp_mom )
226 localvals3(ycoord,comp_pres,ipatchglobal) &
227 = localvals3(ycoord,comp_pres,ipatchglobal) &
228 + ppatch%forceCoeffs(ycoord,comp_pres)
230 localvals3(ycoord,comp_visc,ipatchglobal) &
231 = localvals3(ycoord,comp_visc,ipatchglobal) &
232 + ppatch%forceCoeffs(ycoord,comp_visc)
234 localvals3(zcoord,comp_mom ,ipatchglobal) &
235 = localvals3(zcoord,comp_mom ,ipatchglobal) &
236 + ppatch%forceCoeffs(zcoord,comp_mom )
238 localvals3(zcoord,comp_pres,ipatchglobal) &
239 = localvals3(zcoord,comp_pres,ipatchglobal) &
240 + ppatch%forceCoeffs(zcoord,comp_pres)
242 localvals3(zcoord,comp_visc,ipatchglobal) &
243 = localvals3(zcoord,comp_visc,ipatchglobal) &
244 + ppatch%forceCoeffs(zcoord,comp_visc)
252 CALL mpi_allreduce(localvals3,globalvals3,nvals3,mpi_rfreal,mpi_sum, &
253 global%mpiComm,errorflag)
254 global%error = errorflag
255 IF ( global%error /= err_none )
THEN
256 CALL
errorstop(global,err_mpi_output,__line__)
259 DO ireg = 1,global%nRegionsLocal
260 pcoeff => regions(ireg)%forceCoeffsGlobal
262 DO ipatch = 1,pregion%global%nPatches
263 pcoeff(xcoord,comp_mom ,ipatch) = globalvals3(xcoord,comp_mom ,ipatch)
264 pcoeff(xcoord,comp_pres,ipatch) = globalvals3(xcoord,comp_pres,ipatch)
265 pcoeff(xcoord,comp_visc,ipatch) = globalvals3(xcoord,comp_visc,ipatch)
266 pcoeff(ycoord,comp_mom ,ipatch) = globalvals3(ycoord,comp_mom ,ipatch)
267 pcoeff(ycoord,comp_pres,ipatch) = globalvals3(ycoord,comp_pres,ipatch)
268 pcoeff(ycoord,comp_visc,ipatch) = globalvals3(ycoord,comp_visc,ipatch)
269 pcoeff(zcoord,comp_mom ,ipatch) = globalvals3(zcoord,comp_mom ,ipatch)
270 pcoeff(zcoord,comp_pres,ipatch) = globalvals3(zcoord,comp_pres,ipatch)
271 pcoeff(zcoord,comp_visc,ipatch) = globalvals3(zcoord,comp_visc,ipatch)
279 fact = 1.0_rfreal/global%forceRefArea
281 DO ireg = 1,global%nRegionsLocal
282 pcoeff => regions(ireg)%forceCoeffsGlobal
284 DO ipatch = 1,pregion%global%nPatches
285 pcoeff(xcoord,comp_mom ,ipatch) = fact*pcoeff(xcoord,comp_mom ,ipatch)
286 pcoeff(xcoord,comp_pres,ipatch) = fact*pcoeff(xcoord,comp_pres,ipatch)
287 pcoeff(xcoord,comp_visc,ipatch) = fact*pcoeff(xcoord,comp_visc,ipatch)
288 pcoeff(ycoord,comp_mom ,ipatch) = fact*pcoeff(ycoord,comp_mom ,ipatch)
289 pcoeff(ycoord,comp_pres,ipatch) = fact*pcoeff(ycoord,comp_pres,ipatch)
290 pcoeff(ycoord,comp_visc,ipatch) = fact*pcoeff(ycoord,comp_visc,ipatch)
291 pcoeff(zcoord,comp_mom ,ipatch) = fact*pcoeff(zcoord,comp_mom ,ipatch)
292 pcoeff(zcoord,comp_pres,ipatch) = fact*pcoeff(zcoord,comp_pres,ipatch)
293 pcoeff(zcoord,comp_visc,ipatch) = fact*pcoeff(zcoord,comp_visc,ipatch)
301 DO ipatch = 1,global%nPatches
302 globalvals3(xcoord,comp_mom ,ipatch) = 0.0_rfreal
303 globalvals3(xcoord,comp_pres,ipatch) = 0.0_rfreal
304 globalvals3(xcoord,comp_visc,ipatch) = 0.0_rfreal
305 globalvals3(ycoord,comp_mom ,ipatch) = 0.0_rfreal
306 globalvals3(ycoord,comp_pres,ipatch) = 0.0_rfreal
307 globalvals3(ycoord,comp_visc,ipatch) = 0.0_rfreal
308 globalvals3(zcoord,comp_mom ,ipatch) = 0.0_rfreal
309 globalvals3(zcoord,comp_pres,ipatch) = 0.0_rfreal
310 globalvals3(zcoord,comp_visc,ipatch) = 0.0_rfreal
312 localvals3(xcoord,comp_mom ,ipatch) = 0.0_rfreal
313 localvals3(xcoord,comp_pres,ipatch) = 0.0_rfreal
314 localvals3(xcoord,comp_visc,ipatch) = 0.0_rfreal
315 localvals3(ycoord,comp_mom ,ipatch) = 0.0_rfreal
316 localvals3(ycoord,comp_pres,ipatch) = 0.0_rfreal
317 localvals3(ycoord,comp_visc,ipatch) = 0.0_rfreal
318 localvals3(zcoord,comp_mom ,ipatch) = 0.0_rfreal
319 localvals3(zcoord,comp_pres,ipatch) = 0.0_rfreal
320 localvals3(zcoord,comp_visc,ipatch) = 0.0_rfreal
327 DO ireg = 1,global%nRegionsLocal
328 pregion => regions(ireg)
329 pgrid => pregion%grid
331 DO ipatch = 1,pgrid%nPatches
332 ppatch => pregion%patches(ipatch)
334 ipatchglobal = ppatch%iPatchGlobal
336 localvals3(xcoord,comp_mom ,ipatchglobal) &
337 = localvals3(xcoord,comp_mom ,ipatchglobal) &
338 + ppatch%forceVacCoeffs(xcoord,comp_mom )
340 localvals3(xcoord,comp_pres,ipatchglobal) &
341 = localvals3(xcoord,comp_pres,ipatchglobal) &
342 + ppatch%forceVacCoeffs(xcoord,comp_pres)
344 localvals3(xcoord,comp_visc,ipatchglobal) &
345 = localvals3(xcoord,comp_visc,ipatchglobal) &
346 + ppatch%forceVacCoeffs(xcoord,comp_visc)
348 localvals3(ycoord,comp_mom ,ipatchglobal) &
349 = localvals3(ycoord,comp_mom ,ipatchglobal) &
350 + ppatch%forceVacCoeffs(ycoord,comp_mom )
352 localvals3(ycoord,comp_pres,ipatchglobal) &
353 = localvals3(ycoord,comp_pres,ipatchglobal) &
354 + ppatch%forceVacCoeffs(ycoord,comp_pres)
356 localvals3(ycoord,comp_visc,ipatchglobal) &
357 = localvals3(ycoord,comp_visc,ipatchglobal) &
358 + ppatch%forceVacCoeffs(ycoord,comp_visc)
360 localvals3(zcoord,comp_mom ,ipatchglobal) &
361 = localvals3(zcoord,comp_mom ,ipatchglobal) &
362 + ppatch%forceVacCoeffs(zcoord,comp_mom )
364 localvals3(zcoord,comp_pres,ipatchglobal) &
365 = localvals3(zcoord,comp_pres,ipatchglobal) &
366 + ppatch%forceVacCoeffs(zcoord,comp_pres)
368 localvals3(zcoord,comp_visc,ipatchglobal) &
369 = localvals3(zcoord,comp_visc,ipatchglobal) &
370 + ppatch%forceVacCoeffs(zcoord,comp_visc)
378 CALL mpi_allreduce(localvals3,globalvals3,nvals3,mpi_rfreal,mpi_sum, &
379 global%mpiComm,errorflag)
380 global%error = errorflag
381 IF ( global%error /= err_none )
THEN
382 CALL
errorstop(global,err_mpi_output,__line__)
385 DO ireg = 1,global%nRegionsLocal
386 pcoeff => regions(ireg)%forceVacCoeffsGlobal
388 DO ipatch = 1,pregion%global%nPatches
389 pcoeff(xcoord,comp_mom ,ipatch) = globalvals3(xcoord,comp_mom ,ipatch)
390 pcoeff(xcoord,comp_pres,ipatch) = globalvals3(xcoord,comp_pres,ipatch)
391 pcoeff(xcoord,comp_visc,ipatch) = globalvals3(xcoord,comp_visc,ipatch)
392 pcoeff(ycoord,comp_mom ,ipatch) = globalvals3(ycoord,comp_mom ,ipatch)
393 pcoeff(ycoord,comp_pres,ipatch) = globalvals3(ycoord,comp_pres,ipatch)
394 pcoeff(ycoord,comp_visc,ipatch) = globalvals3(ycoord,comp_visc,ipatch)
395 pcoeff(zcoord,comp_mom ,ipatch) = globalvals3(zcoord,comp_mom ,ipatch)
396 pcoeff(zcoord,comp_pres,ipatch) = globalvals3(zcoord,comp_pres,ipatch)
397 pcoeff(zcoord,comp_visc,ipatch) = globalvals3(zcoord,comp_visc,ipatch)
405 fact = 1.0_rfreal/global%forceRefArea
407 DO ireg = 1,global%nRegionsLocal
408 pcoeff => regions(ireg)%forceVacCoeffsGlobal
410 DO ipatch = 1,pregion%global%nPatches
411 pcoeff(xcoord,comp_mom ,ipatch) = fact*pcoeff(xcoord,comp_mom ,ipatch)
412 pcoeff(xcoord,comp_pres,ipatch) = fact*pcoeff(xcoord,comp_pres,ipatch)
413 pcoeff(xcoord,comp_visc,ipatch) = fact*pcoeff(xcoord,comp_visc,ipatch)
414 pcoeff(ycoord,comp_mom ,ipatch) = fact*pcoeff(ycoord,comp_mom ,ipatch)
415 pcoeff(ycoord,comp_pres,ipatch) = fact*pcoeff(ycoord,comp_pres,ipatch)
416 pcoeff(ycoord,comp_visc,ipatch) = fact*pcoeff(ycoord,comp_visc,ipatch)
417 pcoeff(zcoord,comp_mom ,ipatch) = fact*pcoeff(zcoord,comp_mom ,ipatch)
418 pcoeff(zcoord,comp_pres,ipatch) = fact*pcoeff(zcoord,comp_pres,ipatch)
419 pcoeff(zcoord,comp_visc,ipatch) = fact*pcoeff(zcoord,comp_visc,ipatch)
427 DO ipatch = 1,global%nPatches
428 globalvals3(xcoord,comp_mom ,ipatch) = 0.0_rfreal
429 globalvals3(xcoord,comp_pres,ipatch) = 0.0_rfreal
430 globalvals3(xcoord,comp_visc,ipatch) = 0.0_rfreal
431 globalvals3(ycoord,comp_mom ,ipatch) = 0.0_rfreal
432 globalvals3(ycoord,comp_pres,ipatch) = 0.0_rfreal
433 globalvals3(ycoord,comp_visc,ipatch) = 0.0_rfreal
434 globalvals3(zcoord,comp_mom ,ipatch) = 0.0_rfreal
435 globalvals3(zcoord,comp_pres,ipatch) = 0.0_rfreal
436 globalvals3(zcoord,comp_visc,ipatch) = 0.0_rfreal
438 localvals3(xcoord,comp_mom ,ipatch) = 0.0_rfreal
439 localvals3(xcoord,comp_pres,ipatch) = 0.0_rfreal
440 localvals3(xcoord,comp_visc,ipatch) = 0.0_rfreal
441 localvals3(ycoord,comp_mom ,ipatch) = 0.0_rfreal
442 localvals3(ycoord,comp_pres,ipatch) = 0.0_rfreal
443 localvals3(ycoord,comp_visc,ipatch) = 0.0_rfreal
444 localvals3(zcoord,comp_mom ,ipatch) = 0.0_rfreal
445 localvals3(zcoord,comp_pres,ipatch) = 0.0_rfreal
446 localvals3(zcoord,comp_visc,ipatch) = 0.0_rfreal
453 DO ireg = 1,global%nRegionsLocal
454 pregion => regions(ireg)
455 pgrid => pregion%grid
457 DO ipatch = 1,pgrid%nPatches
458 ppatch => pregion%patches(ipatch)
460 ipatchglobal = ppatch%iPatchGlobal
462 localvals3(xcoord,comp_mom ,ipatchglobal) &
463 = localvals3(xcoord,comp_mom ,ipatchglobal) &
464 + ppatch%momentCoeffs(xcoord,comp_mom )
466 localvals3(xcoord,comp_pres,ipatchglobal) &
467 = localvals3(xcoord,comp_pres,ipatchglobal) &
468 + ppatch%momentCoeffs(xcoord,comp_pres)
470 localvals3(xcoord,comp_visc,ipatchglobal) &
471 = localvals3(xcoord,comp_visc,ipatchglobal) &
472 + ppatch%momentCoeffs(xcoord,comp_visc)
474 localvals3(ycoord,comp_mom ,ipatchglobal) &
475 = localvals3(ycoord,comp_mom ,ipatchglobal) &
476 + ppatch%momentCoeffs(ycoord,comp_mom )
478 localvals3(ycoord,comp_pres,ipatchglobal) &
479 = localvals3(ycoord,comp_pres,ipatchglobal) &
480 + ppatch%momentCoeffs(ycoord,comp_pres)
482 localvals3(ycoord,comp_visc,ipatchglobal) &
483 = localvals3(ycoord,comp_visc,ipatchglobal) &
484 + ppatch%momentCoeffs(ycoord,comp_visc)
486 localvals3(zcoord,comp_mom ,ipatchglobal) &
487 = localvals3(zcoord,comp_mom ,ipatchglobal) &
488 + ppatch%momentCoeffs(zcoord,comp_mom )
490 localvals3(zcoord,comp_pres,ipatchglobal) &
491 = localvals3(zcoord,comp_pres,ipatchglobal) &
492 + ppatch%momentCoeffs(zcoord,comp_pres)
494 localvals3(zcoord,comp_visc,ipatchglobal) &
495 = localvals3(zcoord,comp_visc,ipatchglobal) &
496 + ppatch%momentCoeffs(zcoord,comp_visc)
504 CALL mpi_allreduce(localvals3,globalvals3,nvals3,mpi_rfreal,mpi_sum, &
505 global%mpiComm,errorflag)
506 global%error = errorflag
507 IF ( global%error /= err_none )
THEN
508 CALL
errorstop(global,err_mpi_output,__line__)
511 DO ireg = 1,global%nRegionsLocal
512 pcoeff => regions(ireg)%momentCoeffsGlobal
514 DO ipatch = 1,pregion%global%nPatches
515 pcoeff(xcoord,comp_mom ,ipatch) = globalvals3(xcoord,comp_mom ,ipatch)
516 pcoeff(xcoord,comp_pres,ipatch) = globalvals3(xcoord,comp_pres,ipatch)
517 pcoeff(xcoord,comp_visc,ipatch) = globalvals3(xcoord,comp_visc,ipatch)
518 pcoeff(ycoord,comp_mom ,ipatch) = globalvals3(ycoord,comp_mom ,ipatch)
519 pcoeff(ycoord,comp_pres,ipatch) = globalvals3(ycoord,comp_pres,ipatch)
520 pcoeff(ycoord,comp_visc,ipatch) = globalvals3(ycoord,comp_visc,ipatch)
521 pcoeff(zcoord,comp_mom ,ipatch) = globalvals3(zcoord,comp_mom ,ipatch)
522 pcoeff(zcoord,comp_pres,ipatch) = globalvals3(zcoord,comp_pres,ipatch)
523 pcoeff(zcoord,comp_visc,ipatch) = globalvals3(zcoord,comp_visc,ipatch)
531 fact = 1.0_rfreal/(global%forceRefArea*global%forceRefLength)
533 DO ireg = 1,global%nRegionsLocal
534 pcoeff => regions(ireg)%momentCoeffsGlobal
536 DO ipatch = 1,pregion%global%nPatches
537 pcoeff(xcoord,comp_mom ,ipatch) = fact*pcoeff(xcoord,comp_mom ,ipatch)
538 pcoeff(xcoord,comp_pres,ipatch) = fact*pcoeff(xcoord,comp_pres,ipatch)
539 pcoeff(xcoord,comp_visc,ipatch) = fact*pcoeff(xcoord,comp_visc,ipatch)
540 pcoeff(ycoord,comp_mom ,ipatch) = fact*pcoeff(ycoord,comp_mom ,ipatch)
541 pcoeff(ycoord,comp_pres,ipatch) = fact*pcoeff(ycoord,comp_pres,ipatch)
542 pcoeff(ycoord,comp_visc,ipatch) = fact*pcoeff(ycoord,comp_visc,ipatch)
543 pcoeff(zcoord,comp_mom ,ipatch) = fact*pcoeff(zcoord,comp_mom ,ipatch)
544 pcoeff(zcoord,comp_pres,ipatch) = fact*pcoeff(zcoord,comp_pres,ipatch)
545 pcoeff(zcoord,comp_visc,ipatch) = fact*pcoeff(zcoord,comp_visc,ipatch)
553 DEALLOCATE(globalvals3,stat=errorflag)
554 global%error = errorflag
555 IF ( global%error /= err_none )
THEN
556 CALL
errorstop(global,err_deallocate,__line__,
'globalVals3')
559 DEALLOCATE(localvals3,stat=errorflag)
560 global%error = errorflag
561 IF ( global%error /= err_none )
THEN
562 CALL
errorstop(global,err_deallocate,__line__,
'localVals3')
569 ALLOCATE(globalvals2(mass_in:mass_out,global%nPatches),stat=errorflag)
570 global%error = errorflag
571 IF ( global%error /= err_none )
THEN
572 CALL
errorstop(global,err_allocate,__line__,
'globalVals2')
575 ALLOCATE(localvals2(mass_in:mass_out,global%nPatches),stat=errorflag)
576 global%error = errorflag
577 IF ( global%error /= err_none )
THEN
578 CALL
errorstop(global,err_allocate,__line__,
'localVals2')
585 DO ipatch = 1,global%nPatches
586 globalvals2(mass_in ,ipatch) = 0.0_rfreal
587 globalvals2(mass_out,ipatch) = 0.0_rfreal
589 localvals2(mass_in ,ipatch) = 0.0_rfreal
590 localvals2(mass_out,ipatch) = 0.0_rfreal
597 DO ireg = 1,global%nRegionsLocal
598 pregion => regions(ireg)
599 pgrid => pregion%grid
601 DO ipatch = 1,pgrid%nPatches
602 ppatch => pregion%patches(ipatch)
604 ipatchglobal = ppatch%iPatchGlobal
606 localvals2(mass_in ,ipatchglobal) = localvals2(mass_in ,ipatchglobal) &
607 + ppatch%massCoeffs(mass_in)
608 localvals2(mass_out,ipatchglobal) = localvals2(mass_out,ipatchglobal) &
609 + ppatch%massCoeffs(mass_out)
617 CALL mpi_allreduce(localvals2,globalvals2,nvals2,mpi_rfreal,mpi_sum, &
618 global%mpiComm,errorflag)
619 global%error = errorflag
620 IF ( global%error /= err_none )
THEN
621 CALL
errorstop(global,err_mpi_output,__line__)
624 DO ireg = 1,global%nRegionsLocal
625 DO ipatch = 1,pregion%global%nPatches
626 regions(ireg)%massCoeffsGlobal(mass_in,ipatch) &
627 = globalvals2(mass_in,ipatch)
628 regions(ireg)%massCoeffsGlobal(mass_out,ipatch) &
629 = globalvals2(mass_out,ipatch)
637 fact = 1.0_rfreal/global%forceRefArea
639 DO ireg = 1,global%nRegionsLocal
640 DO ipatch = 1,pregion%global%nPatches
641 regions(ireg)%massCoeffsGlobal(mass_in,ipatch) &
642 = fact*regions(ireg)%massCoeffsGlobal(mass_in,ipatch)
643 regions(ireg)%massCoeffsGlobal(mass_out,ipatch) &
644 = fact*regions(ireg)%massCoeffsGlobal(mass_out,ipatch)
652 DEALLOCATE(globalvals2,stat=errorflag)
653 global%error = errorflag
654 IF ( global%error /= err_none )
THEN
655 CALL
errorstop(global,err_deallocate,__line__,
'globalVals2')
658 DEALLOCATE(localvals2,stat=errorflag)
659 global%error = errorflag
660 IF ( global%error /= err_none )
THEN
661 CALL
errorstop(global,err_deallocate,__line__,
'localVals2')
706 TYPE(t_region
),
POINTER :: pregion
712 INTEGER :: ifl,ipatch
713 REAL(RFREAL) :: cfx,cfy,cfz,ch,cmass,cmomx,cmomy,cmomz,cp,cpref,fmx,fpx, &
714 fpx_vac,fmy,fpy,fpy_vac,fmz,fpz,fpz_vac,fvx,fvy,fvz,mc_in, &
715 mc_out,mpx,mpy,mpz,mvx,mvy,mvz,nm,nx,ny,nz,xc,xref,yc, &
718 TYPE(t_grid),
POINTER :: pgrid
719 TYPE(t_patch),
POINTER :: ppatch
725 global => pregion%global
728 'RFLU_ModForcesMoments.F90')
730 pgrid => pregion%grid
732 xref = global%forceRefXCoord
733 yref = global%forceRefYCoord
734 zref = global%forceRefZCoord
736 cpref = global%refPressure/ &
737 (0.5_rfreal*global%refDensity*global%refVelocity*global%refVelocity)
743 DO ipatch = 1,pgrid%nPatches
744 ppatch => pregion%patches(ipatch)
777 DO ifl = 1,ppatch%nBFaces
783 nx = ppatch%fn(xcoord,ifl)
784 ny = ppatch%fn(ycoord,ifl)
785 nz = ppatch%fn(zcoord,ifl)
786 nm = ppatch%fn(xyzmag,ifl)
788 xc = ppatch%fc(xcoord,ifl)
789 yc = ppatch%fc(ycoord,ifl)
790 zc = ppatch%fc(zcoord,ifl)
797 cfx = ppatch%cf(xcoord,ifl)
798 cfy = ppatch%cf(ycoord,ifl)
799 cfz = ppatch%cf(zcoord,ifl)
802 cmass = ppatch%cmass(ifl)
803 cmomx = ppatch%cmom(xcoord,ifl)
804 cmomy = ppatch%cmom(ycoord,ifl)
805 cmomz = ppatch%cmom(zcoord,ifl)
815 fpx_vac = fpx_vac + (cp+cpref)*nx*nm
816 fpy_vac = fpy_vac + (cp+cpref)*ny*nm
817 fpz_vac = fpz_vac + (cp+cpref)*nz*nm
827 mpx = mpx - cp*(ny*(zc - zref) + nz*(yc - yref))*nm
828 mpy = mpy + cp*(nx*(zc - zref) - nz*(xc - xref))*nm
829 mpz = mpz + cp*(ny*(xc - xref) - nx*(yc - yref))*nm
831 mvx = mvx - (cfy*(zc - zref) + cfz*(yc - yref))*nm
832 mvy = mvy + (cfx*(zc - zref) - cfz*(xc - xref))*nm
833 mvz = mvz + (cfy*(xc - xref) - cfx*(yc - yref))*nm
835 mc_in = mc_in - 0.5_rfreal*(cmass-abs(cmass))*nm
836 mc_out = mc_out + 0.5_rfreal*(cmass+abs(cmass))*nm
843 ppatch%forceCoeffs(xcoord,comp_mom ) = fmx
844 ppatch%forceCoeffs(ycoord,comp_mom ) = fmy
845 ppatch%forceCoeffs(zcoord,comp_mom ) = fmz
847 ppatch%forceCoeffs(xcoord,comp_pres) = fpx
848 ppatch%forceCoeffs(ycoord,comp_pres) = fpy
849 ppatch%forceCoeffs(zcoord,comp_pres) = fpz
851 ppatch%forceCoeffs(xcoord,comp_visc) = fvx
852 ppatch%forceCoeffs(ycoord,comp_visc) = fvy
853 ppatch%forceCoeffs(zcoord,comp_visc) = fvz
855 ppatch%forceVacCoeffs(xcoord,comp_mom ) = fmx
856 ppatch%forceVacCoeffs(ycoord,comp_mom ) = fmy
857 ppatch%forceVacCoeffs(zcoord,comp_mom ) = fmz
859 ppatch%forceVacCoeffs(xcoord,comp_pres) = fpx_vac
860 ppatch%forceVacCoeffs(ycoord,comp_pres) = fpx_vac
861 ppatch%forceVacCoeffs(zcoord,comp_pres) = fpx_vac
863 ppatch%forceVacCoeffs(xcoord,comp_visc) = fvx
864 ppatch%forceVacCoeffs(ycoord,comp_visc) = fvy
865 ppatch%forceVacCoeffs(zcoord,comp_visc) = fvz
867 ppatch%momentCoeffs(xcoord,comp_pres) = mpx
868 ppatch%momentCoeffs(ycoord,comp_pres) = mpy
869 ppatch%momentCoeffs(zcoord,comp_pres) = mpz
871 ppatch%momentCoeffs(xcoord,comp_visc) = mvx
872 ppatch%momentCoeffs(ycoord,comp_visc) = mvy
873 ppatch%momentCoeffs(zcoord,comp_visc) = mvz
875 ppatch%massCoeffs(mass_in) = mc_in
876 ppatch%massCoeffs(mass_out) = mc_out
921 TYPE(t_region
),
POINTER :: pregion
927 INTEGER :: errorflag,ipatch
929 TYPE(t_grid),
POINTER :: pgrid
930 TYPE(t_patch),
POINTER :: ppatch
936 global => pregion%global
939 'RFLU_ModForcesMoments.F90')
941 pgrid => pregion%grid
947 DO ipatch = 1,pgrid%nPatches
948 ppatch => pregion%patches(ipatch)
950 ALLOCATE(ppatch%forceCoeffs(xcoord:zcoord,comp_mom :comp_visc), &
952 global%error = errorflag
953 IF ( global%error /= err_none )
THEN
954 CALL
errorstop(global,err_allocate,__line__,
'pPatch%forceCoeffs')
957 ALLOCATE(ppatch%forceVacCoeffs(xcoord:zcoord,comp_mom :comp_visc), &
959 global%error = errorflag
960 IF ( global%error /= err_none )
THEN
961 CALL
errorstop(global,err_allocate,__line__,
'pPatch%forceVacCoeffs')
964 ALLOCATE(ppatch%momentCoeffs(xcoord:zcoord,comp_mom :comp_visc), &
966 global%error = errorflag
967 IF ( global%error /= err_none )
THEN
968 CALL
errorstop(global,err_allocate,__line__,
'pPatch%momentCoeffs')
971 ALLOCATE(ppatch%massCoeffs(mass_in:mass_out),stat=errorflag)
972 global%error = errorflag
973 IF ( global%error /= err_none )
THEN
974 CALL
errorstop(global,err_allocate,__line__,
'pPatch%massCoeffs')
978 ALLOCATE(pregion%forceCoeffsGlobal(xcoord:zcoord, &
979 comp_mom:comp_visc,global%nPatches),stat=errorflag)
980 global%error = errorflag
981 IF ( global%error /= err_none )
THEN
982 CALL
errorstop(global,err_allocate,__line__,
'pRegion%forceCoeffsGlobal')
985 ALLOCATE(pregion%forceVacCoeffsGlobal(xcoord:zcoord, &
986 comp_mom:comp_visc,global%nPatches),stat=errorflag)
987 global%error = errorflag
988 IF ( global%error /= err_none )
THEN
989 CALL
errorstop(global,err_allocate,__line__,
'pRegion%forceVacCoeffsGlobal')
992 ALLOCATE(pregion%momentCoeffsGlobal(xcoord:zcoord, &
993 comp_mom:comp_visc,global%nPatches),stat=errorflag)
994 global%error = errorflag
995 IF ( global%error /= err_none )
THEN
996 CALL
errorstop(global,err_allocate,__line__, &
997 'pRegion%momentCoeffsGlobal')
1000 ALLOCATE(pregion%massCoeffsGlobal(mass_in:mass_out, &
1001 global%nPatches),stat=errorflag)
1002 global%error = errorflag
1003 IF ( global%error /= err_none )
THEN
1004 CALL
errorstop(global,err_allocate,__line__,
'pRegion%massCoeffsGlobal')
1007 ALLOCATE(pregion%specImpulseGlobal(xcoord:zcoord, &
1008 global%nPatches),stat=errorflag)
1009 global%error = errorflag
1010 IF ( global%error /= err_none )
THEN
1011 CALL
errorstop(global,err_allocate,__line__,
'pRegion%specImpulseGlobal')
1014 ALLOCATE(pregion%specImpulseVacGlobal(xcoord:zcoord, &
1015 global%nPatches),stat=errorflag)
1016 global%error = errorflag
1017 IF ( global%error /= err_none )
THEN
1018 CALL
errorstop(global,err_allocate,__line__,
'pRegion%specImpulseVacGlobal')
1021 ALLOCATE(pregion%thrustGlobal(xcoord:zcoord, &
1022 global%nPatches),stat=errorflag)
1023 global%error = errorflag
1024 IF ( global%error /= err_none )
THEN
1025 CALL
errorstop(global,err_allocate,__line__,
'pRegion%thrustGlobal')
1028 ALLOCATE(pregion%thrustVacGlobal(xcoord:zcoord, &
1029 global%nPatches),stat=errorflag)
1030 global%error = errorflag
1031 IF ( global%error /= err_none )
THEN
1032 CALL
errorstop(global,err_allocate,__line__,
'pRegion%thrustVacGlobal')
1084 TYPE(t_region
),
POINTER :: pregion
1090 INTEGER :: errorflag
1097 global => pregion%global
1100 'RFLU_ModForcesMoments.F90')
1106 ALLOCATE(pregion%thrustFlagsGlobal(global%nPatches),stat=errorflag)
1107 global%error = errorflag
1108 IF ( global%error /= err_none )
THEN
1109 CALL
errorstop(global,err_allocate,__line__,
'pRegion%thrustFlagsGlobal')
1160 TYPE(t_region
),
POINTER :: pregion
1166 INTEGER :: errorflag,ipatch
1168 TYPE(t_grid),
POINTER :: pgrid
1169 TYPE(t_patch),
POINTER :: ppatch
1175 global => pregion%global
1178 'RFLU_ModForcesMoments.F90')
1180 pgrid => pregion%grid
1186 DO ipatch = 1,pgrid%nPatches
1187 ppatch => pregion%patches(ipatch)
1189 DEALLOCATE(ppatch%forceCoeffs,stat=errorflag)
1190 global%error = errorflag
1191 IF ( global%error /= err_none )
THEN
1192 CALL
errorstop(global,err_deallocate,__line__,
'pPatch%forceCoeffs')
1195 DEALLOCATE(ppatch%forceVacCoeffs,stat=errorflag)
1196 global%error = errorflag
1197 IF ( global%error /= err_none )
THEN
1198 CALL
errorstop(global,err_deallocate,__line__,
'pPatch%forceVacCoeffs')
1201 DEALLOCATE(ppatch%momentCoeffs,stat=errorflag)
1202 global%error = errorflag
1203 IF ( global%error /= err_none )
THEN
1204 CALL
errorstop(global,err_deallocate,__line__,
'pPatch%momentCoeffs')
1207 DEALLOCATE(ppatch%massCoeffs,stat=errorflag)
1208 global%error = errorflag
1209 IF ( global%error /= err_none )
THEN
1210 CALL
errorstop(global,err_deallocate,__line__,
'pPatch%massCoeffs')
1214 DEALLOCATE(pregion%forceCoeffsGlobal,stat=errorflag)
1215 global%error = errorflag
1216 IF ( global%error /= err_none )
THEN
1217 CALL
errorstop(global,err_deallocate,__line__, &
1218 'pRegion%forceCoeffsGlobal')
1221 DEALLOCATE(pregion%forceVacCoeffsGlobal,stat=errorflag)
1222 global%error = errorflag
1223 IF ( global%error /= err_none )
THEN
1224 CALL
errorstop(global,err_deallocate,__line__, &
1225 'pRegion%forceVacCoeffsGlobal')
1228 DEALLOCATE(pregion%momentCoeffsGlobal,stat=errorflag)
1229 global%error = errorflag
1230 IF ( global%error /= err_none )
THEN
1231 CALL
errorstop(global,err_deallocate,__line__, &
1232 'pRegion%momentCoeffsGlobal')
1235 DEALLOCATE(pregion%massCoeffsGlobal,stat=errorflag)
1236 global%error = errorflag
1237 IF ( global%error /= err_none )
THEN
1238 CALL
errorstop(global,err_deallocate,__line__,
'pRegion%massCoeffsGlobal')
1241 DEALLOCATE(pregion%specImpulseGlobal,stat=errorflag)
1242 global%error = errorflag
1243 IF ( global%error /= err_none )
THEN
1244 CALL
errorstop(global,err_deallocate,__line__,
'pRegion%specImpulseGlobal')
1247 DEALLOCATE(pregion%specImpulseVacGlobal,stat=errorflag)
1248 global%error = errorflag
1249 IF ( global%error /= err_none )
THEN
1250 CALL
errorstop(global,err_deallocate,__line__,
'pRegion%specImpulseVacGlobal')
1253 DEALLOCATE(pregion%thrustGlobal,stat=errorflag)
1254 global%error = errorflag
1255 IF ( global%error /= err_none )
THEN
1256 CALL
errorstop(global,err_deallocate,__line__,
'pRegion%thrustGlobal')
1259 DEALLOCATE(pregion%thrustVacGlobal,stat=errorflag)
1260 global%error = errorflag
1261 IF ( global%error /= err_none )
THEN
1262 CALL
errorstop(global,err_deallocate,__line__,
'pRegion%thrustVacGlobal')
1314 TYPE(t_region
),
POINTER :: pregion
1320 INTEGER :: errorflag
1327 global => pregion%global
1330 'RFLU_ModForcesMoments.F90')
1336 DEALLOCATE(pregion%thrustFlagsGlobal,stat=errorflag)
1337 global%error = errorflag
1338 IF ( global%error /= err_none )
THEN
1339 CALL
errorstop(global,err_deallocate,__line__,
'pRegion%thrustFlagsGlobal')
1389 TYPE(t_region
),
POINTER :: pregion
1397 TYPE(t_grid),
POINTER :: pgrid
1398 TYPE(t_patch),
POINTER :: ppatch
1404 global => pregion%global
1407 'RFLU_ModForcesMoments.F90')
1409 pgrid => pregion%grid
1415 DO ipatch = 1,pgrid%nPatches
1416 ppatch => pregion%patches(ipatch)
1418 ppatch%forceCoeffs(xcoord,comp_mom ) = 0.0_rfreal
1419 ppatch%forceCoeffs(xcoord,comp_pres) = 0.0_rfreal
1420 ppatch%forceCoeffs(xcoord,comp_visc) = 0.0_rfreal
1421 ppatch%forceCoeffs(ycoord,comp_mom ) = 0.0_rfreal
1422 ppatch%forceCoeffs(ycoord,comp_pres) = 0.0_rfreal
1423 ppatch%forceCoeffs(ycoord,comp_visc) = 0.0_rfreal
1424 ppatch%forceCoeffs(zcoord,comp_mom ) = 0.0_rfreal
1425 ppatch%forceCoeffs(zcoord,comp_pres) = 0.0_rfreal
1426 ppatch%forceCoeffs(zcoord,comp_visc) = 0.0_rfreal
1428 ppatch%forceVacCoeffs(xcoord,comp_mom ) = 0.0_rfreal
1429 ppatch%forceVacCoeffs(xcoord,comp_pres) = 0.0_rfreal
1430 ppatch%forceVacCoeffs(xcoord,comp_visc) = 0.0_rfreal
1431 ppatch%forceVacCoeffs(ycoord,comp_mom ) = 0.0_rfreal
1432 ppatch%forceVacCoeffs(ycoord,comp_pres) = 0.0_rfreal
1433 ppatch%forceVacCoeffs(ycoord,comp_visc) = 0.0_rfreal
1434 ppatch%forceVacCoeffs(zcoord,comp_mom ) = 0.0_rfreal
1435 ppatch%forceVacCoeffs(zcoord,comp_pres) = 0.0_rfreal
1436 ppatch%forceVacCoeffs(zcoord,comp_visc) = 0.0_rfreal
1438 ppatch%momentCoeffs(xcoord,comp_mom ) = 0.0_rfreal
1439 ppatch%momentCoeffs(xcoord,comp_pres) = 0.0_rfreal
1440 ppatch%momentCoeffs(xcoord,comp_visc) = 0.0_rfreal
1441 ppatch%momentCoeffs(ycoord,comp_mom ) = 0.0_rfreal
1442 ppatch%momentCoeffs(ycoord,comp_pres) = 0.0_rfreal
1443 ppatch%momentCoeffs(ycoord,comp_visc) = 0.0_rfreal
1444 ppatch%momentCoeffs(zcoord,comp_mom ) = 0.0_rfreal
1445 ppatch%momentCoeffs(zcoord,comp_pres) = 0.0_rfreal
1446 ppatch%momentCoeffs(zcoord,comp_visc) = 0.0_rfreal
1448 ppatch%massCoeffs(mass_in) = 0.0_rfreal
1449 ppatch%massCoeffs(mass_out) = 0.0_rfreal
1452 DO ipatch = 1,pregion%global%nPatches
1453 pregion%forceCoeffsGlobal(xcoord,comp_mom ,ipatch) = 0.0_rfreal
1454 pregion%forceCoeffsGlobal(xcoord,comp_pres,ipatch) = 0.0_rfreal
1455 pregion%forceCoeffsGlobal(xcoord,comp_visc,ipatch) = 0.0_rfreal
1456 pregion%forceCoeffsGlobal(ycoord,comp_mom ,ipatch) = 0.0_rfreal
1457 pregion%forceCoeffsGlobal(ycoord,comp_pres,ipatch) = 0.0_rfreal
1458 pregion%forceCoeffsGlobal(ycoord,comp_visc,ipatch) = 0.0_rfreal
1459 pregion%forceCoeffsGlobal(zcoord,comp_mom ,ipatch) = 0.0_rfreal
1460 pregion%forceCoeffsGlobal(zcoord,comp_pres,ipatch) = 0.0_rfreal
1461 pregion%forceCoeffsGlobal(zcoord,comp_visc,ipatch) = 0.0_rfreal
1463 pregion%forceVacCoeffsGlobal(xcoord,comp_mom ,ipatch) = 0.0_rfreal
1464 pregion%forceVacCoeffsGlobal(xcoord,comp_pres,ipatch) = 0.0_rfreal
1465 pregion%forceVacCoeffsGlobal(xcoord,comp_visc,ipatch) = 0.0_rfreal
1466 pregion%forceVacCoeffsGlobal(ycoord,comp_mom ,ipatch) = 0.0_rfreal
1467 pregion%forceVacCoeffsGlobal(ycoord,comp_pres,ipatch) = 0.0_rfreal
1468 pregion%forceVacCoeffsGlobal(ycoord,comp_visc,ipatch) = 0.0_rfreal
1469 pregion%forceVacCoeffsGlobal(zcoord,comp_mom ,ipatch) = 0.0_rfreal
1470 pregion%forceVacCoeffsGlobal(zcoord,comp_pres,ipatch) = 0.0_rfreal
1471 pregion%forceVacCoeffsGlobal(zcoord,comp_visc,ipatch) = 0.0_rfreal
1473 pregion%momentCoeffsGlobal(xcoord,comp_mom ,ipatch) = 0.0_rfreal
1474 pregion%momentCoeffsGlobal(xcoord,comp_pres,ipatch) = 0.0_rfreal
1475 pregion%momentCoeffsGlobal(xcoord,comp_visc,ipatch) = 0.0_rfreal
1476 pregion%momentCoeffsGlobal(ycoord,comp_mom ,ipatch) = 0.0_rfreal
1477 pregion%momentCoeffsGlobal(ycoord,comp_pres,ipatch) = 0.0_rfreal
1478 pregion%momentCoeffsGlobal(ycoord,comp_visc,ipatch) = 0.0_rfreal
1479 pregion%momentCoeffsGlobal(zcoord,comp_mom ,ipatch) = 0.0_rfreal
1480 pregion%momentCoeffsGlobal(zcoord,comp_pres,ipatch) = 0.0_rfreal
1481 pregion%momentCoeffsGlobal(zcoord,comp_visc,ipatch) = 0.0_rfreal
1483 pregion%massCoeffsGlobal(mass_in ,ipatch) = 0.0_rfreal
1484 pregion%massCoeffsGlobal(mass_out,ipatch) = 0.0_rfreal
1486 pregion%specImpulseGlobal(xcoord,ipatch) = 0.0_rfreal
1487 pregion%specImpulseGlobal(ycoord,ipatch) = 0.0_rfreal
1488 pregion%specImpulseGlobal(zcoord,ipatch) = 0.0_rfreal
1490 pregion%specImpulseVacGlobal(xcoord,ipatch) = 0.0_rfreal
1491 pregion%specImpulseVacGlobal(ycoord,ipatch) = 0.0_rfreal
1492 pregion%specImpulseVacGlobal(zcoord,ipatch) = 0.0_rfreal
1494 pregion%thrustGlobal(xcoord,ipatch) = 0.0_rfreal
1495 pregion%thrustGlobal(ycoord,ipatch) = 0.0_rfreal
1496 pregion%thrustGlobal(zcoord,ipatch) = 0.0_rfreal
1498 pregion%thrustVacGlobal(xcoord,ipatch) = 0.0_rfreal
1499 pregion%thrustVacGlobal(ycoord,ipatch) = 0.0_rfreal
1500 pregion%thrustVacGlobal(zcoord,ipatch) = 0.0_rfreal
1544 TYPE(t_region
),
POINTER :: pregion
1557 global => pregion%global
1560 'RFLU_ModForcesMoments.F90')
1566 DO ipatch = 1,pregion%global%nPatches
1567 pregion%thrustFlagsGlobal(ipatch) = .false.
1612 TYPE(t_region
),
POINTER :: pregion
1620 TYPE(t_grid),
POINTER :: pgrid
1621 TYPE(t_patch),
POINTER :: ppatch
1627 global => pregion%global
1630 'RFLU_ModForcesMoments.F90')
1632 pgrid => pregion%grid
1638 DO ipatch = 1,pgrid%nPatches
1639 ppatch => pregion%patches(ipatch)
1641 nullify(ppatch%forceCoeffs)
1642 nullify(ppatch%forceVacCoeffs)
1643 nullify(ppatch%momentCoeffs)
1644 nullify(ppatch%massCoeffs)
1647 nullify(pregion%forceCoeffsGlobal)
1648 nullify(pregion%forceVacCoeffsGlobal)
1649 nullify(pregion%momentCoeffsGlobal)
1650 nullify(pregion%massCoeffsGlobal)
1651 nullify(pregion%specImpulseGlobal)
1652 nullify(pregion%specImpulseVacGlobal)
1653 nullify(pregion%thrustGlobal)
1654 nullify(pregion%thrustVacGlobal)
1697 TYPE(t_region
),
POINTER :: pregion
1709 global => pregion%global
1712 'RFLU_ModForcesMoments.F90')
1718 nullify(pregion%thrustFlagsGlobal)
1763 TYPE(t_region
),
POINTER :: pregion
1776 global => pregion%global
1779 'RFLU_ModForcesMoments.F90')
1785 IF ( global%myProcid == masterproc .AND. &
1786 global%verbLevel > verbose_low )
THEN
1787 WRITE(stdout,
'(A,1X,A)') solver_name,
'Printing global force and '// &
1788 'moment coefficients...'
1789 WRITE(stdout,
'(A,3X,A)') solver_name,
'Force coefficients:'
1791 DO ipatch = 1,global%nPatches
1792 WRITE(stdout,
'(A,5X,A,1X,I2)') solver_name,
'Patch:',ipatch
1793 WRITE(stdout,
'(A,7X,A,7X,A,6X,A,8X,A)') solver_name, &
1794 'Component',
'Pressure',
'Viscous',
'Total'
1795 WRITE(stdout,
'(A,7X,A,3(1X,E13.6))') solver_name,
'x-direction:', &
1796 pregion%forceCoeffsGlobal(xcoord,comp_pres,ipatch), &
1797 pregion%forceCoeffsGlobal(xcoord,comp_visc,ipatch), &
1798 pregion%forceCoeffsGlobal(xcoord,comp_pres,ipatch)+ &
1799 pregion%forceCoeffsGlobal(xcoord,comp_visc,ipatch)
1800 WRITE(stdout,
'(A,7X,A,3(1X,E13.6))') solver_name,
'y-direction:', &
1801 pregion%forceCoeffsGlobal(ycoord,comp_pres,ipatch), &
1802 pregion%forceCoeffsGlobal(ycoord,comp_visc,ipatch), &
1803 pregion%forceCoeffsGlobal(ycoord,comp_pres,ipatch)+ &
1804 pregion%forceCoeffsGlobal(ycoord,comp_visc,ipatch)
1805 WRITE(stdout,
'(A,7X,A,3(1X,E13.6))') solver_name,
'z-direction:', &
1806 pregion%forceCoeffsGlobal(zcoord,comp_pres,ipatch), &
1807 pregion%forceCoeffsGlobal(zcoord,comp_visc,ipatch), &
1808 pregion%forceCoeffsGlobal(zcoord,comp_pres,ipatch)+ &
1809 pregion%forceCoeffsGlobal(zcoord,comp_visc,ipatch)
1812 WRITE(stdout,
'(A,3X,A)') solver_name,
'Moment coefficients:'
1814 DO ipatch = 1,global%nPatches
1815 WRITE(stdout,
'(A,5X,A,1X,I2)') solver_name,
'Patch:',ipatch
1816 WRITE(stdout,
'(A,7X,A,7X,A,6X,A,8X,A)') solver_name, &
1817 'Component',
'Pressure',
'Viscous',
'Total'
1818 WRITE(stdout,
'(A,7X,A,3(1X,E13.6))') solver_name,
'x-direction:', &
1819 pregion%momentCoeffsGlobal(xcoord,comp_pres,ipatch), &
1820 pregion%momentCoeffsGlobal(xcoord,comp_visc,ipatch), &
1821 pregion%momentCoeffsGlobal(xcoord,comp_pres,ipatch)+ &
1822 pregion%momentCoeffsGlobal(xcoord,comp_visc,ipatch)
1823 WRITE(stdout,
'(A,7X,A,3(1X,E13.6))') solver_name,
'y-direction:', &
1824 pregion%momentCoeffsGlobal(ycoord,comp_pres,ipatch), &
1825 pregion%momentCoeffsGlobal(ycoord,comp_visc,ipatch), &
1826 pregion%momentCoeffsGlobal(ycoord,comp_pres,ipatch)+ &
1827 pregion%momentCoeffsGlobal(ycoord,comp_visc,ipatch)
1828 WRITE(stdout,
'(A,7X,A,3(1X,E13.6))') solver_name,
'z-direction:', &
1829 pregion%momentCoeffsGlobal(zcoord,comp_pres,ipatch), &
1830 pregion%momentCoeffsGlobal(zcoord,comp_visc,ipatch), &
1831 pregion%momentCoeffsGlobal(zcoord,comp_pres,ipatch)+ &
1832 pregion%momentCoeffsGlobal(zcoord,comp_visc,ipatch)
1835 WRITE(stdout,
'(A,1X,A)') solver_name,
'Printing global force and '// &
1836 'moment coefficients done.'
1880 TYPE(t_region
),
DIMENSION(:),
POINTER :: regions
1886 INTEGER :: errorflag,ipatch,ipatchglobal,ireg,
nvals
1887 INTEGER,
DIMENSION(:),
ALLOCATABLE :: globalvals,localvals
1889 TYPE(t_grid),
POINTER :: pgrid
1890 TYPE(t_patch),
POINTER :: ppatch
1891 TYPE(t_region
),
POINTER :: pregion
1897 global => regions(1)%global
1900 'RFLU_ModForcesMoments.F90')
1906 nvals = global%nPatches
1912 ALLOCATE(globalvals(global%nPatches),stat=errorflag)
1913 global%error = errorflag
1914 IF ( global%error /= err_none )
THEN
1915 CALL
errorstop(global,err_allocate,__line__,
'globalVals')
1918 ALLOCATE(localvals(global%nPatches),stat=errorflag)
1919 global%error = errorflag
1920 IF ( global%error /= err_none )
THEN
1921 CALL
errorstop(global,err_allocate,__line__,
'localVals')
1928 DO ipatch = 1,global%nPatches
1929 globalvals(ipatch) = 0
1930 localvals(ipatch) = 0
1937 DO ireg = 1,global%nRegionsLocal
1938 pregion => regions(ireg)
1939 pgrid => pregion%grid
1941 DO ipatch = 1,pgrid%nPatches
1942 ppatch => pregion%patches(ipatch)
1944 ipatchglobal = ppatch%iPatchGlobal
1946 IF ( ppatch%thrustFlag .EQV. .true. )
THEN
1947 localvals(ipatchglobal) = localvals(ipatchglobal) + 1
1956 CALL mpi_allreduce(localvals,globalvals,
nvals,mpi_integer,mpi_sum, &
1957 global%mpiComm,errorflag)
1958 global%error = errorflag
1959 IF ( global%error /= err_none )
THEN
1960 CALL
errorstop(global,err_mpi_output,__line__)
1963 DO ireg = 1,global%nRegionsLocal
1964 DO ipatch = 1,pregion%global%nPatches
1965 IF ( globalvals(ipatch) > 0 )
THEN
1966 regions(ireg)%thrustFlagsGlobal(ipatch) = .true.
1975 DEALLOCATE(globalvals,stat=errorflag)
1976 global%error = errorflag
1977 IF ( global%error /= err_none )
THEN
1978 CALL
errorstop(global,err_deallocate,__line__,
'globalVals')
1981 DEALLOCATE(localvals,stat=errorflag)
1982 global%error = errorflag
1983 IF ( global%error /= err_none )
THEN
1984 CALL
errorstop(global,err_deallocate,__line__,
'localVals')
2033 TYPE(t_region
),
POINTER :: pregion
2039 LOGICAL :: fileexists
2040 CHARACTER(CHRLEN) :: ifilename
2041 INTEGER :: errorflag,ifile,ipatch
2048 global => pregion%global
2051 'RFLU_ModForcesMoments.F90')
2057 global%forceWriteCntr = global%forceWriteCntr + 1
2065 IF ( global%myProcid == masterproc )
THEN
2066 IF ( global%verbLevel > verbose_low )
THEN
2067 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing global force and '// &
2068 'moment coefficients...'
2075 DO ipatch = 1,global%nPatches
2076 IF ( global%verbLevel > verbose_low )
THEN
2077 WRITE(stdout,
'(A,3X,A,1X,I2)') solver_name,
'Patch:',ipatch
2084 WRITE(ifilename,
'(A,I4.4)') trim(global%outDir)// &
2085 trim(global%casename)//
'.fom_',ipatch
2091 IF ( global%restartFromScratch .EQV. .false. )
THEN
2092 INQUIRE(file=ifilename,exist=fileexists)
2094 IF ( fileexists .EQV. .true. )
THEN
2095 OPEN(ifile,file=ifilename,
form=
'FORMATTED',
status=
'OLD', &
2096 position=
'APPEND',iostat=errorflag)
2098 OPEN(ifile,file=ifilename,
form=
'FORMATTED',
status=
'NEW', &
2102 IF ( global%forceWriteCntr == 1 )
THEN
2103 OPEN(ifile,file=ifilename,
form=
'FORMATTED',
status=
'UNKNOWN', &
2106 OPEN(ifile,file=ifilename,
form=
'FORMATTED',
status=
'OLD', &
2107 position=
'APPEND',iostat=errorflag)
2111 global%error = errorflag
2113 IF ( global%error /= err_none )
THEN
2114 CALL
errorstop(global,err_file_open,__line__,
'File: '// &
2122 IF ( global%flowType == flow_steady )
THEN
2123 WRITE(ifile,
'(I6,18(1X,E13.6))') global%currentIter, &
2124 pregion%forceCoeffsGlobal(xcoord,comp_pres,ipatch), &
2125 pregion%forceCoeffsGlobal(xcoord,comp_visc,ipatch), &
2126 pregion%forceCoeffsGlobal(xcoord,comp_pres,ipatch)+ &
2127 pregion%forceCoeffsGlobal(xcoord,comp_visc,ipatch), &
2129 pregion%forceCoeffsGlobal(ycoord,comp_pres,ipatch), &
2130 pregion%forceCoeffsGlobal(ycoord,comp_visc,ipatch), &
2131 pregion%forceCoeffsGlobal(ycoord,comp_pres,ipatch)+ &
2132 pregion%forceCoeffsGlobal(ycoord,comp_visc,ipatch), &
2134 pregion%forceCoeffsGlobal(zcoord,comp_pres,ipatch), &
2135 pregion%forceCoeffsGlobal(zcoord,comp_visc,ipatch), &
2136 pregion%forceCoeffsGlobal(zcoord,comp_pres,ipatch)+ &
2137 pregion%forceCoeffsGlobal(zcoord,comp_visc,ipatch), &
2139 pregion%momentCoeffsGlobal(xcoord,comp_pres,ipatch), &
2140 pregion%momentCoeffsGlobal(xcoord,comp_visc,ipatch), &
2141 pregion%momentCoeffsGlobal(xcoord,comp_pres,ipatch)+ &
2142 pregion%momentCoeffsGlobal(xcoord,comp_visc,ipatch), &
2144 pregion%momentCoeffsGlobal(ycoord,comp_pres,ipatch), &
2145 pregion%momentCoeffsGlobal(ycoord,comp_visc,ipatch), &
2146 pregion%momentCoeffsGlobal(ycoord,comp_pres,ipatch)+ &
2147 pregion%momentCoeffsGlobal(ycoord,comp_visc,ipatch), &
2149 pregion%momentCoeffsGlobal(zcoord,comp_pres,ipatch), &
2150 pregion%momentCoeffsGlobal(zcoord,comp_visc,ipatch), &
2151 pregion%momentCoeffsGlobal(zcoord,comp_pres,ipatch)+ &
2152 pregion%momentCoeffsGlobal(zcoord,comp_visc,ipatch)
2154 WRITE(ifile,
'(1PE12.5,18(1X,E13.6))') global%currentTime, &
2155 pregion%forceCoeffsGlobal(xcoord,comp_pres,ipatch), &
2156 pregion%forceCoeffsGlobal(xcoord,comp_visc,ipatch), &
2157 pregion%forceCoeffsGlobal(xcoord,comp_pres,ipatch)+ &
2158 pregion%forceCoeffsGlobal(xcoord,comp_visc,ipatch), &
2160 pregion%forceCoeffsGlobal(ycoord,comp_pres,ipatch), &
2161 pregion%forceCoeffsGlobal(ycoord,comp_visc,ipatch), &
2162 pregion%forceCoeffsGlobal(ycoord,comp_pres,ipatch)+ &
2163 pregion%forceCoeffsGlobal(ycoord,comp_visc,ipatch), &
2165 pregion%forceCoeffsGlobal(zcoord,comp_pres,ipatch), &
2166 pregion%forceCoeffsGlobal(zcoord,comp_visc,ipatch), &
2167 pregion%forceCoeffsGlobal(zcoord,comp_pres,ipatch)+ &
2168 pregion%forceCoeffsGlobal(zcoord,comp_visc,ipatch), &
2170 pregion%momentCoeffsGlobal(xcoord,comp_pres,ipatch), &
2171 pregion%momentCoeffsGlobal(xcoord,comp_visc,ipatch), &
2172 pregion%momentCoeffsGlobal(xcoord,comp_pres,ipatch)+ &
2173 pregion%momentCoeffsGlobal(xcoord,comp_visc,ipatch), &
2175 pregion%momentCoeffsGlobal(ycoord,comp_pres,ipatch), &
2176 pregion%momentCoeffsGlobal(ycoord,comp_visc,ipatch), &
2177 pregion%momentCoeffsGlobal(ycoord,comp_pres,ipatch)+ &
2178 pregion%momentCoeffsGlobal(ycoord,comp_visc,ipatch), &
2180 pregion%momentCoeffsGlobal(zcoord,comp_pres,ipatch), &
2181 pregion%momentCoeffsGlobal(zcoord,comp_visc,ipatch), &
2182 pregion%momentCoeffsGlobal(zcoord,comp_pres,ipatch)+ &
2183 pregion%momentCoeffsGlobal(zcoord,comp_visc,ipatch)
2190 CLOSE(ifile,iostat=errorflag)
2191 IF (global%error /= err_none )
THEN
2192 CALL
errorstop(global,err_file_close,__line__,
'File: '// &
2197 IF ( global%verbLevel > verbose_low )
THEN
2198 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing global force and '// &
2199 'moment coefficients done.'
subroutine, private rflu_nullifyforcesmoments(pRegion)
subroutine registerfunction(global, funName, fileName)
int status() const
Obtain the status of the attribute.
subroutine, private rflu_initforcesmoments(pRegion)
subroutine, public rflu_destroyforcesmoments(pRegion)
subroutine, public rflu_createforcesmoments(pRegion)
subroutine, public rflu_setglobalthrustflags(regions)
subroutine, private rflu_initglobalthrustflags(pRegion)
subroutine, public rflu_writeglobalforcesmoments(pRegion)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE form
subroutine, public rflu_computeglobalforcesmoments(regions)
subroutine, public rflu_computelocalforcesmoments(pRegion)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE USE ModDataTypes USE nvals
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine, public rflu_destroyglobalthrustflags(pRegion)
subroutine deregisterfunction(global)
subroutine, private rflu_nullifyglobalthrustflags(pRegion)
subroutine, public rflu_printglobalforcesmoments(pRegion)
subroutine, public rflu_createglobalthrustflags(pRegion)