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