Sie sind auf Seite 1von 29

University of Twente

The Netherlands

Finite Element Methods for


Maxwell’s Equations
Davit Harutyunyan
joint work with M. A. Botchev and J. J. W. van der Vegt
MPCM seminar

26th February 2004

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
1/29
University of Twente
The Netherlands

Outline
Maxwell’s equations Finite element methods
• Time-dependent electromagnetic fields. • Functional spaces.
• Interface and Boundary conditions. • Weak formulation.
• Physical constraints. • Discretization.

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
2/29
University of Twente
The Netherlands

Time Dependent Maxwell’s Equations


• Coupled system of linear PDE’s
∂D E electric f ield
= ∇×H H magnetic f ield
∂t
∂B D electric f lux density
= −∇ × E B magnetic f lux density
∂t

• Divergence constraints • Constitutive relations


∇·D = 0 D = E
∇·B = 0 B = µH
• Material properties
 = (x) permittivity µ = µ(x) permeability

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
3/29
University of Twente
The Netherlands

Interface Conditions
The tangential component of E and H fields are continuous across two
media:

n × (E1 − E2) = 0
n × (H1 − H2) = 0

ε1 ε2 E2
E1 ε1 >ε2

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
4/29
University of Twente
The Netherlands

Interface Conditions
The normal component of B and D fields are continuous across two media:

n · (D1 − D2) = 0
n · (B1 − B2) = 0

ε1 D1 ε2 D2
ε2> ε1

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
5/29
University of Twente
The Netherlands

Boundary Conditions

Dirichlet b.c. on top and bottom edges u = 0


Transparent b.c. on left an right edges

Transparent b.c. on all edges.

Thanks: J.B. Nicolau

• Perfect conducting boundary conditions


n×E =0

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
6/29
University of Twente
The Netherlands

Functional spaces

H(curl, Ω) = {u ∈ L2(Ω)3| ∇ × u ∈ L2(Ω)3}

K1, K2: non-overlapping domains, Σ = K̄1 ∩ K̄2.


Let u1 ∈ H(curl, K1 ) and u2 ∈ H(curl, K2 ), define

u1 on K1,
u=
u2 on K2.
u ∈ H(curl, K1 ∪ K2 ∪ Σ) if and only if u1 × n = u2 × n on Σ.

Hence H(curl, Ω) is an appropriate space for the electric field E .

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
7/29
University of Twente
The Netherlands

Functional spaces . . .
H(div, Ω) = {u ∈ L2(Ω)3| ∇ · u ∈ L2(Ω)}

Let u1 ∈ H(div, K1 ) and u2 ∈ H(div, K2 ), define



u1 on K1,
u=
u2 on K2.

u ∈ H(div, K1 ∪ K2 ∪ Σ) if and only if u1 · n = u2 · n on Σ.

Hence H(div, Ω) is an appropriate space for magnetic flux density B .

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
8/29
University of Twente
The Netherlands

Weak Formulation
• Find E ∈ H(curl, Ω) and B ∈ H(div, Ω) such that
Z Z

E · V dx = (µ−1B) · (∇ × V )dx
∂t Ω Ω

Z Z

B · Zdx = − ∇ × E · Zdx
∂t Ω Ω

for every V ∈ H0 (curl, Ω) and Z ∈ H0 (div, Ω).

H0(curl, Ω) = {u ∈ H(curl, Ω) | n × u = 0 on Γ}
H0(div, Ω) = {u ∈ H(div)| n · u = 0 on Γ}

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
9/29
University of Twente
The Netherlands

Finite elements in H(curl, Ω): Edge elements


• The basis functions are associated from the edges,
they satisfy: 6
4

Z
(wi · tj )ds = δij
1 2
1 1

z 9 1 0

ai x
2

5
7

ti is the unit tangent vector along edge ai. 1

On the unit cube there are 12 edge basis functions.

W10

= (y − 1)(z − 1), 0, 0 W50

= 0, (x − 1)(z − 1), 0
W20

= − y(z − 1), 0, 0 W60

= 0, −x(z − 1), 0
W30

= − (y − 1)z, 0, 0 W70

= 0, −(x − 1)z, 0
W40

= yz, 0, 0 W80

= 0, xz, 0 , . . .

Note: These basis functions are locally divergence free on cubes.


D. Harutyunyan
/Numerical Analysis and Computational Mechanics
10/29
University of Twente
The Netherlands

Finite elements in H(curl, Ω): Edge elements . . .


Example:
on the interface

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
11/29
University of Twente
The Netherlands

Finite elements in H(curl, Ω): Edge elements . . .


3 6
9

On an arbitrary element the basis z


10 1 8 4 11

