277 FUNCTION vexact(m, H_mesh) RESULT(vv) !Set uniquement a l'induction
280 INTEGER,
INTENT(IN) :: m
281 REAL(KIND=8),
DIMENSION(H_mesh%np,6) :: vv
306 FUNCTION hexact(H_mesh,TYPE, rr, m, mu_H_field, t) RESULT(vv)
309 INTEGER ,
INTENT(IN) :: type
310 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
311 INTEGER ,
INTENT(IN) :: m
312 REAL(KIND=8),
INTENT(IN) ::
t
313 REAL(KIND=8),
DIMENSION(:),
INTENT(IN) :: mu_h_field
314 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: vv
315 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: r,
z,
theta, rho
316 REAL(KIND=8) :: aa=0.5d0, bb=1.d0, mu, mu0=1.d0, &
317 capa,capb, capc, capd
325 mu = maxval(mu_h_field)
329 rho = sqrt(r**2+
z**2)
331 capa = -9*mu*mu0/((2*mu+mu0)*(mu+2*mu0) - 2*(mu-mu0)**2*(aa/bb)**3)
332 capd = (2*mu+mu0)*(mu-mu0)*((bb/aa)**3-1.d0)/((2*mu+mu0)*(mu+2*mu0) - 2*(mu-mu0)**2*(aa/bb)**3)
333 capc = (1.d0 - mu0/mu)*capa/3
334 capb = (2.d0 + mu0/mu)*capa/3
338 ELSE IF(type==5)
THEN
339 vv = -capb + capc*(aa/rho)**3*(3.d0*cos(
theta)**2-1.d0)
346 r=h_mesh%rr(1,1); r=
t
351 FUNCTION phiexact(TYPE, rr, m, mu_phi,t) RESULT(vv)
353 INTEGER ,
INTENT(IN) :: type
354 REAL(KIND=8),
DIMENSION(:,:),
INTENT(IN) :: rr
355 INTEGER ,
INTENT(IN) :: m
356 REAL(KIND=8),
INTENT(IN) :: mu_phi,
t
357 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: vv
358 REAL(KIND=8),
DIMENSION(SIZE(rr,2)) :: r,
z,
theta, rho
360 REAL(KIND=8) :: a=0.5d0, b=1.d0, mu, mu0=1.d0, &
369 mu = maxval(inputs%mu_H)
372 rho = sqrt(r**2+
z**2)
375 IF (rho(n).LE.1.d-10)
THEN
378 theta(n) = atan2(r(n),
z(n))
382 capa = -9*mu*mu0/((2*mu+mu0)*(mu+2*mu0) - 2*(mu-mu0)**2*(a/b)**3)
383 capd = (2*mu+mu0)*(mu-mu0)*((b/a)**3-1.d0)/((2*mu+mu0)*(mu+2*mu0) - 2*(mu-mu0)**2*(a/b)**3)
387 IF (type==1 .AND. rho(n).LE. (a+1.d-1))
THEN
388 vv(n) = -capa*rho(n)*cos(
theta(n))
389 ELSE IF (type==1 .AND. rho(n) .GE. (b-1.d-1))
THEN
390 vv(n) = (rho(n)*cos(
theta(n)) - capd*cos(
theta(n))*a**3/rho(n)**2)
403 FUNCTION jexact_gauss(TYPE, rr, m, mu_phi, sigma, mu_H, t, mesh_id, opt_B_ext) RESULT(vv)
405 INTEGER ,
INTENT(IN) :: type
406 REAL(KIND=8),
DIMENSION(:),
INTENT(IN) :: rr
407 INTEGER ,
INTENT(IN) :: m
408 REAL(KIND=8),
INTENT(IN) :: mu_phi, sigma, mu_h,
t
409 INTEGER ,
INTENT(IN) :: mesh_id
410 REAL(KIND=8),
DIMENSION(6),
OPTIONAL,
INTENT(IN) :: opt_b_ext
419 r=rr(1); r=mu_phi; r=sigma; r=mu_h; r=
t; n=type; n=m; n=mesh_id
420 IF (present(opt_b_ext)) r=opt_b_ext(1)
427 INTEGER,
INTENT(IN) :: type
428 REAL(KIND=8),
DIMENSION(:),
INTENT(IN) :: rr
429 INTEGER,
INTENT(IN) :: m
430 REAL(KIND=8),
INTENT(IN) :: mu_phi, sigma, mu_h,
t
439 r=rr(1); r=mu_phi; r=sigma; r=mu_h; r=
t; n=type; n=m
444 SUBROUTINE init_maxwell(H_mesh, phi_mesh, time, dt, mu_H_field, mu_phi, &
445 list_mode, hn1, hn, phin1, phin)
448 REAL(KIND=8),
INTENT(OUT):: time
449 REAL(KIND=8),
INTENT(IN) :: dt
450 REAL(KIND=8),
DIMENSION(:),
INTENT(IN) :: mu_h_field
451 REAL(KIND=8),
INTENT(IN) :: mu_phi
452 INTEGER,
DIMENSION(:),
INTENT(IN) :: list_mode
453 REAL(KIND=8),
DIMENSION(:,:,:),
INTENT(OUT):: hn, hn1
454 REAL(KIND=8),
DIMENSION(:,:,:),
INTENT(OUT):: phin, phin1
466 r=h_mesh%rr(1,1); r=phi_mesh%rr(1,1); r=dt; r=mu_h_field(1); r=mu_phi; n=
SIZE(list_mode)
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
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
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(h_mesh%np, 6), public vexact(m, H_mesh)
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)
real(kind=8) function, dimension(size(rr, 2)), public hexact(H_mesh, TYPE, rr, m, mu_H_field, t)
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