Project 4 Inhomogeneous Dirichlet and Robin Boundary ... · Vinh Ma and Markus Wol Project 4...
Transcript of Project 4 Inhomogeneous Dirichlet and Robin Boundary ... · Vinh Ma and Markus Wol Project 4...
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Project 4 Inhomogeneous Dirichlet and RobinBoundary Conditions
Vinh Ma and Markus Wolff
July 10, 2014
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Contents
1 Linear FEM for BVPs with inhomogeneous Dirichlet bc’sDirichlet lift ansatzLagrange ansatz
2 Linear FEM for BVPs with Robin bc’s
3 Heater exampleDirichlet lift ansatzLagrange ansatz
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Model problem
Find u ∈ C 2(Ω) ∩ C (Ω), such that
−∇ · a∇u + cu = f in Ω
u = g on ∂Ω
with
constants a > 0, c ≥ 0,
Lipschitz domain Ω ⊂ R2 with boundary ∂Ω,
sufficiently smooth functions f and g .
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Dirichlet lift ansatz
Idea: Assume u = u0 + ug with ug |∂Ω = g .
Only need to solve for u0 if ug is known.
⇒ BVP with homogeneous Dirichlet bc’s, since u0|∂Ω = 0.
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Variational formulation
−∇ · a∇(u0 + ug ) + c(u0 + ug ) = f in Ω
u0 = 0 on ∂Ω
Testing with v ∈ H10 (Ω), integrating and applying Green’s formula
leads to:
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Variational formulation
Find u0 ∈ H10 (Ω), such that
∫Ωa∇u0∇v + cu0v dx =
∫Ωfv − a∇ug∇v − cugv dx
for all v ∈ H10 (Ω).
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Implementation
Discretize Ω by choosing an appropriate mesh M with nodesx1, . . . , xN .
Let ϕ1, . . . , ϕN denote the basis of hat functions for the FEsubspace of H1(Ω).
Let k1, . . . , kL ⊆ 1, . . . ,N denote the indices of theboundary nodes of the discretized domain, i.e.xk1 , . . . , xkL ∈ ∂Ω.
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Implementation
Approximate solution by
u0 ≈∑
i∈1,...,N\k1,...,kL u0,iϕi
with u0,i ∈ R.
Choose ug ∈ H1(Ω) such that
ug (xi ) = g(xi ) if i ∈ k1, . . . , kLug (xi ) = 0 else,
i.e.
ug =L∑
i=1
g(xki )ϕki .
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Implementation
Compute the stiffness matrix K , mass matrix M and the loadvector f (for solution and test functions in H1(Ω)) by
Kij =
∫Ω∇ϕi∇ϕj dx
Mij =
∫Ωϕi ϕj dx
fi =
∫Ωf ϕi dx
for i , j = 1, . . . ,N.
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Implementation
Compute Ku0 ,Mu0 ∈ R(N−L)×(N−L) by deleting the i-th rowand column in K and M, resp., for all i ∈ k1, . . . , kL(i.e. omit all hat functions which are not in H1
0 (Ω)).
Compute f ∈ RN−L by deleting the i-th entry of the vector
f − (aK + cM)ug
for all i ∈ k1, . . . , kL, whereby ug ∈ RN is given by
(ug )j =
g(xj) for j ∈ k1, . . . , kL0 for j ∈ 1, . . . ,N\k1, . . . , kL.
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Implementation
Solve the linear system
(aKu0 + cMu0)u0 = f
to get u0 ∈ RN−L, which approximates the solution of theafore-mentioned BVP with homogeneous Dirichlet bc’s at allinner nodes.
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Lagrange ansatz
Idea: Test with v ∈ H1(Ω) instead of v ∈ H10 (Ω).
Substitute ∇u · n =: λ ∈ H−1/2(∂Ω) in the arising boundaryintegral.
Test the bc’s with µ ∈ H−1/2(∂Ω).
H−1/2(∂Ω) ⊃ L2(δΩ) is the space of the Neumann trace.
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Variational formulation
Find u ∈ H1(Ω), such that
∫Ωa∇u∇v + cuv dx −
∫∂Ω
a∇u · n v ds =
∫Ωfv dx∫
∂Ωuµ ds =
∫∂Ω
gµ ds
for all v ∈ H1(Ω), for all µ ∈ H−1/2(∂Ω).
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Variational formulation
Find u ∈ H1(Ω), such that
∫Ωa∇u∇v + cuv dx −
∫∂Ω
a∇u · n︸ ︷︷ ︸=:λ
v ds =
∫Ωfv dx∫
∂Ωuµ ds =
∫∂Ω
gµ ds
for all v ∈ H1(Ω), for all µ ∈ H−1/2(∂Ω).
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Variational formulation
Find u ∈ H1(Ω), λ ∈ H−1/2(∂Ω) such that
∫Ωa∇u∇v + cuv dx −
∫∂Ω
aλv ds =
∫Ωfv dx∫
∂Ωuµ ds =
∫∂Ω
gµ ds
for all v ∈ H1(Ω), for all µ ∈ H−1/2(∂Ω).
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Implementation
Discretize Ω by choosing an appropriate mesh M with nodesx1, . . . , xN .
Let ϕ1, . . . , ϕN denote the basis of hat functions for the FEspace u ∈ H1(Ω).
Let ψ1, . . . , ψL denote the basis of piecewise constantfunctions for the FE subspace of H−1/2(∂Ω).
Approximate solution by
u ≈N∑i=1
uiϕi and λ ≈L∑
i=1
λiψi
with [u1, . . . , uN ] ∈ RN and [λ1, . . . , λL] ∈ RL.
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Implementation
Two choices possible for the piecewise constant basis functions ψi :
1 Choice 1: Constant and support on each boundary edge.⇒ Can lead to a singular linear system, if the number ofboundary nodes L is even.
2 Choice 2: Constant around each boundary node with supportbetween the midpoints of the adjacent edges.
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Implementation
Let k1, . . . , kL ⊆ 1, . . . ,N denote the indices of theboundary nodes of the discretized domain, i.e.xk1 , . . . , xkL ∈ ∂Ω.
Compute M0 ∈ RL×N by
(M0)ikj =
∫∂Ωϕki ψj ds
for i , j = 1, . . . , L.
Compute g ∈ RL by
gi =
∫∂Ω
g ψi ds
for i = 1, . . . , L.
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Implementation
Let K and M be the stiffness and mass matrix, resp., and fthe load vector as above.
Solve the linear system[aK + cM −MT
0
M0 0
] [uλ
]=
[fg
].
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Example
Let the BVP’s solution be u = cos(2πx) cos(2πy).
00.2
0.40.6
0.81
0
0.2
0.4
0.6
0.8
1−1
−0.5
0
0.5
1
exact solution: cos(2πx)⋅cos(2πy)
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Example
Dirichlet lift ansatz: Absolute error.
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Example
Lagrange ansatz: Absolute error using choice 1 (singular matrix).
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Example
Lagrange ansatz: Absolute error using choice 2.
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Comparison
Dirichlet lift ansatz Lagrange ansatzlargest error ≈ 0.03 ≈ 0.03error on boundary no yessize of the LS N-L N+L
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Linear FEM for BVPs with Robin bc’s – Model problem
Find u ∈ C 2(Ω) ∩ C (Ω), such that
−∇ · a∇u + cu = f in Ω
∇u · n + βu = g on ∂Ω
with
constants a > 0, c ≥ 0, β > 0,
Lipschitz domain Ω ⊂ R2 with boundary ∂Ω,
sufficiently smooth functions f and g .
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Variational formulation
Find u ∈ H1(Ω), such that
∫Ωa∇u∇v + cuv dx −
∫∂Ω
a∇u · n v ds =
∫Ωfv dx
for all v ∈ H1(Ω).
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Variational formulation
Find u ∈ H1(Ω), such that
∫Ωa∇u∇v + cuv dx −
∫∂Ω
a∇u · n︸ ︷︷ ︸g−βu
v ds =
∫Ωfv dx .
for all v ∈ H1(Ω).
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Variational formulation
Find u ∈ H1(Ω), such that
∫Ωa∇u∇v + cuv dx +
∫∂Ω
aβuv ds =
∫Ωfv dx +
∫∂Ω
gv ds
for all v ∈ H1(Ω).
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Implementation
Let k1, . . . , kL ⊆ 1, . . . ,N denote the indices of theboundary nodes of the discretized domain, i.e.xk1 , . . . , xkL ∈ ∂Ω.
Compute M∂Ω ∈ RN×N by
(M∂Ω)kikj =
∫∂Ωϕki ϕkj ds
for i , j = 1, . . . , L and set all other entries to be zero.
Compute g ∈ RN by
gki =
∫∂Ω
g ϕki ds
for i = 1, . . . , L and set all other entries to be zero.
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Implementation
Let K and M be the stiffness and mass matrix, resp., and fthe load vector as usual (i.e. in Ω).
Solve the linear system
(aK + cM + aβM∂Ω)u = f + g .
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Example
Let the BVP’s solution be u = cos(2πx) cos(2πy).
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Example
Absolute error of the numerical solution:
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Heater example
Find u ∈ C 2(Ω) ∩ C (Ω), such that
−κ∆u = 0 in Ω (2D cross section of room)
u = uH on ΓH ⊆ ∂Ω (heater)
u = uW on ΓW ⊆ ∂Ω (window)
κ∇u · n + βu = 0 on ΓR ⊆ ∂Ω (ceiling and walls)
∇u · n = 0 on ΓF ⊆ ∂Ω (floor)
with κ, β > 0.
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Dirichlet lift ansatz
Suppose u = u0 + uH + uW with
u0 ∈ H1ΓH∪ΓW ,0
(Ω),
uH |ΓH= uH and uH |∂Ω\ΓH
= 0 known,
uW |ΓW= uW and uW |∂Ω\ΓW
= 0 known.
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Variational formulation
−κ∆(u0 + uH + uW ) = f in Ω
u0 = 0 on ΓH
u0 = 0 on ΓW
κ∇u · n + βu0 = 0 on ΓR
∇u · n = 0 on ΓF
Testing the first equation with v ∈ H1ΓH∪ΓW ,0
(Ω), integrating andapplying Green’s formula leads to:
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Variational formulation
∫Ωκ∇u0∇v dx −
∫ΓR∪ΓF
κ∇u · n v ds = −∫
Ωκ∇(uH + uW )∇v dx
whereby
∫ΓR∪ΓF
κ∇u · n v ds =
∫ΓR
κ∇u · n v ds +
∫ΓF
κ∇u · n v ds.
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Variational formulation
∫Ωκ∇u0∇v dx −
∫ΓR∪ΓF
κ∇u · n v ds = −∫
Ωκ∇(uH + uW )∇v dx
whereby
∫ΓR∪ΓF
κ∇u · n v ds =
∫ΓR
κ∇u · n︸ ︷︷ ︸=−βu
v ds +
∫ΓF
κ∇u · n︸ ︷︷ ︸=0
v ds
.
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Variational formulation
∫Ωκ∇u0∇v dx −
∫ΓR∪ΓF
κ∇u · n v ds = −∫
Ωκ∇(uH + uW )∇v dx
whereby
∫ΓR∪ΓF
κ∇u · n v ds = −∫
ΓR
βuv ds.
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Variational formulation
Find u0 ∈ H1ΓH∪ΓW ,0
(Ω), such that
∫Ωκ∇u0∇v dx +
∫ΓR
βuv ds = −∫
Ωκ∇(uH + uW )∇v dx
for all v ∈ H1ΓH∪ΓW ,0
(Ω).
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Implementation
Analogously to the cases above.
Need stiffness and mass matrix K and M.
Restrict the matrix M∂Ω to the boundary nodes in ΓR , i.e. setall rows and columns not corresponding to nodes in ΓR to 0.
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Lagrange ansatz
Test with v ∈ H1(Ω) instead of v ∈ H1ΓH∪ΓR ,0
(Ω).
Use two multipliers λH ∈ H−1/2(ΓH), λW ∈ H−1/2(ΓW ) nowfor substitution of ∇u · n.Test the two inhomogeneous Dirichlet bc’s withµH ∈ H−1/2(ΓH), µW ∈ H−1/2(ΓW ).
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Variational formulation
∫Ωκ∇(u)∇v dx =
∫∂Ωκ∇u · n v ds
=
∫ΓH
κ∇u · n v ds +
∫ΓW
κ∇u · n v ds
+
∫ΓR
κ∇u · n v ds +
∫ΓF
κ∇u · n v ds
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Variational formulation
∫Ωκ∇u∇v dx =
∫∂Ωκ∇u · n v ds
=
∫ΓH
κ∇u · n︸ ︷︷ ︸λH
v ds +
∫ΓW
κ∇u · n︸ ︷︷ ︸λW
v ds
+
∫ΓR
κ∇u · n︸ ︷︷ ︸−βu
v ds +
∫ΓF
κ∇u · n︸ ︷︷ ︸=0
v ds
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Variational formulation
Find u ∈ H1(Ω), λH ∈ H−1/2(ΓH), λW ∈ H−1/2(ΓW ), such that
∫Ωκ∇u∇v dx +
∫ΓR
βuv ds =
∫ΓH
κλHv ds +
∫ΓW
κλW v ds∫ΓH
uµH ds =
∫ΓH
uHµH ds∫ΓW
uµW ds =
∫ΓW
uWµW ds
for all v ∈ H1(Ω), µH ∈ H−1/2(ΓH), µW ∈ H−1/2(ΓW ).
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Implementation
Analogously to the cases above.
Need stiffness and mass matrix K and M.
Need restriction of M∂Ω to boundary nodes in ΓR from before.
Restrict the matrix M0 to the boundary nodes in ΓH , ΓW ,i.e.delete all rows of M0, which correspond to nodes not lying inΓH , ΓW .
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Dirichlet lift ansatz with β/κ = 0.1:
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Lagrange ansatz with β/κ = 0.1:
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Absolute difference between the two solutions:
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Dirichlet lift ansatz with β/κ = 0.1:
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Dirichlet lift ansatz with β/κ = 0.01:
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Dirichlet lift ansatz with β/κ = 0.5:
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Dirichlet lift ansatz with β/κ = 1:
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Dirichlet lift ansatz with β/κ = 10:
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Dirichlet lift ansatz with β/κ = 0.1, heater at position x = 0:
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Heater at position x = 0.1:
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
0.2
0.4
0.6
0.8
1 heater position = 0.1, ||u||2 = 15.5176
−10
−5
0
5
10
15
20
25
30
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Heater at position x = 0.2:
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
0.2
0.4
0.6
0.8
1 heater position = 0.2, ||u||2 = 16.8467
−10
−5
0
5
10
15
20
25
30
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Heater at position x = 0.3:
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
0.2
0.4
0.6
0.8
1 heater position = 0.3, ||u||2 = 17.7737
−10
−5
0
5
10
15
20
25
30
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Heater at position x = 0.4:
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
0.2
0.4
0.6
0.8
1 heater position = 0.4, ||u||2 = 18.4118
−10
−5
0
5
10
15
20
25
30
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Heater at position x = 0.5:
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
0.2
0.4
0.6
0.8
1 heater position = 0.5, ||u||2 = 18.7971
−10
−5
0
5
10
15
20
25
30
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Heater at position x = 0.6:
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
0.2
0.4
0.6
0.8
1 heater position = 0.6, ||u||2 = 19.1724
−10
−5
0
5
10
15
20
25
30
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Heater at position x = 0.7:
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
0.2
0.4
0.6
0.8
1 heater position = 0.7, ||u||2 = 19.3869
−10
−5
0
5
10
15
20
25
30
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Heater at position x = 0.8:
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
0.2
0.4
0.6
0.8
1 heater position = 0.8, ||u||2 = 19.492
−10
−5
0
5
10
15
20
25
30
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Heater at position x = 0.9:
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
0.2
0.4
0.6
0.8
1 heater position = 0.9, ||u||2 = 19.5157
−10
−5
0
5
10
15
20
25
30
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Heater at position x = 1:
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
0.2
0.4
0.6
0.8
1 heater position = 1, ||u||2 = 19.4654
−10
−5
0
5
10
15
20
25
30
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Heater at position x = 1.4:
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
0.2
0.4
0.6
0.8
1 heater position = 1.4, ||u||2 = 18.8649
−10
−5
0
5
10
15
20
25
30
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Heater at position x = 1.8:
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
0.2
0.4
0.6
0.8
1 heater position = 1.8, ||u||2 = 17.4746
−10
−5
0
5
10
15
20
25
30
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Numerical results
Heater at position x = 1.975:
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions
Linear FEM for BVPs with inhomogeneous Dirichlet bc’sLinear FEM for BVPs with Robin bc’s
Heater example
Dirichlet lift ansatzLagrange ansatz
Thank you for yourattention!
Vinh Ma and Markus Wolff Project 4 Inhomogeneous Dirichlet and Robin Boundary Conditions