17 & localvalues, localvaluesd, famlist, sps, ptvalid)
32 logical,
intent(in) :: isinflow
33 integer(kind=inttype),
dimension(:, :),
intent(in) :: conn
34 integer(kind=inttype),
dimension(:),
intent(in) :: fams
35 real(kind=realtype),
dimension(:, :),
intent(in) :: vars
36 real(kind=realtype),
dimension(:, :) :: varsd
37 real(kind=realtype),
dimension(nlocalvalues),
intent(inout) :: &
39 real(kind=realtype),
dimension(nlocalvalues),
intent(inout) :: &
41 integer(kind=inttype),
dimension(:),
intent(in) :: famlist
42 integer(kind=inttype),
intent(in) :: sps
43 logical(kind=inttype),
dimension(:),
optional,
intent(in) :: ptvalid
45 integer(kind=inttype) :: i, j
46 real(kind=realtype) :: sf, vmag, vnm, vxm, vym, vzm, fx, fy, fz, u, &
47 & v, w, vnmfreestreamref
48 real(kind=realtype) :: sfd, vmagd, vnmd, vxmd, vymd, vzmd, fxd, fyd&
50 real(kind=realtype),
dimension(3) :: fp, mp, fmom, mmom, refpoint, &
51 & ss, x1, x2, x3, norm, sfacecoordref
52 real(kind=realtype),
dimension(3) :: fpd, mpd, fmomd, mmomd, &
53 & refpointd, ssd, x1d, x2d, x3d, normd, sfacecoordrefd
54 real(kind=realtype) :: pm, ptot, ttot, rhom, gammam, mnm, &
55 & massflowratelocal, am
56 real(kind=realtype) :: pmd, ptotd, ttotd, rhomd, gammamd, mnmd, &
57 & massflowratelocald, amd
58 real(kind=realtype) :: massflowrate, mass_ptot, mass_ttot, mass_ps, &
59 & mass_mn, mass_a, mass_rho, mass_vx, mass_vy, mass_vz, mass_nx, &
60 & mass_ny, mass_nz, mass_vi
61 real(kind=realtype) :: massflowrated, mass_ptotd, mass_ttotd, &
62 & mass_psd, mass_mnd, mass_ad, mass_rhod, mass_vxd, mass_vyd, mass_vzd&
63 & , mass_nxd, mass_nyd, mass_nzd, mass_vid
64 real(kind=realtype) :: area, cellarea, overcellarea
65 real(kind=realtype) :: aread, cellaread, overcellaread
66 real(kind=realtype) :: area_ptot, area_ps
67 real(kind=realtype) :: area_ptotd, area_psd
68 real(kind=realtype) :: govgm1, gm1ovg, viconst, vilocal, pratio
69 real(kind=realtype) :: vilocald, pratiod
70 real(kind=realtype) :: mredim
71 real(kind=realtype) :: mredimd
72 real(kind=realtype) :: internalflowfact, inflowfact, xc, xco, yc, &
73 & yco, zc, zco, mx, my, mz
74 real(kind=realtype) :: xcd, xcod, ycd, ycod, zcd, zcod, mxd, myd, &
76 real(kind=realtype),
dimension(3) :: cofsumfx, cofsumfy, cofsumfz
77 real(kind=realtype),
dimension(3) :: cofsumfxd, cofsumfyd, cofsumfzd
83 real(kind=realtype),
dimension(3) :: arg1
84 real(kind=realtype),
dimension(3) :: arg1d
85 real(kind=realtype),
dimension(3) :: arg2
86 real(kind=realtype),
dimension(3) :: arg2d
87 real(kind=realtype) :: temp
88 real(kind=realtype) :: tempd
89 real(kind=realtype) :: temp0
90 real(kind=realtype) :: tempd0
96 internalflowfact =
one
99 if (isinflow) inflowfact = -
one
100 mass_vid = localvaluesd(
imassvi)
101 mass_nzd = localvaluesd(
imassnz)
102 mass_nyd = localvaluesd(
imassny)
103 mass_nxd = localvaluesd(
imassnx)
104 mass_vzd = localvaluesd(
imassvz)
105 mass_vyd = localvaluesd(
imassvy)
106 mass_vxd = localvaluesd(
imassvx)
107 area_psd = localvaluesd(
iareaps)
122 fpd = localvaluesd(
ifp:
ifp+2)
123 mass_mnd = localvaluesd(
imassmn)
124 mass_psd = localvaluesd(
imassps)
127 mass_ad = localvaluesd(
imassa)
129 aread = localvaluesd(
iarea)
135 sfacecoordrefd = 0.0_8
143 if (
present(ptvalid))
then
145 if (((ptvalid(conn(1, i)) .eqv. .false.) .or. (ptvalid(conn(2&
146 & , i)) .eqv. .false.)) .or. (ptvalid(conn(3, i)) .eqv. &
148 call pushcontrol1b(0)
151 call pushcontrol1b(0)
154 call pushcontrol1b(1)
166 rhom = rhom + vars(conn(j, i),
irho)
167 vxm = vxm + vars(conn(j, i),
ivx)
168 vym = vym + vars(conn(j, i),
ivy)
169 vzm = vzm + vars(conn(j, i),
ivz)
170 pm = pm + vars(conn(j, i),
irhoe)
180 gammam =
third*gammam
192 vnm = vxm*ss(1) + vym*ss(2) + vzm*ss(3) - sf
193 vmag = sqrt(vxm**2 + vym**2 + vzm**2) - sf
194 am = sqrt(gammam*pm/rhom)
195 mnm = vmag/sqrt(gammam*pm/rhom)
196 cellarea = sqrt(ss(1)**2 + ss(2)**2 + ss(3)**2)
197 overcellarea = 1/cellarea
198 massflowratelocal = rhom*vnm*mredim
201 sfacecoordref(1) = sf*ss(1)*overcellarea
202 sfacecoordref(2) = sf*ss(2)*overcellarea
203 sfacecoordref(3) = sf*ss(3)*overcellarea
207 if (
one .gt.
one/ptot)
then
209 call pushcontrol1b(0)
211 call pushcontrol1b(1)
214 vilocal = sqrt(viconst*(
one-pratio**gm1ovg)*ttot*
tref)
229 xc = xco - refpoint(1)
230 yc = yco - refpoint(2)
231 zc = zco - refpoint(3)
241 call pushreal8array(ss, 3)
243 call pushreal8(massflowratelocal)
244 massflowratelocal = massflowratelocal/
timeref*internalflowfact&
246 fx = massflowratelocal*ss(1)*vxm
247 fy = massflowratelocal*ss(2)*vym
248 fz = massflowratelocal*ss(3)*vzm
256 zcod = fz*cofsumfzd(3) + fy*cofsumfyd(3) + fx*cofsumfxd(3)
257 fzd = zco*cofsumfzd(3) + yco*cofsumfzd(2) + xco*cofsumfzd(1) +&
258 & yc*mxd - xc*myd - fmomd(3)
259 ycod = fz*cofsumfzd(2) + fy*cofsumfyd(2) + fx*cofsumfxd(2)
260 xcod = fz*cofsumfzd(1) + fy*cofsumfyd(1) + fx*cofsumfxd(1)
261 fyd = zco*cofsumfyd(3) + yco*cofsumfyd(2) + xco*cofsumfyd(1) +&
262 & xc*mzd - zc*mxd - fmomd(2)
263 fxd = zco*cofsumfxd(3) + yco*cofsumfxd(2) + xco*cofsumfxd(1) +&
264 & zc*myd - yc*mzd - fmomd(1)
265 xcd = fy*mzd - fz*myd
266 ycd = fz*mxd - fx*mzd
267 zcd = fx*myd - fy*mxd
269 ssd(3) = ssd(3) + massflowratelocal*vzm*fzd
270 massflowratelocald = vzm*ss(3)*fzd + vym*ss(2)*fyd + vxm*ss(1)&
272 vzmd = massflowratelocal*ss(3)*fzd
273 ssd(2) = ssd(2) + massflowratelocal*vym*fyd
274 vymd = massflowratelocal*ss(2)*fyd
275 ssd(1) = ssd(1) + massflowratelocal*vxm*fxd
276 vxmd = massflowratelocal*ss(1)*fxd
277 call popreal8(massflowratelocal)
278 tempd0 = internalflowfact*inflowfact*massflowratelocald/&
280 massflowratelocald = tempd0
282 call popreal8array(ss, 3)
283 cellaread = -(sum(ss*ssd)/cellarea**2)
290 fxd = zco*cofsumfxd(3) + yco*cofsumfxd(2) + xco*cofsumfxd(1) +&
291 & zc*myd - yc*mzd + fpd(1)
293 fzd = zco*cofsumfzd(3) + yco*cofsumfzd(2) + xco*cofsumfzd(1) +&
294 & yc*mxd - xc*myd + fpd(3)
295 fyd = zco*cofsumfyd(3) + yco*cofsumfyd(2) + xco*cofsumfyd(1) +&
296 & xc*mzd + fpd(2) - zc*mxd
297 xcd = xcd + fy*mzd - fz*myd
298 xcod = xcod + fz*cofsumfzd(1) + fy*cofsumfyd(1) + fx*cofsumfxd&
300 ycd = ycd + fz*mxd - fx*mzd
301 ycod = ycod + fz*cofsumfzd(2) + fy*cofsumfyd(2) + fx*cofsumfxd&
303 zcd = zcd + fx*myd - fy*mxd
304 zcod = zcod + fz*cofsumfzd(3) + fy*cofsumfyd(3) + fx*cofsumfxd&
306 pmd = ss(3)*fzd + ss(2)*fyd + ss(1)*fxd
307 ssd(3) = ssd(3) + pm*fzd
308 ssd(2) = ssd(2) + pm*fyd
309 ssd(1) = ssd(1) + pm*fxd
313 refpointd(3) = refpointd(3) - zcd
314 refpointd(2) = refpointd(2) - ycd
315 refpointd(1) = refpointd(1) - xcd
327 ssd(3) = ssd(3) + overcellarea*massflowratelocal*mass_nzd
328 overcellaread = massflowratelocal*ss(3)*mass_nzd + &
329 & massflowratelocal*ss(2)*mass_nyd + massflowratelocal*ss(1)*&
331 massflowratelocald = massflowratelocald + overcellarea*ss(3)*&
332 & mass_nzd + overcellarea*ss(2)*mass_nyd + overcellarea*ss(1)*&
333 & mass_nxd + vilocal*mass_vid
334 ssd(2) = ssd(2) + overcellarea*massflowratelocal*mass_nyd
335 ssd(1) = ssd(1) + overcellarea*massflowratelocal*mass_nxd
336 vilocald = massflowratelocal*mass_vid
337 temp0 =
one - pratio**gm1ovg
338 if (viconst*(temp0*(ttot*
tref)) .eq. 0.0_8)
then
341 tempd = viconst*vilocald/(2.0*sqrt(viconst*(temp0*(ttot*
tref&
344 if (pratio .le. 0.0_8 .and. (gm1ovg .eq. 0.0_8 .or. gm1ovg &
345 & .ne. int(gm1ovg)))
then
348 pratiod = -(gm1ovg*pratio**(gm1ovg-1)*ttot*
tref*tempd)
350 ttotd = ttotd +
tref*temp0*tempd
352 call popcontrol1b(branch)
353 if (branch .eq. 0) ptotd = ptotd -
one*pratiod/ptot**2
354 sfacecoordrefd(3) = sfacecoordrefd(3) - massflowratelocal*&
356 massflowratelocald = massflowratelocald + (
uref*vzm-&
357 & sfacecoordref(3))*mass_vzd + (
uref*vym-sfacecoordref(2))*&
358 & mass_vyd + (
uref*vxm-sfacecoordref(1))*mass_vxd + mnm*&
359 & mass_mnd + pm*mass_psd + am*
uref*mass_ad + rhom*
rhoref*&
360 & mass_rhod + ttot*
tref*mass_ttotd + ptot*
pref*mass_ptotd + &
362 sfacecoordrefd(2) = sfacecoordrefd(2) - massflowratelocal*&
364 sfacecoordrefd(1) = sfacecoordrefd(1) - massflowratelocal*&
366 overcellaread = overcellaread + sf*ss(3)*sfacecoordrefd(3) + &
367 & sf*ss(2)*sfacecoordrefd(2) + sf*ss(1)*sfacecoordrefd(1)
368 pmd = pmd + cellarea*area_psd + massflowratelocal*mass_psd
369 cellaread = cellaread + pm*area_psd + ptot*
pref*area_ptotd + &
370 & aread - overcellaread/cellarea**2
371 mnmd = massflowratelocal*mass_mnd
372 amd = massflowratelocal*
uref*mass_ad
374 prefd =
prefd + ptot*cellarea*area_ptotd + ptot*&
375 & massflowratelocal*mass_ptotd + pm*pmd
376 vnmd = rhom*mredim*massflowratelocald
377 if (ss(1)**2 + ss(2)**2 + ss(3)**2 .eq. 0.0_8)
then
380 tempd0 = cellaread/(2.0*sqrt(ss(1)**2+ss(2)**2+ss(3)**2))
382 temp = gammam*pm/rhom
385 if (temp .eq. 0.0_8)
then
388 tempd = -(vmag*mnmd/(rhom*2.0*temp0**3))
390 rhomd = massflowratelocal*
rhoref*mass_rhod + vnm*mredim*&
391 & massflowratelocald - temp*tempd
392 pmd =
pref*pmd + gammam*tempd
394 temp = gammam*pm/rhom
395 if (temp .eq. 0.0_8)
then
398 tempd = amd/(rhom*2.0*sqrt(temp))
400 gammamd = gammamd + pm*tempd
401 pmd = pmd + gammam*tempd
402 rhomd = rhomd - temp*tempd
403 if (vxm**2 + vym**2 + vzm**2 .eq. 0.0_8)
then
406 tempd = vmagd/(2.0*sqrt(vxm**2+vym**2+vzm**2))
408 vzmd = vzmd +
uref*massflowratelocal*mass_vzd + 2*vzm*tempd + &
410 vymd = vymd +
uref*massflowratelocal*mass_vyd + 2*vym*tempd + &
412 vxmd = vxmd +
uref*massflowratelocal*mass_vxd + 2*vxm*tempd + &
414 ssd(3) = ssd(3) + sf*overcellarea*sfacecoordrefd(3) + 2*ss(3)*&
416 sfd = overcellarea*ss(3)*sfacecoordrefd(3) + overcellarea*ss(2&
417 & )*sfacecoordrefd(2) + overcellarea*ss(1)*sfacecoordrefd(1) -&
419 sfacecoordrefd(3) = 0.0_8
420 ssd(2) = ssd(2) + sf*overcellarea*sfacecoordrefd(2) + 2*ss(2)*&
422 sfacecoordrefd(2) = 0.0_8
423 ssd(1) = ssd(1) + sf*overcellarea*sfacecoordrefd(1) + 2*ss(1)*&
425 sfacecoordrefd(1) = 0.0_8
426 ptotd = ptotd +
pref*cellarea*area_ptotd + massflowratelocal*&
429 ttotd = ttotd + massflowratelocal*
tref*mass_ttotd
430 trefd =
trefd + ttot*massflowratelocal*mass_ttotd
431 mredimd = mredimd + rhom*vnm*massflowratelocald
433 & vzmd, pm, pmd, ttot, ttotd)
435 & vzmd, pm, pmd, ptot, ptotd)
436 normd = normd +
half*ssd
437 call cross_prod_b(arg1(:), arg1d(:), arg2(:), arg2d(:), norm, &
452 gammamd =
third*gammamd
463 varsd(conn(j, i),
irhoe) = varsd(conn(j, i),
irhoe) + pmd
464 varsd(conn(j, i),
ivz) = varsd(conn(j, i),
ivz) + vzmd
465 varsd(conn(j, i),
ivy) = varsd(conn(j, i),
ivy) + vymd
466 varsd(conn(j, i),
ivx) = varsd(conn(j, i),
ivx) + vxmd
467 varsd(conn(j, i),
irho) = varsd(conn(j, i),
irho) + rhomd
470 call popcontrol1b(branch)
488 & localvalues, famlist, sps, ptvalid)
501 logical,
intent(in) :: isinflow
502 integer(kind=inttype),
dimension(:, :),
intent(in) :: conn
503 integer(kind=inttype),
dimension(:),
intent(in) :: fams
504 real(kind=realtype),
dimension(:, :),
intent(in) :: vars
505 real(kind=realtype),
dimension(nlocalvalues),
intent(inout) :: &
507 integer(kind=inttype),
dimension(:),
intent(in) :: famlist
508 integer(kind=inttype),
intent(in) :: sps
509 logical(kind=inttype),
dimension(:),
optional,
intent(in) :: ptvalid
511 integer(kind=inttype) :: i, j
512 real(kind=realtype) :: sf, vmag, vnm, vxm, vym, vzm, fx, fy, fz, u, &
513 & v, w, vnmfreestreamref
514 real(kind=realtype),
dimension(3) :: fp, mp, fmom, mmom, refpoint, &
515 & ss, x1, x2, x3, norm, sfacecoordref
516 real(kind=realtype) :: pm, ptot, ttot, rhom, gammam, mnm, &
517 & massflowratelocal, am
518 real(kind=realtype) :: massflowrate, mass_ptot, mass_ttot, mass_ps, &
519 & mass_mn, mass_a, mass_rho, mass_vx, mass_vy, mass_vz, mass_nx, &
520 & mass_ny, mass_nz, mass_vi
521 real(kind=realtype) :: area, cellarea, overcellarea
522 real(kind=realtype) :: area_ptot, area_ps
523 real(kind=realtype) :: govgm1, gm1ovg, viconst, vilocal, pratio
524 real(kind=realtype) :: mredim
525 real(kind=realtype) :: internalflowfact, inflowfact, xc, xco, yc, &
526 & yco, zc, zco, mx, my, mz
527 real(kind=realtype),
dimension(3) :: cofsumfx, cofsumfy, cofsumfz
528 logical :: triisvalid
533 real(kind=realtype),
dimension(3) :: arg1
534 real(kind=realtype),
dimension(3) :: arg2
563 internalflowfact =
one
566 if (isinflow) inflowfact = -
one
573 if (
present(ptvalid))
then
575 if (((ptvalid(conn(1, i)) .eqv. .false.) .or. (ptvalid(conn(2&
576 & , i)) .eqv. .false.)) .or. (ptvalid(conn(3, i)) .eqv. &
577 & .false.)) triisvalid = .false.
590 rhom = rhom + vars(conn(j, i),
irho)
591 vxm = vxm + vars(conn(j, i),
ivx)
592 vym = vym + vars(conn(j, i),
ivy)
593 vzm = vzm + vars(conn(j, i),
ivz)
594 pm = pm + vars(conn(j, i),
irhoe)
604 gammam =
third*gammam
616 vnm = vxm*ss(1) + vym*ss(2) + vzm*ss(3) - sf
617 vmag = sqrt(vxm**2 + vym**2 + vzm**2) - sf
618 am = sqrt(gammam*pm/rhom)
619 mnm = vmag/sqrt(gammam*pm/rhom)
620 cellarea = sqrt(ss(1)**2 + ss(2)**2 + ss(3)**2)
621 area = area + cellarea
622 overcellarea = 1/cellarea
623 massflowratelocal = rhom*vnm*mredim
624 massflowrate = massflowrate + massflowratelocal
626 mass_ptot = mass_ptot + ptot*massflowratelocal*
pref
627 mass_ttot = mass_ttot + ttot*massflowratelocal*
tref
628 mass_rho = mass_rho + rhom*massflowratelocal*
rhoref
629 mass_a = mass_a + am*massflowratelocal*
uref
630 mass_ps = mass_ps + pm*massflowratelocal
631 mass_mn = mass_mn + mnm*massflowratelocal
632 area_ptot = area_ptot + ptot*
pref*cellarea
633 area_ps = area_ps + pm*cellarea
634 sfacecoordref(1) = sf*ss(1)*overcellarea
635 sfacecoordref(2) = sf*ss(2)*overcellarea
636 sfacecoordref(3) = sf*ss(3)*overcellarea
637 mass_vx = mass_vx + (vxm*
uref-sfacecoordref(1))*&
639 mass_vy = mass_vy + (vym*
uref-sfacecoordref(2))*&
641 mass_vz = mass_vz + (vzm*
uref-sfacecoordref(3))*&
646 if (
one .gt.
one/ptot)
then
651 vilocal = sqrt(viconst*(
one-pratio**gm1ovg)*ttot*
tref)
652 mass_vi = mass_vi + vilocal*massflowratelocal
653 mass_nx = mass_nx + ss(1)*overcellarea*massflowratelocal
654 mass_ny = mass_ny + ss(2)*overcellarea*massflowratelocal
655 mass_nz = mass_nz + ss(3)*overcellarea*massflowratelocal
670 xc = xco - refpoint(1)
671 yc = yco - refpoint(2)
672 zc = zco - refpoint(3)
689 cofsumfx(1) = cofsumfx(1) + xco*fx
690 cofsumfx(2) = cofsumfx(2) + yco*fx
691 cofsumfx(3) = cofsumfx(3) + zco*fx
693 cofsumfy(1) = cofsumfy(1) + xco*fy
694 cofsumfy(2) = cofsumfy(2) + yco*fy
695 cofsumfy(3) = cofsumfy(3) + zco*fy
697 cofsumfz(1) = cofsumfz(1) + xco*fz
698 cofsumfz(2) = cofsumfz(2) + yco*fz
699 cofsumfz(3) = cofsumfz(3) + zco*fz
703 massflowratelocal = massflowratelocal/
timeref*internalflowfact&
705 fx = massflowratelocal*ss(1)*vxm
706 fy = massflowratelocal*ss(2)*vym
707 fz = massflowratelocal*ss(3)*vzm
708 fmom(1) = fmom(1) - fx
709 fmom(2) = fmom(2) - fy
710 fmom(3) = fmom(3) - fz
714 mmom(1) = mmom(1) + mx
715 mmom(2) = mmom(2) + my
716 mmom(3) = mmom(3) + mz
719 cofsumfx(1) = cofsumfx(1) + xco*fx
720 cofsumfx(2) = cofsumfx(2) + yco*fx
721 cofsumfx(3) = cofsumfx(3) + zco*fx
723 cofsumfy(1) = cofsumfy(1) + xco*fy
724 cofsumfy(2) = cofsumfy(2) + yco*fy
725 cofsumfy(3) = cofsumfy(3) + zco*fy
727 cofsumfz(1) = cofsumfz(1) + xco*fz
728 cofsumfz(2) = cofsumfz(2) + yco*fz
729 cofsumfz(3) = cofsumfz(3) + zco*fz
735 localvalues(
iarea) = localvalues(
iarea) + area
770 & localvalues, localvaluesd, famlist, sps)
778 integer(kind=inttype),
dimension(:, :),
intent(in) :: conn
779 integer(kind=inttype),
dimension(:),
intent(in) :: fams
780 real(kind=realtype),
dimension(:, :),
intent(in) :: vars
781 real(kind=realtype),
dimension(:, :) :: varsd
782 real(kind=realtype),
intent(inout) :: localvalues(
nlocalvalues)
783 real(kind=realtype),
intent(inout) :: localvaluesd(
nlocalvalues)
784 integer(kind=inttype),
dimension(:),
intent(in) :: famlist
785 integer(kind=inttype),
intent(in) :: sps
787 real(kind=realtype),
dimension(3) :: fp, fv, mp, mv
788 real(kind=realtype),
dimension(3) :: fpd, fvd, mpd, mvd
789 real(kind=realtype),
dimension(3) :: cofsumfx, cofsumfy, cofsumfz
790 real(kind=realtype),
dimension(3) :: cofsumfxd, cofsumfyd, cofsumfzd
791 integer(kind=inttype) :: i, j
792 real(kind=realtype),
dimension(3) :: ss, norm, refpoint
793 real(kind=realtype),
dimension(3) :: ssd, normd, refpointd
794 real(kind=realtype),
dimension(3) :: p1, p2, p3, v1, v2, v3, x1, x2&
796 real(kind=realtype),
dimension(3) :: p1d, p2d, p3d, v1d, v2d, v3d, &
798 real(kind=realtype) :: fact,
triarea, fx, fy, fz, mx, my, mz, xc, &
799 & xco, yc, yco, zc, zco
800 real(kind=realtype) :: triaread, fxd, fyd, fzd, mxd, myd, mzd, xcd, &
801 & xcod, ycd, ycod, zcd, zcod
803 real(kind=realtype),
dimension(3) :: arg1
804 real(kind=realtype),
dimension(3) :: arg1d
805 real(kind=realtype),
dimension(3) :: arg2
806 real(kind=realtype),
dimension(3) :: arg2d
807 real(kind=realtype) :: result1
808 real(kind=realtype) :: result1d
809 real(kind=realtype) :: tempd
822 mvd = localvaluesd(
imv:
imv+2)
824 mpd = localvaluesd(
imp:
imp+2)
826 fvd = localvaluesd(
ifv:
ifv+2)
828 fpd = localvaluesd(
ifp:
ifp+2)
847 xco =
third*(x1(1)+x2(1)+x3(1))
848 yco =
third*(x1(2)+x2(2)+x3(2))
849 zco =
third*(x1(3)+x2(3)+x3(3))
850 xc = xco - refpoint(1)
851 yc = yco - refpoint(2)
852 zc = zco - refpoint(3)
865 fx = (v1(1)+v2(1)+v3(1))*
triarea
866 fy = (v1(2)+v2(2)+v3(2))*
triarea
867 fz = (v1(3)+v2(3)+v3(3))*
triarea
876 zcod = fz*cofsumfzd(3) + fy*cofsumfyd(3) + fx*cofsumfxd(3)
877 fzd = zco*cofsumfzd(3) + yco*cofsumfzd(2) + xco*cofsumfzd(1) + &
878 & yc*mxd - xc*myd + fvd(3)
879 ycod = fz*cofsumfzd(2) + fy*cofsumfyd(2) + fx*cofsumfxd(2)
880 xcod = fz*cofsumfzd(1) + fy*cofsumfyd(1) + fx*cofsumfxd(1)
881 fyd = zco*cofsumfyd(3) + yco*cofsumfyd(2) + xco*cofsumfyd(1) + &
882 & xc*mzd + fvd(2) - zc*mxd
883 fxd = zco*cofsumfxd(3) + yco*cofsumfxd(2) + xco*cofsumfxd(1) + &
884 & zc*myd - yc*mzd + fvd(1)
885 xcd = fy*mzd - fz*myd
886 ycd = fz*mxd - fx*mzd
887 zcd = fx*myd - fy*mxd
892 triaread = (v1(3)+v2(3)+v3(3))*fzd + (v1(2)+v2(2)+v3(2))*fyd + (&
893 & v1(1)+v2(1)+v3(1))*fxd
894 v1d(3) = v1d(3) + tempd
895 v2d(3) = v2d(3) + tempd
896 v3d(3) = v3d(3) + tempd
898 v1d(2) = v1d(2) + tempd
899 v2d(2) = v2d(2) + tempd
900 v3d(2) = v3d(2) + tempd
902 v1d(1) = v1d(1) + tempd
903 v2d(1) = v2d(1) + tempd
904 v3d(1) = v3d(1) + tempd
911 fz = (p1(3)+p2(3)+p3(3))*
triarea
912 fy = (p1(2)+p2(2)+p3(2))*
triarea
913 fx = (p1(1)+p2(1)+p3(1))*
triarea
916 fxd = zco*cofsumfxd(3) + yco*cofsumfxd(2) + xco*cofsumfxd(1) + &
917 & zc*myd - yc*mzd + fpd(1)
919 fzd = zco*cofsumfzd(3) + yco*cofsumfzd(2) + xco*cofsumfzd(1) + &
920 & yc*mxd - xc*myd + fpd(3)
921 fyd = zco*cofsumfyd(3) + yco*cofsumfyd(2) + xco*cofsumfyd(1) + &
922 & xc*mzd + fpd(2) - zc*mxd
923 xcd = xcd + fy*mzd - fz*myd
924 xcod = xcod + fz*cofsumfzd(1) + fy*cofsumfyd(1) + fx*cofsumfxd(1&
926 ycd = ycd + fz*mxd - fx*mzd
927 ycod = ycod + fz*cofsumfzd(2) + fy*cofsumfyd(2) + fx*cofsumfxd(2&
929 zcd = zcd + fx*myd - fy*mxd
930 zcod = zcod + fz*cofsumfzd(3) + fy*cofsumfyd(3) + fx*cofsumfxd(3&
936 triaread = triaread + (p1(3)+p2(3)+p3(3))*fzd + (p1(2)+p2(2)+p3(&
937 & 2))*fyd + (p1(1)+p2(1)+p3(1))*fxd
938 p1d(3) = p1d(3) + tempd
939 p2d(3) = p2d(3) + tempd
940 p3d(3) = p3d(3) + tempd
942 p1d(2) = p1d(2) + tempd
943 p2d(2) = p2d(2) + tempd
944 p3d(2) = p3d(2) + tempd
946 p1d(1) = p1d(1) + tempd
947 p2d(1) = p2d(1) + tempd
948 p3d(1) = p3d(1) + tempd
955 refpointd(3) = refpointd(3) - zcd
956 refpointd(2) = refpointd(2) - ycd
957 refpointd(1) = refpointd(1) - xcd
962 x1d(3) = x1d(3) + tempd
963 x2d(3) = x2d(3) + tempd
964 x3d(3) = x3d(3) + tempd
966 x1d(2) = x1d(2) + tempd
967 x2d(2) = x2d(2) + tempd
968 x3d(2) = x3d(2) + tempd
970 x1d(1) = x1d(1) + tempd
971 x2d(1) = x2d(1) + tempd
972 x3d(1) = x3d(1) + tempd
973 result1d =
third*triaread
975 normd = normd +
half*ssd
976 call cross_prod_b(arg1(:), arg1d(:), arg2(:), arg2d(:), norm, &
979 x1d = x1d - arg2d - arg1d
1005 integer(kind=inttype),
dimension(:, :),
intent(in) :: conn
1006 integer(kind=inttype),
dimension(:),
intent(in) :: fams
1007 real(kind=realtype),
dimension(:, :),
intent(in) :: vars
1008 real(kind=realtype),
intent(inout) :: localvalues(
nlocalvalues)
1009 integer(kind=inttype),
dimension(:),
intent(in) :: famlist
1010 integer(kind=inttype),
intent(in) :: sps
1012 real(kind=realtype),
dimension(3) :: fp, fv, mp, mv
1013 real(kind=realtype),
dimension(3) :: cofsumfx, cofsumfy, cofsumfz
1014 integer(kind=inttype) :: i, j
1015 real(kind=realtype),
dimension(3) :: ss, norm, refpoint
1016 real(kind=realtype),
dimension(3) :: p1, p2, p3, v1, v2, v3, x1, x2&
1018 real(kind=realtype) :: fact,
triarea, fx, fy, fz, mx, my, mz, xc, &
1019 & xco, yc, yco, zc, zco
1021 real(kind=realtype),
dimension(3) :: arg1
1022 real(kind=realtype),
dimension(3) :: arg2
1023 real(kind=realtype) :: result1
1037 do i=1,
size(conn, 2)
1052 xco =
third*(x1(1)+x2(1)+x3(1))
1053 yco =
third*(x1(2)+x2(2)+x3(2))
1054 zco =
third*(x1(3)+x2(3)+x3(3))
1055 xc = xco - refpoint(1)
1056 yc = yco - refpoint(2)
1057 zc = zco - refpoint(3)
1062 fx = (p1(1)+p2(1)+p3(1))*
triarea
1063 fy = (p1(2)+p2(2)+p3(2))*
triarea
1064 fz = (p1(3)+p2(3)+p3(3))*
triarea
1076 cofsumfx(1) = cofsumfx(1) + xco*fx
1077 cofsumfx(2) = cofsumfx(2) + yco*fx
1078 cofsumfx(3) = cofsumfx(3) + zco*fx
1080 cofsumfy(1) = cofsumfy(1) + xco*fy
1081 cofsumfy(2) = cofsumfy(2) + yco*fy
1082 cofsumfy(3) = cofsumfy(3) + zco*fy
1084 cofsumfz(1) = cofsumfz(1) + xco*fz
1085 cofsumfz(2) = cofsumfz(2) + yco*fz
1086 cofsumfz(3) = cofsumfz(3) + zco*fz
1091 fx = (v1(1)+v2(1)+v3(1))*
triarea
1092 fy = (v1(2)+v2(2)+v3(2))*
triarea
1093 fz = (v1(3)+v2(3)+v3(3))*
triarea
1106 cofsumfx(1) = cofsumfx(1) + xco*fx
1107 cofsumfx(2) = cofsumfx(2) + yco*fx
1108 cofsumfx(3) = cofsumfx(3) + zco*fx
1110 cofsumfy(1) = cofsumfy(1) + xco*fy
1111 cofsumfy(2) = cofsumfy(2) + yco*fy
1112 cofsumfy(3) = cofsumfy(3) + zco*fy
1114 cofsumfz(1) = cofsumfz(1) + xco*fz
1115 cofsumfz(2) = cofsumfz(2) + yco*fz
1116 cofsumfz(3) = cofsumfz(3) + zco*fz
integer(kind=inttype), dimension(:), pointer bctype
integer(kind=inttype), parameter imassvz
integer(kind=inttype), parameter iareaps
real(kind=realtype), parameter zero
integer(kind=inttype), parameter nlocalvalues
integer(kind=inttype), parameter izippflowy
integer(kind=inttype), parameter iflowmp
integer(kind=inttype), parameter imassnx
integer(kind=inttype), parameter imassflow
real(kind=realtype), parameter third
integer(kind=inttype), parameter icoforcez
integer(kind=inttype), parameter imassptot
integer(kind=inttype), parameter iflowfm
integer(kind=inttype), parameter izippwallz
integer(kind=inttype), parameter izippflowx
integer(kind=inttype), parameter imassnz
integer(kind=inttype), parameter imp
integer(kind=inttype), parameter imassa
integer(kind=inttype), parameter ifv
integer(kind=inttype), parameter imassny
integer(kind=inttype), parameter izippflowsface
integer(kind=inttype), parameter icoforcex
real(kind=realtype), parameter one
integer(kind=inttype), parameter iflowmm
integer(kind=inttype), parameter imassvy
real(kind=realtype), parameter half
integer(kind=inttype), parameter imassvx
integer(kind=inttype), parameter imassrho
integer(kind=inttype), parameter izippwalltpz
integer(kind=inttype), parameter imassmn
integer(kind=inttype), parameter icoforcey
integer(kind=inttype), parameter iarea
integer(kind=inttype), parameter imassvi
real(kind=realtype), parameter two
integer(kind=inttype), parameter imv
integer(kind=inttype), parameter imassps
integer(kind=inttype), parameter izippwalltvx
integer(kind=inttype), parameter izippflowgamma
integer(kind=inttype), parameter izippwalltvz
integer(kind=inttype), parameter izippwalltpx
integer(kind=inttype), parameter imassttot
integer(kind=inttype), parameter izippwallx
integer(kind=inttype), parameter internalflow
integer(kind=inttype), parameter ifp
integer(kind=inttype), parameter iareaptot
integer(kind=inttype), parameter izippflowz
subroutine computeptot(rho, u, v, w, p, ptot)
subroutine computeptot_b(rho, rhod, u, ud, v, vd, w, wd, p, pd, ptot, ptotd)
subroutine computettot(rho, u, v, w, p, ttot)
subroutine computettot_b(rho, rhod, u, ud, v, vd, w, wd, p, pd, ttot, ttotd)
real(kind=realtype) gammainf
real(kind=realtype) rhoinfd
real(kind=realtype) trefd
real(kind=realtype) uinfd
real(kind=realtype) rgasd
real(kind=realtype) prefd
real(kind=realtype) rhoref
real(kind=realtype) urefd
real(kind=realtype) pinfd
real(kind=realtype) rhoinf
real(kind=realtype) rhorefd
real(kind=realtype) timeref
real(kind=realtype) timerefd
logical function faminlist(famID, famList)
type(familyexchange), dimension(:, :), allocatable, target bcfamexchange
real(kind=realtype) function mynorm2(x)
subroutine cross_prod(a, b, c)
subroutine mynorm2_b(x, xd, mynorm2d)
subroutine cross_prod_b(a, ad, b, bd, c, cd)
subroutine wallintegrationzipper(conn, fams, vars, localvalues, famlist, sps)
subroutine flowintegrationzipper(isinflow, conn, fams, vars, localvalues, famlist, sps, ptvalid)
subroutine flowintegrationzipper_b(isinflow, conn, fams, vars, varsd, localvalues, localvaluesd, famlist, sps, ptvalid)
subroutine wallintegrationzipper_b(conn, fams, vars, varsd, localvalues, localvaluesd, famlist, sps)
real(kind=realtype) function triarea(pt1, pt2, pt3)