• Aucun résultat trouvé

Two dierent numerical algorithms and codes are used for the numerical solution of problems involving the kinematic induction equation (C.2.1). The rst one is a combined nite vol-ume/boundary element method FV/BEM [136]. It is a grid based approach which provides a exible scheme that utilizes a local discretization and intrinsically maintains the solenoidal character of the magnetic eld.

The second solution method is based on a Spectral/Finite Element approximation tech-nique denoted SFEMaNS for Spectral/Finite Elements for Maxwell and Navier-Stokes equa-tions. Taking advantage of the cylindrical symmetry of the domains, Fourier modes are used in the azimuthal direction and nite elements are used in the meridional plane. For each Fourier mode this leads to independent two-dimensional-problems in the meridian plane.

C.3.1 Hybrid nite volume/boundary element method We start with the induction equation in conservative form

(C.3.1) ∂B

∂t +∇ ×E=0, where the electric eld E is given by

(C.3.2) E=−u×B+η∇ × B

µr

andη = 1/µ0σ is the magnetic diusivity. For the sake of simplicity we give a short sketch for the treatment of inhomogeneous conductivity and permeability only in Cartesian coordinates.

The scheme can easily be adapted to dierent (orthogonal) coordinate systems (e.g. cylindrical or spherical coordinate system) making use of generalized coordinates [140, 141].

In the nite volume scheme the grid representation of the magnetic eld is given by a staggered collocation of the eld components that are interpreted as an approximation of the (cell-)face average:

(C.3.3) Bi−1/2,j,kx ≈ 1

∆y∆z Z

Γyz

Bx(xi−1/2, y, z)dydz,

where the integration domain Γ corresponds to the surface of a single cell-face: Γyz = [yj−1/2, yj+1/2]×[zk−1/2, zk+1/2] (see gure C.1). A comparable denition is applied to the

Figure C.1: Localization of vector quantities on a grid cellijk with the cell center located at (xi, yj, zk). The dotted curve denotes the path along which the integration of B is executed for the computation ofEi,j−1/2,k−1/2

x .

electric eld which is localized at the center of a cell edge and which is dened as the line average (see gure C.1):

(C.3.4) Ei,j−1/2,k−1/2

x ≈ 1

∆x

Z xi+1/2 xi−1/2

Ex(x, yj−1/2, zk−1/2)dx.

Similar denitions hold for the components Bi,j−1/2,ky and Bi,j,k−1/2z , and for Ei−1/2,j,k−1/2 y

andEi−1/2,j−1/2,k

z , respectively.

The nite volume discretization of the induction equation reads d

dtBi−1/2,j,kx = −Ei−1/2,j+1/2,k

z (t)−Ei−1/2,j−1/2,k

z (t)

∆y +Ei−1/2,j,k+1/2

y (t)−Ei−1/2,j,k−1/2

y (t)

(C.3.5) ∆z

and it can easily been shown that this approach preserves the∇ ·B constraint for all times (to machine accuracy) if the initial eld is divergence free.

Material coecients

In the following we only discuss the treatment of the diusive part of the electric eld, E= η∇ ×B/µr because the induction contribution (∝ −u×B) does not involve the material

properties and can be treated separately in the framework of an operator splitting scheme (see e.g. [72] [72], [57] [57], [157] [157]). To obtain the computation directive for the electric eld the magnetic eld has to be integrated along a (closed path) aroundEx(,y,z) at the edge of a grid cell (see dotted curve in gure C.1).

(C.3.6) Ex ≈ 1 Γ

Z

Γyz

ExdA= 1 Γ

Z

Γyz

η

∇ × B µr

dA≈ η

∆y∆z Z

∂Γyz

B µrdl,

whereΓ = ∆y∆z is the surface surrounded by the path Γyz and η is the average diusivity (η= (µ0σ)−1) seen by the electric eld. Unlike vectorial quantities the material coecients are scalar quantities that are localized in the center of a grid cell. The consideration of spatial variations and/or jumps in conductivity respectively permeability is straightforward if corresponding averaging procedures forσ or µr are applied [68]. For the component Ex the discretization of equation (C.3.6) leads to

Ei,j−1/2,k−1/2

xi,j−1/2,k−1/2

"

1

∆y

Bi,j,k−1/2z

r)i,j,k−1/2 − Bi,j−1,k−1/2 z

r)i,j−1,k−1/2

!

− 1

∆z

Bi,j−1/2,ky

r)i,j−1/2,k − Bi,j−1/2,k−1 y

r)i,j−1/2,k−1

. (C.3.7)