functions are defined using covariant y 7 12


2
x
transformation
Β
Wj = (dB)−tWj0, 3
A1 6

4
C1

B1 8 D1
ζ 9 11

dB Jacobian of the transformation B η


10
A
5
12

C
1 2
ξ
B 7 D

These elements are conforming in H(curl, Ω).

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
12/29
University of Twente
The Netherlands

Finite elements in H(div, Ω): Face elements


• The basis functions are associated from the faces, they satisfy:
Z
(Fi · nj )ds = δij
fi

nj unit normal vector to the face fj .

• On the unit cube there are 6 face basis functions.


0 0
 
F1 = − 1 + x, 0, 0 F4 = 0, y, 0
F20 = x, 0, 0 F50 = 0, 0, −1 + z
 

F30 = 0, −1 + y, 0 F60 = 0, 0, z
 

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
13/29
University of Twente
The Netherlands

Finite elements in H(div, Ω): Face elements. . .

• On an arbitrary element the basis functions are defined using Piola


transformation
Fj = PK Fj0

These elements are conforming in H(div, Ω).

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
14/29
University of Twente
The Netherlands

Why Piola transformation?


• K̂ and K are two bounded domains in R3.
• BK : K̂ → K is continuously differentiable.
Define the Piola transformation via
1
v = PK v̂ = dBK v̂(BK−1)
det(dBK )

Let ŵ ∈ H(div, K̂), define w = PK ŵ, then w ∈ H(div, K) and


1 ˆ · ŵ
∇·w = ∇
det(dBK )
1
w·n= ŵ · n̂
|S|
S ∈ ∂K –is the area of the face.
• Divergence free functions remain div-free also in the physical domain.
D. Harutyunyan
/Numerical Analysis and Computational Mechanics
15/29
University of Twente
The Netherlands

Field expansion, ODE system


• Approximate the electric field E and the magnetic flux B as
PN PNf
E = j=1 ej (t)Wj ∈ H(curl, Ω) B = j=1 bj (t)Fj ∈ H(div, Ω).
• Ordinary differential equations

∂e
C = KT b
∂t
∂b
G = −Ke
∂t
where
Z Z
Cij = Wi · Wj dx, Gij = µ−1Fi · Fj dx,
ZΩ Ω

Kij = (µ−1∇ × Wi) · Fidx



D. Harutyunyan
/Numerical Analysis and Computational Mechanics
16/29
University of Twente
The Netherlands

Leap-frog Time Integration


• The magnetic field is calculated at the half time step and the electric
field is calculated at the whole time step, specifically

Gbn+1/2 = Gbn−1/2 − 4tKen


Cen+1 = Cen + 4tK T bn+1/2
• A large sparse linear system must be solved at every time step. The
matrices are s.p.d. and well conditioned. Simple iterative methods are
efficient (CG, ICCG, et al).
• The scheme is second order accurate.

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
17/29
University of Twente
The Netherlands

Conservation
• Conservation of magnetic charge [G. Rodrigue, D. White]
Z Z
∇ · B n+1/2dΩ = ∇ · B n−1/2dΩ, n = 1, 2, . . .
Ω Ω

• Conservation of electric charge [G. Rodrigue, D. White]


Z Z
∇ · E nψdΩ = ∇ · E n−1ψdΩ, n = 1, 2, . . .
Ω Ω

for all continuous piecewise linear functions ψ vanishing on the bound-


ary of Ω.

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
18/29
University of Twente
The Netherlands

Locally divergence-free Discontinuous Galerkin Finite Elements

• The basis functions are defined on the reference elements.


• They are locally divergence free, hence they save a lot of computational
cost as compared with the standard piecewise polynomial space.
• Proper numerical fluxes need to be defined on the interelement bound-
aries.
• At the final time, projection to the globally divergence free basis func-
tions is done([Cockburn, et. al.]).

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
19/29
University of Twente
The Netherlands

DG Finite Element Spaces


P p(K) space of polynomial functions of degree at most p on K
e p := {φ ∈ (L2(Ω))3 : φ|K ∈ (P p(K))3, ∀K ∈ Ih}
Σ h
Σh(divh) := {φ ∈ Σph : ∇h · φ|K = 0, ∀K ∈ Ih}
p 0

e p on each element is
• Dimension of the space Σ h

1
(p + 1)(p + 2)(p + 3)
2
• Dimension of the space Σph(divh0 ) on each element is
1
(p + 1)(p + 2)(2p + 9)
6
which is about 2/3 of the original space, hence
They are computationally cheap
D. Harutyunyan
/Numerical Analysis and Computational Mechanics
20/29
University of Twente
The Netherlands

