15 & localvalues, localvaluesd, famlist, sps, ptvalid)
30 logical,
intent(in) :: isinflow
31 integer(kind=inttype),
dimension(:, :),
intent(in) :: conn
32 integer(kind=inttype),
dimension(:),
intent(in) :: fams
33 real(kind=realtype),
dimension(:, :),
intent(in) :: vars
34 real(kind=realtype),
dimension(:, :),
intent(in) :: varsd
35 real(kind=realtype),
dimension(nlocalvalues),
intent(inout) :: &
37 real(kind=realtype),
dimension(nlocalvalues),
intent(inout) :: &
39 integer(kind=inttype),
dimension(:),
intent(in) :: famlist
40 integer(kind=inttype),
intent(in) :: sps
41 logical(kind=inttype),
dimension(:),
optional,
intent(in) :: ptvalid
43 integer(kind=inttype) :: i, j
44 real(kind=realtype) :: sf, vmag, vnm, vxm, vym, vzm, fx, fy, fz, u, &
45 & v, w, vnmfreestreamref
46 real(kind=realtype) :: sfd, vmagd, vnmd, vxmd, vymd, vzmd, fxd, fyd&
48 real(kind=realtype),
dimension(3) :: fp, mp, fmom, mmom, refpoint, &
49 & ss, x1, x2, x3, norm, sfacecoordref
50 real(kind=realtype),
dimension(3) :: fpd, mpd, fmomd, mmomd, &
51 & refpointd, ssd, x1d, x2d, x3d, normd, sfacecoordrefd
52 real(kind=realtype) :: pm, ptot, ttot, rhom, gammam, mnm, &
53 & massflowratelocal, am
54 real(kind=realtype) :: pmd, ptotd, ttotd, rhomd, gammamd, mnmd, &
55 & massflowratelocald, amd
56 real(kind=realtype) :: massflowrate, mass_ptot, mass_ttot, mass_ps, &
57 & mass_mn, mass_a, mass_rho, mass_vx, mass_vy, mass_vz, mass_nx, &
58 & mass_ny, mass_nz, mass_vi
59 real(kind=realtype) :: massflowrated, mass_ptotd, mass_ttotd, &
60 & mass_psd, mass_mnd, mass_ad, mass_rhod, mass_vxd, mass_vyd, mass_vzd&
61 & , mass_nxd, mass_nyd, mass_nzd, mass_vid
62 real(kind=realtype) :: area, cellarea, overcellarea
63 real(kind=realtype) :: aread, cellaread, overcellaread
64 real(kind=realtype) :: area_ptot, area_ps
65 real(kind=realtype) :: area_ptotd, area_psd
66 real(kind=realtype) :: govgm1, gm1ovg, viconst, vilocal, pratio
67 real(kind=realtype) :: vilocald, pratiod
68 real(kind=realtype) :: mredim
69 real(kind=realtype) :: mredimd
70 real(kind=realtype) :: internalflowfact, inflowfact, xc, xco, yc, &
71 & yco, zc, zco, mx, my, mz
72 real(kind=realtype) :: xcd, xcod, ycd, ycod, zcd, zcod, mxd, myd, &
74 real(kind=realtype),
dimension(3) :: cofsumfx, cofsumfy, cofsumfz
75 real(kind=realtype),
dimension(3) :: cofsumfxd, cofsumfyd, cofsumfzd
81 real(kind=realtype) :: arg1
82 real(kind=realtype) :: arg1d
83 real(kind=realtype) :: result1
84 real(kind=realtype) :: result1d
85 real(kind=realtype) :: temp
86 real(kind=realtype) :: tempd
87 real(kind=realtype) :: temp0
126 internalflowfact =
one
129 if (isinflow) inflowfact = -
one
145 sfacecoordrefd = 0.0_8
156 massflowrated = 0.0_8
163 if (
present(ptvalid))
then
165 if (((ptvalid(conn(1, i)) .eqv. .false.) .or. (ptvalid(conn(2&
166 & , i)) .eqv. .false.)) .or. (ptvalid(conn(3, i)) .eqv. &
167 & .false.)) triisvalid = .false.
187 rhomd = rhomd + varsd(conn(j, i),
irho)
188 rhom = rhom + vars(conn(j, i),
irho)
189 vxmd = vxmd + varsd(conn(j, i),
ivx)
190 vxm = vxm + vars(conn(j, i),
ivx)
191 vymd = vymd + varsd(conn(j, i),
ivy)
192 vym = vym + vars(conn(j, i),
ivy)
193 vzmd = vzmd + varsd(conn(j, i),
ivz)
194 vzm = vzm + vars(conn(j, i),
ivz)
195 pmd = pmd + varsd(conn(j, i),
irhoe)
196 pm = pm + vars(conn(j, i),
irhoe)
213 gammamd =
third*gammamd
214 gammam =
third*gammam
224 call cross_prod_d(x2 - x1, x2d - x1d, x3 - x1, x3d - x1d, norm&
229 & vzmd, pm, pmd, ptot, ptotd)
231 & vzmd, pm, pmd, ttot, ttotd)
232 vnmd = ss(1)*vxmd + vxm*ssd(1) + ss(2)*vymd + vym*ssd(2) + ss(&
233 & 3)*vzmd + vzm*ssd(3) - sfd
234 vnm = vxm*ss(1) + vym*ss(2) + vzm*ss(3) - sf
235 arg1d = 2*vxm*vxmd + 2*vym*vymd + 2*vzm*vzmd
236 arg1 = vxm**2 + vym**2 + vzm**2
238 if (arg1 .eq. 0.0_8)
then
241 result1d = arg1d/(2.0*temp)
244 vmagd = result1d - sfd
246 temp = gammam*pm/rhom
247 arg1d = (pm*gammamd+gammam*pmd-temp*rhomd)/rhom
250 if (arg1 .eq. 0.0_8)
then
253 amd = arg1d/(2.0*temp)
256 temp = gammam*pm/rhom
257 arg1d = (pm*gammamd+gammam*pmd-temp*rhomd)/rhom
260 if (arg1 .eq. 0.0_8)
then
263 result1d = arg1d/(2.0*temp)
266 mnmd = (vmagd-vmag*result1d/result1)/result1
268 arg1d = 2*ss(1)*ssd(1) + 2*ss(2)*ssd(2) + 2*ss(3)*ssd(3)
269 arg1 = ss(1)**2 + ss(2)**2 + ss(3)**2
271 if (arg1 .eq. 0.0_8)
then
274 cellaread = arg1d/(2.0*temp)
277 aread = aread + cellaread
278 area = area + cellarea
279 overcellaread = -(cellaread/cellarea**2)
280 overcellarea = 1/cellarea
281 massflowratelocald = mredim*(vnm*rhomd+rhom*vnmd) + rhom*vnm*&
283 massflowratelocal = rhom*vnm*mredim
284 massflowrated = massflowrated + massflowratelocald
285 massflowrate = massflowrate + massflowratelocal
288 mass_ptotd = mass_ptotd +
pref*(massflowratelocal*ptotd+ptot*&
289 & massflowratelocald) + ptot*massflowratelocal*
prefd
290 mass_ptot = mass_ptot + ptot*massflowratelocal*
pref
291 mass_ttotd = mass_ttotd +
tref*(massflowratelocal*ttotd+ttot*&
292 & massflowratelocald) + ttot*massflowratelocal*
trefd
293 mass_ttot = mass_ttot + ttot*massflowratelocal*
tref
294 mass_rhod = mass_rhod +
rhoref*(massflowratelocal*rhomd+rhom*&
295 & massflowratelocald) + rhom*massflowratelocal*
rhorefd
296 mass_rho = mass_rho + rhom*massflowratelocal*
rhoref
297 mass_ad = mass_ad +
uref*(massflowratelocal*amd+am*&
298 & massflowratelocald)
299 mass_a = mass_a + am*massflowratelocal*
uref
300 mass_psd = mass_psd + massflowratelocal*pmd + pm*&
302 mass_ps = mass_ps + pm*massflowratelocal
303 mass_mnd = mass_mnd + massflowratelocal*mnmd + mnm*&
305 mass_mn = mass_mn + mnm*massflowratelocal
306 area_ptotd = area_ptotd + cellarea*(
pref*ptotd+ptot*
prefd) + &
307 & ptot*
pref*cellaread
308 area_ptot = area_ptot + ptot*
pref*cellarea
309 area_psd = area_psd + cellarea*pmd + pm*cellaread
310 area_ps = area_ps + pm*cellarea
311 sfacecoordrefd(1) = sf*overcellarea*ssd(1) + ss(1)*(&
312 & overcellarea*sfd+sf*overcellaread)
313 sfacecoordref(1) = sf*ss(1)*overcellarea
314 sfacecoordrefd(2) = sf*overcellarea*ssd(2) + ss(2)*(&
315 & overcellarea*sfd+sf*overcellaread)
316 sfacecoordref(2) = sf*ss(2)*overcellarea
317 sfacecoordrefd(3) = sf*overcellarea*ssd(3) + ss(3)*(&
318 & overcellarea*sfd+sf*overcellaread)
319 sfacecoordref(3) = sf*ss(3)*overcellarea
320 temp =
uref*vxm - sfacecoordref(1)
321 mass_vxd = mass_vxd + massflowratelocal*(
uref*vxmd-&
322 & sfacecoordrefd(1)) + temp*massflowratelocald
323 mass_vx = mass_vx + temp*massflowratelocal
324 temp =
uref*vym - sfacecoordref(2)
325 mass_vyd = mass_vyd + massflowratelocal*(
uref*vymd-&
326 & sfacecoordrefd(2)) + temp*massflowratelocald
327 mass_vy = mass_vy + temp*massflowratelocal
328 temp =
uref*vzm - sfacecoordref(3)
329 mass_vzd = mass_vzd + massflowratelocal*(
uref*vzmd-&
330 & sfacecoordrefd(3)) + temp*massflowratelocald
331 mass_vz = mass_vz + temp*massflowratelocal
335 if (
one .gt.
one/ptot)
then
336 pratiod = -(
one*ptotd/ptot**2)
342 temp0 =
one - pratio**gm1ovg
343 if (pratio .le. 0.0_8 .and. (gm1ovg .eq. 0.0_8 .or. gm1ovg &
344 & .ne. int(gm1ovg)))
then
347 tempd = gm1ovg*pratio**(gm1ovg-1)*pratiod
349 arg1d = viconst*(temp0*(
tref*ttotd+ttot*
trefd)-ttot*
tref*tempd&
351 arg1 = viconst*(temp0*(ttot*
tref))
353 if (arg1 .eq. 0.0_8)
then
356 vilocald = arg1d/(2.0*temp0)
359 mass_vid = mass_vid + massflowratelocal*vilocald + vilocal*&
361 mass_vi = mass_vi + vilocal*massflowratelocal
362 mass_nxd = mass_nxd + overcellarea*massflowratelocal*ssd(1) + &
363 & ss(1)*(massflowratelocal*overcellaread+overcellarea*&
364 & massflowratelocald)
365 mass_nx = mass_nx + ss(1)*overcellarea*massflowratelocal
366 mass_nyd = mass_nyd + overcellarea*massflowratelocal*ssd(2) + &
367 & ss(2)*(massflowratelocal*overcellaread+overcellarea*&
368 & massflowratelocald)
369 mass_ny = mass_ny + ss(2)*overcellarea*massflowratelocal
370 mass_nzd = mass_nzd + overcellarea*massflowratelocal*ssd(3) + &
371 & ss(3)*(massflowratelocal*overcellaread+overcellarea*&
372 & massflowratelocald)
373 mass_nz = mass_nz + ss(3)*overcellarea*massflowratelocal
397 xcd = xcod - refpointd(1)
398 xc = xco - refpoint(1)
399 ycd = ycod - refpointd(2)
400 yc = yco - refpoint(2)
401 zcd = zcod - refpointd(3)
402 zc = zco - refpoint(3)
405 fxd = ss(1)*pmd + pm*ssd(1)
407 fyd = ss(2)*pmd + pm*ssd(2)
409 fzd = ss(3)*pmd + pm*ssd(3)
412 fpd(1) = fpd(1) + fxd
414 fpd(2) = fpd(2) + fyd
416 fpd(3) = fpd(3) + fzd
418 mxd = fz*ycd + yc*fzd - fy*zcd - zc*fyd
420 myd = fx*zcd + zc*fxd - fz*xcd - xc*fzd
422 mzd = fy*xcd + xc*fyd - fx*ycd - yc*fxd
424 mpd(1) = mpd(1) + mxd
426 mpd(2) = mpd(2) + myd
428 mpd(3) = mpd(3) + mzd
432 cofsumfxd(1) = cofsumfxd(1) + fx*xcod + xco*fxd
433 cofsumfx(1) = cofsumfx(1) + xco*fx
434 cofsumfxd(2) = cofsumfxd(2) + fx*ycod + yco*fxd
435 cofsumfx(2) = cofsumfx(2) + yco*fx
436 cofsumfxd(3) = cofsumfxd(3) + fx*zcod + zco*fxd
437 cofsumfx(3) = cofsumfx(3) + zco*fx
439 cofsumfyd(1) = cofsumfyd(1) + fy*xcod + xco*fyd
440 cofsumfy(1) = cofsumfy(1) + xco*fy
441 cofsumfyd(2) = cofsumfyd(2) + fy*ycod + yco*fyd
442 cofsumfy(2) = cofsumfy(2) + yco*fy
443 cofsumfyd(3) = cofsumfyd(3) + fy*zcod + zco*fyd
444 cofsumfy(3) = cofsumfy(3) + zco*fy
446 cofsumfzd(1) = cofsumfzd(1) + fz*xcod + xco*fzd
447 cofsumfz(1) = cofsumfz(1) + xco*fz
448 cofsumfzd(2) = cofsumfzd(2) + fz*ycod + yco*fzd
449 cofsumfz(2) = cofsumfz(2) + yco*fz
450 cofsumfzd(3) = cofsumfzd(3) + fz*zcod + zco*fzd
451 cofsumfz(3) = cofsumfz(3) + zco*fz
454 ssd = (ssd-ss*cellaread/cellarea)/cellarea
456 massflowratelocald = internalflowfact*inflowfact*(&
459 massflowratelocal = massflowratelocal/
timeref*internalflowfact&
461 fxd = massflowratelocal*vxm*ssd(1) + ss(1)*(vxm*&
462 & massflowratelocald+massflowratelocal*vxmd)
463 fx = massflowratelocal*ss(1)*vxm
464 fyd = massflowratelocal*vym*ssd(2) + ss(2)*(vym*&
465 & massflowratelocald+massflowratelocal*vymd)
466 fy = massflowratelocal*ss(2)*vym
467 fzd = massflowratelocal*vzm*ssd(3) + ss(3)*(vzm*&
468 & massflowratelocald+massflowratelocal*vzmd)
469 fz = massflowratelocal*ss(3)*vzm
470 fmomd(1) = fmomd(1) - fxd
471 fmom(1) = fmom(1) - fx
472 fmomd(2) = fmomd(2) - fyd
473 fmom(2) = fmom(2) - fy
474 fmomd(3) = fmomd(3) - fzd
475 fmom(3) = fmom(3) - fz
476 mxd = fz*ycd + yc*fzd - fy*zcd - zc*fyd
478 myd = fx*zcd + zc*fxd - fz*xcd - xc*fzd
480 mzd = fy*xcd + xc*fyd - fx*ycd - yc*fxd
482 mmomd(1) = mmomd(1) + mxd
483 mmom(1) = mmom(1) + mx
484 mmomd(2) = mmomd(2) + myd
485 mmom(2) = mmom(2) + my
486 mmomd(3) = mmomd(3) + mzd
487 mmom(3) = mmom(3) + mz
490 cofsumfxd(1) = cofsumfxd(1) + fx*xcod + xco*fxd
491 cofsumfx(1) = cofsumfx(1) + xco*fx
492 cofsumfxd(2) = cofsumfxd(2) + fx*ycod + yco*fxd
493 cofsumfx(2) = cofsumfx(2) + yco*fx
494 cofsumfxd(3) = cofsumfxd(3) + fx*zcod + zco*fxd
495 cofsumfx(3) = cofsumfx(3) + zco*fx
497 cofsumfyd(1) = cofsumfyd(1) + fy*xcod + xco*fyd
498 cofsumfy(1) = cofsumfy(1) + xco*fy
499 cofsumfyd(2) = cofsumfyd(2) + fy*ycod + yco*fyd
500 cofsumfy(2) = cofsumfy(2) + yco*fy
501 cofsumfyd(3) = cofsumfyd(3) + fy*zcod + zco*fyd
502 cofsumfy(3) = cofsumfy(3) + zco*fy
504 cofsumfzd(1) = cofsumfzd(1) + fz*xcod + xco*fzd
505 cofsumfz(1) = cofsumfz(1) + xco*fz
506 cofsumfzd(2) = cofsumfzd(2) + fz*ycod + yco*fzd
507 cofsumfz(2) = cofsumfz(2) + yco*fz
508 cofsumfzd(3) = cofsumfzd(3) + fz*zcod + zco*fzd
509 cofsumfz(3) = cofsumfz(3) + zco*fz
516 localvaluesd(
iarea) = localvaluesd(
iarea) + aread
517 localvalues(
iarea) = localvalues(
iarea) + area
576 & localvalues, famlist, sps, ptvalid)
589 logical,
intent(in) :: isinflow
590 integer(kind=inttype),
dimension(:, :),
intent(in) :: conn
591 integer(kind=inttype),
dimension(:),
intent(in) :: fams
592 real(kind=realtype),
dimension(:, :),
intent(in) :: vars
593 real(kind=realtype),
dimension(nlocalvalues),
intent(inout) :: &
595 integer(kind=inttype),
dimension(:),
intent(in) :: famlist
596 integer(kind=inttype),
intent(in) :: sps
597 logical(kind=inttype),
dimension(:),
optional,
intent(in) :: ptvalid
599 integer(kind=inttype) :: i, j
600 real(kind=realtype) :: sf, vmag, vnm, vxm, vym, vzm, fx, fy, fz, u, &
601 & v, w, vnmfreestreamref
602 real(kind=realtype),
dimension(3) :: fp, mp, fmom, mmom, refpoint, &
603 & ss, x1, x2, x3, norm, sfacecoordref
604 real(kind=realtype) :: pm, ptot, ttot, rhom, gammam, mnm, &
605 & massflowratelocal, am
606 real(kind=realtype) :: massflowrate, mass_ptot, mass_ttot, mass_ps, &
607 & mass_mn, mass_a, mass_rho, mass_vx, mass_vy, mass_vz, mass_nx, &
608 & mass_ny, mass_nz, mass_vi
609 real(kind=realtype) :: area, cellarea, overcellarea
610 real(kind=realtype) :: area_ptot, area_ps
611 real(kind=realtype) :: govgm1, gm1ovg, viconst, vilocal, pratio
612 real(kind=realtype) :: mredim
613 real(kind=realtype) :: internalflowfact, inflowfact, xc, xco, yc, &
614 & yco, zc, zco, mx, my, mz
615 real(kind=realtype),
dimension(3) :: cofsumfx, cofsumfy, cofsumfz
616 logical :: triisvalid
621 real(kind=realtype) :: arg1
622 real(kind=realtype) :: result1
651 internalflowfact =
one
654 if (isinflow) inflowfact = -
one
661 if (
present(ptvalid))
then
663 if (((ptvalid(conn(1, i)) .eqv. .false.) .or. (ptvalid(conn(2&
664 & , i)) .eqv. .false.)) .or. (ptvalid(conn(3, i)) .eqv. &
665 & .false.)) triisvalid = .false.
678 rhom = rhom + vars(conn(j, i),
irho)
679 vxm = vxm + vars(conn(j, i),
ivx)
680 vym = vym + vars(conn(j, i),
ivy)
681 vzm = vzm + vars(conn(j, i),
ivz)
682 pm = pm + vars(conn(j, i),
irhoe)
692 gammam =
third*gammam
702 vnm = vxm*ss(1) + vym*ss(2) + vzm*ss(3) - sf
703 arg1 = vxm**2 + vym**2 + vzm**2
706 arg1 = gammam*pm/rhom
708 arg1 = gammam*pm/rhom
711 arg1 = ss(1)**2 + ss(2)**2 + ss(3)**2
712 cellarea = sqrt(arg1)
713 area = area + cellarea
714 overcellarea = 1/cellarea
715 massflowratelocal = rhom*vnm*mredim
716 massflowrate = massflowrate + massflowratelocal
718 mass_ptot = mass_ptot + ptot*massflowratelocal*
pref
719 mass_ttot = mass_ttot + ttot*massflowratelocal*
tref
720 mass_rho = mass_rho + rhom*massflowratelocal*
rhoref
721 mass_a = mass_a + am*massflowratelocal*
uref
722 mass_ps = mass_ps + pm*massflowratelocal
723 mass_mn = mass_mn + mnm*massflowratelocal
724 area_ptot = area_ptot + ptot*
pref*cellarea
725 area_ps = area_ps + pm*cellarea
726 sfacecoordref(1) = sf*ss(1)*overcellarea
727 sfacecoordref(2) = sf*ss(2)*overcellarea
728 sfacecoordref(3) = sf*ss(3)*overcellarea
729 mass_vx = mass_vx + (vxm*
uref-sfacecoordref(1))*&
731 mass_vy = mass_vy + (vym*
uref-sfacecoordref(2))*&
733 mass_vz = mass_vz + (vzm*
uref-sfacecoordref(3))*&
738 if (
one .gt.
one/ptot)
then
743 arg1 = viconst*(
one-pratio**gm1ovg)*ttot*
tref
745 mass_vi = mass_vi + vilocal*massflowratelocal
746 mass_nx = mass_nx + ss(1)*overcellarea*massflowratelocal
747 mass_ny = mass_ny + ss(2)*overcellarea*massflowratelocal
748 mass_nz = mass_nz + ss(3)*overcellarea*massflowratelocal
763 xc = xco - refpoint(1)
764 yc = yco - refpoint(2)
765 zc = zco - refpoint(3)
782 cofsumfx(1) = cofsumfx(1) + xco*fx
783 cofsumfx(2) = cofsumfx(2) + yco*fx
784 cofsumfx(3) = cofsumfx(3) + zco*fx
786 cofsumfy(1) = cofsumfy(1) + xco*fy
787 cofsumfy(2) = cofsumfy(2) + yco*fy
788 cofsumfy(3) = cofsumfy(3) + zco*fy
790 cofsumfz(1) = cofsumfz(1) + xco*fz
791 cofsumfz(2) = cofsumfz(2) + yco*fz
792 cofsumfz(3) = cofsumfz(3) + zco*fz
796 massflowratelocal = massflowratelocal/
timeref*internalflowfact&
798 fx = massflowratelocal*ss(1)*vxm
799 fy = massflowratelocal*ss(2)*vym
800 fz = massflowratelocal*ss(3)*vzm
801 fmom(1) = fmom(1) - fx
802 fmom(2) = fmom(2) - fy
803 fmom(3) = fmom(3) - fz
807 mmom(1) = mmom(1) + mx
808 mmom(2) = mmom(2) + my
809 mmom(3) = mmom(3) + mz
812 cofsumfx(1) = cofsumfx(1) + xco*fx
813 cofsumfx(2) = cofsumfx(2) + yco*fx
814 cofsumfx(3) = cofsumfx(3) + zco*fx
816 cofsumfy(1) = cofsumfy(1) + xco*fy
817 cofsumfy(2) = cofsumfy(2) + yco*fy
818 cofsumfy(3) = cofsumfy(3) + zco*fy
820 cofsumfz(1) = cofsumfz(1) + xco*fz
821 cofsumfz(2) = cofsumfz(2) + yco*fz
822 cofsumfz(3) = cofsumfz(3) + zco*fz
828 localvalues(
iarea) = localvalues(
iarea) + area
863 & localvalues, localvaluesd, famlist, sps)
871 integer(kind=inttype),
dimension(:, :),
intent(in) :: conn
872 integer(kind=inttype),
dimension(:),
intent(in) :: fams
873 real(kind=realtype),
dimension(:, :),
intent(in) :: vars
874 real(kind=realtype),
dimension(:, :),
intent(in) :: varsd
875 real(kind=realtype),
intent(inout) :: localvalues(
nlocalvalues)
876 real(kind=realtype),
intent(inout) :: localvaluesd(
nlocalvalues)
877 integer(kind=inttype),
dimension(:),
intent(in) :: famlist
878 integer(kind=inttype),
intent(in) :: sps
880 real(kind=realtype),
dimension(3) :: fp, fv, mp, mv
881 real(kind=realtype),
dimension(3) :: fpd, fvd, mpd, mvd
882 real(kind=realtype),
dimension(3) :: cofsumfx, cofsumfy, cofsumfz
883 real(kind=realtype),
dimension(3) :: cofsumfxd, cofsumfyd, cofsumfzd
884 integer(kind=inttype) :: i, j
885 real(kind=realtype),
dimension(3) :: ss, norm, refpoint
886 real(kind=realtype),
dimension(3) :: ssd, normd, refpointd
887 real(kind=realtype),
dimension(3) :: p1, p2, p3, v1, v2, v3, x1, x2&
889 real(kind=realtype),
dimension(3) :: p1d, p2d, p3d, v1d, v2d, v3d, &
891 real(kind=realtype) :: fact,
triarea, fx, fy, fz, mx, my, mz, xc, &
892 & xco, yc, yco, zc, zco
893 real(kind=realtype) :: triaread, fxd, fyd, fzd, mxd, myd, mzd, xcd, &
894 & xcod, ycd, ycod, zcd, zcod
896 real(kind=realtype) :: result1
897 real(kind=realtype) :: result1d
931 call cross_prod_d(x2 - x1, x2d - x1d, x3 - x1, x3d - x1d, norm, &
938 triaread =
third*result1d
941 xcod =
third*(x1d(1)+x2d(1)+x3d(1))
942 xco =
third*(x1(1)+x2(1)+x3(1))
943 ycod =
third*(x1d(2)+x2d(2)+x3d(2))
944 yco =
third*(x1(2)+x2(2)+x3(2))
945 zcod =
third*(x1d(3)+x2d(3)+x3d(3))
946 zco =
third*(x1(3)+x2(3)+x3(3))
947 xcd = xcod - refpointd(1)
948 xc = xco - refpoint(1)
949 ycd = ycod - refpointd(2)
950 yc = yco - refpoint(2)
951 zcd = zcod - refpointd(3)
952 zc = zco - refpoint(3)
960 fxd =
triarea*(p1d(1)+p2d(1)+p3d(1)) + (p1(1)+p2(1)+p3(1))*&
962 fx = (p1(1)+p2(1)+p3(1))*
triarea
963 fyd =
triarea*(p1d(2)+p2d(2)+p3d(2)) + (p1(2)+p2(2)+p3(2))*&
965 fy = (p1(2)+p2(2)+p3(2))*
triarea
966 fzd =
triarea*(p1d(3)+p2d(3)+p3d(3)) + (p1(3)+p2(3)+p3(3))*&
968 fz = (p1(3)+p2(3)+p3(3))*
triarea
969 fpd(1) = fpd(1) + fxd
971 fpd(2) = fpd(2) + fyd
973 fpd(3) = fpd(3) + fzd
975 mxd = fz*ycd + yc*fzd - fy*zcd - zc*fyd
977 myd = fx*zcd + zc*fxd - fz*xcd - xc*fzd
979 mzd = fy*xcd + xc*fyd - fx*ycd - yc*fxd
981 mpd(1) = mpd(1) + mxd
983 mpd(2) = mpd(2) + myd
985 mpd(3) = mpd(3) + mzd
989 cofsumfxd(1) = cofsumfxd(1) + fx*xcod + xco*fxd
990 cofsumfx(1) = cofsumfx(1) + xco*fx
991 cofsumfxd(2) = cofsumfxd(2) + fx*ycod + yco*fxd
992 cofsumfx(2) = cofsumfx(2) + yco*fx
993 cofsumfxd(3) = cofsumfxd(3) + fx*zcod + zco*fxd
994 cofsumfx(3) = cofsumfx(3) + zco*fx
996 cofsumfyd(1) = cofsumfyd(1) + fy*xcod + xco*fyd
997 cofsumfy(1) = cofsumfy(1) + xco*fy
998 cofsumfyd(2) = cofsumfyd(2) + fy*ycod + yco*fyd
999 cofsumfy(2) = cofsumfy(2) + yco*fy
1000 cofsumfyd(3) = cofsumfyd(3) + fy*zcod + zco*fyd
1001 cofsumfy(3) = cofsumfy(3) + zco*fy
1003 cofsumfzd(1) = cofsumfzd(1) + fz*xcod + xco*fzd
1004 cofsumfz(1) = cofsumfz(1) + xco*fz
1005 cofsumfzd(2) = cofsumfzd(2) + fz*ycod + yco*fzd
1006 cofsumfz(2) = cofsumfz(2) + yco*fz
1007 cofsumfzd(3) = cofsumfzd(3) + fz*zcod + zco*fzd
1008 cofsumfz(3) = cofsumfz(3) + zco*fz
1016 fxd =
triarea*(v1d(1)+v2d(1)+v3d(1)) + (v1(1)+v2(1)+v3(1))*&
1018 fx = (v1(1)+v2(1)+v3(1))*
triarea
1019 fyd =
triarea*(v1d(2)+v2d(2)+v3d(2)) + (v1(2)+v2(2)+v3(2))*&
1021 fy = (v1(2)+v2(2)+v3(2))*
triarea
1022 fzd =
triarea*(v1d(3)+v2d(3)+v3d(3)) + (v1(3)+v2(3)+v3(3))*&
1024 fz = (v1(3)+v2(3)+v3(3))*
triarea
1026 fvd(1) = fvd(1) + fxd
1028 fvd(2) = fvd(2) + fyd
1030 fvd(3) = fvd(3) + fzd
1032 mxd = fz*ycd + yc*fzd - fy*zcd - zc*fyd
1034 myd = fx*zcd + zc*fxd - fz*xcd - xc*fzd
1036 mzd = fy*xcd + xc*fyd - fx*ycd - yc*fxd
1038 mvd(1) = mvd(1) + mxd
1040 mvd(2) = mvd(2) + myd
1042 mvd(3) = mvd(3) + mzd
1046 cofsumfxd(1) = cofsumfxd(1) + fx*xcod + xco*fxd
1047 cofsumfx(1) = cofsumfx(1) + xco*fx
1048 cofsumfxd(2) = cofsumfxd(2) + fx*ycod + yco*fxd
1049 cofsumfx(2) = cofsumfx(2) + yco*fx
1050 cofsumfxd(3) = cofsumfxd(3) + fx*zcod + zco*fxd
1051 cofsumfx(3) = cofsumfx(3) + zco*fx
1053 cofsumfyd(1) = cofsumfyd(1) + fy*xcod + xco*fyd
1054 cofsumfy(1) = cofsumfy(1) + xco*fy
1055 cofsumfyd(2) = cofsumfyd(2) + fy*ycod + yco*fyd
1056 cofsumfy(2) = cofsumfy(2) + yco*fy
1057 cofsumfyd(3) = cofsumfyd(3) + fy*zcod + zco*fyd
1058 cofsumfy(3) = cofsumfy(3) + zco*fy
1060 cofsumfzd(1) = cofsumfzd(1) + fz*xcod + xco*fzd
1061 cofsumfz(1) = cofsumfz(1) + xco*fz
1062 cofsumfzd(2) = cofsumfzd(2) + fz*ycod + yco*fzd
1063 cofsumfz(2) = cofsumfz(2) + yco*fz
1064 cofsumfzd(3) = cofsumfzd(3) + fz*zcod + zco*fzd
1065 cofsumfz(3) = cofsumfz(3) + zco*fz
1069 localvaluesd(
ifp:
ifp+2) = localvaluesd(
ifp:
ifp+2) + fpd
1071 localvaluesd(
ifv:
ifv+2) = localvaluesd(
ifv:
ifv+2) + fvd
1073 localvaluesd(
imp:
imp+2) = localvaluesd(
imp:
imp+2) + mpd
1075 localvaluesd(
imv:
imv+2) = localvaluesd(
imv:
imv+2) + mvd
1100 integer(kind=inttype),
dimension(:, :),
intent(in) :: conn
1101 integer(kind=inttype),
dimension(:),
intent(in) :: fams
1102 real(kind=realtype),
dimension(:, :),
intent(in) :: vars
1103 real(kind=realtype),
intent(inout) :: localvalues(
nlocalvalues)
1104 integer(kind=inttype),
dimension(:),
intent(in) :: famlist
1105 integer(kind=inttype),
intent(in) :: sps
1107 real(kind=realtype),
dimension(3) :: fp, fv, mp, mv
1108 real(kind=realtype),
dimension(3) :: cofsumfx, cofsumfy, cofsumfz
1109 integer(kind=inttype) :: i, j
1110 real(kind=realtype),
dimension(3) :: ss, norm, refpoint
1111 real(kind=realtype),
dimension(3) :: p1, p2, p3, v1, v2, v3, x1, x2&
1113 real(kind=realtype) :: fact,
triarea, fx, fy, fz, mx, my, mz, xc, &
1114 & xco, yc, yco, zc, zco
1116 real(kind=realtype) :: result1
1130 do i=1,
size(conn, 2)
1143 xco =
third*(x1(1)+x2(1)+x3(1))
1144 yco =
third*(x1(2)+x2(2)+x3(2))
1145 zco =
third*(x1(3)+x2(3)+x3(3))
1146 xc = xco - refpoint(1)
1147 yc = yco - refpoint(2)
1148 zc = zco - refpoint(3)
1153 fx = (p1(1)+p2(1)+p3(1))*
triarea
1154 fy = (p1(2)+p2(2)+p3(2))*
triarea
1155 fz = (p1(3)+p2(3)+p3(3))*
triarea
1167 cofsumfx(1) = cofsumfx(1) + xco*fx
1168 cofsumfx(2) = cofsumfx(2) + yco*fx
1169 cofsumfx(3) = cofsumfx(3) + zco*fx
1171 cofsumfy(1) = cofsumfy(1) + xco*fy
1172 cofsumfy(2) = cofsumfy(2) + yco*fy
1173 cofsumfy(3) = cofsumfy(3) + zco*fy
1175 cofsumfz(1) = cofsumfz(1) + xco*fz
1176 cofsumfz(2) = cofsumfz(2) + yco*fz
1177 cofsumfz(3) = cofsumfz(3) + zco*fz
1182 fx = (v1(1)+v2(1)+v3(1))*
triarea
1183 fy = (v1(2)+v2(2)+v3(2))*
triarea
1184 fz = (v1(3)+v2(3)+v3(3))*
triarea
1197 cofsumfx(1) = cofsumfx(1) + xco*fx
1198 cofsumfx(2) = cofsumfx(2) + yco*fx
1199 cofsumfx(3) = cofsumfx(3) + zco*fx
1201 cofsumfy(1) = cofsumfy(1) + xco*fy
1202 cofsumfy(2) = cofsumfy(2) + yco*fy
1203 cofsumfy(3) = cofsumfy(3) + zco*fy
1205 cofsumfz(1) = cofsumfz(1) + xco*fz
1206 cofsumfz(2) = cofsumfz(2) + yco*fz
1207 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 computettot_d(rho, rhod, u, ud, v, vd, w, wd, p, pd, ttot, ttotd)
subroutine computeptot_d(rho, rhod, u, ud, v, vd, w, wd, p, pd, ptot, ptotd)
subroutine computettot(rho, u, v, w, p, ttot)
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
subroutine cross_prod(a, b, c)
real(kind=realtype) function mynorm2(x)
real(kind=realtype) function mynorm2_d(x, xd, mynorm2)
subroutine cross_prod_d(a, ad, b, bd, c, cd)
subroutine flowintegrationzipper_d(isinflow, conn, fams, vars, varsd, localvalues, localvaluesd, famlist, sps, ptvalid)
subroutine wallintegrationzipper_d(conn, fams, vars, varsd, localvalues, localvaluesd, famlist, sps)
subroutine flowintegrationzipper(isinflow, conn, fams, vars, localvalues, famlist, sps, ptvalid)
subroutine wallintegrationzipper(conn, fams, vars, localvalues, famlist, sps)
real(kind=realtype) function triarea(pt1, pt2, pt3)