In equation (C.3.7), ηi,j−1/2,k−1/2 represents the diusivity that is seen by the electric eld componentEi,j−1/2,k−1/2

x at the edge of the grid cell(ijk)and which is given by the arithmetic average of the diusivity of the four adjacent cells:

(C.3.8) ηi,j−1/2,k−1/2 = 1

4(ηi,j,ki,j−1,ki,j,k−1i,j−1,k−1).

Similarly, µr denotes the relative permeability that is seen by the magnetic eld components (By and Bz) at the interface between two adjacent grid cells. For instance, for the case considered in equation (C.3.7),µr is dened as follows:

forBi,j−1/2,ky : (µr)i,j−1/2,k = 2(µr)i,j,kr)i,j−1,k

r)i,j,k+ (µr)i,j−1,k

, for Bi,j,k−1/2z : (µr)i,j,k−1/2 = 2(µr)i,j,kr)i,j,k−1

r)i,j,k+ (µr)i,j,k−1

(C.3.9) .

For the computation of Ei−1/2,j,k−1/2

y and Ei−1/2,j−1/2,k

z equations (C.3.8) and (C.3.9) have to be adjusted according to the localization and the eld components involved. Applying the averaging rules (C.3.8) and (C.3.9) to the computation of the diusive part of the electric eld results in a scheme that intrinsically fullls the jump conditions (C.2.3) at material interfaces.

The scheme is robust and simple to implement, however, the averaging procedure results in a articial smoothing of parameter jumps at interfaces and in concave corners additional diculties might occur caused by ambiguous expressions for µr. Furthermore in the simple realization presented above, the parameter range is restricted. For larger jumps of µr or σ a more careful treatment of the discontinuities at the material interfaces is necessary which would require a more elaborate eld reconstruction that makes use of slope limiters.

Boundary conditions

In numerical simulations of laboratory dynamo action insulating boundary conditions are often simplied by assuming vanishing tangential elds (VTF, sometimes also called pseudo vac-uum condition). In fact, a restriction of the boundary magnetic eld to its normal component resembles an artical but numerically convenient setup where the exterior of the computa-tional domain is characterized by an innite permeability. VTF boundary conditions usually overestimate the eld growth rates in many dynamo problems. Therefore a more elaborate treatment of the eld behavior at the boundary is recommended which is nontrivial in non-spherical coordinate systems. Insulating domains are characterized by a vanishing current j∝ ∇ ×B=0 so thatB can be expressed as the gradient of a scalar eld Φ(assuming that the insulating domain is simply connected) which fullls the Laplace equation:

(C.3.10) B=−∇Φ with ∇2Φ= 0, Φ→O(r−2) for r→ ∞.

Integrating∇2Φ= 0 and adoption of Green's 2nd theorem leads to

(C.3.11) Φ(r) = 2

Z

Γ

G(r,r0) ∂Φ(r0)

∂n

| {z }

−Bn(r0)

−Φ(r0)∂G(r,r0)

∂n dΓ(r0),

where G(r,r0) = −(4π|r−r0|)−1 is the Greens function (with ∇2G(r,r0) =−δ(r−r0)) and

∂/∂nis the normal derivative on the surface elementdΓso that∂nΦ=−Bnyields the normal component of B on dΓ. The tangential components of the magnetic eld at the boundary Bτ =eτ·B=−eτ· ∇Φ(r) are computed from equation (C.3.11) as follows :

(C.3.12) Bτ = 2

Z

Γ

eτ·

Φ(r0)∇r∂G(r,r0)

∂n +Bn(r0)∇rG(r,r0)

dΓ(r0),

where eτ represents a tangential unit vector on the surface element dΓ(r0). In fact, there are two orthogonal tangential directions on the boundary and equation (C.3.12) is valid in-dependently for both orientations. After the subdivision of the surface Γ in boundary el-ements Γj with Γ = ∪Γj the approximate potential Φi = Φ(ri) and the tangential eld Biτ =Bτ(ri) =−eτ·(∇Φi)in discretized form are given by

1

i =−X

j

Z

Γj

∂G

∂n(ri,r0)dΓ0j

!

Φj,−X

j

Z

Γj

G(ri,r0)dΓ0j

! Bjn

Biτ =X

j

Z

Γj

2eτ· ∇r∂G

∂n(ri,r0)dΓ0j

!

Φj+X

j

Z

Γj

2eτ· ∇rG(ri,r0)dΓ0j

! Bjn. (C.3.13)

