(Galerkin) Finite Element Approximations

(Galerkin) Finite Element Approximations

(Galerkin) Finite element approximations The finite element method (FEM): special choice for the shape functions φ. ˜ Ne = 5 Subdivide Ω into elements Ωe: Ne Ω = Ωe e=1 [ Ω1 Ω2 Ω3 Ω4 Ω5 Ωe1 Ωe2 = x = a x = b ∩ ∅ Approximate u on each element separately by a polynomial of some degree p, for example by Lagrangian interpolation (using p + 1 nodal points per element). The end points of an element must be nodal points. Example: linear elements Global shape functions: Ne = 5 n T 1 uh(x) = uiφi(x) = φ (x)u φ3(x) i=1 ˜ ˜ X Ω1 Ω2 Ω3 Ω4 Ω5 n: number of global nodal points. x1 = ax2 x3 x4 x5 x6 = b Local element shape functions: e e e T e u (x) = u φ1(x)+u φ2(x) = φ (x)u h 1 2 ˜ φ1(x) φ2(x) ˜ 1 1 T with φ = [φ1(x), φ2(x)] and ˜ e e x x2 x x1 e e e e φ1(x) = − , φ2(x) = − x1 x2 x1 x2 xe xe xe xe 1 − 2 2 − 1 Example: quadratic elements Local element shape functions: φ1(x) φ2(x) φ3(x) 1 1 1 e e e e e e e e e x1 x2 x3 x1 x2 x3 x1 x2 x3 e e e T e uh(x) = u1φ1(x) + u2φ2(x) = φ (x)u ˜ ˜ T with φ = [φ1(x), φ2(x), φ3(x)] and ˜ (x xe)(x xe) (x xe)(x xe) φ (x) = − 2 − 3 , φ (x) = − 1 − 3 , 1 (xe xe)(xe xe) 2 (xe xe)(xe xe) 1 − 2 1 − 3 2 − 1 2 − 3 (x xe)(x xe) φ (x) = − 1 − 2 3 (xe xe)(xe xe) 3 − 1 3 − 2 Example: higher-order elements General polynomials of order p: p+1 e e T e uh(x) = ui φi(x) = φ (x)u i=1 ˜ ˜ X T with φ = [φ1, φ2, . , φp+1]. ˜ Various expansions possible: B Gauss-Lobatto integration points (includes end points) and Lagrangian interpolation (Spectral elements). B Hierarchical base functions: end points are nodes but internal shape functions have no nodes (similar to Legrende polynomials). (hp-FEM). B Legrendre polynomials in discontinuous Galerkin methods. Global numbering 4 N =3 e uh(x) T uh(x) = uiφi(x) = φ (x)u i=1 ˜ ˜ X u 2 u3 u1 u4 u1 φ1(x) u φ (x) Ω1 Ω2 Ω3 u = 2 , φ(x) = 2 u φ (x) x1 = ax2 x3 x4 = b ˜ 3 ˜ 3 u φ (x) 1 4 4 φ (x) Ne = 3 3 Ω1 Ω2 Ω3 x1 = ax2 x3 x4 = b Local numbering in elements Weak form: Find uh in Sh such that dv du ( h,A h) + v (b)h = (v , f) for all v V dx dx h b h h ∈ h Split: N N e dv du e ( h,A h) + v (b)h = (v , f) for all v V dx dx h b h h ∈ h e=1 e=1 X X Write in each element e: 2 2 e e T e e T uh(x) = ui φi(x) = φ (x)ue, vh(x) = vi φi(x) = φ (x)ve i=1 ˜ ˜ i=1 ˜ ˜ X X T e e T where ue = (u1, u2) and φ (x) = (φ1(x), φ2(x)). ˜ ˜ Element matrix and vector We get: Ne Ne T T (ve Keue) + vnhb = ve f e e=1 ˜ ¯ ˜ e=1 ˜ ˜ X X where dφ dφT dφ dφT Ke = ˜,A ˜ = ˜A ˜ dx ¯ dx dx e Ω dx dx Z e f e = (φ, f)e = φf dx ˜ ˜ ZΩe ˜ are the element matrix Ke and element vector f e. ¯ ˜ Local global (assembling) → The local vectors ue and ve are part of the global vectors: ˜ ˜ ue = P eu, ve = P ev, ˜ ¯ ˜ ˜ ¯ ˜ So we get Ne Ne Ne T T T T ˜ v Keue = v P KeP e u = v Ke u ˜e ¯ ˜ ˜ ¯ e ¯ ¯ ˜ ˜ ¯ ˜ e=1 e=1 ˜ e=1 X X Ke X ¯ Ne Ne | {z } Ne vT f = vT P T f = vT f˜ e e e e e e=1 ˜ ˜ e=1 ˜ ¯ ˜ ˜ e=1 ˜ X X f˜ X e | ˜{z } Weak form Substitution into the weak form: vT Ku = vT f for all v ˜ ¯ ˜ ˜ ˜ ˜ or Ku = f ¯ ˜ with ˜ Ne ˜ K = Ke ¯ e=1 ¯ X 0 Ne 0 f = f˜ + . e ˜ e=1 ˜ 0 X h − b Example (1) For example: u1 u2 0 1 0 0 u2 u2 = = = P 2u u3 0 0 1 0 u3 ¯ ˜ ˜ u4 P 2 ¯ 0| 0 {z } 2 2 ˜ T 1 0 K11 K12 0 1 0 0 K2 = P 2 K2P 2 = 2 2 ¯ ¯ ¯ ¯ 0 1 K21 K22 0 0 1 0 0 0 0 0 0 0 2 2 0 K11 K12 0 = 2 2 0 K21 K22 0 0 0 0 0 Example (2) Assembly of K: ¯ 1 1 K11 K12 0 0 0 0 0 0 0 0 0 0 1 1 2 2 K21 K22 0 0 0 K11 K12 0 0 0 0 0 K = + 2 2 + 3 3 ¯ 0 0 0 0 0 K21 K22 0 0 0 K11 K12 0 0 0 0 0 0 0 0 0 0 K3 K3 21 22 1 1 K11 K12 0 0 1 1 2 2 K21 K22 + K11 K12 0 = 2 2 3 3 0 K21 K22 + K11 K12 0 0 K3 K3 21 22 Similar for assembly of f. ˜ Exercise 5 The ‘bandwidth’ of K for linear shape functions is 3. How large is the bandwidth for K when using polynomial¯ shape functions of order k, k 1? ¯ ≥ Dirichlet conditions Renumber and split vector and matrix (‘u’ unknown, ‘p’ prescribed) uu vu Kuu Kup f u u = ˜ , v = ˜ ,K = ¯ ¯ , f = ˜ ˜ up ˜ vp ¯ Kpu Kpp ˜ f p ˜ ˜ ¯ ¯ ˜ Note: up prescribed values, vp = 0. Weak form ˜ ˜ ˜ vT Ku = vT f for all v ˜ ¯ ˜ ˜ ˜ ˜ with vp = 0 leads to ˜ ˜ T T vu (Kuuuu + Kupup) = vu f u for all vu ˜ ¯ ˜ ¯ ˜ ˜ ˜ ˜ or Kuuuu = f u Kupup ¯ ˜ ˜ − ¯ ˜ 1D convection-diffusion-reaction equation 1D convection-diffusion-reaction Eq.: find u(x) such that for x (a, b) ∈ ∂u ∂u ∂ ∂u + a (A ) + bu = f ∂t ∂x − ∂x ∂x and u = ua(t), at x = a, t > 0 (ΓD) du A = h (t) at x = b, t > 0 (Γ ) − dx b N Notes: B Strong form; Classical (strong) solution u(x, t) 0 2 B f(x, t) C (a, b) (continuous) then u C (a, b) (twice continuously differentiable)∈ ∈ Oldroyd-B/UCM viscoelastic model λ τ5 +τ = 2ηD where τ5= τ˙ L τ τ LT − · − · or ∂τ τ η + ~u τ L τ τ LT + = 2 D ∂t · ∇ − · − · λ λ ∂u ∂u bu f ∂t a∂x |{z} | {z } | {z } | {z } Diffusion is missing (A = 0). Dimensionless form (1) Scaling: t = tct∗ tc : characteristic time u = Uu∗ U : characteristic value solution x = Lx∗ L : characteristic length scale Dimensionless variables: (1). O 2 U ∂u∗ aU ∂u∗ AU ∂ u∗ + 2 2 + bUu∗ = f tc ∂t∗ L ∂x∗ − L ∂x∗ Relative to convection: 2 L ∂u∗ ∂u∗ 1 ∂ u∗ bL L + 2 + u∗ = f atc ∂t∗ ∂x∗ − Pe∂x∗ a aU aL Pe = : P´eclet number, convection/diffusion. A Dimensionless form (2) Time scales: L convection: B a L2 diffusion: B A 1 source: (’relaxation time’) B b B time scales in b.c. B externally or internally generated frequencies (’von Karman vortex’) We choose tc = L/a (convection) and get 2 ∂u∗ ∂u∗ 1 ∂ u∗ + 2 + b∗u∗ = f ∗ ∂t∗ ∂x∗ − Pe∂x∗ bL L with b = and f = f. Pe > 1 : convection dominated ∗ a ∗ aU Exercise 6 L2 Assume b = 0 and f = 0. We take for the typical time scale t = (diffusion c A time scale). Show that we now have the non-dimensional form 2 ∂u∗ ∂u∗ ∂ u∗ + Pe 2 = 0 ∂t∗ ∂x∗ − ∂x∗ When will this non-dimensional form be preferable over the one on the previous slide? Steady state 1D convection-diffusion-reaction equation steady state: ∂u/∂t = 0 du d du (u) = a (A ) + bu = f L dx − dx dx : linear operator, with b.c. L u = ua, at x = a (ΓD) du A = h at x = b (Γ ) − dx b N Weak form Multiply with test function v and integrate: (v, u f) = 0 for all v L − Partial integration of the diffusion term and inserting b.c. we get: Find u S such that ∈ dv du du ( ,A ) + (v, a ) + (v, bu) + v(b)h = (v, f) for all v V dx dx dx b ∈ where S and V are appropriate spaces. Galerkin FEM approximations (1) Approximation spaces Sh and Vh: n T uh(x) = uiφi(x) = φ (x)u i=1 ˜ ˜ X n T vh(x) = viφi(x) = φ (x)v i=1 ˜ ˜ X where φ(x) are global shape functions. Substituting this into the weak form gives: Find u˜ S such that h ∈ h dv du du ( h,A h) + (v , a h) + (v , bu ) + v (b)h = (v , f) for all v V dx dx h dx h h h b h h ∈ h or vT Ku = vT f for all v ˜ ¯ ˜ ˜ ˜ ˜ Galerkin FEM approximations (2) and thus Ku = f ¯ ˜ ˜ with T dφ dφ dφi dφj K = ( ˜,A ˜ ) or Kij = ( ,A ) ¯ dx dx dx dx T dφ dφj + (φ, a ˜ ) + (φi, a ) ˜ dx dx T + (φ, bφ ) + (φi, bφj) ˜ ˜ f = (φ, f) hbφ(b) fi = (φi, f) hbφi(b) ˜ ˜ − ˜ − Galerkin FEM approximations (3) Build from element matrices. For example with constant coefficients and linear element shape functions: dφ dφT 1 1 1 ( , )e = − “stiffness matrix” dx˜ dx˜ h 1 1 − dφT 1 1 1 (φ, )e = − “convection matrix” dx˜ 2 1 1 ˜ − h 2 1 (φ, φT ) = “mass matrix” e 6 1 2 ˜ ˜ where h is the element length.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    93 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us