DG Weak Formulation
p
Find Eh , Bh ∈ Σh (divh0 )
Z Z Z

Eh · ϕ dx = µ−1Bh · (∇h × ϕ) dx + (nK × µ−1BbK ) · ϕ ds,
∂t ZK KZ Z ∂K

Bh · ψ dx = − Eh · (∇h × ψ) dx − (nK × E
bK ) · ψ ds,
∂t K K ∂K
p
for all ϕ, ψ ∈ Σh (divh0 ), for all K ∈ Ih .

• The numerical fluxes E


bK and B
bK are field approximations on ∂K .

Compare with the weak form of vector FEM:


Z Z

E · V dx = (µ−1B) · (∇ × V )dx
∂t ZΩ ΩZ

B · Zdx = − (∇ × E) · Zdx
∂t Ω Ω
D. Harutyunyan
/Numerical Analysis and Computational Mechanics
21/29
University of Twente
The Netherlands

Construction of globally div-free basis functions


Consider a 2D rectangular domain. Write in each element
7   
    
X 1 hxX̄ Ȳ 0
U= uiwi = u1 + u2 + u3 + u4
0−hy Ȳ 0 1
i=1
   2
  
0 hx(12X̄ − 1) −24hxX̄ Ȳ
+ u5 +u6 +u7
X̄ −24hy X̄ Ȳ hy (12Ȳ 2 − 1)

• The functions {wi}7i=1 are orthogonal and divergence free.

• The last two terms are added to do normal jump correction.

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
22/29
University of Twente
The Netherlands

Construction of globally div-free basis functions . . .


f 3

• Restriction of U · n on
f
– f1 and f3 faces is linear in X̄ 4 f 2

– f2 and f4 faces is linear in Ȳ y

f
x

• Assume these linear functions are


– on face f1 : a1 + b1 X̄, – on face f3 : a3 + b3X̄
– on face f2 : a2 + b2Ȳ , – on face f4 : a4 + b4Ȳ

The Gauss divergence theorem implies the following constraint

(a2 − a4)hy + (a3 − a1)hx = 0.

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
23/29
University of Twente
The Netherlands

Construction of globally div-free basis functions . . .

• The following relations hold


a1 + a2 a2 − a4 a3 + a1
u1 = − 2u6hx, u2 = , u4 = − 2u7hy
2 hx 2
b2 + b4 b4 − b2 b1 + b3 b1 − b3
u3 = , u7 = , u5 = , u6 = .
2 24hx 2 24hy

• In each element choose ak , bl , k, l = 1, . . . , 4 as the degrees of freedom


but with one constraint on ak .

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
24/29
University of Twente
The Netherlands

Construction of globally div-free basis functions . . .

• Choose in which edges there are degrees of freedom for ’a’.

• The basis functions have quite global support, this reflects global nature
of the divergence–free condition.

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
25/29
University of Twente
The Netherlands

Making divergence free field


Let Bh is DG solution of Maxwell’s equations, then

∇h · Bh = 0 on each element K, but ∇ · Bh 6=0 on Ω.

• Expand Bh with globally divergence free bases


N
X
Bh = b̃j w̃j
j=1

• Apply Galerkin projection


N
X
(Bh, w̃i) = b̃j (w̃i, w̃j ), i = 1, 2, . . . , N
j=1

• The projection matrix is symmetric positive definite, hence the PCG


method can be applied.
D. Harutyunyan
/Numerical Analysis and Computational Mechanics
26/29
University of Twente
The Netherlands

Approximation results

u − the smooth exact solution (∇ · u = 0),


uh − the solution obtained by using the locally div -free bases, (∇h · uh = 0)
Ph − L2 projection operator to the globally divergence free bases, then

||u − uh|| ≤ C||u||k+1hk+1/2

||u − Phuh|| ≤ C||u||k+1hk+1

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
27/29
University of Twente
The Netherlands

NACM approach, preliminary results

• The same local basis functions.


• Construction of globally divergence free bases
– For normal jump correction add sufficient functions associated from
the faces.
– Use bubble functions to achieve divergence freedom inside element.
• Projection to the globally divergence free bases.
• Flexible for p – adaptation.

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
28/29
University of Twente
The Netherlands

Conclusion
• Vector finite elements
– The boundary conditions are satisfied in the best possible way.
– Provide the right kind of continuity for the fields (conforming ele-
ments).
– For some elements they satisfy the divergence constraint locally.
• Discontinuous Finite Elements
– Easy to do hp – adaptation.
– Locally divergence free.
– Satisfy the divergence constraints exactly.

D. Harutyunyan
/Numerical Analysis and Computational Mechanics
29/29

Das könnte Ihnen auch gefallen