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 & degreefourrot, omegafourrot, coscoeffourrot, sincoeffourrot, t, &
351 & derivativerigidrotangled)
366 real(kind=realtype) :: derivativerigidrotangled
370 integer(kind=inttype),
intent(in) :: degreepolrot
371 integer(kind=inttype),
intent(in) :: degreefourrot
372 real(kind=realtype),
intent(in) :: omegafourrot, t
373 real(kind=realtype),
dimension(0:*),
intent(in) :: coefpolrot
374 real(kind=realtype),
dimension(0:*),
intent(in) :: coscoeffourrot
375 real(kind=realtype),
dimension(*),
intent(in) :: sincoeffourrot
379 integer(kind=inttype) :: nn
380 real(kind=realtype) :: dphi, val
388 dphi = dphi + nn*coefpolrot(nn)*t**(nn-1)
391 do nn=1,degreefourrot
392 val = nn*omegafourrot
393 dphi = dphi - val*coscoeffourrot(nn)*sin(val*t)
394 dphi = dphi + val*sincoeffourrot(nn)*cos(val*t)
401 & degreefourrot, omegafourrot, coscoeffourrot, sincoeffourrot, t)
419 integer(kind=inttype),
intent(in) :: degreepolrot
420 integer(kind=inttype),
intent(in) :: degreefourrot
421 real(kind=realtype),
intent(in) :: omegafourrot, t
422 real(kind=realtype),
dimension(0:*),
intent(in) :: coefpolrot
423 real(kind=realtype),
dimension(0:*),
intent(in) :: coscoeffourrot
424 real(kind=realtype),
dimension(*),
intent(in) :: sincoeffourrot
428 integer(kind=inttype) :: nn
429 real(kind=realtype) :: dphi, val
440 dphi = dphi + nn*coefpolrot(nn)*t**(nn-1)
443 do nn=1,degreefourrot
444 val = nn*omegafourrot
445 dphi = dphi - val*coscoeffourrot(nn)*sin(val*t)
446 dphi = dphi + val*sincoeffourrot(nn)*cos(val*t)
460 real(kind=realtype) :: x, y
461 real(kind=realtype) :: xd, yd
462 real(kind=realtype) ::
mydim
463 real(kind=realtype) :: mydimd
465 if (
mydim .lt. 0.0) mydimd = 0.0_8
473 real(kind=realtype) :: x, y
474 real(kind=realtype) ::
mydim
503 character(len=*),
intent(in) :: routinename
504 character(len=*),
intent(in) :: errormessage
521 real(kind=realtype),
intent(in) :: tnew, told
522 real(kind=realtype),
dimension(3),
intent(out) :: rotationpoint
523 real(kind=realtype),
dimension(3, 3),
intent(out) :: rotationmatrix
527 integer(kind=inttype) :: i, j
528 real(kind=realtype) :: phi
529 real(kind=realtype) :: cosx, cosy, cosz, sinx, siny, sinz
530 real(kind=realtype),
dimension(3, 3) :: mnew, mold
552 mnew(1, 1) = cosy*cosz
553 mnew(2, 1) = cosy*sinz
555 mnew(1, 2) = sinx*siny*cosz - cosx*sinz
556 mnew(2, 2) = sinx*siny*sinz + cosx*cosz
557 mnew(3, 2) = sinx*cosy
558 mnew(1, 3) = cosx*siny*cosz + sinx*sinz
559 mnew(2, 3) = cosx*siny*sinz - sinx*cosz
560 mnew(3, 3) = cosx*cosy
578 mold(1, 1) = cosy*cosz
579 mold(2, 1) = cosy*sinz
581 mold(1, 2) = sinx*siny*cosz - cosx*sinz
582 mold(2, 2) = sinx*siny*sinz + cosx*cosz
583 mold(3, 2) = sinx*cosy
584 mold(1, 3) = cosx*siny*cosz + sinx*sinz
585 mold(2, 3) = cosx*siny*sinz - sinx*cosz
586 mold(3, 3) = cosx*cosy
592 rotationmatrix(i, j) = mnew(i, 1)*mold(j, 1) + mnew(i, 2)*mold(j&
593 & , 2) + mnew(i, 3)*mold(j, 3)
611 & degreefourrot, omegafourrot, coscoeffourrot, sincoeffourrot, t)
629 integer(kind=inttype),
intent(in) :: degreepolrot
630 integer(kind=inttype),
intent(in) :: degreefourrot
631 real(kind=realtype),
intent(in) :: omegafourrot, t
632 real(kind=realtype),
dimension(0:*),
intent(in) :: coefpolrot
633 real(kind=realtype),
dimension(0:*),
intent(in) :: coscoeffourrot
634 real(kind=realtype),
dimension(*),
intent(in) :: sincoeffourrot
638 integer(kind=inttype) :: nn
639 real(kind=realtype) :: dphi, val
650 dphi = dphi + (nn-1)*nn*coefpolrot(nn)*t**(nn-2)
653 do nn=1,degreefourrot
654 val = nn*omegafourrot
655 dphi = dphi - val**2*sincoeffourrot(nn)*sin(val*t)
656 dphi = dphi - val**2*coscoeffourrot(nn)*cos(val*t)
665 & omegafourrot, coscoeffourrot, sincoeffourrot, t)
681 integer(kind=inttype),
intent(in) :: degreepolrot
682 integer(kind=inttype),
intent(in) :: degreefourrot
683 real(kind=realtype),
intent(in) :: omegafourrot, t
684 real(kind=realtype),
dimension(0:*),
intent(in) :: coefpolrot
685 real(kind=realtype),
dimension(0:*),
intent(in) :: coscoeffourrot
686 real(kind=realtype),
dimension(*),
intent(in) :: sincoeffourrot
690 integer(kind=inttype) :: nn
691 real(kind=realtype) :: phi, val
703 phi = phi + coefpolrot(nn)*t**nn
707 phi = phi + coscoeffourrot(0)
708 do nn=1,degreefourrot
709 val = nn*omegafourrot*t
710 phi = phi + coscoeffourrot(nn)*cos(val) + sincoeffourrot(nn)*sin&
726 & ,
sk,
s,
globalcell,
bcdata,
nx,
il,
ie,
ib,
ny,
jl,
je,
jb,
nz,
kl,&
729 use bcpointers_b,
only : ww0, ww1, ww2, ww3, pp0, pp1, pp2, pp3, &
730 & rlv0, rlv1, rlv2, rlv3, rev0, rev1, rev2, rev3, gamma0, gamma1, &
731 & gamma2, gamma3, gcp, xx, ss, ssi, ssj, ssk, dd2wall, sface, istart, &
732 & iend, jstart, jend, isize, jsize
736 integer(kind=inttype),
intent(in) :: nn
737 logical,
intent(in) :: spatialpointers
745 isize = iend - istart + 1
746 jsize = jend - jstart + 1
752 ww3 =>
w(3, 1:, 1:, :)
753 ww2 =>
w(2, 1:, 1:, :)
754 ww1 =>
w(1, 1:, 1:, :)
755 ww0 =>
w(0, 1:, 1:, :)
760 rlv3 =>
rlv(3, 1:, 1:)
761 rlv2 =>
rlv(2, 1:, 1:)
762 rlv1 =>
rlv(1, 1:, 1:)
763 rlv0 =>
rlv(0, 1:, 1:)
764 rev3 =>
rev(3, 1:, 1:)
765 rev2 =>
rev(2, 1:, 1:)
766 rev1 =>
rev(1, 1:, 1:)
767 rev0 =>
rev(0, 1:, 1:)
768 gamma3 =>
gamma(3, 1:, 1:)
769 gamma2 =>
gamma(2, 1:, 1:)
770 gamma1 =>
gamma(1, 1:, 1:)
771 gamma0 =>
gamma(0, 1:, 1:)
775 ww3 =>
w(
nx, 1:, 1:, :)
776 ww2 =>
w(
il, 1:, 1:, :)
777 ww1 =>
w(
ie, 1:, 1:, :)
778 ww0 =>
w(
ib, 1:, 1:, :)
783 rlv3 =>
rlv(
nx, 1:, 1:)
784 rlv2 =>
rlv(
il, 1:, 1:)
785 rlv1 =>
rlv(
ie, 1:, 1:)
786 rlv0 =>
rlv(
ib, 1:, 1:)
787 rev3 =>
rev(
nx, 1:, 1:)
788 rev2 =>
rev(
il, 1:, 1:)
789 rev1 =>
rev(
ie, 1:, 1:)
790 rev0 =>
rev(
ib, 1:, 1:)
798 ww3 =>
w(1:, 3, 1:, :)
799 ww2 =>
w(1:, 2, 1:, :)
800 ww1 =>
w(1:, 1, 1:, :)
801 ww0 =>
w(1:, 0, 1:, :)
806 rlv3 =>
rlv(1:, 3, 1:)
807 rlv2 =>
rlv(1:, 2, 1:)
808 rlv1 =>
rlv(1:, 1, 1:)
809 rlv0 =>
rlv(1:, 0, 1:)
810 rev3 =>
rev(1:, 3, 1:)
811 rev2 =>
rev(1:, 2, 1:)
812 rev1 =>
rev(1:, 1, 1:)
813 rev0 =>
rev(1:, 0, 1:)
814 gamma3 =>
gamma(1:, 3, 1:)
815 gamma2 =>
gamma(1:, 2, 1:)
816 gamma1 =>
gamma(1:, 1, 1:)
817 gamma0 =>
gamma(1:, 0, 1:)
821 ww3 =>
w(1:,
ny, 1:, :)
822 ww2 =>
w(1:,
jl, 1:, :)
823 ww1 =>
w(1:,
je, 1:, :)
824 ww0 =>
w(1:,
jb, 1:, :)
829 rlv3 =>
rlv(1:,
ny, 1:)
830 rlv2 =>
rlv(1:,
jl, 1:)
831 rlv1 =>
rlv(1:,
je, 1:)
832 rlv0 =>
rlv(1:,
jb, 1:)
833 rev3 =>
rev(1:,
ny, 1:)
834 rev2 =>
rev(1:,
jl, 1:)
835 rev1 =>
rev(1:,
je, 1:)
836 rev0 =>
rev(1:,
jb, 1:)
844 ww3 =>
w(1:, 1:, 3, :)
845 ww2 =>
w(1:, 1:, 2, :)
846 ww1 =>
w(1:, 1:, 1, :)
847 ww0 =>
w(1:, 1:, 0, :)
852 rlv3 =>
rlv(1:, 1:, 3)
853 rlv2 =>
rlv(1:, 1:, 2)
854 rlv1 =>
rlv(1:, 1:, 1)
855 rlv0 =>
rlv(1:, 1:, 0)
856 rev3 =>
rev(1:, 1:, 3)
857 rev2 =>
rev(1:, 1:, 2)
858 rev1 =>
rev(1:, 1:, 1)
859 rev0 =>
rev(1:, 1:, 0)
860 gamma3 =>
gamma(1:, 1:, 3)
861 gamma2 =>
gamma(1:, 1:, 2)
862 gamma1 =>
gamma(1:, 1:, 1)
863 gamma0 =>
gamma(1:, 1:, 0)
867 ww3 =>
w(1:, 1:,
nz, :)
868 ww2 =>
w(1:, 1:,
kl, :)
869 ww1 =>
w(1:, 1:,
ke, :)
870 ww0 =>
w(1:, 1:,
kb, :)
875 rlv3 =>
rlv(1:, 1:,
nz)
876 rlv2 =>
rlv(1:, 1:,
kl)
877 rlv1 =>
rlv(1:, 1:,
ke)
878 rlv0 =>
rlv(1:, 1:,
kb)
879 rev3 =>
rev(1:, 1:,
nz)
880 rev2 =>
rev(1:, 1:,
kl)
881 rev1 =>
rev(1:, 1:,
ke)
882 rev0 =>
rev(1:, 1:,
kb)
889 if (spatialpointers)
then
893 ssi =>
si(1, :, :, :)
894 ssj =>
sj(2, :, :, :)
895 ssk =>
sk(2, :, :, :)
899 ssi =>
si(
il, :, :, :)
900 ssj =>
sj(
il, :, :, :)
901 ssk =>
sk(
il, :, :, :)
905 ssi =>
sj(:, 1, :, :)
906 ssj =>
si(:, 2, :, :)
907 ssk =>
sk(:, 2, :, :)
911 ssi =>
sj(:,
jl, :, :)
912 ssj =>
si(:,
jl, :, :)
913 ssk =>
sk(:,
jl, :, :)
917 ssi =>
sk(:, :, 1, :)
918 ssj =>
si(:, :, 2, :)
919 ssk =>
sj(:, :, 2, :)
923 ssi =>
sk(:, :,
kl, :)
924 ssj =>
si(:, :,
kl, :)
925 ssk =>
sj(:, :,
kl, :)
947 dd2wall =>
d2wall(2, :, :)
951 dd2wall =>
d2wall(:, 2, :)
955 dd2wall =>
d2wall(:, :, 2)
975 real(kind=realtype),
dimension(3),
intent(in) :: cf, cm
976 real(kind=realtype),
intent(out) :: bendingmoment
978 real(kind=realtype) :: elasticmomentx, elasticmomenty, &
988 bendingmoment = sqrt(elasticmomentx**2 + elasticmomentz**2)
995 bendingmoment = sqrt(elasticmomentx**2 + elasticmomenty**2)
1007 integer(kind=inttype) :: npts
1008 real(kind=realtype),
dimension(npts) :: x, y
1009 real(kind=realtype) :: m, b
1011 real(kind=realtype) :: sumx, sumy, sumx2, sumxy
1012 integer(kind=inttype) :: i
1021 sumx2 = sumx2 + x(i)*x(i)
1022 sumxy = sumxy + x(i)*y(i)
1024 m = (npts*sumxy-sumy*sumx)/(npts*sumx2-sumx**2)
1025 b = (sumy*sumx2-sumx*sumxy)/(npts*sumx2-sumx**2)
1029 & dcdalphadot, dcdq, dcdqdot)
1048 real(kind=realtype),
dimension(3, ntimeintervalsspectral) :: force, &
1050 real(kind=realtype),
dimension(8) :: dcdq, dcdqdot
1051 real(kind=realtype),
dimension(8) :: dcdalpha, dcdalphadot
1052 real(kind=realtype),
dimension(8) :: coef0
1054 real(kind=realtype),
dimension(ntimeintervalsspectral, 8) :: &
1056 real(kind=realtype),
dimension(8) :: coef0dot
1057 real(kind=realtype),
dimension(ntimeintervalsspectral, 8) :: &
1059 real(kind=realtype),
dimension(ntimeintervalsspectral) :: &
1060 & intervalalpha, intervalalphadot
1061 real(kind=realtype),
dimension(ntimeintervalsspectral) :: &
1062 & intervalmach, intervalmachdot
1063 real(kind=realtype),
dimension(nsections) :: t
1064 integer(kind=inttype) :: i, sps, nn
1066 real(kind=realtype) :: a
1067 real(kind=realtype) :: fact, factmoment
1069 real(kind=realtype),
dimension(ntimeintervalsspectral) :: dphix, &
1071 real(kind=realtype),
dimension(ntimeintervalsspectral) :: dphixdot, &
1072 & dphiydot, dphizdot
1080 &
'ts q mode code needs to be updated in computetsderivatives!'
1132 t(nn) = t(nn) + (sps-1)*
sections(nn)%timeperiod/(&
1144 basecoef(sps, 1) = fact*(force(1, sps)*
liftdirection(1)+force(2&
1146 basecoef(sps, 2) = fact*(force(1, sps)*
dragdirection(1)+force(2&
1148 basecoef(sps, 3) = force(1, sps)*fact
1149 basecoef(sps, 4) = force(2, sps)*fact
1150 basecoef(sps, 5) = force(3, sps)*fact
1151 basecoef(sps, 6) = moment(1, sps)*factmoment
1152 basecoef(sps, 7) = moment(2, sps)*factmoment
1153 basecoef(sps, 8) = moment(3, sps)*factmoment
1165 resbasecoef(sps, i) = basecoef(sps, i) - (dcdalpha(i)*&
1166 & intervalalpha(sps)+coef0(i))
1172 & intervalalphadot, &
1179 call terminate(
'computetsderivatives', &
1180 &
'not a valid stability motion')
1213 real(kind=realtype),
dimension(3),
intent(in) :: freestreamaxis
1214 real(kind=realtype),
dimension(3),
intent(in) :: liftaxis
1215 real(kind=realtype),
intent(out) :: alpha, beta
1216 integer(kind=inttype),
intent(out) :: liftindex
1220 real(kind=realtype) :: rnorm
1221 integer(kind=inttype) :: flowindex, i
1222 real(kind=realtype),
dimension(3) :: freestreamaxisnorm
1223 integer(kind=inttype) :: temp
1228 real(kind=realtype) :: abs0
1229 real(kind=realtype) :: abs1
1230 real(kind=realtype) :: abs2
1231 real(kind=realtype) :: abs3
1232 real(kind=realtype) :: abs4
1233 real(kind=realtype) :: abs5
1234 real(kind=realtype) :: abs6
1235 real(kind=realtype) :: abs7
1238 if (liftaxis(1) .ge. 0.)
then
1243 if (liftaxis(2) .ge. 0.)
then
1248 if (liftaxis(1) .ge. 0.)
then
1253 if (liftaxis(3) .ge. 0.)
then
1259 if (abs0 .gt. abs2 .and. abs4 .gt. abs6)
then
1262 if (liftaxis(2) .ge. 0.)
then
1267 if (liftaxis(1) .ge. 0.)
then
1272 if (liftaxis(2) .ge. 0.)
then
1277 if (liftaxis(3) .ge. 0.)
then
1282 if (abs1 .gt. abs3 .and. abs5 .gt. abs7)
then
1290 rnorm = sqrt(freestreamaxis(1)**2 + freestreamaxis(2)**2 + &
1291 & freestreamaxis(3)**2)
1293 freestreamaxisnorm(i) = freestreamaxis(i)/rnorm
1295 if (liftindex .eq. 2)
then
1299 alpha = asin(freestreamaxisnorm(2))
1301 beta = -atan2(freestreamaxisnorm(3), freestreamaxisnorm(1))
1302 else if (liftindex .eq. 3)
then
1305 alpha = asin(freestreamaxisnorm(3))
1307 beta = atan2(freestreamaxisnorm(2), freestreamaxisnorm(1))
1309 call terminate(
'getdirangle',
'invalid lift direction')
1323 real(kind=
realtype),
dimension(8) :: dcdalpha, dcdalphadot, dcdbeta&
1324 & , dcdbetadot, dcdmach, dcdmachdot
1325 real(kind=
realtype),
dimension(8) :: dcdp, dcdpdot, dcdq, dcdqdot, &
1327 real(kind=
realtype),
dimension(8) :: coef0, coef0dot
1348 integer(kind=inttype) :: nn, nlevelsset
1429 coeftime(0) = 11.0_realtype/6.0_realtype
1432 coeftime(3) = -(1.0_realtype/3.0_realtype)
1436 print*,
'third-order ale not implemented yet.'
1464 real(kind=realtype),
dimension(3),
intent(in) :: x
1465 real(kind=realtype),
dimension(3) :: xd
1466 real(kind=realtype) ::
mynorm2
1467 real(kind=realtype) :: mynorm2d
1469 real(kind=realtype) :: tempd
1471 if (x(1)**2 + x(2)**2 + x(3)**2 .eq. 0.0_8)
then
1474 tempd = mynorm2d/(2.0*sqrt(x(1)**2+x(2)**2+x(3)**2))
1476 xd(1) = xd(1) + 2*x(1)*tempd
1477 xd(2) = xd(2) + 2*x(2)*tempd
1478 xd(3) = xd(3) + 2*x(3)*tempd
1484 real(kind=realtype),
dimension(3),
intent(in) :: x
1485 real(kind=realtype) ::
mynorm2
1487 mynorm2 = sqrt(x(1)**2 + x(2)**2 + x(3)**2)
1493 integer(kind=inttype) :: btype
1507 real(kind=
realtype),
dimension(3),
intent(in) :: a, b
1508 real(kind=
realtype),
dimension(3) :: ad, bd
1510 real(kind=
realtype),
dimension(3) :: c
1511 real(kind=
realtype),
dimension(3) :: cd
1514 ad(1) = ad(1) + b(2)*cd(3) - b(3)*cd(2)
1515 bd(2) = bd(2) + a(1)*cd(3) - a(3)*cd(1)
1516 ad(2) = ad(2) + b(3)*cd(1) - b(1)*cd(3)
1517 bd(1) = bd(1) + a(3)*cd(2) - a(2)*cd(3)
1519 ad(3) = ad(3) + b(1)*cd(2) - b(2)*cd(1)
1520 bd(3) = bd(3) + a(2)*cd(1) - a(1)*cd(2)
1529 real(kind=
realtype),
dimension(3),
intent(in) :: a, b
1531 real(kind=
realtype),
dimension(3),
intent(out) :: c
1532 c(1) = a(2)*b(3) - a(3)*b(2)
1533 c(2) = a(3)*b(1) - a(1)*b(3)
1534 c(3) = a(1)*b(2) - a(2)*b(1)
1539 use su_cgns,
only : radian, degree
1544 integer,
intent(in) :: angle
1545 real(kind=realtype),
intent(out) :: mult, trans
1547 if (angle .eq. radian)
then
1551 else if (angle .eq. degree)
then
1553 mult =
pi/180.0_realtype
1557 &
'no idea how to convert this to si units')
1570 use su_cgns,
only : kilogram, meter
1575 integer,
intent(in) :: mass, len
1576 real(kind=realtype),
intent(out) :: mult, trans
1578 if (mass .eq. kilogram .and. len .eq. meter)
then
1584 &
'no idea how to convert this to si units')
1596 use su_cgns,
only : meter, centimeter, millimeter, foot, inch
1601 integer,
intent(in) :: len
1602 real(kind=realtype),
intent(out) :: mult, trans
1609 mult = 0.01_realtype
1612 mult = 0.001_realtype
1615 mult = 0.3048_realtype
1618 mult = 0.0254_realtype
1621 call terminate(
'silen',
'no idea how to convert this to si units')
1623 end subroutine silen
1634 use su_cgns,
only : kilogram, meter, second
1639 integer,
intent(in) :: mass, len, time
1640 real(kind=realtype),
intent(out) :: mult, trans
1642 if (mass .eq. kilogram .and. len .eq. meter .and. time .eq. second) &
1649 &
'no idea how to convert this to si units')
1662 use su_cgns,
only : kelvin, celsius, rankine, fahrenheit
1667 integer,
intent(in) :: temp
1668 real(kind=realtype),
intent(out) :: mult, trans
1679 trans = 273.16_realtype
1683 mult = 5.0_realtype/9.0_realtype
1688 mult = 5.0_realtype/9.0_realtype
1693 &
'no idea how to convert this to si units')
1697 subroutine siturb(mass, len, time, temp, turbname, mult, trans)
1706 use su_cgns,
only : kilogram, meter, second, kelvin
1711 integer,
intent(in) :: mass, len, time, temp
1712 character(len=*),
intent(in) :: turbname
1713 real(kind=realtype),
intent(out) :: mult, trans
1715 if (mass .eq. kilogram .and. len .eq. meter .and. time .eq. second &
1716 & .and. temp .eq. kelvin)
then
1721 call terminate(
'siturb',
'no idea how to convert this to si units'&
1735 use su_cgns,
only : meter, centimeter, millimeter, foot, inch, &
1741 integer,
intent(in) :: length, time
1742 real(kind=realtype),
intent(out) :: mult, trans
1745 select case (length)
1750 mult = 0.01_realtype
1753 mult = 0.001_realtype
1756 mult = 0.3048_realtype
1759 mult = 0.0254_realtype
1763 &
'no idea how to convert this length to si units')
1771 &
'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 siturb(mass, len, time, temp, turbname, mult, trans)
subroutine computerootbendingmoment(cf, cm, bendingmoment)
real(kind=realtype) function derivativerigidrotangle(degreepolrot, coefpolrot, degreefourrot, omegafourrot, coscoeffourrot, sincoeffourrot, t)
subroutine sitemperature(temp, mult, trans)
subroutine sidensity(mass, len, mult, trans)
real(kind=realtype) function mydim(x, y)
real(kind=realtype) function tsmachdot(degreepolmach, coefpolmach, degreefourmach, omegafourmach, coscoeffourmach, sincoeffourmach, t)
character(len=n) function char2str(chararray, n)
real(kind=realtype) function tsalphadot(degreepolalpha, coefpolalpha, degreefouralpha, omegafouralpha, coscoeffouralpha, sincoeffouralpha, t)
real(kind=realtype) function mynorm2(x)
real(kind=realtype) function tsbetadot(degreepolbeta, coefpolbeta, degreefourbeta, omegafourbeta, coscoeffourbeta, sincoeffourbeta, t)
subroutine sipressure(mass, len, time, mult, trans)
subroutine computeleastsquaresregression(y, x, npts, m, b)
real(kind=realtype) function secondderivativerigidrotangle(degreepolrot, coefpolrot, degreefourrot, omegafourrot, coscoeffourrot, sincoeffourrot, t)
subroutine getdirangle(freestreamaxis, liftaxis, liftindex, alpha, beta)
subroutine stabilityderivativedriver()
subroutine rotmatrixrigidbody(tnew, told, rotationmatrix, rotationpoint)
logical function getcorrectfork()
logical function iswalltype(btype)
subroutine computetsderivatives(force, moment, coef0, dcdalpha, dcdalphadot, dcdq, dcdqdot)
subroutine setcoeftimeintegrator()
real(kind=realtype) function tsalpha(degreepolalpha, coefpolalpha, degreefouralpha, omegafouralpha, coscoeffouralpha, sincoeffouralpha, t)
subroutine setbcpointers(nn, spatialpointers)
subroutine silen(len, mult, trans)
subroutine terminate(routinename, errormessage)
subroutine cross_prod(a, b, c)
subroutine sivelocity(length, time, mult, trans)
subroutine siangle(angle, mult, trans)
subroutine derivativerigidrotangle_b(degreepolrot, coefpolrot, degreefourrot, omegafourrot, coscoeffourrot, sincoeffourrot, t, derivativerigidrotangled)
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 mynorm2_b(x, xd, mynorm2d)
subroutine mydim_b(x, xd, y, yd, mydimd)
subroutine cross_prod_b(a, ad, b, bd, c, cd)
real(kind=realtype) function tsmach(degreepolmach, coefpolmach, degreefourmach, omegafourmach, coscoeffourmach, sincoeffourmach, t)