aerospace engineering seminar series
DESCRIPTION
My presentation for the aerospace engineering seminar series on my work with high order finite elements for Lagrangian computational fluid dynamicsTRANSCRIPT
High Order Finite Elements for LagrangianComputational Fluid Dynamics
Truman E. EllisAdvisor: Dr. Faisal Kolkailah
LLNL Mentors: Dr. Robert Rieben and Dr. Tzanio Kolev
Department of Aerospace EngineeringCalifornia Polytechnic State University
San Luis Obispo, CA
November 18, 2009
This work performed under the auspicesof the U.S. Department of Energy by
Lawrence Livermore National Laboratoryunder Contract DE-AC52-07NA27344
LLNL-PRES-416883, -416822
Powered by LATEX
Introduction
We are developing advanced finite elementdiscretization methods for Lagrangianhydrodynamics.Our goal is to improve the currentstaggered grid hydro (SGH) algorithms inmulti-material ALE codes with respect to:
symmetry preservationenergy conservationartificial viscosity discretizationhourglass-mode instabilities
We consider a general framework forsolving the Euler equations with thefollowing features:
allows for high order field representationsallows for curved element geometryexact energy conservation by constructionreduces to classical SGH under simplifying assumptions
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 2 / 27
Glossary
We consider several different hydro methods which make use of various finite element spaces.The specific finite element spaces considered in this talk are:
Q0: constant function on quadrilaterals
Q1: continuous bi linear functions on quadrilaterals
Q2: continuous bi-quadratic functions on quadrilaterals
Q1d: discontinuous bi-linear functions on quadrilaterals
Q2d: discontinuous bi-quadratic function on quadrilaterals
Each hydro method is designated by a pair of finite element spaces:
A continuous kinematic space
A discontinuous thermodynamic space
For example: Q2-Q1d uses continuous quadratic velocities and positions with discontinuous bi-linear pressures and densities.
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 3 / 27
Euler Equations in a Lagrangian Frame
The Euler equations of gas dynamics in a Lagrangianreference frame can be written in differential form as:
Momentum Conservation: ρ∂v∂ t
=−~∇p+ ...
Mass Conservation:1ρ
∂ρ
∂ t=−~∇ ·~v
Energy Conservation: ρ∂e∂ t
=−p~∇ ·~v+ ...
Equation of State: p = EOS(e,ρ)
Typically, these equations aresolved on a staggered spatial grid[1,2] where thermodynamicvariables are approximated aspiece-wise constants defined onzone centers and kinematicvariables are defined on thenodes.
Spatial gradients are computedusing finite volume and/or finitedifference methods:
[1] R. Tipton, CALE Lagrange Step, unpublished LLNL report, 1990[2] M. Wilkins, Calculations of Elastic-Plastic Flow, In Methods of Computational Physics, 1964
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 4 / 27
Semi-Discrete Finite Element Approximation: Computational Mesh
We propose a general semi-discrete FEM approach to solving the Euler equations in a Lagrangianframe. A semi-discrete method is only concerned with the spatial approximation of the continuumequations.
To begin, we decompose the continuum domain at an initial time into a set of non-overlappingdiscrete volumes (zones). The union of these volumes forms the computational mesh:
Ω(t0)
−→
Ω(t0) = ∪ZΩZ(t0)
The motion of the continuous medium will therefore be described by the motion of only a finitenumber of particles (mesh vertices, edge midpoints, etc )
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 5 / 27
Semi-Discrete Finite Element Approximation: Lagrangian Mesh MotionAfter deformation in time, zones are reconstructed based onparticle locations, thus defining the moved mesh.
Q1 (Bi-Linear) Approximation Q2 (Bi-Quadratic)Approximation
This reconstruction processhas an inherent geometricerror.
Initial Cartesian meshdeformed with the exactsolution of the Sedov blastwave problem.
This built in geometric error motivates the use of (higher order) finite elements which can use theadditional particle degrees of freedom to more accurately represent continuous deformations.
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 6 / 27
Lagrangian Mesh Motion: Animation
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 7 / 27
Semi-Discrete Finite Element Approximation: Curved Geometries
Finite element basis functions are defined on a reference (unit) zone. To compute quantities on anarbitrary mesh zone, we use the Jacobian matrix which defines the geometric transformation (ormapping) from reference space:
Reference Space:
φ(~x)
~∇φ(~x)
Physical Space:
φ(~x) = φ(Φ−1(~x))
~∇φ = J−1Z
~∇φ
A standard Q1 mapping gives zones with straight edges, while Q2 mappings produce curved zones.Note that we can have Q1 elements defined with a Q2 mapping and vice versa. The finite elementreference degrees of freedom are in general different from the nodes of the mapping.
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 8 / 27
Semi-Discrete Finite Element Approximation: Basis Functions
We approximate each of the continuum fields with a basis function expansion, where theexpansion coefficients are independent of space:
Velocity:~v(~x, t)≈Nv
∑i
vi(t)wi(~x)
Internal Energy: e(~x, t)≈Ne
∑i
ei(t)θi(~x)
Pressure: p(~x, t)≈Np
∑i
pi(t)φi(~x)
Density: ρ(~x, t)≈Nρ
∑i
ρi(t)ψi(~x)
Our formulation is general; we are free to choose various types of basis functions. However,stability requires that certain choices are not independent[1] (e.g. pressure and velocity.)
Q1 (Bi-Linear) basis function4 DOF per Quad
Q2 (Bi-Quadratic) basis function9 DOF per Quad
Q2 basis function with degrees offreedom at the 9
Gauss-Legendre quadraturepoints
[1] See for example: D. Arnold et. al., Differential Complexes and stability of Finite Element Methods, 2005.
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 9 / 27
Semi-Discrete Momentum Conservation
To derive a semi-discrete momentum conservation law, we begin with a variational formulation:
ρd~vdt
=−~∇p =⇒∫
Ω(t)
(ρ
d~vdt
)· ~w′ =
∫Ω(t)
(~∇p) · ~w′ =∫
Ω(t)p(~∇ · ~w′)−
∫∂ Ω(t)
p(~w′ · n)
Multiply by vector valued testfunction, integrate over
computational mesh
Perform integrationby parts
Inserting our basis function expansions and applying Galerkins method by picking the velocitybasis as the test function yields the following linear system of equations:
∫Ω(t)
(ρ ∑
i
dvi
dt~wi
)·~wj =
∫Ω(t)
∑i
piφi(~∇ ·~wj)Write in matrix / vector form−→ M
dvdt
= DTp
The Mass and Derivative matrices are computed zone by zone and assembled to form globalsystems:
(Mz)ij =∫
Ω(t) ρ(~wi · ~wj)
The symmetric positive definite mass matrixdescribes how matter is distributed in space
(Dz)ij =∫
Ω(t) φi(~∇ · ~wj)
The rectangular derivative matrix mapsbetween pressure and velocity spaces. This
matrix is a discrete version of the Div operator.Its adjoint (transpose) is the Grad operator
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 10 / 27
Computing Mass and Derivative Matrices
In practice, we compute the mass and derivative matrices by integrating over the reference volumeusing a change of variables: ∫
Ω(t)f =
∫Ω(t)
(f Φ)|Jz|
The integrals are computed using Gaussian quadrature of a specified order. For certain integrandsand quadrature rules, this can be computed exactly:
∫Ω(t)
(f Φ)|Jz| ≈Nq
∑n=1
αn f Φ)|Jz|~x=~qn
2D Order 1 Gauss-Legendrerule (exact for Q1)
2D Order 2 Gauss-Legendrerule (exact for Q3)
2D Order 3 Gauss-Legendrerule (exact for Q5)
2D Order 4 Gauss-Legendrerule (exact for Q7)
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 11 / 27
Semi-Discrete Mass Conservation
We define the zonal mass moments in a natural manner: mz,i =∫
Ωz(t)
ρψi
The Lagrangian description requires that:dmz,i
dt= 0
From the representation: ρ(~x, t)≈∑i
ρi(t)ψi(~x) it follows that: mz,i = ∑j
ρz,j
∫Ωz(t)
ψiψj
In matrix form we have: mz = Mρz ρz where (Mρ
z )i,j =∫
Ωz(t)
ψiψj
If we impose the stronger condition:ddt
∫Ω(t)
ρψ = 0 for any function ψ
then we obtain the strong mass conservation principle:
ρ(t)|J(t)|= ρ(t0)|J(t0)|
Note that, in general, the density defined by the above equation is not polynomial.
Note that both generalizations imply the standard zonal mass conservation
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 12 / 27
Mixed Finite Elements
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 13 / 27
High Order Methods Using the Q2 Basis
For each Q2 zone, we track 9independent vertices(coordinates, velocities,accelerations etc ) which definethe quadratic mapping fromreference space to physicalspace. This mapping is definedusing the Q2 Jacobian matrix,which is a function:
Jmat=[(-4*(y - 1)*(2*y - 1)*(2*x - 1)*X5 +
(y - 1)*(2*y - 1)*(4*x - 3)*X1 + (y- 1)*(2*y
- 1)*(4*x - 1)*X2 + 16*(y - 1)*(2*x - 1)*X9*y
- 4*(y - 1)*(4*x- 3)*X8*y - 4*(y - 1)*(4*x -
1)*X6*y - 4*(2*y - 1)*(2*x - 1)*X7*y + (2*y-
1)*(4*x - 3)*X4*y + (2*y - 1)*(4*x -
1)*X3*y); (-4*(2*y - 1)*(x - 1)*(2*x - 1)*X8
+ 16*(2*y - 1)*(x - 1)*X9*x - 4*(2*y -1)*(2*x
- 1)*X6*x + (4*y - 3)*(x - 1)*(2*x - 1)*X1 -
4*(4*y - 3)*(x -1)*X5*x + (4*y - 3)*(2*x -
1)*X2*x + (4*y - 1)*(x - 1)*(2*x - 1)*X4
-4*(4*y - 1)*(x - 1)*X7*x + (4*y - 1)*(2*x -
1)*X3*x)];
Points in reference space
Basis function in reference space
Points in physical space
Basis function in physical space
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 14 / 27
High Order Methods Using the Q2 Basis
For each zone in the computational mesh, we compute the following matrices usingGauss-Legendre quadrature of a specified order.:
The symmetric positive definite 9 by 9 massmatrix describes how matter is distributedwithin the Q2 zone
(Mz)i,j ≡∫
Ωzρz(wiwj)|Jz|
The rectangular derivative matrix mapsbetween the pressure and velocity spaces.This matrix is a discrete version of the Divoperator. Its adjoint (transpose) is the Gradoperator
(Dxz)i,j ≡
∫Ωz
φi(J−1z
~∇wj) · 1,0|Jz|
(Dyz)i,j ≡
∫Ωz
φi(J−1z
~∇wj) · 0,1|Jz|
The symmetric positive definite 9 by 9 stiffnessmatrix is a discrete version of the second orderDivGrad operator. It is used to compute theartificial viscosity
(Sz)i,j ≡∫
Ωzµz(J−1
z~∇wi)(J−1
z~∇wj)|Jz|
The bulk of the computational effort is in computing the high order Jacobian matrix. However, thiscan be computed once per DOF and shared between each matrix.
For the remaining examples, we apply mass lumping to the mass matrix to eliminate the need fora global linear solve. In addition, we compute the mass matrix only once as an initial condition.
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 15 / 27
Static Momentum Equation Solve Convergence Study
In this simple test, we project an analytic pressure functiononto a randomly perturbed mesh and solve for theresulting accelerations:
p(x,y) = cos(π
2x)cos(
π
2y)
ma =−∇p
Ma =−DT p
Randomly perturbed base line mesh and a sequence ofrefinements
Lumped mass matrix
Full linear solve
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 16 / 27
1D Sod Shock Tube: Velocity and Density
We consider two meshes: A coarse 60 zone mesh and fine 120 zone mesh
For each method, qlin = qquad = 1.0, no monotonic limiter is used
We acknowledge this is sub-standard for Q1 (i.e. limiters make a difference); however, this afair comparison between each method
For each zone, 5 plot points are evaluated
Each method captures contact discontinuity exactly due to discontinuous thermodynamicbasis
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 17 / 27
1D Sod Shock Tube: Velocity and Density (Zoomed View)
We consider two meshes: A coarse 60 zone mesh and fine 120 zone mesh
For each method, qlin = qquad = 1.0, no monotonic limiter is used
We acknowledge this is sub-standard for Q1 (i.e. limiters make a difference); however, this afair comparison between each method
For each zone, 5 plot points are evaluated
Each method captures contact discontinuity exactly due to discontinuous thermodynamicbasis
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 18 / 27
Sedov Blast Problem, 20 by 20 Mesh: Q1-Q0 FEM
Standard HG filterrequired
Shock is not wellresolved on thiscoarse mesh
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 19 / 27
Sedov Blast Problem, 20 by 20 Mesh: Q2-Q1d FEM
No HG filter used
Curved elements
81 plot points used per cell
Shock front is much sharperon the same mesh
Zone at origin has incorrectdeformation
Velocity oscillations areobserved in post shock region
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 20 / 27
Sedov Blast Problem, 20 by 20 Mesh: Q2-Q1d FEM
No HG filter used
81 plot points used per cell
Allowing 25% of the linear-qterm in expansion has asignificant benefit
Velocity oscillations in postshock region are eliminated
Curved deformation of zonesclosely resembles exactdeformation
We have not taken full benefitof the high order informationin each cell to compute theviscosity coefficient, this is anarea we plan to investigatemuch further
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 21 / 27
Sedov Blast Problem, 20 by 20 Mesh Comparison
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 22 / 27
Noh Implosion Problem, 30 by 30 Mesh: Q1-Q0 FEM
Standard HG filterrequired
Shock is not wellresolved on thiscoarse mesh
No overshoots orundershoots areobserved
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 23 / 27
Noh Implosion Problem, 30 by 30 Mesh: Q2-Q1d FEM
No HG filter used
36 plot points per zone
Shock is more sharplyresolved
Wall heating is diminished
Post shock density is closerto correct value
Strong undershoots andovershoots in the density areobserved in the single layer ofzones at shock front
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 24 / 27
Noh Implosion Problem, 30 by 30 Mesh: Q2-Q2d FEM
No HG filter used
36 plot points per zone
Shock is more sharplyresolved
Wall heating is diminished
Post shock density is closerto correct value
Under shoots in densitydiminished, but overshootspersist
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 25 / 27
Conclusions
We have developed a general FEM framework for Lagrangian CFD
Kinematic and thermodynamic space can be chosen independentlyFor triangles:
Linear, quadratic, cubic, etc. kinematic spaceConstant, linear, quadratic, etc. thermodynamic space
For quads:Bi-linear, bi-quadratic, bi-cubic, etc. kinematic spaceConstant, bi-linear, bi-quadratic, etc. thermodynamic space
This allows us to experiment with many different finite element pairs
We have also demonstrated that high order Lagrangian methods have significant promise
Permits curved elements
Increased accuracy
Sharper shocks
Density/pressure gradients in a single cell
Second derivatives of velocity in a single cell
Potential improvements for sub-zonal physics / multi-material ALE
Post shock ringing is still an issue and we plan to address this by improving the artificialviscosity coefficient (e.g. the Hyper Viscosity technique of Cook and Cabot)
Truman Ellis (Cal Poly) High Order Finite Elements for Lagrangian CFD November 2009 26 / 27