The system of equations (C.3.13) gives a linear, non local relation for the tangential eld components at the boundary in terms of the normal components and closes the problem of magnetic induction in nite (connected) domains with insulating boundaries [73]. A more detailed description of the scheme can be found in [57].

C.3.2 Spectral/Finite Elements for Maxwell equations

The conducting part of the computational domain is denoted Ωc, the non-conducting part (vacuum) is denoted Ωv, and we set Ω := Ωc∪Ωv. We use the subscriptc for the conducting

part andv for the vacuum. We assume thatΩc is partitioned into subregions Ωc1,· · · ,ΩcN, so that the magnetic permeability in each subregion Ωci, say µci, is smooth. We denote Σµ the interface between all the conducting subregions. We denote Σ the interface between Ωc andΩv. A sketch of the computational domain is displayed on gure D.1(a).

v

∂Ω

Σ Ωc1

c2

Σµ

Axis

(a) (b) (c)

Figure C.2: Example of a computational domainΩ with various boundaries: (a) sketch with arbitrary axisymmetrical domains showing the conducting domain Ωc (shaded regions) and the vacuumΩv (non-shaded domain) with the interfacesΣµ and Σ, (b) meridian triangular mesh used in section C.4 with disks of d= 0.6 thickness with SFEMaNS (1 point out of 4 has been represented), (c) zoom of (b).

The electric eld Eand magnetic eld HinΩc andΩv solve the following system:

∂(µcHc)

∂t =−∇ ×Ec, ∂(µvHv)

∂t =−∇ ×Ev, (C.3.14)

∇·(µcHc) = 0, ∇·(µvHv) = 0, (C.3.15)

Ec=−u×µcHc+ 1

σ∇×Hc, ∇×Hv =0 (C.3.16)

and the following transmission conditions hold acrossΣµ and Σ:

Hci×nci+Hcj×ncj =0, Hc×nc+Hv×nv=0, (C.3.17)

µciHci·ncicjHcj·ncj = 0, µcHc·ncvHv·nv= 0, (C.3.18)

Eci×nci+Ecj×ncj =0, Ec×nc+Ev×nv=0, (C.3.19)

wherenc(resp. nv) is the unit outward normal onΣ, i.e. ncpoints fromΩctoΩv (resp. from Ωv to Ωc), and nci is the unit normal onΣµ, i.e. nci points fromΩci to Ωcj.

Weak formulation

The nite element solution is computed by solving a weak form of the system (C.3.14)-(C.3.19).

We proceed as follows inΩci. Multiplying the induction equation inΩci by a test-functionb, integrating overΩci, integrating by parts and using (C.3.16) gives

0 = Z

ci

∂(µciHci)

∂t ·b+ Z

ci

∇ ×Eci·b

= Z

ci

∂(µciHci)

∂t ·b+ Z

ci

Eci· ∇ ×b+ Z

∂Ωci

(nci×Eci)·b

= Z

ci

∂(µciHci)

∂t ·b+ Z

ci

−u×µciHci+ 1

σ∇ ×Hci

· ∇ ×b+ Z

∂Ωci

Eci·(b×nci).

(C.3.20)

Note that, in the weak formulation, the variable of integration is omitted. We proceed slightly dierently inΩv. From (C.3.16) we infer thatHv is a gradient for a simply connected vacuum, i.e., Hv = ∇φv. Thus taking a test-function of the form ∇ψ, where ψ is a scalar potential dened onΩv, multiplying (C.3.14) by ∇ψand integrating over Ωv, we obtain

(C.3.21)

Z

v

∂(µv∇φv)

∂t · ∇ψ+ Z

Σ

Ev· ∇ψ×nv+ Z

∂Ω

Ev· ∇ψ×nv = 0.

We henceforth assume that a := E|∂Ω is a data. Since only the tangential parts of the electric eld are involved in the surface integrals in (C.3.20) and (C.3.21), we can use the jump conditions (C.3.19) to write

Z

Σµ

Eci·b×nci= Z

Σµ

{Ec} ·b×nci, Z

Σ

Ev· ∇ψ×nv = Z

Σ

Ec· ∇ψ×nv, where{Ec}is dened onΣµby{Ec}= 12 Eci+Ecj

. We now add (C.3.20) (fori= 1, . . . , N) and (C.3.21) to obtain

Z

c

∂(µcHc)

∂t ·b+ Z

v

∂(µv∇φv)

∂t · ∇ψ+ Z

Ni=1ci

1

σ∇ ×Hci−u×µciHci

· ∇ ×b

+ Z

Σµ

{Ec} ·[[b×n]] + Z

Σ

Ec·(b×nc+∇ψ×nv) =− Z

∂Ω

