35 REAL(KIND=8),
PRIVATE,
PARAMETER :: pi = 3.14159265358979323846d0
36 REAL(KIND=8),
PRIVATE ,
PARAMETER :: twopi=2*pi
37 REAL(KIND=8),
PARAMETER:: mu_disk= 5.0d1
44 REAL(KIND=8),
PARAMETER:: top_propeller_angle_offset = 0.d0
45 INTEGER :: nblades = 8
46 REAL(KIND=8),
PARAMETER:: lw = 0.0125
47 REAL(KIND=8),
PARAMETER:: disk_bot=-1.1d0, top_of_disk_bot=-0.9d0, top_of_blade_bot=-0.7d0
48 REAL(KIND=8),
PARAMETER:: disk_top= 1.1d0, bot_of_disk_top= 0.9d0, bot_of_blade_top= 0.7d0
49 REAL(KIND=8),
PARAMETER,
PUBLIC:: disk_radius=0.75d0, hole_radius=0.1d0
51 REAL(KIND=8),
PARAMETER:: two_rp = disk_radius/SIN(twopi*24.d0/360.d0)
53 REAL(KIND=8),
PUBLIC :: omega_Vol= pi*(1.0)*(2.0)
56 REAL(KIND=8),
PARAMETER:: wjump_hole = 0.06*(1.0), wjump= 0.04*(1.0)
57 REAL(KIND=8),
PARAMETER:: hole_r = hole_radius, hole_rp=hole_r - wjump_hole
58 REAL(KIND=8),
PUBLIC,
PARAMETER:: disk_r = disk_radius, disk_rp= disk_r- wjump
61 REAL(KIND=8),
PARAMETER:: cyl_bott = -1.0
62 REAL(KIND=8),
PARAMETER:: Bdisk_z = cyl_bott + 0.3d0, bdisk_z_p= Bdisk_z - wjump
63 REAL(KIND=8),
PARAMETER:: zbot = cyl_bott + 0.1d0, zbot_p = zbot - wjump
64 REAL(KIND=8),
PARAMETER:: zbot_bar = zbot - 0.04d0, zbot_bar_p = zbot_bar - wjump
67 REAL(KIND=8),
PARAMETER:: cyl_top = 1.0
68 REAL(KIND=8),
PARAMETER:: Tdisk_z = cyl_top - 0.3d0, Tdisk_z_p= Tdisk_z + wjump
69 REAL(KIND=8),
PARAMETER:: ztop = cyl_top - 0.1d0, ztop_p = ztop + wjump
70 REAL(KIND=8),
PARAMETER:: ztop_bar = ztop + 0.04d0, ztop_bar_p = ztop_bar + wjump
73 REAL(KIND=8),
PARAMETER:: alpha=200.d0*(1.0), alpha_th = 80.d0*(1.0)
76 LOGICAL,
PARAMETER:: if_bottom_prop=.TRUE.
77 LOGICAL,
PARAMETER:: if_top_prop=.TRUE.
78 REAL(KIND=8),
PARAMETER:: solid_vel=1.0;
88 un_m1, un, pn_m1, pn, phin_m1, phin)
91 REAL(KIND=8),
INTENT(OUT):: time
92 REAL(KIND=8),
INTENT(IN) :: dt
93 INTEGER,
DIMENSION(:),
INTENT(IN) :: list_mode
94 REAL(KIND=8),
DIMENSION(:,:,:),
INTENT(OUT):: un_m1, un
95 REAL(KIND=8),
DIMENSION(:,:,:),
INTENT(OUT):: pn_m1, pn, phin_m1, phin
97 REAL(KIND=8),
DIMENSION(mesh_c%np) :: pn_m2
100 DO i= 1,
SIZE(list_mode)
104 un_m1(:,j,i) =
vv_exact(j,mesh_f%rr,mode,time-dt)
105 un(:,j,i) =
vv_exact(j,mesh_f%rr,mode,time)
109 pn_m2(:) =
pp_exact(j,mesh_c%rr,mode,time-2*dt)
110 pn_m1(:,j,i) =
pp_exact(j,mesh_c%rr,mode,time-dt)
111 pn(:,j,i) =
pp_exact(j,mesh_c%rr,mode,time)
112 phin_m1(:,j,i) = pn_m1(:,j,i) - pn_m2(:)
113 phin(:,j,i) = pn(:,j,i) - pn_m1(:,j,i)
166 INTEGER ,
INTENT(IN) :: type
167 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
168 INTEGER ,
INTENT(IN) :: mode, i
169 REAL(KIND=8),
INTENT(IN) :: time
170 REAL(KIND=8),
INTENT(IN) :: re
171 CHARACTER(LEN=2),
INTENT(IN) :: ty
172 REAL(KIND=8),
DIMENSION(:,:,:),
OPTIONAL,
INTENT(IN) :: opt_density
173 REAL(KIND=8),
DIMENSION(:,:,:),
OPTIONAL,
INTENT(IN) :: opt_tempn
174 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: vv
177 CHARACTER(LEN=2) :: np
179 IF (present(opt_density)) CALL
error_petsc(
'density should not be present for test 28')
180 IF (present(opt_tempn)) CALL
error_petsc(
'temperature should not be present for test 28')
186 n=type; n=
SIZE(rr,1); n=mode; n=i; r=time; r=re;np=ty
221 INTEGER ,
INTENT(IN) :: type
222 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
223 INTEGER,
INTENT(IN) :: m
224 REAL(KIND=8),
INTENT(IN) ::
t
225 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: vv
231 IF (type==3 .AND. m==0)
THEN
236 IF ( if_bottom_prop .AND. r <disk_radius .AND.
z < top_of_blade_bot )
then
241 IF ( if_top_prop .AND. r <disk_radius .AND.
z > bot_of_blade_top)
then
258 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
259 REAL(KIND=8),
INTENT(IN) ::
t
260 REAL(KIND=8),
DIMENSION(SIZE(rr,2),6) :: vv
269 vv(n,3) = solid_vel*rr(1,n)
271 vv(n,3) = -solid_vel*rr(1,n)
288 INTEGER ,
INTENT(IN) :: type
289 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
290 INTEGER ,
INTENT(IN) :: m
291 REAL(KIND=8),
INTENT(IN) ::
t
292 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: vv
300 n=type; n=
SIZE(rr,1); n=m; r=
t
339 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr_gauss
340 REAL(KIND=8),
DIMENSION(:),
INTENT(IN) :: angles
341 INTEGER,
INTENT(IN) :: nb_angles
342 INTEGER,
INTENT(IN) :: nb, ne
343 REAL(KIND=8),
INTENT(IN) :: time
344 REAL(KIND=8),
DIMENSION(nb_angles,ne-nb+1) :: vv
772 REAL(KIND=8),
DIMENSION(:,:) :: rr_gauss
773 REAL(KIND=8),
DIMENSION(:) :: angles
776 REAL(KIND=8),
DIMENSION(nb_angles,ne-nb+1) :: vv
778 REAL(KIND=8) :: r,
z,time
783 r = rr_gauss(1,n_loc)
784 z = rr_gauss(2,n_loc)
787 IF (if_bottom_prop .AND. if_top_prop)
THEN
790 ELSE IF (if_bottom_prop)
THEN
811 REAL(KIND=8) :: r,
theta,
z,time
812 REAL(KIND=8),
DIMENSION(:) :: angles
814 REAL(KIND=8),
DIMENSION(nb_angles) :: vv
816 REAL(KIND=8) :: g, a,alphaz,alphar
817 REAL(KIND=8) :: r0,r1,r2,r3,z0,z1,z2,z3
818 REAL(KIND=8) :: psi, tanhp,tanhm, tanhd, r_theta
824 IF(abs(psi) .LE. 1.d-8)
THEN
843 IF (
z .LE. z1 )
THEN
845 ELSE IF(
z .LE. z0 .AND.
z .GE. z1)
THEN
847 ELSE IF(
z .GE. z0)
THEN
851 If ( r .LE. r0 )
THEN
853 ELSE IF(r .GE. r0 .AND. r .LE. r1)
THEN
858 alphaz= alpha_th*alphaz*alphar
860 r_theta = asin(r/two_rp)
867 theta= angles(na) + solid_vel*time
874 a =
theta - r_theta - floor((
theta - r_theta)/(twopi/nblades))*twopi/nblades &
877 tanhp = tanh(alphaz*(r*a+lw+lw*r))
878 tanhm = tanh(alphaz*(r*a-lw-lw*r))
879 tanhd = tanh(alphaz*(lw+lw*r))
880 g=(1+tanhp)*(1-tanhm)/(1+tanhd)**2
895 REAL(KIND=8) :: r,
theta,
z,time
896 REAL(KIND=8),
DIMENSION(:) :: angles
898 REAL(KIND=8),
DIMENSION(nb_angles) :: vv
900 REAL(KIND=8) :: g, a,alphaz,alphar
901 REAL(KIND=8) :: r0,r1,r2,r3,z0,z1,z2,z3
902 REAL(KIND=8) :: psi, tanhp,tanhm, tanhd, r_theta
909 IF(abs(psi) .LE. 1.d-8)
THEN
929 IF (
z .LE. z0 )
THEN
931 ELSE IF(
z .GE. z0 .AND.
z .LE. z1)
THEN
933 ELSE IF(
z .GE. z1)
THEN
937 IF ( r .LE. r0 )
THEN
939 ELSE IF(r .GE. r0 .AND. r .LE. r1)
THEN
944 alphaz= alpha_th*alphaz*alphar
946 r_theta = asin(r/two_rp)
951 theta= angles(na) - solid_vel*time
956 a =
theta + r_theta - floor((
theta + r_theta)/(twopi/nblades))*twopi/nblades &
959 tanhp = tanh(alphaz*(r*a+lw+lw*r))
960 tanhm = tanh(alphaz*(r*a-lw-lw*r))
961 tanhd = tanh(alphaz*(lw+lw*r))
962 g=(1+tanhp)*(1-tanhm)/(1+tanhd)**2
977 REAL(KIND=8) :: r0,r1,r2,r3,z0,z1,z2,z3
978 REAL(KIND=8) :: curve_1,curve_2,psi
994 IF (
z .LE. z3 .AND. r .GE. r3)
THEN
996 ELSE IF (r.LE.r0)
THEN
999 ELSE IF (
z.LE.z1)
THEN
1004 ELSE IF(r.GE.r0 .AND. r.LE.r1)
THEN
1007 IF(
z.LE.curve_2)
THEN
1009 ELSE IF(
z.GE.curve_1)
THEN
1014 ELSE IF(r.GE.r1 .AND. r.LE.r2)
THEN
1017 ELSE IF (
z.LE.z3)
THEN
1022 ELSE IF (r.GE.r2 .AND. r.LE.r3)
THEN
1025 ELSE IF(
z.GE.z2)
THEN
1045 REAL(KIND=8) :: r0,r1,r2,r3,z0,z1,z2,z3
1046 REAL(KIND=8) :: curve_1,curve_2,psi
1063 IF (
z .GE. z3 .AND. r .GE. r3)
THEN
1065 ELSE IF (r.LE.r0)
THEN
1068 ELSE IF (
z.GE.z1)
THEN
1073 ELSE IF(r.GE.r0 .AND. r.LE.r1)
THEN
1076 IF(
z.GE.curve_2)
THEN
1078 ELSE IF(
z.LE.curve_1)
THEN
1083 ELSE IF(r.GE.r1 .AND. r.LE.r2)
THEN
1086 ELSE IF (
z.GE.z3)
THEN
1091 ELSE IF (r.GE.r2 .AND. r.LE.r3)
THEN
1094 ELSE IF(
z.LE.z2)
THEN
1108 REAL(KIND=8) :: x,x0,x1
1110 REAL(KIND=8) :: a0,a1,a2,a3
1113 a0 = x1**2*(3*x0-x1)/(x0-x1)**3;
1114 a1 = -6.0*x0*x1/(x0-x1)**3;
1115 a2 = (3.0*(x0+x1))/(x0-x1)**3;
1116 a3 = -2.0/(x0-x1)**3;
1117 vv = a0+a1*x+a2*x*x + a3*x*x*x
1124 REAL(KIND=8) :: x,x0,x1
section doc_intro_frame_work_num_app Numerical approximation subsection doc_intro_fram_work_num_app_Fourier_FEM Fourier Finite element representation The SFEMaNS code uses a hybrid Fourier Finite element formulation The Fourier decomposition allows to approximate the problem’s solutions for each Fourier mode modulo nonlinear terms that are made explicit The variables are then approximated on a meridian section of the domain with a finite element method The numerical approximation of a function f $f f is written in the following generic t
real(kind=8) function, dimension(size(rr, 2)), public source_in_ns_momentum(TYPE, rr, mode, i, time, Re, ty, opt_density, opt_tempn)
real(kind=8) function smooth_bottom_supporting_disk(r, z)
real(kind=8) function, dimension(size(rr, 2)), public pp_exact(TYPE, rr, m, t)
real(kind=8) function smooth_jump_down(x, x0, x1)
section doc_intro_frame_work_num_app Numerical approximation subsection doc_intro_fram_work_num_app_Fourier_FEM Fourier Finite element representation The SFEMaNS code uses a hybrid Fourier Finite element formulation The Fourier decomposition allows to approximate the problem’s solutions for each Fourier mode modulo nonlinear terms that are made explicit The variables are then approximated on a meridian section of the domain with a finite element method The numerical approximation of a function f $f f is written in the following generic theta
real(kind=8) function, dimension(nb_angles, ne-nb+1) smooth_penal_in_real_space(mesh, rr_gauss, angles, nb_angles, nb, ne, time)
real(kind=8) function, dimension(nb_angles) smooth_top_propeller(r, z, angles, nb_angles, time)
real(kind=8) function, dimension(nb_angles, ne-nb+1), public penal_in_real_space(mesh, rr_gauss, angles, nb_angles, nb, ne, time)
real(kind=8) function, dimension(nb_angles) smooth_bottom_propeller(r, z, angles, nb_angles, time)
real(kind=8) function, dimension(size(rr, 2)), public vv_exact(TYPE, rr, m, t)
real(kind=8) function, dimension(size(rr, 2), 6), public imposed_velocity_by_penalty(rr, t)
subroutine, public init_velocity_pressure(mesh_f, mesh_c, time, dt, list_mode, un_m1, un, pn_m1, pn, phin_m1, phin)
subroutine error_petsc(string)
real(kind=8) function smooth_jump_up(x, x0, x1)
real(kind=8) function smooth_top_supporting_disk(r, z)
section doc_intro_frame_work_num_app Numerical approximation subsection doc_intro_fram_work_num_app_Fourier_FEM Fourier Finite element representation The SFEMaNS code uses a hybrid Fourier Finite element formulation The Fourier decomposition allows to approximate the problem’s solutions for each Fourier mode modulo nonlinear terms that are made explicit The variables are then approximated on a meridian section of the domain with a finite element method The numerical approximation of a function f $f f is written in the following generic z