Professional Documents
Culture Documents
a(u, v) = b(v) ∀v ∈ W
J(u) ≤ J(w) ∀w ∈ V
where
Z Z Z
1
J(w) = |∇w|2 dx − f w dx − g2 w ds
2 Ω Ω Γ2
Z Z
α
− g3 w ds + w2 ds
Γ3 2 Γ3
Minimization problems
Lu = f in Ω, u = 0 on Γ
R
3 Positive definiteness Ω
uLu dx ≥ 0 ∀u ∈ V
Z
uLu dx = 0 ⇔ u≡0
Ω
1D example
2
∂
The operator L = − ∂x 2 is linear and symmetric:
1 1 1 1
∂2u
Z Z Z
∂u ∂v ∂u
vLu dx = − v dx = dx − v
0 0 ∂x2 0 ∂x ∂x ∂x 0
Z 1 2
1 Z 1
∂ v ∂v
= − u 2 dx + u = uLv dx
0 ∂x ∂x 0 0
∂u 2
R1 ∂u
0 ∂x dx = 0 ⇒ ∂x ≡0 ⇒ u≡0 since u(0) = 0
Minimization problems
Ac = b, A ∈ RN ×N , b ∈ RN , c = (c1 , . . . , cN )T
N
X N
X
gh = 0, uh = cj ϕj , wh = c̃j ϕj
j=1 j=1
ϕj = xj , j = 0, 1, . . . , N
1 1 1 1 · 1
1 4/3 6/4 8/5 · 2N/(N + 1)
1 6/4 9/5 12/6 · 3N/(N + 2)
A=
1 8/5 12/6 16/7 · 4N/(N + 3)
· · · · · ·
1 · · · · N 2 /(2N − 1)
This will be the case if the basis functions ϕj have compact support,
i.e., vanish outside a small patch of mesh elements
N
P
uh (x) = uj ϕj = ui−1 ϕi−1 + ui ϕi
j=1
x−xi−1
= ui−1 + xi −xi−1 (ui − ui−1 ), x ∈ ei xi 1 xi
N u1 ui 1
X uN 1 uN
uh (x) = uj ϕj (x)
j=1
0 1
uh (xi ) = ui ≈ u(xi ) x0 x1 xi 1 xi xi+1 xN 1 xN
ui+1
Poisson equation in 1D
a(u, v) = b(v) ∀v ∈ V0
The variational form (VF) is satisfied for all test functions vh ∈ {ϕi }
a(uh , ϕi ) = b(ϕi ), ∀i = 1, . . . , N
Variational formulation
a(u, v) = b(v) ∀v ∈ V0
Galerkin discretization
a(uh , ϕi ) = b(ϕi ), i = 1, . . . , N
Linear algebraic system
N
P
Substitution of uh = uj ϕj into the bilinear form yields
j=1
N
X N
X
a(uh , ϕi ) = a uj ϕj , ϕi = a (ϕj , ϕi ) uj
j=1 j=1
Variational formulation
Z 1 2
∂ u
− 2 − f v dx = 0, v(0) = 0
0 ∂x
1 1 1
∂2u
Z Z
∂u ∂v ∂u
Integration by parts − v dx = dx − v
0 ∂x2 0 ∂x ∂x ∂x 0
Poisson equation in 1D
Z 1 Z 1
∂ϕi ∂ϕj
Au = b, aij = dx, bi = f ϕi dx
0 ∂x ∂x 0
Poisson equation in 2D
Variational formulation u ∈ Vg
Z
[−∆u − f ]v dx = 0 ∀v ∈ V0
Ω
Vg = {v ∈ V : v|Γ1 = g1 }, V0 = {v ∈ V : v|Γ1 = 0}
Poisson equation in 2D
Integration by parts
Z Z Z
∇u · ∇v dx − (n · ∇u)v ds = f v dx
Ω Γ Ω
Z Z Z Z
(n · ∇u)v ds = g2 v ds + g3 v ds − α uv ds
Γ Γ2 Γ3 Γ3
Poisson equation in 2D
ϕi
Piecewise-linear approximation
ϕi (x, y) = ci1 + ci2 x + ci3 y
(x, y) ∈ ek , i = 1, 2, 3
xi
1 if i = j
ϕj (xi , yi ) = δij =
0 6 j
if i =
The matrix of the linear system is sparse and has a band structure
which depends on the numbering of nodes
R N
|∇uh |2 dx + α
R
u2h ds,
P
= Ω Γ3
uh = uj ϕj
j=1
vh = ũh − uh = (ũh − u) + (u − uh )
Error analysis
Variational formulation
Z 1
∂u ∂ 2 u
Pe − v dx = 0, v(0) = v(1) = 0
0 ∂x ∂x2
1 1 1
∂2u
Z Z
∂u ∂v ∂u
Integration by parts − v dx = dx − v
0 ∂x2 0 ∂x ∂x ∂x 0
Convection-diffusion in 1D
Z 1
∂ϕj ∂ϕi
aij = P e ϕi + dx, bN −1 = −aN −1,N
0 ∂x ∂x
Convection-diffusion in 1D
∂u ∂2u P e ∆x
Pe − (1 + τ ) 2 = 0, τ =α
∂x ∂x 2
is given by
1+α 1−α
ui−1 −2ui +ui+1
Pe 2 (ui − ui−1 ) + 2 (ui+1 − ui ) − ∆x =0
v⊗v vi vj |v|h
D=τ , dij = τ = dji , τ =α
|v|2 |v|2 2
Variational formulation u ∈ Vg
Z
− (vu − d∇u − D∇u) · ∇w dx = 0 ∀w ∈ V0
Ω
Stabilization in 2D
Stabilization term
(v · ∇u)(v · ∇w) |v|h
Z Z
(D∇u) · ∇w dx = τ dx, τ =α
Ω Ω |v|2 2