a· ∇ψ×nv, where we have set [[b×n]] := bi×nci+bj×ncj

with bi := b|ci and bj := b|cj. We nally get rid of Ec by using Ohm's law in the conductor:

Z

c

∂(µcHc)

∂t ·b+ Z

v

∂(µv∇φv)

∂t ·∇ψ+ Z

Ni=1ci

1

σ∇×Hci−u×µciHci

·∇×b

+ Z

Σµ

{1

σ∇×Hc−u×µcHc}·[[b×n]] + Z

Σ

1

σ∇×Hc−u×µcHc

·(b×nc+∇ψ×nv)

=− Z

∂Ω

a·∇ψ×nv. (C.3.22)

This formulation is the starting point for the nite element discretization.

Space discretization

As already mentioned, SFEMaNS takes advantage of the cylindrical symmetry. We denote Ω2dv and Ω2dci the meridian sections of Ωv and Ωci, respectively. These sections are meshed using quadratic triangular meshes (we assume that Ω2dv and the sub-domains Ω2dc1. . .Ω2dcN have piecewise quadratic boundaries). We denote{Fhv}h>0, {Fhc1}h>0. . .{FhcN}h>0 the cor-responding regular families of non-overlapping quadratic triangular meshes where h denotes the typical size of a mesh element. Figure D.1(b-c) displays a meridian triangular mesh used in section C.4 with disks of thickness d= 0.6 (see section C.4 for details). We use the same mesh strategy for all the sub-domains. We can use renement, but the ratio between the maximum size of an element and the minimum one is of order 1. For every triangleK in the mesh we denoteTK : ˆK −→K the quadratic transformation that maps the reference triangle Kˆ := {(ˆr,z)ˆ ∈ R2, 0 ≤r,ˆ 0≤ z,ˆ ˆr+ ˆz ≤ 1} to K. Given `H and `φ two integers in {1,2}

with `φ>`H we rst dene the meridian nite element spaces XH,2dh :=

bh ∈L1(Ωc)/bh|ci ∈ C0(Ωci), ∀i= 1, . . . , N, bh(TK)∈P`H, ∀K ∈ ∪Ni=1Fhci , Xhφ,2d:=

ψh∈ C0(Ωv)/ ψh(TK)∈P`φ, ∀K ∈ Fhv ,

where Pk denotes the set of (scalar or vector valued) bivariate polynomials of total degree at mostk. Then, using the complex notationi2 =−1, the magnetic eld and the scalar potential are approximated in the following spaces:

XHh :=

( bh =

M

X

m=−M

bmh(r, z)eimθ; ∀m= 0, . . . , M, bmh ∈XH,2dh and bmh =b−mh )

,

Xhφ:=

( ψh =

M

X

m=−M

ψmh(r, z)eimθ; ∀m= 0, . . . , M, ψmh ∈XH,2dh andψmh−mh )

, where M+ 1is the maximum number of complex Fourier modes.

Time discretization

We approximate the time derivatives using the second-order Backward Dierence Formula (BDF2). The terms that are likely to mix Fourier modes are made explicit. Let ∆t be the time step and set tn := n∆t, n >0. After proper initialization at t0 and t1, the algorithm proceeds as follows. Forn>1we set

H = 2Hc,n−Hc,n−1 and





DHc,n+1:= 1

2 3Hc,n+1−4Hc,n+Hc,n−1 , Dφv,n+1:= 1

2 3φv,n+1−4φv,nv,n−1 ,

and the discrete elds Hc,n+1 ∈ XHh and φv,n+1 ∈ Xhφ are computed so that the following holds for all b∈XHh, ψ ∈Xhφ:

(C.3.23) L (Hc,n+1, φv,n+1),(b, ψ)

=R(b, ψ),

where the linear forRis dened by R(b, ψ) =−

Z

∂Ω

a·∇ψ×nv+ Z

c

u×µcH·∇×b+ Z

Σµ

{u×µcH}·[[b×n]]

+ Z

Σ

u×µcH·(b×nc+∇ψ×nv), the bilinear formLis dened by

L (Hc,n+1, φv,n+1),(b, ψ) :=

Z

c

µcDHc,n+1

∆t ·b+ Z

v

µv∇Dφv,n+1

∆t ·∇ψ +

Z

c

1

σ∇×Hc,n+1·∇×b+g (Hc,n+1, φv,n+1),(b, ψ) +

Z

Σµ

{1

σ∇×Hc,n+1}·[[b×n]] + Z

Σ

1

σ∇×Hc,n+1·(b×nc+∇ψ×nv) and the bilinear formg is dened by

