16
AMS 691 Special Topics in Applied Mathematics Lecture 8 James Glimm Department of Applied Mathematics and Statistics, Stony Brook University Brookhaven National Laboratory

AMS 691 Special Topics in Applied Mathematics Lecture 8 James Glimm Department of Applied Mathematics and Statistics, Stony Brook University Brookhaven

Embed Size (px)

Citation preview

Page 1: AMS 691 Special Topics in Applied Mathematics Lecture 8 James Glimm Department of Applied Mathematics and Statistics, Stony Brook University Brookhaven

AMS 691Special Topics in Applied

MathematicsLecture 8

James Glimm

Department of Applied Mathematics and Statistics,

Stony Brook University

Brookhaven National Laboratory

Page 2: AMS 691 Special Topics in Applied Mathematics Lecture 8 James Glimm Department of Applied Mathematics and Statistics, Stony Brook University Brookhaven

Numerical Partial Differential Equations (PDEs)

Elliptic equations: usually solved iteratively, unless the dimensions of the problem are small. Usually use software packages to solve these equations. Petsi is an example.

Parabolic equations: d/dt U = elliptic UTime step is very small: delta t = O(delta x)^2 if solved explicitly.Usually solved implicitly: requires solving an elliptic sub problem.Use software packages.

1 1

11

; = elliptic

1 ( )

n N n

n n

U U tLU L

U tL U

Page 3: AMS 691 Special Topics in Applied Mathematics Lecture 8 James Glimm Department of Applied Mathematics and Statistics, Stony Brook University Brookhaven

Mixed equation types

Often use operator splitting: To solve (1), alternately solve (2) and (3) each for a time step.

Many problems are mixed, hyperbolic, parabolic, elliptic. Solution methods are specialized for each type, so use special method and Use operator splitting to separate types.

(1) 0

(2) 0;

(3) 0

UA B

tU

AtU

Bt

Page 4: AMS 691 Special Topics in Applied Mathematics Lecture 8 James Glimm Department of Applied Mathematics and Statistics, Stony Brook University Brookhaven

Hyperbolic Equations

Linear problems: use high order methods and central differences

Difficulty if coefficients are not smooth

Nonlinear: often conservation laws. Use conservative methods

Main ideas in 1D. Use operator splitting to extend to 3D

Page 5: AMS 691 Special Topics in Applied Mathematics Lecture 8 James Glimm Department of Applied Mathematics and Statistics, Stony Brook University Brookhaven

Reference for numericalconservation laws

@Book{LeV92, author = "R. LeVeque", title = "Numerical Methods for Conservation Laws", publisher = "Birkh{\"a}user Verlag", address = "Basel--Boston--Berlin", year = "1992",}

Page 6: AMS 691 Special Topics in Applied Mathematics Lecture 8 James Glimm Department of Applied Mathematics and Statistics, Stony Brook University Brookhaven

Splitting to reduce the spatial dimension

(1) ( ) 0

( )(2 ) 0

( )(2 ) 0

( )(2 ) 0

t

t

t

t

U F U

F Ua U

xF U

b Uy

F Uc U

z

Operator splitting: (1) is the same as (2a-2c) each solved is succession.Difference is not zero but is second order in delta t. More complicated ordering of the substeps changes the error to (delta t)^2 or higher.

Page 7: AMS 691 Special Topics in Applied Mathematics Lecture 8 James Glimm Department of Applied Mathematics and Statistics, Stony Brook University Brookhaven

Numerical Conservation Laws in 1DTwo problems central to any difference scheme:

1. Stability issues related to solution discontinuities2. Convergence to a weak solution of equation

#1: addressed by artificial viscosity or by limiters#2: addressed by conservative methods

Illustrate difficulties associated with #2: Consider two equivalent forms of Burger’s equation. They have the same smooth solutions but differentjump relations and different weak solutions. Difference schemes based on(b) will not converge to a solution of (a).

2

2 2

1( ) 0

2

2( ) 0

3

t

t

a u u

b u u

Page 8: AMS 691 Special Topics in Applied Mathematics Lecture 8 James Glimm Department of Applied Mathematics and Statistics, Stony Brook University Brookhaven

Conservative Difference Methods

1/2 1/2 n nj ju u

1 11/2 1/2 n n

j ju u

x

t

ujn = cell average

ujn+1 = uj

n +(delta t/delta x)[Fn+1/2j+1/2 –Fn+1/2

j-1/2]

F must be a function of cell averages. Many ways to do this.Many different conservative numerical methods

Numerical flux Fn+1/2j+1/2 = F(un

j-p,…,unj+q) for stencil size p+q+1.

Consistent if F(u,…,u) = F(u).

Page 9: AMS 691 Special Topics in Applied Mathematics Lecture 8 James Glimm Department of Applied Mathematics and Statistics, Stony Brook University Brookhaven

Gudonov methodsbased on Riemann problems and

characteristic variablesFirst order Godunov (very simple, very diffusive):

Fn+1/2j+1/2 = solution of Riemann problem between

