Lecture 20

advertisement
Lecture 20
FEM and Navier-Stokes Equations: implicit method
(Lecture notes taken by Steven Burgess and Peter Gerakios)
ο‚·
Implicit method and weak equations.
We have three equations of interest, the velocity in the “x” direction (u), the velocity in the “y”
direction (v), and the incompressibility equation.
π‘’π‘˜+1 − π‘’π‘˜
2
+ (π‘’π‘˜+1 )π‘₯ + (π‘’π‘˜+1 𝑣 π‘˜+1 )𝑦 − πœ‡βˆ†π‘’π‘˜+1 + 𝑝π‘₯ π‘˜+1 = 𝑓 π‘˜+1
βˆ†π‘‘
𝑣 π‘˜+1 − 𝑣 π‘˜
2
+ (𝑣 π‘˜+1 )𝑦 + (π‘’π‘˜+1 𝑣 π‘˜+1 )π‘₯ − πœ‡βˆ†π‘£ π‘˜+1 + 𝑝𝑦 π‘˜+1 = π‘”π‘˜+1
βˆ†π‘‘
𝑒π‘₯ π‘˜+1 + 𝑣𝑦 π‘˜+1 = 0
Initial condition can be given as:
𝑒(π‘₯, 𝑦, 0) = 𝑔𝑖𝑣𝑒𝑛
𝑣(π‘₯, 𝑦, 0) = 𝑔𝑖𝑣𝑒𝑛
And the boundary conditions can be given as:
𝑒 = 𝑒1 π‘œπ‘› πœ•Ω1
𝑣 = 𝑣1 π‘œπ‘› πœ•Ω1
𝑑𝑝
= 0 π‘œπ‘› ?
𝑑𝑛
(𝑒,
⏟ 𝑣) = (0,0) π‘œπ‘› πœ•Ωwall
(π‘›π‘œπ‘› − 𝑠𝑙𝑖𝑝 π‘π‘œπ‘’π‘›π‘‘π‘Žπ‘Ÿπ‘¦ π‘π‘œπ‘›π‘‘π‘–π‘‘π‘–π‘œπ‘›)
1
Now multiply by a suitable test function φ (which equals zero on πœ•Ω) and integrate by parts to
yield:
∬(
π‘’π‘˜+1 − π‘’π‘˜
)πœ‘ − ∬(π‘’π‘˜+1 )2 πœ‘π‘₯ − ∬(π‘’π‘˜+1 𝑣 π‘˜+1 )πœ‘π‘¦ + πœ‡ ∬(𝑒π‘₯ π‘˜+1 πœ‘π‘₯ + 𝑒𝑦 π‘˜+1 πœ‘π‘¦ )
βˆ†π‘‘
− ∬ π‘π‘˜+1 πœ‘π‘₯ = ∬ 𝑓 π‘˜+1 πœ‘
∬(
𝑣 π‘˜+1 − 𝑣 π‘˜
)πœ‘ − ∬(𝑣 π‘˜+1 )2 πœ‘π‘¦ − ∬(π‘’π‘˜+1 𝑣 π‘˜+1 )πœ‘π‘₯ + πœ‡ ∬(𝑣π‘₯ π‘˜+1 πœ‘π‘₯ + 𝑣𝑦 π‘˜+1 πœ‘π‘¦ )
βˆ†π‘‘
− ∬ π‘π‘˜+1 πœ‘π‘¦ = ∬ π‘”π‘˜+1 πœ‘
− ∬(π‘’π‘˜+1 πœ‘π‘₯ + 𝑣 π‘˜+1 πœ‘π‘¦ ) = 0
Now we want to discretize the weak forms.
ο‚·
FEM with mixed shape functions.
Make the following replacements, where we will use higher order shape functions for the
velocity components (quadratic shape functions,πœ‘) and shape functions of one degree lower for
the pressure component (linear shape functions, πœ‘):
𝑒 → ∑ 𝑒𝑗 πœ‘π‘—
𝑗
𝑣 → ∑ 𝑣𝑗 πœ‘π‘—
j
πœ‘ → πœ‘π‘–
𝑝 → ∑ 𝑝𝑗 πœ‘π‘—
𝑗
2
Substituting these expressions into the weak form equations, and with some work, yields the
following matrices related to each component of the left hand side of the weak equations:
𝐡=[
1
∬ πœ‘π‘– πœ‘π‘— ]
Δt
𝐢π‘₯ (𝑒) = [∑ ∬ πœ‘π‘–π‘₯ πœ‘π‘— πœ‘π‘™ 𝑒𝑙 ]
𝑙
𝐢𝑦 (𝑣) = [∑ ∬ πœ‘π‘–π‘¦ πœ‘π‘— πœ‘π‘™ 𝑣𝑙 ]
𝑙
𝐴 = [πœ‡ ∬(πœ‘π‘–π‘₯ πœ‘π‘—π‘₯ + πœ‘π‘–π‘¦ πœ‘π‘—π‘¦ )]
𝐷π‘₯ = [∬ πœ‘π‘— πœ‘π‘–π‘₯ ]
𝐷𝑦 = [∬ πœ‘π‘— πœ‘π‘–π‘¦ ]
And we get an expression for the “u” velocity component to be:
π΅π‘’π‘˜+1 − 𝐢π‘₯ (π‘’π‘˜+1 )π‘’π‘˜+1 − 𝐢𝑦 (𝑣 π‘˜+1 )π‘’π‘˜+1 + π΄π‘’π‘˜+1 − 𝐷π‘₯ π‘π‘˜+1 = 𝑑1
Define the following:
𝛽(π‘’π‘˜+1 , 𝑣 π‘˜+1 ) ≡ 𝐡 − 𝐢π‘₯ (π‘’π‘˜+1 ) − 𝐢𝑦 (𝑣 π‘˜+1 ) + 𝐴 ,
We can write the velocity equations as follows:
𝑒 π‘’π‘žπ‘’π‘Žπ‘‘π‘–π‘œπ‘›: 𝛽(π‘’π‘˜+1 , 𝑣 π‘˜+1 )π‘’π‘˜+1 − 𝐷π‘₯ π‘π‘˜+1 = 𝑑1
𝑣 π‘’π‘žπ‘’π‘Žπ‘‘π‘–π‘œπ‘›: 𝛽(π‘’π‘˜+1 , 𝑣 π‘˜+1 )𝑣 π‘˜+1 − 𝐷𝑦 π‘π‘˜+1 = 𝑑2
3
The pressure equation requires slightly more work, but the process is the same as for the velocity
equations. The pressure equation is derived as follows:
− ∬ (π‘’π‘˜+1 πœ‘π‘₯ + 𝑣 π‘˜+1 πœ‘π‘¦ ) = 0
− ∬ ∑ 𝑒𝑗 π‘˜+1 πœ‘π‘— πœ‘π‘–π‘₯ − ∬ ∑ 𝑣𝑗 π‘˜+1 πœ‘π‘— πœ‘π‘–π‘¦ = 0
𝑗
𝑗
− ∑ ∬ πœ‘π‘— πœ‘π‘–π‘₯ 𝑒𝑗 π‘˜+1 − ∑ ∬ πœ‘π‘— πœ‘π‘–π‘¦ 𝑣𝑗 π‘˜+1 = 0
𝑗
𝑗
Or, multiply by (-1) and integrate by parts to get
𝑝 π‘’π‘žπ‘’π‘Žπ‘‘π‘–π‘œπ‘›: −𝐷π‘₯ 𝑇 π‘’π‘˜+1 − 𝐷𝑦 𝑇 𝑣 π‘˜+1 = 0
And we can now form the following “equilibrium equations”, which are nonlinear
𝛽(π‘’π‘˜+1 , 𝑣 π‘˜+1 )
0
−𝐷π‘₯ π‘’π‘˜+1
𝑑1
π‘˜+1 π‘˜+1 )
π‘˜+1
0
𝛽(𝑒
,
𝑣
−𝐷
[
] = [𝑑2 ]
𝑦 ] [𝑣
π‘˜+1
𝑇
𝑇
𝑝
0
−𝐷π‘₯
−𝐷𝑦
0
ο‚·
Equilibrium algebraic equations.
The general form of the equilibrium equations is given as follows:
[𝐴
𝐸
𝐸 𝑇 ] [π‘₯ ] = [𝑔]
𝑓
0 𝑦
Various applications of this “form” are given as, but not limited to:
𝑒
1. Flow, Navier-Stokes (π‘₯ = [ ], 𝑦 = 𝑝) and “A” is a block diagonal matrix
𝑣
2. Circuits (E is a conservation of currents at each node)
3. Structures (“A” is stiffness matrix)
4
ο‚·
Solution by block Gauss elimination method.
“A” matrix is usually square and the “E” matrix is usually a skinny rectangular matrix.
From the general form of the equilibrium equations, we have:
𝐴π‘₯ + 𝐸 𝑇 𝑦 = 𝑔
and solving for “x” yields
π‘₯ = 𝐴−1 𝑔 − 𝐴−1 𝐸 𝑇 𝑦 .
Plugging this expression for “x” into the “y” equation and simplifying yields
𝐸π‘₯ + 0𝑦 = 𝑓
𝐸(𝐴−1 𝑔 − 𝐴−1 𝐸 𝑇 𝑦) = 𝑓
𝐸𝐴−1 𝐸 𝑇 𝑦 = −𝑓 + 𝐸𝐴−1 𝑔
Where we are assuming 𝐸 𝑇 is full column rank and “A” is a symmetric and positive definite
(spd) matrix, making 𝐸𝐴−1 𝐸 𝑇 invertible.
Once “y” is obtained, solving for “x” proves to be trivial.
ο‚·
Solution by nullspace method.
Assume the following:
𝐸 = [𝑅1
𝑅2 ]
π‘Žπ‘›π‘‘
𝐸𝑁 = 0
5
We then have:
[𝑅1
𝑅2 ] [𝑅1
−1
𝐼
𝑅2 ] = 0
And “x” can be expressed in its most general form as follows:
π‘₯ = 𝑁π‘₯π‘œ + π‘₯𝑝 .
We want the following:
𝐸π‘₯ + 0 = 𝑓
𝐸(𝑁π‘₯π‘œ + π‘₯𝑝 ) = 𝑓
𝐸𝑁π‘₯
⏟ 0 + 𝐸π‘₯𝑝 = 𝑓
=0
And from the equilibrium equations,
𝐴π‘₯ + 𝐸 𝑇 𝑦 = 𝑔
𝐴(𝑁π‘₯π‘œ + π‘₯𝑝 ) + 𝐸 𝑇 𝑦 = 𝑔
𝑁 𝑇 (𝐴𝑁π‘₯π‘œ + 𝐴π‘₯𝑝 ) + 𝑁
βŸπ‘‡ 𝐸 𝑇 𝑦 = 𝑁 𝑇 𝑔
=0
𝑁 𝑇 𝐴𝑁π‘₯π‘œ + 𝑁 𝑇 𝐴π‘₯𝑝 = 𝑁 𝑇 𝑔
𝑁 𝑇 𝐴𝑁π‘₯π‘œ = 𝑁 𝑇 𝑔 − 𝑁 𝑇 𝐴π‘₯𝑝 .
Where we are assuming 𝑁 𝑇 𝐴𝑁 is invertible. Once “x” has been found, it remains to find “y”
from
EAx+EET y = Eg.
This is generally referred to as a dimension reduction scheme, with the name depending on the
particular application.
6
ο‚·
Nonlinear problems.
Example linear system:
𝐴π‘₯ = 𝑑
Example non-linear system:
𝐴(π‘₯)π‘₯ = 𝑑(π‘₯)
One can solve the non-linear system sequentially using the following iterative equation:
𝐴(π‘₯ π‘š )π‘₯ π‘š+1 = 𝑑(π‘₯ π‘š )
π‘₯ π‘š+1 = 𝐴(π‘₯ π‘š )−1 𝑑(π‘₯ π‘š ) = 𝐺(π‘₯ π‘š )
This solution technique is referred to as Picard’s iterative scheme and a special case is Newton’s
method.
One could also use Newton’s method to (in some instances) to obtain faster convergence to a
solution. Simply find where the residuals equal zero to find the solution:
𝐹(π‘₯) = 𝑑(π‘₯) − 𝐴(π‘₯)π‘₯ = 0
Faster convergence with this method is only obtained if the initial guess is close to the correct
solution.
7
Download