g((Hh, ψh),(bh, ψh)) := β1h−1F Z

Σµ

(Hh,1×nc1+Hh,2×nc2)·(bh,1×nc1+bh,2×nc2) + β2h−1F

Z

Σ

(Hh×nc+∇ψh×nv)·(bh×nc+∇ψh×nv),

where hF denotes the typical size of ∂K ∪Σµ or ∂K∪Σ for all K in the mesh such that

∂K∪Σµ or ∂K∪Σ is not empty. The constant coecients β1 and β2 are chosen to be of order 1. The purpose of the bilinear formg is to penalize the tangential jumps [[Hc,n+1×n]]

andHc,n+1×nc+∇ψv,n+1×nv, so that they converge to zero when the mesh-size goes to zero.

Addition of a magnetic pressure

The above time-marching algorithm is convergent on nite time intervals but may fail to provide a convergent solution in a steady state regime since errors may accumulate on the divergence of the magnetic induction. We now detail the technique which is employed to control the divergence ofBcon arbitrary time intervals.

To avoid non-convergence properties that could occur in non-smooth domains and discon-tinuous material properties, we have designed a non standard technique inspired from [17] to control∇·B. We replace the induction equation in Ωcby the following:

(C.3.24) ∂(µcHc)

∂t =−∇ ×Ecc∇pc, (−∆0)αpc=∇·µcHc, pc|∂Ωc = 0,

where α is a real parameter, ∆0 is the Laplace operator with zero boundary condition on Ωc, and pc is a new scalar unknown. A simple calculation shows that pc = 0 if the initial magnetic induction is solenoidal; hence, (D.3.9) enforces ∇·µcHc= 0. Taking α= 0amounts to penalizing ∇·µcHc in L2(Ωc), which turns out to be non-convergent with Lagrange nite elements when the boundary of Ωc is not smooth, (see [36] for details). The mathematical analysis shows that the method converges with Lagrange nite elements when α ∈(12,1). In practice we takeα= 0.7.

We introduce new nite elements spaces to approximate the new scalar unknownp Xhp,2d:=

n

ph ∈L1(Ωc)/ ph ∈ C0(Ωc), ph(TK)∈P`p, ∀K∈ ∪Ni=1Fhci, ph = 0on ∂Ωc

o , Xhp :=

( p=

M

X

m=−M

pm(r, z)eimθ /∀m= 1. . . , M, pm∈Xhp,2dand pm =p−m )

.

Here`p is an integer in {1,2}. The nal form of the algorithm is the following: after proper initialization, we solve for Hc,n+1 ∈ XHh, φv,n+1 ∈ Xhφ and pn+1 ∈ Xhp so that the following holds for allb∈XHh, ψ ∈Xhφ, q∈Xhp:

(C.3.25)

L (Hc,n+1, φv,n+1),(b, ψ)

+D (Hc,n+1, pc,n+1, φv,n+1),(b, q, ψ)

+P(φv,n+1, ψ) =R(b, ψ) with(C.3.26)

D((H, p, φ),(b, q, ψ)) :=

N

X

i=1

Z

ci

µcb·∇p−µcH·∇q+h∇·µcH∇·µcb+h2(1−α)∇p·∇q , wherehdenotes the typical size of a mesh element. The termPN

i=1

R

cih∇·µcHc,n+1 ∇·µcb is a stabilization quantity which is added in to have discrete well-posedness of the problem irrespective of the polynomial degree of the approximation forpc. The additional stabilizing bilinear formP is dened by

P(φ, ψ) = Z

v

∇φ·∇ψ− Z

∂Ωv

ψn·∇φ.

This bilinear form is meant to help ensure that∆φv,n+1= 0 for all times.

Taking advantage of the cylindrical symmetry for Maxwell and Navier-Stokes equations

SFEMaNS is a fully nonlinear code integrating the coupled Maxwell and Navier-Stokes equa-tions ([65, 66]). As mentioned above, any term that could mix dierent Fourier modes has been made explicit. Owing to this property, there are M + 1 independent linear systems to solve at each time step (M+ 1 being the maximum number of complex Fourier modes). This immediately provides a parallelization strategy. In practice we use one processor per Fourier mode. The computation of the nonlinear terms in the right-hand side is done using a parallel Fast Fourier Transform. Note that, in the present paper, we use only the kinematic part of the code with an axisymmetric steady ow. A typical time step is∆t= 0.01 and a typical mesh size is h = 1/80. When necessary, the mesh is rened in the vicinity of the curved interface Σµ so that we have h= 1/400locally.