unj and un

j+1, evaluated at x = xj+1/2

Higher order Godunov (MUSCL and PPM):

Use neighbor u values (wider stencil) to fit polynomial approximation to discrete solution values (grid cell averages). Linear for MUSCL, piecewise parabolic for PPM.

Use PDE to advance solution values to ½ time level n+1/2. Get left and right values for un+1/2

j+1/2. Solve Riemann problem (or approximate Riemann problem), to get numerical flux Fn+1/2

j+1/2.

PDE solution uses characteristic coordinates, eigenvectors, wave curves

Page 10: AMS 691 Special Topics in Applied Mathematics Lecture 8 James Glimm Department of Applied Mathematics and Statistics, Stony Brook University Brookhaven

Primitive variable methodsLax-Friedrichs etc.

Lax-Friedrichs is a first order method. It is very diffusive. But there are a number of very good higher order methods that use only primitive variables. A primitive variable is one of the (conserved) components of the solution U.

Lax-Friedrichs is very simple:

11 1 1 1

1( ) ( )

2 2n n n n nj j j j j

tU U U F U F U

x

Page 11: AMS 691 Special Topics in Applied Mathematics Lecture 8 James Glimm Department of Applied Mathematics and Statistics, Stony Brook University Brookhaven

Lax Wendroff

1/21/2 1 1

1 1/2 1/21/2 1/2

1

2 2n n n n nj j j j j

n n n nj j j j

tU U U F F

xt

U U F Fx

Works well for smooth solutions. Second order accurate. Needs artificial viscosity to cure post shock oscillations if used for discontinuous flows. Not competitive with modern methods for such flows.

Page 12: AMS 691 Special Topics in Applied Mathematics Lecture 8 James Glimm Department of Applied Mathematics and Statistics, Stony Brook University Brookhaven

Nonlinear StabilitySevere oscillations in the numerical solution following a shock wave.Similar to Gibbs phenomena, where by convergence of a Fourier series for discontinuous data is highly oscillatory near the discontinuity.

Cure (a): add “artificial viscosity”, to dissipate the oscillations.

(b) Slope limiters in the reconstruction step of higher order Godunov solvers. Consider MUSCL, which is a piecewise linear reconstruction, to define the solution U at every point, in terms of the cell averages over a stencil of grid cells adjacent to the cell in question.

The linear reconstruction at the face between two adjacent cells will produce a jump discontinuity. We want this discontinuity to be interpolative not extrapolative, and we reduce the slope (slope limiter) in order to achieve this goal. In other words, the endpoints of the values for the solution within the cell must lie within the values given from the neighbor cells as extrapolated to their cell endpoints.

Page 13: AMS 691 Special Topics in Applied Mathematics Lecture 8 James Glimm Department of Applied Mathematics and Statistics, Stony Brook University Brookhaven

Refinements on slope limiters:ENO/WENO

If the basic scheme uses 3 or 5 or j points in its stencil the basic idea of Eno/Weno is to slide the stencil to the left or right to choose an optimal stencil, one which has a smoother solution and a reduced requirement for limiting. In other words it is to limit the limiters!

Eno considers a number of these translated stencils and chooses the best, ie the smoothest one with the least limiting. Weno considers all possible translated stencils and performs a weighted average of all, with the weights largest for the smoothest and smaller for the ones that need more limiting.

Eno/Weno is a stencil method and can be used in combination with any solver, and either using primitive or characteristic methods

Page 14: AMS 691 Special Topics in Applied Mathematics Lecture 8 James Glimm Department of Applied Mathematics and Statistics, Stony Brook University Brookhaven

Comments on methods

Many methods, others not yet mentioned (discontinuous Galerkin), compact schemes, hybrid combinations of

Many methods, others not yet mentioned (discontinuous Galerkin), compact schemes, hybrid combinations of above.

Which to use? Problem dependent, some methods are faster, some more accurate, but accuracy is problem dependent. Usually any good method will do.

Other issues:

AMR = automatic mesh refinement

Implicit methods: stable for large time steps. Useful if system has fast but not important waves.

Page 15: AMS 691 Special Topics in Applied Mathematics Lecture 8 James Glimm Department of Applied Mathematics and Statistics, Stony Brook University Brookhaven

Other issues: entropy

It is desirable to define a discrete entropy and to determine thatthe entropy inequality is maintained in time. This prevents rarefaction shocks from occuring.

Page 16: AMS 691 Special Topics in Applied Mathematics Lecture 8 James Glimm Department of Applied Mathematics and Statistics, Stony Brook University Brookhaven

Incompressible Navier-Stokes Equation (3D)

( )tv v v P v

is not a dynamic variable. terms depending on v only

Solution method (projection method): drop the P term, solve the rest as

a finite difference equation. Get a trial velocity v*. It will

P P P NS

not be divergence free.

Compute the divergence free part of v* (Known as the Hodge decomposition).

Call this v. To be a solution of the NS equation, we need to choose a P which

balances part of v* dropped to define v.