14 character,
dimension(maxcgnsnamelen),
intent(in) :: chararray
15 integer(kind=inttype),
intent(in) :: n
23 integer(kind=inttype) :: i
29 function tsbeta(degreepolbeta, coefpolbeta, degreefourbeta, &
30 & omegafourbeta, coscoeffourbeta, sincoeffourbeta, t)
41 real(kind=realtype) ::
tsbeta
45 integer(kind=inttype),
intent(in) :: degreepolbeta
46 integer(kind=inttype),
intent(in) :: degreefourbeta
47 real(kind=realtype),
intent(in) :: omegafourbeta, t
48 real(kind=realtype),
dimension(0:*),
intent(in) :: coefpolbeta
49 real(kind=realtype),
dimension(0:*),
intent(in) :: coscoeffourbeta
50 real(kind=realtype),
dimension(*),
intent(in) :: sincoeffourbeta
54 integer(kind=inttype) :: nn
55 real(kind=realtype) :: beta, val
67 beta = beta + coefpolbeta(nn)*t**nn
71 beta = beta + coscoeffourbeta(0)
72 do nn=1,degreefourbeta
73 val = nn*omegafourbeta*t
74 beta = beta + coscoeffourbeta(nn)*cos(val) + sincoeffourbeta(nn)&
82 function tsbetadot(degreepolbeta, coefpolbeta, degreefourbeta, &
83 & omegafourbeta, coscoeffourbeta, sincoeffourbeta, t)
98 integer(kind=inttype),
intent(in) :: degreepolbeta
99 integer(kind=inttype),
intent(in) :: degreefourbeta
100 real(kind=realtype),
intent(in) :: omegafourbeta, t
101 real(kind=realtype),
dimension(0:*),
intent(in) :: coefpolbeta
102 real(kind=realtype),
dimension(0:*),
intent(in) :: coscoeffourbeta
103 real(kind=realtype),
dimension(*),
intent(in) :: sincoeffourbeta
107 integer(kind=inttype) :: nn
108 real(kind=realtype) :: betadot, val
119 do nn=1,degreepolbeta
120 betadot = betadot + nn*coefpolbeta(nn)*t**(nn-1)
124 do nn=1,degreefourbeta
125 val = nn*omegafourbeta
126 betadot = betadot - val*coscoeffourbeta(nn)*sin(val*t) + val*&
127 & sincoeffourbeta(nn)*cos(val*t)
134 function tsmach(degreepolmach, coefpolmach, degreefourmach, &
135 & omegafourmach, coscoeffourmach, sincoeffourmach, t)
146 real(kind=realtype) ::
tsmach
150 integer(kind=inttype),
intent(in) :: degreepolmach
151 integer(kind=inttype),
intent(in) :: degreefourmach
152 real(kind=realtype),
intent(in) :: omegafourmach, t
153 real(kind=realtype),
dimension(0:*),
intent(in) :: coefpolmach
154 real(kind=realtype),
dimension(0:*),
intent(in) :: coscoeffourmach
155 real(kind=realtype),
dimension(*),
intent(in) :: sincoeffourmach
159 integer(kind=inttype) :: nn
160 real(kind=realtype) :: intervalmach, val
170 intervalmach = coefpolmach(0)
171 do nn=1,degreepolmach
172 intervalmach = intervalmach + coefpolmach(nn)*t**nn
176 intervalmach = intervalmach + coscoeffourmach(0)
177 do nn=1,degreefourmach
178 val = nn*omegafourmach*t
179 intervalmach = intervalmach + coscoeffourmach(nn)*cos(val) + &
180 & sincoeffourmach(nn)*sin(val)
182 print*,
'intsmach', intervalmach, nn, val, t
188 function tsmachdot(degreepolmach, coefpolmach, degreefourmach, &
189 & omegafourmach, coscoeffourmach, sincoeffourmach, t)
204 integer(kind=inttype),
intent(in) :: degreepolmach
205 integer(kind=inttype),
intent(in) :: degreefourmach
206 real(kind=realtype),
intent(in) :: omegafourmach, t
207 real(kind=realtype),
dimension(0:*),
intent(in) :: coefpolmach
208 real(kind=realtype),
dimension(0:*),
intent(in) :: coscoeffourmach
209 real(kind=realtype),
dimension(*),
intent(in) :: sincoeffourmach
213 integer(kind=inttype) :: nn
214 real(kind=realtype) :: machdot, val
225 do nn=1,degreepolmach
226 machdot = machdot + nn*coefpolmach(nn)*t**(nn-1)
230 do nn=1,degreefourmach
231 val = nn*omegafourmach
232 machdot = machdot - val*coscoeffourmach(nn)*sin(val*t) + val*&
233 & sincoeffourmach(nn)*cos(val*t)
240 function tsalpha(degreepolalpha, coefpolalpha, degreefouralpha, &
241 & omegafouralpha, coscoeffouralpha, sincoeffouralpha, t)
256 integer(kind=inttype),
intent(in) :: degreepolalpha
257 integer(kind=inttype),
intent(in) :: degreefouralpha
258 real(kind=realtype),
intent(in) :: omegafouralpha, t
259 real(kind=realtype),
dimension(0:*),
intent(in) :: coefpolalpha
260 real(kind=realtype),
dimension(0:*),
intent(in) :: coscoeffouralpha
261 real(kind=realtype),
dimension(*),
intent(in) :: sincoeffouralpha
265 integer(kind=inttype) :: nn
266 real(kind=realtype) :: alpha, val
276 alpha = coefpolalpha(0)
277 do nn=1,degreepolalpha
278 alpha = alpha + coefpolalpha(nn)*t**nn
282 alpha = alpha + coscoeffouralpha(0)
283 do nn=1,degreefouralpha
284 val = nn*omegafouralpha*t
285 alpha = alpha + coscoeffouralpha(nn)*cos(val) + sincoeffouralpha&
294 function tsalphadot(degreepolalpha, coefpolalpha, degreefouralpha, &
295 & omegafouralpha, coscoeffouralpha, sincoeffouralpha, t)
310 integer(kind=inttype),
intent(in) :: degreepolalpha
311 integer(kind=inttype),
intent(in) :: degreefouralpha
312 real(kind=realtype),
intent(in) :: omegafouralpha, t
313 real(kind=realtype),
dimension(0:*),
intent(in) :: coefpolalpha
314 real(kind=realtype),
dimension(0:*),
intent(in) :: coscoeffouralpha
315 real(kind=realtype),
dimension(*),
intent(in) :: sincoeffouralpha
319 integer(kind=inttype) :: nn
320 real(kind=realtype) :: alphadot, val
331 do nn=1,degreepolalpha
332 alphadot = alphadot + nn*coefpolalpha(nn)*t**(nn-1)
336 do nn=1,degreefouralpha
337 val = nn*omegafouralpha
338 alphadot = alphadot - val*coscoeffouralpha(nn)*sin(val*t) + val*&
339 & sincoeffouralpha(nn)*cos(val*t)
350 & coefpolrot, degreefourrot, omegafourrot, coscoeffourrot, &
351 & sincoeffourrot, t, derivativerigidrotangle)
369 integer(kind=inttype),
intent(in) :: degreepolrot
370 integer(kind=inttype),
intent(in) :: degreefourrot
371 real(kind=realtype),
intent(in) :: omegafourrot, t
372 real(kind=realtype),
dimension(0:*),
intent(in) :: coefpolrot
373 real(kind=realtype),
dimension(0:*),
intent(in) :: coscoeffourrot
374 real(kind=realtype),
dimension(*),
intent(in) :: sincoeffourrot
378 integer(kind=inttype) :: nn
379 real(kind=realtype) :: dphi, val
391 dphi = dphi + nn*coefpolrot(nn)*t**(nn-1)
394 do nn=1,degreefourrot
395 val = nn*omegafourrot
396 dphi = dphi - val*coscoeffourrot(nn)*sin(val*t)
397 dphi = dphi + val*sincoeffourrot(nn)*cos(val*t)
407 & degreefourrot, omegafourrot, coscoeffourrot, sincoeffourrot, t)
425 integer(kind=inttype),
intent(in) :: degreepolrot
426 integer(kind=inttype),
intent(in) :: degreefourrot
427 real(kind=realtype),
intent(in) :: omegafourrot, t
428 real(kind=realtype),
dimension(0:*),
intent(in) :: coefpolrot
429 real(kind=realtype),
dimension(0:*),
intent(in) :: coscoeffourrot
430 real(kind=realtype),
dimension(*),
intent(in) :: sincoeffourrot
434 integer(kind=inttype) :: nn
435 real(kind=realtype) :: dphi, val
446 dphi = dphi + nn*coefpolrot(nn)*t**(nn-1)
449 do nn=1,degreefourrot
450 val = nn*omegafourrot
451 dphi = dphi - val*coscoeffourrot(nn)*sin(val*t)
452 dphi = dphi + val*sincoeffourrot(nn)*cos(val*t)
463 real(kind=realtype)
function mydim_d(x, xd, y, yd, mydim)
466 real(kind=realtype) :: x, y
467 real(kind=realtype) :: xd, yd
468 real(kind=realtype) ::
mydim
471 if (
mydim .lt. 0.0)
then
480 real(kind=realtype) :: x, y
481 real(kind=realtype) ::
mydim
510 character(len=*),
intent(in) :: routinename
511 character(len=*),
intent(in) :: errormessage
528 real(kind=realtype),
intent(in) :: tnew, told
529 real(kind=realtype),
dimension(3),
intent(out) :: rotationpoint
530 real(kind=realtype),
dimension(3, 3),
intent(out) :: rotationmatrix
534 integer(kind=inttype) :: i, j
535 real(kind=realtype) :: phi
536 real(kind=realtype) :: cosx, cosy, cosz, sinx, siny, sinz
537 real(kind=realtype),
dimension(3, 3) :: mnew, mold
559 mnew(1, 1) = cosy*cosz
560 mnew(2, 1) = cosy*sinz
562 mnew(1, 2) = sinx*siny*cosz - cosx*sinz
563 mnew(2, 2) = sinx*siny*sinz + cosx*cosz
564 mnew(3, 2) = sinx*cosy
565 mnew(1, 3) = cosx*siny*cosz + sinx*sinz
566 mnew(2, 3) = cosx*siny*sinz - sinx*cosz
567 mnew(3, 3) = cosx*cosy
585 mold(1, 1) = cosy*cosz
586 mold(2, 1) = cosy*sinz
588 mold(1, 2) = sinx*siny*cosz - cosx*sinz
589 mold(2, 2) = sinx*siny*sinz + cosx*cosz
590 mold(3, 2) = sinx*cosy
591 mold(1, 3) = cosx*siny*cosz + sinx*sinz
592 mold(2, 3) = cosx*siny*sinz - sinx*cosz
593 mold(3, 3) = cosx*cosy
599 rotationmatrix(i, j) = mnew(i, 1)*mold(j, 1) + mnew(i, 2)*mold(j&
600 & , 2) + mnew(i, 3)*mold(j, 3)
618 & degreefourrot, omegafourrot, coscoeffourrot, sincoeffourrot, t)
636 integer(kind=inttype),
intent(in) :: degreepolrot
637 integer(kind=inttype),
intent(in) :: degreefourrot
638 real(kind=realtype),
intent(in) :: omegafourrot, t
639 real(kind=realtype),
dimension(0:*),
intent(in) :: coefpolrot
640 real(kind=realtype),
dimension(0:*),
intent(in) :: coscoeffourrot
641 real(kind=realtype),
dimension(*),
intent(in) :: sincoeffourrot
645 integer(kind=inttype) :: nn
646 real(kind=realtype) :: dphi, val
657 dphi = dphi + (nn-1)*nn*coefpolrot(nn)*t**(nn-2)
660 do nn=1,degreefourrot
661 val = nn*omegafourrot
662 dphi = dphi - val**2*sincoeffourrot(nn)*sin(val*t)
663 dphi = dphi - val**2*coscoeffourrot(nn)*cos(val*t)
672 & omegafourrot, coscoeffourrot, sincoeffourrot, t)
688 integer(kind=inttype),
intent(in) :: degreepolrot
689 integer(kind=inttype),
intent(in) :: degreefourrot
690 real(kind=realtype),
intent(in) :: omegafourrot, t
691 real(kind=realtype),
dimension(0:*),
intent(in) :: coefpolrot
692 real(kind=realtype),
dimension(0:*),
intent(in) :: coscoeffourrot
693 real(kind=realtype),
dimension(*),
intent(in) :: sincoeffourrot
697 integer(kind=inttype) :: nn
698 real(kind=realtype) :: phi, val
710 phi = phi + coefpolrot(nn)*t**nn
714 phi = phi + coscoeffourrot(0)
715 do nn=1,degreefourrot
716 val = nn*omegafourrot*t
717 phi = phi + coscoeffourrot(nn)*cos(val) + sincoeffourrot(nn)*sin&
733 & ,
sk,
s,
globalcell,
bcdata,
nx,
il,
ie,
ib,
ny,
jl,
je,
jb,
nz,
kl,&
736 use bcpointers_d,
only : ww0, ww1, ww2, ww3, pp0, pp1, pp2, pp3, &
737 & rlv0, rlv1, rlv2, rlv3, rev0, rev1, rev2, rev3, gamma0, gamma1, &
738 & gamma2, gamma3, gcp, xx, ss, ssi, ssj, ssk, dd2wall, sface, istart, &
739 & iend, jstart, jend, isize, jsize
743 integer(kind=inttype),
intent(in) :: nn
744 logical,
intent(in) :: spatialpointers
752 isize = iend - istart + 1
753 jsize = jend - jstart + 1
759 ww3 =>
w(3, 1:, 1:, :)
760 ww2 =>
w(2, 1:, 1:, :)
761 ww1 =>
w(1, 1:, 1:, :)
762 ww0 =>
w(0, 1:, 1:, :)
767 rlv3 =>
rlv(3, 1:, 1:)
768 rlv2 =>
rlv(2, 1:, 1:)
769 rlv1 =>
rlv(1, 1:, 1:)
770 rlv0 =>
rlv(0, 1:, 1:)
771 rev3 =>
rev(3, 1:, 1:)
772 rev2 =>
rev(2, 1:, 1:)
773 rev1 =>
rev(1, 1:, 1:)
774 rev0 =>
rev(0, 1:, 1:)
775 gamma3 =>
gamma(3, 1:, 1:)
776 gamma2 =>
gamma(2, 1:, 1:)
777 gamma1 =>
gamma(1, 1:, 1:)
778 gamma0 =>
gamma(0, 1:, 1:)
782 ww3 =>
w(
nx, 1:, 1:, :)
783 ww2 =>
w(
il, 1:, 1:, :)
784 ww1 =>
w(
ie, 1:, 1:, :)
785 ww0 =>
w(
ib, 1:, 1:, :)
790 rlv3 =>
rlv(
nx, 1:, 1:)
791 rlv2 =>
rlv(
il, 1:, 1:)
792 rlv1 =>
rlv(
ie, 1:, 1:)
793 rlv0 =>
rlv(
ib, 1:, 1:)
794 rev3 =>
rev(
nx, 1:, 1:)
795 rev2 =>
rev(
il, 1:, 1:)
796 rev1 =>
rev(
ie, 1:, 1:)
797 rev0 =>
rev(
ib, 1:, 1:)
805 ww3 =>
w(1:, 3, 1:, :)
806 ww2 =>
w(1:, 2, 1:, :)
807 ww1 =>
w(1:, 1, 1:, :)
808 ww0 =>
w(1:, 0, 1:, :)
813 rlv3 =>
rlv(1:, 3, 1:)
814 rlv2 =>
rlv(1:, 2, 1:)
815 rlv1 =>
rlv(1:, 1, 1:)
816 rlv0 =>
rlv(1:, 0, 1:)
817 rev3 =>
rev(1:, 3, 1:)
818 rev2 =>
rev(1:, 2, 1:)
819 rev1 =>
rev(1:, 1, 1:)
820 rev0 =>
rev(1:, 0, 1:)
821 gamma3 =>
gamma(1:, 3, 1:)
822 gamma2 =>
gamma(1:, 2, 1:)
823 gamma1 =>
gamma(1:, 1, 1:)
824 gamma0 =>
gamma(1:, 0, 1:)
828 ww3 =>
w(1:,
ny, 1:, :)
829 ww2 =>
w(1:,
jl, 1:, :)
830 ww1 =>
w(1:,
je, 1:, :)
831 ww0 =>
w(1:,
jb, 1:, :)
836 rlv3 =>
rlv(1:,
ny, 1:)
837 rlv2 =>
rlv(1:,
jl, 1:)
838 rlv1 =>
rlv(1:,
je, 1:)
839 rlv0 =>
rlv(1:,
jb, 1:)
840 rev3 =>
rev(1:,
ny, 1:)
841 rev2 =>
rev(1:,
jl, 1:)
842 rev1 =>
rev(1:,
je, 1:)
843 rev0 =>
rev(1:,
jb, 1:)
851 ww3 =>
w(1:, 1:, 3, :)
852 ww2 =>
w(1:, 1:, 2, :)
853 ww1 =>
w(1:, 1:, 1, :)
854 ww0 =>
w(1:, 1:, 0, :)
859 rlv3 =>
rlv(1:, 1:, 3)
860 rlv2 =>
rlv(1:, 1:, 2)
861 rlv1 =>
rlv(1:, 1:, 1)
862 rlv0 =>
rlv(1:, 1:, 0)
863 rev3 =>
rev(1:, 1:, 3)
864 rev2 =>
rev(1:, 1:, 2)
865 rev1 =>
rev(1:, 1:, 1)
866 rev0 =>
rev(1:, 1:, 0)
867 gamma3 =>
gamma(1:, 1:, 3)
868 gamma2 =>
gamma(1:, 1:, 2)
869 gamma1 =>
gamma(1:, 1:, 1)
870 gamma0 =>
gamma(1:, 1:, 0)
874 ww3 =>
w(1:, 1:,
nz, :)
875 ww2 =>
w(1:, 1:,
kl, :)
876 ww1 =>
w(1:, 1:,
ke, :)
877 ww0 =>
w(1:, 1:,
kb, :)
882 rlv3 =>
rlv(1:, 1:,
nz)
883 rlv2 =>
rlv(1:, 1:,
kl)
884 rlv1 =>
rlv(1:, 1:,
ke)
885 rlv0 =>
rlv(1:, 1:,
kb)
886 rev3 =>
rev(1:, 1:,
nz)
887 rev2 =>
rev(1:, 1:,
kl)
888 rev1 =>
rev(1:, 1:,
ke)
889 rev0 =>
rev(1:, 1:,
kb)
896 if (spatialpointers)
then
900 ssi =>
si(1, :, :, :)
901 ssj =>
sj(2, :, :, :)
902 ssk =>
sk(2, :, :, :)
906 ssi =>
si(
il, :, :, :)
907 ssj =>
sj(
il, :, :, :)
908 ssk =>
sk(
il, :, :, :)
912 ssi =>
sj(:, 1, :, :)
913 ssj =>
si(:, 2, :, :)
914 ssk =>
sk(:, 2, :, :)
918 ssi =>
sj(:,
jl, :, :)
919 ssj =>
si(:,
jl, :, :)
920 ssk =>
sk(:,
jl, :, :)
924 ssi =>
sk(:, :, 1, :)
925 ssj =>
si(:, :, 2, :)
926 ssk =>
sj(:, :, 2, :)
930 ssi =>
sk(:, :,
kl, :)
931 ssj =>
si(:, :,
kl, :)
932 ssk =>
sj(:, :,
kl, :)
954 dd2wall =>
d2wall(2, :, :)
958 dd2wall =>
d2wall(:, 2, :)
962 dd2wall =>
d2wall(:, :, 2)
982 real(kind=realtype),
dimension(3),
intent(in) :: cf, cm
983 real(kind=realtype),
intent(out) :: bendingmoment
985 real(kind=realtype) :: elasticmomentx, elasticmomenty, &
988 real(kind=realtype) :: arg1
996 arg1 = elasticmomentx**2 + elasticmomentz**2
997 bendingmoment = sqrt(arg1)
1004 arg1 = elasticmomentx**2 + elasticmomenty**2
1005 bendingmoment = sqrt(arg1)
1017 integer(kind=inttype) :: npts
1018 real(kind=realtype),
dimension(npts) :: x, y
1019 real(kind=realtype) :: m, b
1021 real(kind=realtype) :: sumx, sumy, sumx2, sumxy
1022 integer(kind=inttype) :: i
1031 sumx2 = sumx2 + x(i)*x(i)
1032 sumxy = sumxy + x(i)*y(i)
1034 m = (npts*sumxy-sumy*sumx)/(npts*sumx2-sumx**2)
1035 b = (sumy*sumx2-sumx*sumxy)/(npts*sumx2-sumx**2)
1039 & dcdalphadot, dcdq, dcdqdot)
1058 real(kind=realtype),
dimension(3, ntimeintervalsspectral) :: force, &
1060 real(kind=realtype),
dimension(8) :: dcdq, dcdqdot
1061 real(kind=realtype),
dimension(8) :: dcdalpha, dcdalphadot
1062 real(kind=realtype),
dimension(8) :: coef0
1064 real(kind=realtype),
dimension(ntimeintervalsspectral, 8) :: &
1066 real(kind=realtype),
dimension(8) :: coef0dot
1067 real(kind=realtype),
dimension(ntimeintervalsspectral, 8) :: &
1069 real(kind=realtype),
dimension(ntimeintervalsspectral) :: &
1070 & intervalalpha, intervalalphadot
1071 real(kind=realtype),
dimension(ntimeintervalsspectral) :: &
1072 & intervalmach, intervalmachdot
1073 real(kind=realtype),
dimension(nsections) :: t
1074 integer(kind=inttype) :: i, sps, nn
1076 real(kind=realtype) :: a
1077 real(kind=realtype) :: fact, factmoment
1079 real(kind=realtype),
dimension(ntimeintervalsspectral) :: dphix, &
1081 real(kind=realtype),
dimension(ntimeintervalsspectral) :: dphixdot, &
1082 & dphiydot, dphizdot
1086 real(kind=realtype) :: arg1
1091 &
'ts q mode code needs to be updated in computetsderivatives!'
1143 t(nn) = t(nn) + (sps-1)*
sections(nn)%timeperiod/(&
1155 basecoef(sps, 1) = fact*(force(1, sps)*
liftdirection(1)+force(2&
1157 basecoef(sps, 2) = fact*(force(1, sps)*
dragdirection(1)+force(2&
1159 basecoef(sps, 3) = force(1, sps)*fact
1160 basecoef(sps, 4) = force(2, sps)*fact
1161 basecoef(sps, 5) = force(3, sps)*fact
1162 basecoef(sps, 6) = moment(1, sps)*factmoment
1163 basecoef(sps, 7) = moment(2, sps)*factmoment
1164 basecoef(sps, 8) = moment(3, sps)*factmoment
1176 resbasecoef(sps, i) = basecoef(sps, i) - (dcdalpha(i)*&
1177 & intervalalpha(sps)+coef0(i))
1183 & intervalalphadot, &
1191 call terminate(
'computetsderivatives', &
1192 &
'not a valid stability motion')
1225 real(kind=realtype),
dimension(3),
intent(in) :: freestreamaxis
1226 real(kind=realtype),
dimension(3),
intent(in) :: liftaxis
1227 real(kind=realtype),
intent(out) :: alpha, beta
1228 integer(kind=inttype),
intent(out) :: liftindex
1232 real(kind=realtype) :: rnorm
1233 integer(kind=inttype) :: flowindex, i
1234 real(kind=realtype),
dimension(3) :: freestreamaxisnorm
1235 integer(kind=inttype) :: temp
1240 real(kind=realtype) :: abs0
1241 real(kind=realtype) :: abs1
1242 real(kind=realtype) :: abs2
1243 real(kind=realtype) :: abs3
1244 real(kind=realtype) :: abs4
1245 real(kind=realtype) :: abs5
1246 real(kind=realtype) :: abs6
1247 real(kind=realtype) :: abs7
1248 real(kind=realtype) :: arg1
1251 if (liftaxis(1) .ge. 0.)
then
1256 if (liftaxis(2) .ge. 0.)
then
1261 if (liftaxis(1) .ge. 0.)
then
1266 if (liftaxis(3) .ge. 0.)
then
1272 if (abs0 .gt. abs2 .and. abs4 .gt. abs6)
then
1275 if (liftaxis(2) .ge. 0.)
then
1280 if (liftaxis(1) .ge. 0.)
then
1285 if (liftaxis(2) .ge. 0.)
then
1290 if (liftaxis(3) .ge. 0.)
then
1295 if (abs1 .gt. abs3 .and. abs5 .gt. abs7)
then
1303 arg1 = freestreamaxis(1)**2 + freestreamaxis(2)**2 + freestreamaxis(&
1307 freestreamaxisnorm(i) = freestreamaxis(i)/rnorm
1309 if (liftindex .eq. 2)
then
1313 alpha = asin(freestreamaxisnorm(2))
1315 beta = -atan2(freestreamaxisnorm(3), freestreamaxisnorm(1))
1316 else if (liftindex .eq. 3)
then
1319 alpha = asin(freestreamaxisnorm(3))
1321 beta = atan2(freestreamaxisnorm(2), freestreamaxisnorm(1))
1323 call terminate(
'getdirangle',
'invalid lift direction')
1337 real(kind=
realtype),
dimension(8) :: dcdalpha, dcdalphadot, dcdbeta&
1338 & , dcdbetadot, dcdmach, dcdmachdot
1339 real(kind=
realtype),
dimension(8) :: dcdp, dcdpdot, dcdq, dcdqdot, &
1341 real(kind=
realtype),
dimension(8) :: coef0, coef0dot
1362 integer(kind=inttype) :: nn, nlevelsset
1443 coeftime(0) = 11.0_realtype/6.0_realtype
1446 coeftime(3) = -(1.0_realtype/3.0_realtype)
1450 print*,
'third-order ale not implemented yet.'
1478 real(kind=realtype),
dimension(3),
intent(in) :: x
1479 real(kind=realtype),
dimension(3),
intent(in) :: xd
1480 real(kind=realtype) ::
mynorm2
1482 real(kind=realtype) :: arg1
1483 real(kind=realtype) :: arg1d
1484 real(kind=realtype) :: temp
1485 arg1d = 2*x(1)*xd(1) + 2*x(2)*xd(2) + 2*x(3)*xd(3)
1486 arg1 = x(1)**2 + x(2)**2 + x(3)**2
1488 if (arg1 .eq. 0.0_8)
then
1499 real(kind=realtype),
dimension(3),
intent(in) :: x
1500 real(kind=realtype) ::
mynorm2
1502 real(kind=realtype) :: arg1
1503 arg1 = x(1)**2 + x(2)**2 + x(3)**2
1510 integer(kind=inttype) :: btype
1524 real(kind=
realtype),
dimension(3),
intent(in) :: a, b
1525 real(kind=
realtype),
dimension(3),
intent(in) :: ad, bd
1527 real(kind=
realtype),
dimension(3),
intent(out) :: c
1528 real(kind=
realtype),
dimension(3),
intent(out) :: cd
1529 cd(1) = b(3)*ad(2) + a(2)*bd(3) - b(2)*ad(3) - a(3)*bd(2)
1530 c(1) = a(2)*b(3) - a(3)*b(2)
1531 cd(2) = b(1)*ad(3) + a(3)*bd(1) - b(3)*ad(1) - a(1)*bd(3)
1532 c(2) = a(3)*b(1) - a(1)*b(3)
1533 cd(3) = b(2)*ad(1) + a(1)*bd(2) - b(1)*ad(2) - a(2)*bd(1)
1534 c(3) = a(1)*b(2) - a(2)*b(1)
1541 real(kind=
realtype),
dimension(3),
intent(in) :: a, b
1543 real(kind=
realtype),
dimension(3),
intent(out) :: c
1544 c(1) = a(2)*b(3) - a(3)*b(2)
1545 c(2) = a(3)*b(1) - a(1)*b(3)
1546 c(3) = a(1)*b(2) - a(2)*b(1)
1551 use su_cgns,
only : radian, degree
1556 integer,
intent(in) :: angle
1557 real(kind=realtype),
intent(out) :: mult, trans
1559 if (angle .eq. radian)
then
1563 else if (angle .eq. degree)
then
1565 mult =
pi/180.0_realtype
1569 &
'no idea how to convert this to si units')
1582 use su_cgns,
only : kilogram, meter
1587 integer,
intent(in) :: mass, len
1588 real(kind=realtype),
intent(out) :: mult, trans
1590 if (mass .eq. kilogram .and. len .eq. meter)
then
1596 &
'no idea how to convert this to si units')
1608 use su_cgns,
only : meter, centimeter, millimeter, foot, inch
1613 integer,
intent(in) :: len
1614 real(kind=realtype),
intent(out) :: mult, trans
1621 mult = 0.01_realtype
1624 mult = 0.001_realtype
1627 mult = 0.3048_realtype
1630 mult = 0.0254_realtype
1633 call terminate(
'silen',
'no idea how to convert this to si units')
1635 end subroutine silen
1646 use su_cgns,
only : kilogram, meter, second
1651 integer,
intent(in) :: mass, len, time
1652 real(kind=realtype),
intent(out) :: mult, trans
1654 if (mass .eq. kilogram .and. len .eq. meter .and. time .eq. second) &
1661 &
'no idea how to convert this to si units')
1674 use su_cgns,
only : kelvin, celsius, rankine, fahrenheit
1679 integer,
intent(in) :: temp
1680 real(kind=realtype),
intent(out) :: mult, trans
1691 trans = 273.16_realtype
1695 mult = 5.0_realtype/9.0_realtype
1700 mult = 5.0_realtype/9.0_realtype
1705 &
'no idea how to convert this to si units')
1709 subroutine siturb(mass, len, time, temp, turbname, mult, trans)
1718 use su_cgns,
only : kilogram, meter, second, kelvin
1723 integer,
intent(in) :: mass, len, time, temp
1724 character(len=*),
intent(in) :: turbname
1725 real(kind=realtype),
intent(out) :: mult, trans
1727 if (mass .eq. kilogram .and. len .eq. meter .and. time .eq. second &
1728 & .and. temp .eq. kelvin)
then
1733 call terminate(
'siturb',
'no idea how to convert this to si units'&
1747 use su_cgns,
only : meter, centimeter, millimeter, foot, inch, &
1753 integer,
intent(in) :: length, time
1754 real(kind=realtype),
intent(out) :: mult, trans
1757 select case (length)
1762 mult = 0.01_realtype
1765 mult = 0.001_realtype
1768 mult = 0.3048_realtype
1771 mult = 0.0254_realtype
1775 &
'no idea how to convert this length to si units')
1783 &
'no idea how to convert this time to si units')
real(kind=realtype), dimension(:, :, :), pointer sfacek
real(kind=realtype), dimension(:, :, :), pointer gamma
logical addgridvelocities
real(kind=realtype), dimension(:, :, :), pointer p
real(kind=realtype), dimension(:, :, :, :), pointer w
real(kind=realtype), dimension(:, :, :), pointer sfacei
real(kind=realtype), dimension(:, :, :), pointer d2wall
integer(kind=inttype), dimension(:, :, :), pointer globalcell
real(kind=realtype), dimension(:, :, :), pointer rlv
integer(kind=inttype), dimension(:), pointer bcfaceid
real(kind=realtype), dimension(:, :, :, :), pointer si
real(kind=realtype), dimension(:, :, :, :), pointer sj
real(kind=realtype), dimension(:, :, :, :), pointer s
real(kind=realtype), dimension(:, :, :), pointer rev
real(kind=realtype), dimension(:, :, :, :), pointer sk
real(kind=realtype), dimension(:, :, :), pointer sfacej
real(kind=realtype), dimension(:, :, :, :), pointer x
integer adflow_comm_world
integer(kind=inttype), parameter firstorder
integer(kind=inttype), parameter eulerwall
real(kind=realtype), parameter zero
integer(kind=inttype), parameter imax
real(kind=realtype), parameter threefourth
integer(kind=inttype), parameter kmin
real(kind=realtype), parameter pi
integer(kind=inttype), parameter jmax
integer(kind=inttype), parameter nswalladiabatic
integer(kind=inttype), parameter timespectral
integer(kind=inttype), parameter unsteady
real(kind=realtype), parameter one
real(kind=realtype), parameter half
integer(kind=inttype), parameter imin
integer(kind=inttype), parameter steady
real(kind=realtype), parameter two
real(kind=realtype), parameter fourth
integer(kind=inttype), parameter nswallisothermal
real(kind=realtype), parameter sqrtthree
integer(kind=inttype), parameter thirdorder
integer(kind=inttype), parameter secondorder
integer(kind=inttype), parameter kmax
integer(kind=inttype), parameter ransequations
integer(kind=inttype), parameter jmin
real(kind=realtype) rhoinfdim
real(kind=realtype) gammainf
real(kind=realtype) pinfdim
real(kind=realtype) timeref
real(kind=realtype) timerefd
integer(kind=inttype) noldlevels
real(kind=realtype), dimension(:, :), allocatable coefmeshale
integer(kind=inttype) currentlevel
integer(kind=inttype) groundlevel
real(kind=realtype), dimension(:), allocatable coeftime
real(kind=realtype), dimension(:), allocatable coeftimeale
integer(kind=inttype) noldsolavail
real(kind=realtype) timeunsteadyrestart
integer, parameter realtype
integer(kind=inttype) nsections
type(sectiontype), dimension(:), allocatable sections
subroutine sivelocity(length, time, mult, trans)
subroutine computetsderivatives(force, moment, coef0, dcdalpha, dcdalphadot, dcdq, dcdqdot)
real(kind=realtype) function mydim_d(x, xd, y, yd, mydim)
subroutine cross_prod(a, b, c)
real(kind=realtype) function secondderivativerigidrotangle(degreepolrot, coefpolrot, degreefourrot, omegafourrot, coscoeffourrot, sincoeffourrot, t)
logical function iswalltype(btype)
subroutine sitemperature(temp, mult, trans)
real(kind=realtype) function tsbetadot(degreepolbeta, coefpolbeta, degreefourbeta, omegafourbeta, coscoeffourbeta, sincoeffourbeta, t)
subroutine setcoeftimeintegrator()
subroutine getdirangle(freestreamaxis, liftaxis, liftindex, alpha, beta)
subroutine siturb(mass, len, time, temp, turbname, mult, trans)
subroutine silen(len, mult, trans)
subroutine computerootbendingmoment(cf, cm, bendingmoment)
real(kind=realtype) function derivativerigidrotangle(degreepolrot, coefpolrot, degreefourrot, omegafourrot, coscoeffourrot, sincoeffourrot, t)
real(kind=realtype) function mynorm2(x)
real(kind=realtype) function mynorm2_d(x, xd, mynorm2)
real(kind=realtype) function mydim(x, y)
subroutine rotmatrixrigidbody(tnew, told, rotationmatrix, rotationpoint)
real(kind=realtype) function derivativerigidrotangle_d(degreepolrot, coefpolrot, degreefourrot, omegafourrot, coscoeffourrot, sincoeffourrot, t, derivativerigidrotangle)
character(len=n) function char2str(chararray, n)
logical function getcorrectfork()
real(kind=realtype) function rigidrotangle(degreepolrot, coefpolrot, degreefourrot, omegafourrot, coscoeffourrot, sincoeffourrot, t)
real(kind=realtype) function tsbeta(degreepolbeta, coefpolbeta, degreefourbeta, omegafourbeta, coscoeffourbeta, sincoeffourbeta, t)
subroutine siangle(angle, mult, trans)
real(kind=realtype) function tsalphadot(degreepolalpha, coefpolalpha, degreefouralpha, omegafouralpha, coscoeffouralpha, sincoeffouralpha, t)
subroutine computeleastsquaresregression(y, x, npts, m, b)
subroutine cross_prod_d(a, ad, b, bd, c, cd)
subroutine sidensity(mass, len, mult, trans)
real(kind=realtype) function tsalpha(degreepolalpha, coefpolalpha, degreefouralpha, omegafouralpha, coscoeffouralpha, sincoeffouralpha, t)
subroutine sipressure(mass, len, time, mult, trans)
subroutine setbcpointers(nn, spatialpointers)
real(kind=realtype) function tsmachdot(degreepolmach, coefpolmach, degreefourmach, omegafourmach, coscoeffourmach, sincoeffourmach, t)
real(kind=realtype) function tsmach(degreepolmach, coefpolmach, degreefourmach, omegafourmach, coscoeffourmach, sincoeffourmach, t)
subroutine terminate(routinename, errormessage)
subroutine stabilityderivativedriver()