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)
93 dt, list_mode, level_set_m1, level_set)
96 REAL(KIND=8),
INTENT(OUT):: time
97 REAL(KIND=8),
INTENT(IN) :: dt
98 INTEGER,
DIMENSION(:),
INTENT(IN) :: list_mode
99 REAL(KIND=8),
DIMENSION(:,:,:,:),
INTENT(OUT):: level_set, level_set_m1
100 INTEGER :: mode, i, j, n
103 DO i= 1,
SIZE(list_mode)
107 DO n = 1, inputs%nb_fluid -1
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_tempn)) CALL
error_petsc(
'temperature should not be present for test 19')
140 IF (m==0 .AND. type==1)
THEN
141 vv = -r**3*(1+(inputs%density_fluid(2)-inputs%density_fluid(1))*(r**2+
z**2))*sin(-
z+
t)**2
142 ELSE IF (m==0 .AND. type==3)
THEN
143 vv = r**2*(1+(inputs%density_fluid(2)-inputs%density_fluid(1))*(r**2+
z**2))*cos(-
z+
t) &
144 - 1/re*(3.d0-r**2)*sin(-
z+
t)
151 m=i; m=
SIZE(opt_density,1); np=ty
172 INTEGER ,
INTENT(IN) :: type
173 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
174 INTEGER ,
INTENT(IN) :: m, interface_nb
175 REAL(KIND=8),
INTENT(IN) ::
t
176 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: vv
184 n=type; n=
SIZE(rr,1); n=m; n=interface_nb; r=
t
192 INTEGER ,
INTENT(IN) :: type
193 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
194 INTEGER,
INTENT(IN) :: m
195 REAL(KIND=8),
INTENT(IN) ::
t
196 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: vv
197 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: r,
z
202 IF (m==0 .AND. type==3)
THEN
229 INTEGER ,
INTENT(IN) :: type
230 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
231 INTEGER ,
INTENT(IN) :: m
232 REAL(KIND=8),
INTENT(IN) ::
t
233 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: vv
241 n=type; n=
SIZE(rr,1); n=m; r=
t
262 INTEGER ,
INTENT(IN) :: type
263 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
264 INTEGER ,
INTENT(IN) :: m, interface_nb
265 REAL(KIND=8),
INTENT(IN) ::
t
266 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: vv
269 IF (interface_nb==1)
THEN
270 IF (m==0 .AND.
TYPE ==1) then
271 vv = rr(1,:)**2 + rr(2,:)**2
276 CALL
error_petsc(
' BUG in level_set_exact, we should compute only 1 level set')
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(size(rr, 2)), public source_in_level_set(interface_nb, TYPE, rr, m, t)
real(kind=8) function, dimension(size(rr, 2)), public vv_exact(TYPE, rr, m, 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, dimension(size(rr, 2)), public level_set_exact(interface_nb, TYPE, rr, m, t)
subroutine, public init_level_set(vv_mesh, time, dt, list_mode, level_set_m1, level_set)
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