41 un_m1, un, pn_m1, pn, phin_m1, phin)
44 REAL(KIND=8),
INTENT(OUT):: time
45 REAL(KIND=8),
INTENT(IN) :: dt
46 INTEGER,
DIMENSION(:),
INTENT(IN) :: list_mode
47 REAL(KIND=8),
DIMENSION(:,:,:),
INTENT(OUT):: un_m1, un
48 REAL(KIND=8),
DIMENSION(:,:,:),
INTENT(OUT):: pn_m1, pn, phin_m1, phin
50 REAL(KIND=8),
DIMENSION(mesh_c%np) :: pn_m2
53 DO i= 1,
SIZE(list_mode)
57 un_m1(:,j,i) =
vv_exact(j,mesh_f%rr,mode,time-dt)
58 un(:,j,i) =
vv_exact(j,mesh_f%rr,mode,time)
62 pn_m2(:) =
pp_exact(j,mesh_c%rr,mode,time-2*dt)
63 pn_m1(:,j,i) =
pp_exact(j,mesh_c%rr,mode,time-dt)
64 pn(:,j,i) =
pp_exact(j,mesh_c%rr,mode,time)
65 phin_m1(:,j,i) = pn_m1(:,j,i) - pn_m2(:)
66 phin(:,j,i) = pn(:,j,i) - pn_m1(:,j,i)
119 INTEGER ,
INTENT(IN) :: type
120 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
121 INTEGER ,
INTENT(IN) :: mode, i
122 REAL(KIND=8),
INTENT(IN) :: time
123 REAL(KIND=8),
INTENT(IN) :: re
124 CHARACTER(LEN=2),
INTENT(IN) :: ty
125 REAL(KIND=8),
DIMENSION(:,:,:),
OPTIONAL,
INTENT(IN) :: opt_density
126 REAL(KIND=8),
DIMENSION(:,:,:),
OPTIONAL,
INTENT(IN) :: opt_tempn
127 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: vv
128 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: r,
z
131 CHARACTER(LEN=2) :: np
133 IF (present(opt_density)) CALL
error_petsc(
'density should not be present for test 24')
134 IF (present(opt_tempn)) CALL
error_petsc(
'temperature should not be present for test 24')
141 IF (type==1.AND.m==0)
THEN
142 vv = (2*r-1)**2*cos(
z+
t) &
145 -(1/re)*sin(
z+
t)*(-4*r**4 +4*r**3+11*r**2-1)/r**2 &
146 +(2*r-1)/r**3*(6*r-1)*cos(
z+
t)**2*(4*r**4-4*r**3-11*r**2+1) &
148 ELSE IF (type==1.AND.m==1)
THEN
150 ELSE IF (type==1.AND.m==4)
THEN
152 ELSE IF (type==2.AND.m==2)
THEN
153 vv = (4*r**2 - 4*r - 11 + 1/r**2)*(r - 0.5d0)*cos(
z+
t) &
154 -(2-1/r)*(6*r-1)*cos(
z+
t)
155 ELSE IF (type==3.AND.m==2)
THEN
156 vv = -(2-1/r)**2*(6*r-1)*cos(
z+
t)
157 ELSE IF (type==4.AND.m==1)
THEN
159 ELSE IF (type==4.AND.m==4)
THEN
161 ELSE IF (type==5.AND.m==0)
THEN
162 vv = -(2-1/r)*(6*r-1)*sin(
z+
t) &
163 + 3*r**2*
z**2*cos(
t) &
164 +(1/re)*cos(
z+
t)*(12*r**4-8*r**3-11*r**2-1)/r**3 &
165 -(2*r-1)**2*sin(
z+
t)*cos(
z+
t)*(4*r**4-4*r**3-11*r**2+1)/r**2
166 ELSE IF(type==6.AND.m==2)
THEN
167 vv = -(1.d0/re)*(-3/r + 2/r**2) &
211 INTEGER ,
INTENT(IN) :: type
212 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
213 INTEGER,
INTENT(IN) :: m
214 REAL(KIND=8),
INTENT(IN) ::
t
215 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: vv
216 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: r,
z
222 IF (type==1.AND.m==0)
THEN
224 IF (rr(1,n)>0.5d0)
THEN
225 vv(n) = (2*rr(1,n)-1)**2*sin(rr(2,n)+
t)
230 ELSE IF (type==5.AND.m==0)
THEN
232 IF (rr(1,n)>0.5d0)
THEN
233 vv(n) = (2-1.d0/rr(1,n))*(6*rr(1,n)-1)*cos(rr(2,n)+
t)
238 ELSE IF (type==6.AND.m==2)
THEN
240 IF (rr(1,n)>0.5d0)
THEN
241 vv(n) = rr(1,n)-0.5d0
256 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
257 REAL(KIND=8),
INTENT(IN) ::
t
258 REAL(KIND=8),
DIMENSION(SIZE(rr,2),6) :: vv
276 INTEGER ,
INTENT(IN) :: type
277 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
278 INTEGER ,
INTENT(IN) :: m
279 REAL(KIND=8),
INTENT(IN) ::
t
280 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: vv
281 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: r,
z
286 IF (type==1.AND.m==0)
THEN
287 vv(:) = r**2*
z**3*cos(
t)
288 ELSE IF (type==1.AND.m==1)
THEN
331 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr_gauss
332 REAL(KIND=8),
DIMENSION(:),
INTENT(IN) :: angles
333 INTEGER,
INTENT(IN) :: nb_angles
334 INTEGER,
INTENT(IN) :: nb, ne
335 REAL(KIND=8),
INTENT(IN) :: time
336 REAL(KIND=8),
DIMENSION(nb_angles,ne-nb+1) :: vv
342 IF (rr_gauss(1,n_loc).LE.0.5d0)
THEN
351 n=mesh%np; n=
SIZE(angles); n=nb_angles; r=time
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, dimension(size(rr, 2)), public pp_exact(TYPE, rr, m, t)
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(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)
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