42 un_m1, un, pn_m1, pn, phin_m1, phin)
45 REAL(KIND=8),
INTENT(OUT):: time
46 REAL(KIND=8),
INTENT(IN) :: dt
47 INTEGER,
DIMENSION(:),
INTENT(IN) :: list_mode
48 REAL(KIND=8),
DIMENSION(:,:,:),
INTENT(OUT):: un_m1, un
49 REAL(KIND=8),
DIMENSION(:,:,:),
INTENT(OUT):: pn_m1, pn, phin_m1, phin
51 REAL(KIND=8),
DIMENSION(mesh_c%np) :: pn_m2
54 DO i= 1,
SIZE(list_mode)
58 un_m1(:,j,i) =
vv_exact(j,mesh_f%rr,mode,time-dt)
59 un(:,j,i) =
vv_exact(j,mesh_f%rr,mode,time)
63 pn_m2(:) =
pp_exact(j,mesh_c%rr,mode,time-2*dt)
64 pn_m1(:,j,i) =
pp_exact(j,mesh_c%rr,mode,time-dt)
65 pn(:,j,i) =
pp_exact(j,mesh_c%rr,mode,time)
66 phin_m1(:,j,i) = pn_m1(:,j,i) - pn_m2(:)
67 phin(:,j,i) = pn(:,j,i) - pn_m1(:,j,i)
94 dt, list_mode, level_set_m1, level_set)
97 REAL(KIND=8),
INTENT(OUT):: time
98 REAL(KIND=8),
INTENT(IN) :: dt
99 INTEGER,
DIMENSION(:),
INTENT(IN) :: list_mode
100 REAL(KIND=8),
DIMENSION(:,:,:,:),
INTENT(OUT):: level_set, level_set_m1
101 INTEGER :: mode, i, j, n
104 DO i= 1,
SIZE(list_mode)
108 DO n = 1, inputs%nb_fluid -1
120 INTEGER ,
INTENT(IN) :: type
121 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
122 INTEGER ,
INTENT(IN) :: mode, i
123 REAL(KIND=8),
INTENT(IN) :: time
124 REAL(KIND=8),
INTENT(IN) :: re
125 CHARACTER(LEN=2),
INTENT(IN) :: ty
126 REAL(KIND=8),
DIMENSION(:,:,:),
OPTIONAL,
INTENT(IN) :: opt_density
127 REAL(KIND=8),
DIMENSION(:,:,:),
OPTIONAL,
INTENT(IN) :: opt_tempn
128 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: vv
129 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 21')
139 IF (m==0 .AND. type==1)
THEN
141 ELSE IF (m==0 .AND. type==5)
THEN
149 m=i; r=time; r=re; np=ty
150 IF (present(opt_density)) m=
SIZE(opt_density,1)
171 INTEGER ,
INTENT(IN) :: type
172 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
173 INTEGER ,
INTENT(IN) :: m, interface_nb
174 REAL(KIND=8),
INTENT(IN) ::
t
175 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: vv
183 n=type; n=
SIZE(rr,1); n=m; n=interface_nb; r=
t
191 INTEGER ,
INTENT(IN) :: type
192 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
193 INTEGER,
INTENT(IN) :: m
194 REAL(KIND=8),
INTENT(IN) ::
t
195 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: vv
203 n=type; n=
SIZE(rr,1); n=m; r=
t
226 INTEGER ,
INTENT(IN) :: type
227 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
228 INTEGER ,
INTENT(IN) :: m
229 REAL(KIND=8),
INTENT(IN) ::
t
230 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: vv
238 n=type; n=
SIZE(rr,1); n=m; r=
t
259 INTEGER ,
INTENT(IN) :: type
260 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
261 INTEGER ,
INTENT(IN) :: m, interface_nb
262 REAL(KIND=8),
INTENT(IN) ::
t
263 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: vv
266 IF (interface_nb==1)
THEN
267 IF (m==0 .AND.
TYPE ==1) then
269 ELSE IF (m==1 .AND. type==1)
THEN
275 CALL
error_petsc(
' BUG in level_set_exact, we should compute only 1 level set')
311 INTEGER ,
INTENT(IN) :: type, n_start
312 INTEGER,
INTENT(IN) :: mode
313 REAL(KIND=8),
INTENT(IN) ::
t
314 REAL(KIND=8),
DIMENSION(H_Mesh%np) :: vv
322 n=h_mesh%np; r=
t; n=type; n=mode; n=n_start
354 FUNCTION hexact(H_mesh,TYPE, rr, m, mu_H_field, t) RESULT(vv)
357 INTEGER ,
INTENT(IN) :: type
358 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
359 INTEGER ,
INTENT(IN) :: m
360 REAL(KIND=8),
INTENT(IN) ::
t
361 REAL(KIND=8),
DIMENSION(:),
INTENT(IN) :: mu_h_field
362 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: vv
366 IF (m==0.AND. type==1)
THEN
368 ELSE IF (m==0.AND.type==5)
THEN
369 vv = -4.d0*rr(1,:)**2*rr(2,:)
376 n=h_mesh%np; r=mu_h_field(1); r=
t
381 FUNCTION phiexact(TYPE, rr, m, mu_phi,t) RESULT(vv)
383 INTEGER ,
INTENT(IN) :: type
384 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
385 INTEGER ,
INTENT(IN) :: m
386 REAL(KIND=8),
INTENT(IN) :: mu_phi,
t
387 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: vv
392 CALL
error_petsc(
'Phiexact: should not be called for this test')
396 n=type; n=
SIZE(rr,1); n=m; r=mu_phi; r=
t
401 FUNCTION jexact_gauss(TYPE, rr, m, mu_phi, sigma, mu_H, t, mesh_id, opt_B_ext) RESULT(vv)
403 INTEGER ,
INTENT(IN) :: type
404 REAL(KIND=8),
DIMENSION(:),
INTENT(IN) :: rr
405 INTEGER ,
INTENT(IN) :: m
406 REAL(KIND=8),
INTENT(IN) :: mu_phi, sigma, mu_h,
t
407 INTEGER ,
INTENT(IN) :: mesh_id
408 REAL(KIND=8),
DIMENSION(6),
OPTIONAL,
INTENT(IN) :: opt_b_ext
413 IF(m==0.AND.type==3)
THEN
414 vv = 8.d0*rr(1)*rr(2)
421 r=rr(1); r=mu_phi; r=sigma; r=mu_h; r=
t; n=type; n=m; n=mesh_id
422 IF (present(opt_b_ext)) r=opt_b_ext(1)
429 INTEGER,
INTENT(IN) :: type
430 REAL(KIND=8),
DIMENSION(:),
INTENT(IN) :: rr
431 INTEGER,
INTENT(IN) :: m
432 REAL(KIND=8),
INTENT(IN) :: mu_phi, sigma, mu_h,
t
441 r=rr(1); r=mu_phi; r=sigma; r=mu_h; r=
t; n=type; n=m
446 SUBROUTINE init_maxwell(H_mesh, phi_mesh, time, dt, mu_H_field, mu_phi, &
447 list_mode, hn1, hn, phin1, phin)
450 REAL(KIND=8),
INTENT(OUT):: time
451 REAL(KIND=8),
INTENT(IN) :: dt
452 REAL(KIND=8),
DIMENSION(:),
INTENT(IN) :: mu_h_field
453 REAL(KIND=8),
INTENT(IN) :: mu_phi
454 INTEGER,
DIMENSION(:),
INTENT(IN) :: list_mode
455 REAL(KIND=8),
DIMENSION(:,:,:),
INTENT(OUT):: hn, hn1
456 REAL(KIND=8),
DIMENSION(:,:,:),
INTENT(OUT):: phin, phin1
461 DO i=1,
SIZE(list_mode)
462 hn1(:,k,i) =
hexact(h_mesh,k, h_mesh%rr, list_mode(i), mu_h_field, time)
463 IF (inputs%nb_dom_phi>0)
THEN
465 phin1(:,k,i) =
phiexact(k, phi_mesh%rr, list_mode(i) , mu_phi, time)
473 DO i=1,
SIZE(list_mode)
474 hn(:,k,i) =
hexact(h_mesh,k, h_mesh%rr, list_mode(i), mu_h_field, time)
475 IF (inputs%nb_dom_phi>0)
THEN
477 phin(:,k,i) =
phiexact(k, phi_mesh%rr, list_mode(i), mu_phi, time)
540 REAL(KIND=8),
DIMENSION(SIZE(H_mesh%rr,2)) :: vv
542 vv = 0.5d0*minval(inputs%sigma_fluid)
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(h_mesh%np), public extension_velocity(TYPE, H_mesh, mode, t, n_start)
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(h_mesh%rr, 2)), public sigma_bar_in_fourier_space(H_mesh)
subroutine, public init_maxwell(H_mesh, phi_mesh, time, dt, mu_H_field, mu_phi, list_mode, Hn1, Hn, phin1, phin)
real(kind=8) function, public jexact_gauss(TYPE, rr, m, mu_phi, sigma, mu_H, t, mesh_id, opt_B_ext)
real(kind=8) function, dimension(size(rr, 2)), public vv_exact(TYPE, rr, m, t)
real(kind=8) function, dimension(size(rr, 2)), public phiexact(TYPE, rr, m, mu_phi, t)
real(kind=8) function, public eexact_gauss(TYPE, rr, m, mu_phi, sigma, mu_H, 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)
real(kind=8) function, dimension(size(rr, 2)), public hexact(H_mesh, TYPE, rr, m, mu_H_field, 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