24 use blockpointers,
only :
ie,
je,
ke,
il,
jl,
kl,
w,
wd,
p, &
25 &
pd,
rlv,
rlvd,
rev,
revd,
radi,
radid,
radj,
radjd,
radk,
radkd,
si,&
41 logical,
intent(in) :: onlyradii
45 real(kind=realtype),
parameter :: b=2.0_realtype
49 integer(kind=inttype) :: i, j, k, ii
50 real(kind=realtype) :: plim, rlim, clim2
51 real(kind=realtype) :: uux, uuy, uuz, cc2, qsi, qsj, qsk, sx, sy, sz&
53 real(kind=realtype) :: uuxd, uuyd, uuzd, cc2d, qsid, qsjd, qskd
54 real(kind=realtype) :: ri, rj, rk, rij, rjk, rki
55 real(kind=realtype) :: rid, rjd, rkd, rijd, rjkd, rkid
56 real(kind=realtype) :: vsi, vsj, vsk, rfl, dpi, dpj, dpk
57 real(kind=realtype) :: sface, tmp
58 logical :: radiineeded, doscaling
63 real(kind=realtype) :: abs0
64 real(kind=realtype) :: abs0d
65 real(kind=realtype) :: abs1
66 real(kind=realtype) :: abs1d
67 real(kind=realtype) :: abs2
68 real(kind=realtype) :: abs2d
69 real(kind=realtype) :: abs3
70 real(kind=realtype) :: abs4
71 real(kind=realtype) :: abs5
72 real(kind=realtype) :: temp
73 real(kind=realtype) :: temp0
74 real(kind=realtype) :: tempd
82 if (.not.(onlyradii .and. (.not.radiineeded)))
then
100 j = mod(ii/
ie,
je) + 1
103 uux =
w(i, j, k,
ivx)
104 uuy =
w(i, j, k,
ivy)
105 uuz =
w(i, j, k,
ivz)
107 if (cc2 .lt. clim2)
then
123 sx =
si(i-1, j, k, 1) +
si(i, j, k, 1)
124 sy =
si(i-1, j, k, 2) +
si(i, j, k, 2)
125 sz =
si(i-1, j, k, 3) +
si(i, j, k, 3)
126 qsi = uux*sx + uuy*sy + uuz*sz - sface
127 if (qsi .ge. 0.)
then
142 sx =
sj(i, j-1, k, 1) +
sj(i, j, k, 1)
143 sy =
sj(i, j-1, k, 2) +
sj(i, j, k, 2)
144 sz =
sj(i, j-1, k, 3) +
sj(i, j, k, 3)
145 qsj = uux*sx + uuy*sy + uuz*sz - sface
146 if (qsj .ge. 0.)
then
161 sx =
sk(i, j, k-1, 1) +
sk(i, j, k, 1)
162 sy =
sk(i, j, k-1, 2) +
sk(i, j, k, 2)
163 sz =
sk(i, j, k-1, 3) +
sk(i, j, k, 3)
164 qsk = uux*sx + uuy*sy + uuz*sz - sface
165 if (qsk .ge. 0.)
then
182 if (ri .lt.
eps)
then
191 if (rj .lt.
eps)
then
200 if (rk .lt.
eps)
then
220 if (temp0 .le. 0.0_8 .and. (
adis .eq. 0.0_8 .or.
adis .ne. &
224 tempd =
adis*temp0**(
adis-1)*rkid/ri
228 radkd(i, j, k) = 0.0_8
230 rid = (
one+
one/rij+rki)*
radid(i, j, k) - temp0*tempd
231 radid(i, j, k) = 0.0_8
233 if (temp0 .le. 0.0_8 .and. (
adis .eq. 0.0_8 .or.
adis .ne. &
237 tempd =
adis*temp0**(
adis-1)*rjkd/rk
240 radjd(i, j, k) = 0.0_8
241 rkd = rkd - temp0*tempd
243 if (temp0 .le. 0.0_8 .and. (
adis .eq. 0.0_8 .or.
adis .ne. &
247 tempd =
adis*temp0**(
adis-1)*rijd/rj
250 rjd = rjd - temp0*tempd
253 if (branch .eq. 0) rkd = 0.0_8
256 if (branch .eq. 0) rjd = 0.0_8
259 if (branch .eq. 0) rid = 0.0_8
262 radkd(i, j, k) = 0.0_8
264 radjd(i, j, k) = 0.0_8
266 radid(i, j, k) = 0.0_8
268 temp0 = sx*sx + sy*sy + sz*sz
270 if (temp0*cc2 .eq. 0.0_8)
then
278 if (branch .eq. 0)
then
286 sx =
sj(i, j-1, k, 1) +
sj(i, j, k, 1)
287 sy =
sj(i, j-1, k, 2) +
sj(i, j, k, 2)
288 sz =
sj(i, j-1, k, 3) +
sj(i, j, k, 3)
289 temp0 = sx*sx + sy*sy + sz*sz
291 if (.not.temp0*cc2 .eq. 0.0_8) cc2d = cc2d + temp0*&
295 if (branch .eq. 0)
then
300 uuxd = uuxd + sx*qsjd
301 uuyd = uuyd + sy*qsjd
302 uuzd = uuzd + sz*qsjd
303 sx =
si(i-1, j, k, 1) +
si(i, j, k, 1)
304 sy =
si(i-1, j, k, 2) +
si(i, j, k, 2)
305 sz =
si(i-1, j, k, 3) +
si(i, j, k, 3)
306 temp0 = sx*sx + sy*sy + sz*sz
308 if (.not.temp0*cc2 .eq. 0.0_8) cc2d = cc2d + temp0*&
312 if (branch .eq. 0)
then
317 uuxd = uuxd + sx*qsid
318 uuyd = uuyd + sy*qsid
319 uuzd = uuzd + sz*qsid
322 if (branch .eq. 0) cc2d = 0.0_8
323 temp =
w(i, j, k,
irho)
324 tempd =
gamma(i, j, k)*cc2d/temp
325 pd(i, j, k) =
pd(i, j, k) + tempd
326 wd(i, j, k,
irho) =
wd(i, j, k,
irho) -
p(i, j, k)*tempd/temp
345 use blockpointers,
only :
ie,
je,
ke,
il,
jl,
kl,
w,
p,
rlv, &
346 &
rev,
radi,
radj,
radk,
si,
sj,
sk,
sfacei,
sfacej,
sfacek,
dtl, &
361 logical,
intent(in) :: onlyradii
365 real(kind=realtype),
parameter :: b=2.0_realtype
369 integer(kind=inttype) :: i, j, k, ii
370 real(kind=realtype) :: plim, rlim, clim2
371 real(kind=realtype) :: uux, uuy, uuz, cc2, qsi, qsj, qsk, sx, sy, sz&
373 real(kind=realtype) :: ri, rj, rk, rij, rjk, rki
374 real(kind=realtype) :: vsi, vsj, vsk, rfl, dpi, dpj, dpk
375 real(kind=realtype) :: sface, tmp
376 logical :: radiineeded, doscaling
381 real(kind=realtype) :: abs0
382 real(kind=realtype) :: abs1
383 real(kind=realtype) :: abs2
384 real(kind=realtype) :: abs3
385 real(kind=realtype) :: abs4
386 real(kind=realtype) :: abs5
393 if (onlyradii .and. (.not.radiineeded))
then
400 rlim = 0.001_realtype*
rhoinf
417 j = mod(ii/
ie,
je) + 1
420 uux =
w(i, j, k,
ivx)
421 uuy =
w(i, j, k,
ivy)
422 uuz =
w(i, j, k,
ivz)
424 if (cc2 .lt. clim2)
then
436 sx =
si(i-1, j, k, 1) +
si(i, j, k, 1)
437 sy =
si(i-1, j, k, 2) +
si(i, j, k, 2)
438 sz =
si(i-1, j, k, 3) +
si(i, j, k, 3)
439 qsi = uux*sx + uuy*sy + uuz*sz - sface
440 if (qsi .ge. 0.)
then
451 sx =
sj(i, j-1, k, 1) +
sj(i, j, k, 1)
452 sy =
sj(i, j-1, k, 2) +
sj(i, j, k, 2)
453 sz =
sj(i, j-1, k, 3) +
sj(i, j, k, 3)
454 qsj = uux*sx + uuy*sy + uuz*sz - sface
455 if (qsj .ge. 0.)
then
466 sx =
sk(i, j, k-1, 1) +
sk(i, j, k, 1)
467 sy =
sk(i, j, k-1, 2) +
sk(i, j, k, 2)
468 sz =
sk(i, j, k-1, 3) +
sk(i, j, k, 3)
469 qsk = uux*sx + uuy*sy + uuz*sz - sface
470 if (qsk .ge. 0.)
then
478 if (.not.onlyradii)
dtl(i, j, k) = ri + rj + rk
484 if (ri .lt.
eps)
then
489 if (rj .lt.
eps)
then
494 if (rk .lt.
eps)
then
519 &
'turkel preconditioner not implemented yet')
522 &
'choi merkle preconditioner not implemented yet')
526 if (.not.onlyradii)
then
549 sx =
si(i, j, k, 1) +
si(i-1, j, k, 1)
550 sy =
si(i, j, k, 2) +
si(i-1, j, k, 2)
551 sz =
si(i, j, k, 3) +
si(i-1, j, k, 3)
552 vsi = rmu*(sx*sx+sy*sy+sz*sz)
553 dtl(i, j, k) =
dtl(i, j, k) + vsi
556 sx =
sj(i, j, k, 1) +
sj(i, j-1, k, 1)
557 sy =
sj(i, j, k, 2) +
sj(i, j-1, k, 2)
558 sz =
sj(i, j, k, 3) +
sj(i, j-1, k, 3)
559 vsj = rmu*(sx*sx+sy*sy+sz*sz)
560 dtl(i, j, k) =
dtl(i, j, k) + vsj
563 sx =
sk(i, j, k, 1) +
sk(i, j, k-1, 1)
564 sy =
sk(i, j, k, 2) +
sk(i, j, k-1, 2)
565 sz =
sk(i, j, k, 3) +
sk(i, j, k-1, 3)
566 vsk = rmu*(sx*sx+sy*sy+sz*sz)
567 dtl(i, j, k) =
dtl(i, j, k) + vsk
582 dtl(i, j, k) =
dtl(i, j, k) + tmp*
vol(i, j, k)
593 if (
p(i+1, j, k) -
two*
p(i, j, k) +
p(i-1, j, k) .ge. 0.) &
595 abs3 =
p(i+1, j, k) -
two*
p(i, j, k) +
p(i-1, j, k)
597 abs3 = -(
p(i+1, j, k)-
two*
p(i, j, k)+
p(i-1, j, k))
599 dpi = abs3/(
p(i+1, j, k)+
two*
p(i, j, k)+
p(i-1, j, k)+plim)
600 if (
p(i, j+1, k) -
two*
p(i, j, k) +
p(i, j-1, k) .ge. 0.) &
602 abs4 =
p(i, j+1, k) -
two*
p(i, j, k) +
p(i, j-1, k)
604 abs4 = -(
p(i, j+1, k)-
two*
p(i, j, k)+
p(i, j-1, k))
606 dpj = abs4/(
p(i, j+1, k)+
two*
p(i, j, k)+
p(i, j-1, k)+plim)
607 if (
p(i, j, k+1) -
two*
p(i, j, k) +
p(i, j, k-1) .ge. 0.) &
609 abs5 =
p(i, j, k+1) -
two*
p(i, j, k) +
p(i, j, k-1)
611 abs5 = -(
p(i, j, k+1)-
two*
p(i, j, k)+
p(i, j, k-1))
613 dpk = abs5/(
p(i, j, k+1)+
two*
p(i, j, k)+
p(i, j, k-1)+plim)
614 rfl =
one/(
one+b*(dpi+dpj+dpk))
615 dtl(i, j, k) = rfl/
dtl(i, j, k)
651 integer(kind=inttype),
intent(in) :: sps, nn
652 logical,
intent(in) :: useoldcoor
653 real(kind=realtype),
dimension(*),
intent(in) :: t
657 integer(kind=inttype) :: mm
658 integer(kind=inttype) :: i, j, k, ii, iie, jje, kke
659 real(kind=realtype) :: oneover4dt, oneover8dt
660 real(kind=realtype) :: velxgrid, velygrid, velzgrid, ainf
661 real(kind=realtype) :: velxgrid0, velygrid0, velzgrid0
662 real(kind=realtype),
dimension(3) :: sc, xc, xxc
663 real(kind=realtype),
dimension(3) :: rotcenter, rotrate
664 real(kind=realtype),
dimension(3) :: rotationpoint
665 real(kind=realtype),
dimension(3, 3) :: rotationmatrix, &
666 & derivrotationmatrix
667 real(kind=realtype) :: tnew, told
668 real(kind=realtype),
dimension(:, :),
pointer :: sface
669 real(kind=realtype),
dimension(:, :, :),
pointer :: xx, ss
670 real(kind=realtype),
dimension(:, :, :, :),
pointer :: xxold
671 real(kind=realtype) :: intervalmach, alphats, alphaincrement, betats&
673 real(kind=realtype),
dimension(3) :: veldir
674 real(kind=realtype),
dimension(3) :: refdirection
693 if (.not.useoldcoor)
then
717 xc(1) = eighth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j-1&
718 & , k-1, 1)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, k-1, &
719 & 1)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 1)+&
720 & flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 1)+flowdoms(&
721 & nn,
groundlevel, sps)%x(i-1, j-1, k, 1)+flowdoms(nn, &
725 xc(2) = eighth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j-1&
726 & , k-1, 2)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, k-1, &
727 & 2)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 2)+&
728 & flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 2)+flowdoms(&
729 & nn,
groundlevel, sps)%x(i-1, j-1, k, 2)+flowdoms(nn, &
733 xc(3) = eighth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j-1&
734 & , k-1, 3)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, k-1, &
735 & 3)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 3)+&
736 & flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 3)+flowdoms(&
737 & nn,
groundlevel, sps)%x(i-1, j-1, k, 3)+flowdoms(nn, &
743 xxc(1) = xc(1) - rotcenter(1)
744 xxc(2) = xc(2) - rotcenter(2)
745 xxc(3) = xc(3) - rotcenter(3)
748 sc(1) = rotrate(2)*xxc(3) - rotrate(3)*xxc(2)
749 sc(2) = rotrate(3)*xxc(1) - rotrate(1)*xxc(3)
750 sc(3) = rotrate(1)*xxc(2) - rotrate(2)*xxc(1)
753 xxc(1) = xc(1) - rotationpoint(1)
754 xxc(2) = xc(2) - rotationpoint(2)
755 xxc(3) = xc(3) - rotationpoint(3)
759 s(i, j, k, 1) = sc(1) + velxgrid + derivrotationmatrix(1, &
760 & 1)*xxc(1) + derivrotationmatrix(1, 2)*xxc(2) + &
761 & derivrotationmatrix(1, 3)*xxc(3)
762 s(i, j, k, 2) = sc(2) + velygrid + derivrotationmatrix(2, &
763 & 1)*xxc(1) + derivrotationmatrix(2, 2)*xxc(2) + &
764 & derivrotationmatrix(2, 3)*xxc(3)
765 s(i, j, k, 3) = sc(3) + velzgrid + derivrotationmatrix(3, &
766 & 1)*xxc(1) + derivrotationmatrix(3, 2)*xxc(2) + &
767 & derivrotationmatrix(3, 3)*xxc(3)
784 xc(1) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
785 & -1, 1)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 1)+&
786 & flowdoms(nn,
groundlevel, sps)%x(i, j-1, k, 1)+flowdoms(&
788 xc(2) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
789 & -1, 2)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 2)+&
790 & flowdoms(nn,
groundlevel, sps)%x(i, j-1, k, 2)+flowdoms(&
792 xc(3) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
793 & -1, 3)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 3)+&
794 & flowdoms(nn,
groundlevel, sps)%x(i, j-1, k, 3)+flowdoms(&
797 & velygrid, velzgrid, derivrotationmatrix&
801 sfacei(i, j, k) = sc(1)*
si(i, j, k, 1) + sc(2)*
si(i, j, k&
802 & , 2) + sc(3)*
si(i, j, k, 3)
812 xc(1) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j, k&
813 & , 1)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 1)+&
814 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 1)+&
816 xc(2) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j, k&
817 & , 2)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 2)+&
818 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 2)+&
820 xc(3) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i-1, j, k&
821 & , 3)+flowdoms(nn,
groundlevel, sps)%x(i, j, k-1, 3)+&
822 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, k-1, 3)+&
825 & velygrid, velzgrid, derivrotationmatrix&
829 sfacej(i, j, k) = sc(1)*
sj(i, j, k, 1) + sc(2)*
sj(i, j, k&
830 & , 2) + sc(3)*
sj(i, j, k, 3)
840 xc(1) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
841 & , 1)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k, 1)+&
842 & flowdoms(nn,
groundlevel, sps)%x(i-1, j-1, k, 1)+&
844 xc(2) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
845 & , 2)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k, 2)+&
846 & flowdoms(nn,
groundlevel, sps)%x(i-1, j-1, k, 2)+&
848 xc(3) = fourth*(flowdoms(nn,
groundlevel, sps)%x(i, j-1, k&
849 & , 3)+flowdoms(nn,
groundlevel, sps)%x(i-1, j, k, 3)+&
850 & flowdoms(nn,
groundlevel, sps)%x(i-1, j-1, k, 3)+&
853 & velygrid, velzgrid, derivrotationmatrix&
857 sfacek(i, j, k) = sc(1)*
sk(i, j, k, 1) + sc(2)*
sk(i, j, k&
858 & , 2) + sc(3)*
sk(i, j, k, 3)
867 & velygrid, velzgrid, derivrotationmatrix, sc)
876 real(kind=realtype),
dimension(3),
intent(in) :: xc, rotcenter, &
878 real(kind=realtype),
intent(in) :: velxgrid, velygrid, velzgrid
879 real(kind=realtype),
dimension(3, 3),
intent(in) :: &
880 & derivrotationmatrix
881 real(kind=realtype),
dimension(3),
intent(out) :: sc
885 real(kind=realtype),
dimension(3) :: rotationpoint, xxc
888 xxc(1) = xc(1) - rotcenter(1)
889 xxc(2) = xc(2) - rotcenter(2)
890 xxc(3) = xc(3) - rotcenter(3)
893 sc(1) = rotrate(2)*xxc(3) - rotrate(3)*xxc(2)
894 sc(2) = rotrate(3)*xxc(1) - rotrate(1)*xxc(3)
895 sc(3) = rotrate(1)*xxc(2) - rotrate(2)*xxc(1)
898 xxc(1) = xc(1) - rotationpoint(1)
899 xxc(2) = xc(2) - rotationpoint(2)
900 xxc(3) = xc(3) - rotationpoint(3)
904 sc(1) = sc(1) + velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
905 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1, 3)*xxc(3&
907 sc(2) = sc(2) + velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
908 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2, 3)*xxc(3&
910 sc(3) = sc(3) + velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
911 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3, 3)*xxc(3&
942 integer(kind=inttype),
intent(in) :: sps, nn
943 logical,
intent(in) :: useoldcoor
944 real(kind=realtype),
dimension(*),
intent(in) :: t
948 integer(kind=inttype) :: mm, i, j, level, ii
949 real(kind=realtype) :: oneover4dt
950 real(kind=realtype) :: velxgrid, velygrid, velzgrid, ainf
951 real(kind=realtype) :: velxgrid0, velygrid0, velzgrid0
952 real(kind=realtype),
dimension(3) :: xc, xxc
953 real(kind=realtype),
dimension(3) :: rotcenter, rotrate
954 real(kind=realtype),
dimension(3) :: rotationpoint
955 real(kind=realtype),
dimension(3, 3) :: rotationmatrix, &
956 & derivrotationmatrix
957 real(kind=realtype) :: tnew, told
958 real(kind=realtype),
dimension(:, :, :),
pointer :: uslip
959 real(kind=realtype),
dimension(:, :, :),
pointer :: xface
960 real(kind=realtype),
dimension(:, :, :, :),
pointer :: xfaceold
961 real(kind=realtype) :: intervalmach, alphats, alphaincrement, betats&
963 real(kind=realtype),
dimension(3) :: veldir
964 real(kind=realtype),
dimension(3) :: refdirection
967 if (.not.useoldcoor)
then
1009 & 1)+flowdoms(nn,
groundlevel, sps)%x(1, i, j-1, 1)+&
1010 & flowdoms(nn,
groundlevel, sps)%x(1, i-1, j, 1)+flowdoms(&
1013 & 2)+flowdoms(nn,
groundlevel, sps)%x(1, i, j-1, 2)+&
1014 & flowdoms(nn,
groundlevel, sps)%x(1, i-1, j, 2)+flowdoms(&
1017 & 3)+flowdoms(nn,
groundlevel, sps)%x(1, i, j-1, 3)+&
1018 & flowdoms(nn,
groundlevel, sps)%x(1, i-1, j, 3)+flowdoms(&
1022 xxc(1) = xc(1) - rotcenter(1)
1023 xxc(2) = xc(2) - rotcenter(2)
1024 xxc(3) = xc(3) - rotcenter(3)
1027 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
1029 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
1031 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
1035 xxc(1) = xc(1) - rotationpoint(1)
1036 xxc(2) = xc(2) - rotationpoint(2)
1037 xxc(3) = xc(3) - rotationpoint(3)
1041 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
1042 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
1043 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
1045 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
1046 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
1047 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
1049 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
1050 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
1051 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
1076 xxc(1) = xc(1) - rotcenter(1)
1077 xxc(2) = xc(2) - rotcenter(2)
1078 xxc(3) = xc(3) - rotcenter(3)
1081 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
1083 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
1085 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
1089 xxc(1) = xc(1) - rotationpoint(1)
1090 xxc(2) = xc(2) - rotationpoint(2)
1091 xxc(3) = xc(3) - rotationpoint(3)
1095 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
1096 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
1097 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
1099 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
1100 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
1101 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
1103 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
1104 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
1105 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
1117 & 1)+flowdoms(nn,
groundlevel, sps)%x(i, 1, j-1, 1)+&
1118 & flowdoms(nn,
groundlevel, sps)%x(i-1, 1, j, 1)+flowdoms(&
1121 & 2)+flowdoms(nn,
groundlevel, sps)%x(i, 1, j-1, 2)+&
1122 & flowdoms(nn,
groundlevel, sps)%x(i-1, 1, j, 2)+flowdoms(&
1125 & 3)+flowdoms(nn,
groundlevel, sps)%x(i, 1, j-1, 3)+&
1126 & flowdoms(nn,
groundlevel, sps)%x(i-1, 1, j, 3)+flowdoms(&
1130 xxc(1) = xc(1) - rotcenter(1)
1131 xxc(2) = xc(2) - rotcenter(2)
1132 xxc(3) = xc(3) - rotcenter(3)
1135 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
1137 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
1139 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
1143 xxc(1) = xc(1) - rotationpoint(1)
1144 xxc(2) = xc(2) - rotationpoint(2)
1145 xxc(3) = xc(3) - rotationpoint(3)
1149 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
1150 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
1151 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
1153 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
1154 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
1155 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
1157 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
1158 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
1159 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
1184 xxc(1) = xc(1) - rotcenter(1)
1185 xxc(2) = xc(2) - rotcenter(2)
1186 xxc(3) = xc(3) - rotcenter(3)
1189 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
1191 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
1193 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
1197 xxc(1) = xc(1) - rotationpoint(1)
1198 xxc(2) = xc(2) - rotationpoint(2)
1199 xxc(3) = xc(3) - rotationpoint(3)
1203 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
1204 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
1205 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
1207 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
1208 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
1209 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
1211 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
1212 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
1213 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
1225 & 1)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, 1, 1)+&
1226 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, 1, 1)+flowdoms(&
1229 & 2)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, 1, 2)+&
1230 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, 1, 2)+flowdoms(&
1233 & 3)+flowdoms(nn,
groundlevel, sps)%x(i, j-1, 1, 3)+&
1234 & flowdoms(nn,
groundlevel, sps)%x(i-1, j, 1, 3)+flowdoms(&
1238 xxc(1) = xc(1) - rotcenter(1)
1239 xxc(2) = xc(2) - rotcenter(2)
1240 xxc(3) = xc(3) - rotcenter(3)
1243 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
1245 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
1247 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
1251 xxc(1) = xc(1) - rotationpoint(1)
1252 xxc(2) = xc(2) - rotationpoint(2)
1253 xxc(3) = xc(3) - rotationpoint(3)
1257 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
1258 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
1259 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
1261 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
1262 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
1263 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
1265 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
1266 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
1267 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
1292 xxc(1) = xc(1) - rotcenter(1)
1293 xxc(2) = xc(2) - rotcenter(2)
1294 xxc(3) = xc(3) - rotcenter(3)
1297 bcdata(mm)%uslip(i, j, 1) = rotrate(2)*xxc(3) - rotrate(3)&
1299 bcdata(mm)%uslip(i, j, 2) = rotrate(3)*xxc(1) - rotrate(1)&
1301 bcdata(mm)%uslip(i, j, 3) = rotrate(1)*xxc(2) - rotrate(2)&
1305 xxc(1) = xc(1) - rotationpoint(1)
1306 xxc(2) = xc(2) - rotationpoint(2)
1307 xxc(3) = xc(3) - rotationpoint(3)
1311 bcdata(mm)%uslip(i, j, 1) =
bcdata(mm)%uslip(i, j, 1) + &
1312 & velxgrid + derivrotationmatrix(1, 1)*xxc(1) + &
1313 & derivrotationmatrix(1, 2)*xxc(2) + derivrotationmatrix(1&
1315 bcdata(mm)%uslip(i, j, 2) =
bcdata(mm)%uslip(i, j, 2) + &
1316 & velygrid + derivrotationmatrix(2, 1)*xxc(1) + &
1317 & derivrotationmatrix(2, 2)*xxc(2) + derivrotationmatrix(2&
1319 bcdata(mm)%uslip(i, j, 3) =
bcdata(mm)%uslip(i, j, 3) + &
1320 & velzgrid + derivrotationmatrix(3, 1)*xxc(1) + &
1321 & derivrotationmatrix(3, 2)*xxc(2) + derivrotationmatrix(3&
1344 integer(kind=inttype),
intent(in) :: sps
1348 integer(kind=inttype) :: mm
1349 integer(kind=inttype) :: i, j
1350 real(kind=realtype) :: weight, mult
1351 real(kind=realtype),
dimension(:, :),
pointer :: sface
1352 real(kind=realtype),
dimension(:, :, :),
pointer :: ss
1353 intrinsic associated
1372 if (
associated(
bcdata(mm)%rface))
then
1383 weight = sqrt(
si(1, i, j, 1)**2 +
si(1, i, j, 2)**2 +
si&
1385 if (weight .gt.
zero) weight = mult/weight
1397 weight = sqrt(
si(
il, i, j, 1)**2 +
si(
il, i, j, 2)**2 + &
1398 &
si(
il, i, j, 3)**2)
1399 if (weight .gt.
zero) weight = mult/weight
1411 weight = sqrt(
sj(i, 1, j, 1)**2 +
sj(i, 1, j, 2)**2 +
sj&
1413 if (weight .gt.
zero) weight = mult/weight
1425 weight = sqrt(
sj(i,
jl, j, 1)**2 +
sj(i,
jl, j, 2)**2 + &
1426 &
sj(i,
jl, j, 3)**2)
1427 if (weight .gt.
zero) weight = mult/weight
1439 weight = sqrt(
sk(i, j, 1, 1)**2 +
sk(i, j, 1, 2)**2 +
sk&
1441 if (weight .gt.
zero) weight = mult/weight
1453 weight = sqrt(
sk(i, j,
kl, 1)**2 +
sk(i, j,
kl, 2)**2 + &
1454 &
sk(i, j,
kl, 3)**2)
1455 if (weight .gt.
zero) weight = mult/weight
real(kind=realtype), dimension(:, :, :), pointer sfacek
real(kind=realtype), dimension(:, :, :), pointer gamma
real(kind=realtype), dimension(:, :, :), pointer radid
logical addgridvelocities
real(kind=realtype), dimension(:, :, :), pointer radk
real(kind=realtype), dimension(:, :, :, :), pointer wd
integer(kind=inttype) nviscbocos
real(kind=realtype), dimension(:, :, :), pointer p
real(kind=realtype), dimension(:, :, :), pointer radj
real(kind=realtype), dimension(:, :, :, :), pointer w
real(kind=realtype), dimension(:, :, :), pointer sfacei
integer(kind=inttype), dimension(:), pointer cgnssubface
real(kind=realtype), dimension(:, :, :), pointer revd
real(kind=realtype), dimension(:, :, :), pointer radjd
integer(kind=inttype) nbkglobal
real(kind=realtype), dimension(:, :, :), pointer rlv
integer(kind=inttype), dimension(:), pointer bcfaceid
real(kind=realtype), dimension(:, :, :, :), pointer si
real(kind=realtype), dimension(:, :, :), pointer radkd
integer(kind=inttype) nbocos
real(kind=realtype), dimension(:, :, :, :), pointer sj
integer(kind=inttype) sectionid
real(kind=realtype), dimension(:, :, :, :), pointer s
real(kind=realtype), dimension(:, :, :), pointer rev
real(kind=realtype), dimension(:, :, :, :), pointer sk
real(kind=realtype), dimension(:, :, :), pointer rlvd
real(kind=realtype), dimension(:, :, :), pointer vol
real(kind=realtype), dimension(:, :, :), pointer dtl
real(kind=realtype), dimension(:, :, :), pointer sfacej
real(kind=realtype), dimension(:, :, :), pointer radi
real(kind=realtype), dimension(:, :, :), pointer pd
type(cgnsblockinfotype), dimension(:), allocatable cgnsdoms
real(kind=realtype), parameter zero
integer(kind=inttype), parameter imax
integer(kind=inttype), parameter kmin
real(kind=realtype), parameter pi
integer(kind=inttype), parameter jmax
real(kind=realtype), parameter eps
integer(kind=inttype), parameter turkel
integer(kind=inttype), parameter choimerkle
integer(kind=inttype), parameter timespectral
integer(kind=inttype), dimension(32) myintstack
integer(kind=inttype) myintptr
integer(kind=inttype), parameter noprecond
real(kind=realtype), parameter one
real(kind=realtype), parameter half
integer(kind=inttype), parameter imin
real(kind=realtype), parameter two
real(kind=realtype), parameter fourth
integer(kind=inttype), parameter kmax
integer(kind=inttype), parameter jmin
subroutine derivativerotmatrixrigid(rotationmatrix, rotationpoint, t)
subroutine getdirvector(refdirection, alpha, beta, winddirection, liftindex)
real(kind=realtype) gammainf
real(kind=realtype) pinfcorr
real(kind=realtype) rhoinf
real(kind=realtype) timeref
integer(kind=inttype) currentlevel
integer(kind=inttype) groundlevel
type(sectiontype), dimension(:), allocatable sections
subroutine slipvelocitiesfinelevel_block(useoldcoor, t, sps, nn)
subroutine normalvelocities_block(sps)
subroutine cellfacevelocities(xc, rotcenter, rotrate, velxgrid, velygrid, velzgrid, derivrotationmatrix, sc)
subroutine timestep_block(onlyradii)
subroutine timestep_block_fast_b(onlyradii)
subroutine gridvelocitiesfinelevel_block(useoldcoor, t, sps, nn)
subroutine terminate(routinename, errormessage)
subroutine rotmatrixrigidbody(tnew, told, rotationmatrix, rotationpoint)
subroutine setcoeftimeintegrator()
real(kind=realtype) function tsmach(degreepolmach, coefpolmach, degreefourmach, omegafourmach, coscoeffourmach, sincoeffourmach, t)
subroutine getdirangle(freestreamaxis, liftaxis, liftindex, alpha, beta)
real(kind=realtype) function tsalpha(degreepolalpha, coefpolalpha, degreefouralpha, omegafouralpha, coscoeffouralpha, sincoeffouralpha, t)
real(kind=realtype) function tsbeta(degreepolbeta, coefpolbeta, degreefourbeta, omegafourbeta, coscoeffourbeta, sincoeffourbeta, t)