A Brief Introduction to Godunov Methods

32
A Brief Introduction to Godunov Methods Tim Handy

description

A Brief Introduction to Godunov Methods. Tim Handy. TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A. Outline. Basic Equations of Fluid Mechanics Euler’s Equations Divergence Refresher Strong Forms Weak Forms Numerical Solution of Euler’s Equations - PowerPoint PPT Presentation

Transcript of A Brief Introduction to Godunov Methods

Page 1: A Brief Introduction to Godunov Methods

A Brief Introduction to Godunov Methods

Tim Handy

Page 2: A Brief Introduction to Godunov Methods

I. Basic Equations of Fluid MechanicsI. Euler’s Equations

I. Divergence RefresherII. Strong FormsIII. Weak Forms

II. Numerical Solution of Euler’s EquationsI. TermsII. DiscretizationIII. Godunov’s Scheme

Outline

Page 3: A Brief Introduction to Godunov Methods

Euler’s Equations“Although to penetrate into the intimate mysteries of nature and thence to learn the true causes of phenomena is not allowed to us, nevertheless it can happen that a certain fictive hypothesis may suffice for explaining many phenomena.” – Leonhard Euler

Page 4: A Brief Introduction to Godunov Methods

Divergence Refresher Divergence of a vector field at a point is the

measure of how much the point acts like a source or sink

Defined as the limit of volume weighted flux as the volume goes to a point

V

VdS

Vdiv

||lim|

}{

nFFppx

Page 5: A Brief Introduction to Godunov Methods

Source: divF > 0

Page 6: A Brief Introduction to Godunov Methods

Sink: divF < 0

Page 7: A Brief Introduction to Godunov Methods

Incompresssible/Solenoidal: divF = 0

Page 8: A Brief Introduction to Godunov Methods

General Equation◦ Statement of quantity conservation

◦ At any point in space, the variation of the quantity in time is proportional to the amount of quantity flowing towards or away from the point (source/sink)

Euler’s Equations – Strong Form

@½@t

0)( QtQ u

Page 9: A Brief Introduction to Godunov Methods

Continuity Equation◦ Statement of mass conservation

◦ At any point in space, the variation of the density in time is proportional to the amount of material flowing towards or away from the point (source/sink)

Euler’s Equations – Strong Form

@½@t

0)( ut

Page 10: A Brief Introduction to Godunov Methods

Momentum Equation◦ Statement of momentum conservation

◦ At any point in space, the variation of the momentum in time is proportional to the combination of advective momentum transfer, pressure gradient, and other body forces (gravity, electromagnetics [jxB], coordinate accelerations, etc.)

Euler’s Equations – Strong Form

@½@t

fuuu

pt

))((

Page 11: A Brief Introduction to Godunov Methods

Energy Equation◦ Statement of energy conservation

For ideal gas situations,

Euler’s Equations – Strong Form

@½@t

uu

u

21

0))((

eE

pEtE

uu21

)1( PE

Not true for time dependent gravity situations

Page 12: A Brief Introduction to Godunov Methods

In general, the Euler Equations are a system of nonlinear, hyperbolic PDE’s◦ General solutions are waves◦ Multi-valued solutions possible (Shocks; obey

Rankine-Hugoniot; “weak” solutions)◦ Solutions travel along characteristics and come in

pairs If steady state

◦ M<1: Elliptic◦ M=1: Parabolic

Euler Equations – Strong Form

Page 13: A Brief Introduction to Godunov Methods

General Formulation (Reynolds Transport Theorem)

(Rate of change of N) = (Accumulation in CV) + (Flux through CS due to CV moving) + (Flux through CS due to velocity field)

Euler Equations – Weak Form

massunit

)(

N

dAdAdVtDt

DN

CSr

CV CSb

sys

nunu

Page 14: A Brief Introduction to Godunov Methods

Continuity (Stationary CV)

(Rate of change of mass) = (RoC of how much mass we have in CV) + (How much mass is crossing the boundary)

Euler Equations – Weak Form

1massunit massunit

0

dAdVtDt

Dm

CSr

CV

nu

Page 15: A Brief Introduction to Godunov Methods

Momentum (Stationary CV)

(Rate of change of momentum) = (RoC of how much momemtum we have in CV) + (How much momentum is crossing the boundary)= (Sum of forces on CV)

Euler Equations – Weak Form

uu

Fnuuuu

massunit m

)()(

dAdVtDt

Dm

CSr

CV

Page 16: A Brief Introduction to Godunov Methods

Energy (Stationary CV)

(Rate of change of total energy) = (RoC of how much energy we have in CV) + (How much energy is crossing the boundary)= (Rate of heat transfer into CV) + (Rate of work done by system)

Euler Equations – Weak Form

dAPEdVEt

WQ

eE

CSr

CV

))(()(

2

nu

uu

Page 17: A Brief Introduction to Godunov Methods

Equation Components

Quantity Changing Flux [Quantity/A/T]

Continuity 1Momentum 3Energy 1

Equation Summary

u

uuu

E uE

• Strong form: Finite Difference Methods, Spectral Methods

• Weak form: Finite Volume Methods, Finite Element Methods, Boundary Element Methods

Page 18: A Brief Introduction to Godunov Methods

Numerical Solution of Euler’s Equations

The Hard Part

Page 19: A Brief Introduction to Godunov Methods

Total Variation Diminishing• Total Variation: The total length in the y-direction that the ball moves traveling along the path

• Total Variation Diminishing: At next timestep, the length the ball travels either stays the same or decreases• Wiggles do not grow, they

are either conserved or decreased

• Implies stability

Page 20: A Brief Introduction to Godunov Methods

In 1D

A scheme is TVD if

Total Variation Diminishing

xx dffTV |)(|),(

i

ii uudxxuTV 1

)()( 1 nn uTVuTV

In tnuTVuTV ),()( 0

Page 21: A Brief Introduction to Godunov Methods

A scheme is monotonicity preserving if:◦ It does not create new local extrema within the spatial domain◦ The value of a local minima is non-decreasing and the value of a

local maxima is non-increasing Harten (1983) proved that:

◦ A monotone scheme is TVD◦ A TVD scheme preserves monotonicity

Why do we want monotonicity? Fixes overshoots in approximation. For example, without it you may be constantly adding mass to your solution due to overshooting the density value in the continuity equation.

Monotonic schemes do not provide non-physical solutions

Monotonicity

Page 22: A Brief Introduction to Godunov Methods

If we want a monotonic scheme, it can only be first-order accurate (piecewise constant)◦ Error very slowly decreases with mesh resolution

Godunov’s Theorem

Monotonic, linear numerical schemes for solving partial differential equations can be at most first order accurate.

Page 23: A Brief Introduction to Godunov Methods

Consistency: Truncation error goes to 0 as h→0

Consistency

3)3(2 ))((

!31))((''

!21))(('

!11)(

!01)( axafOaxafaxafafxf

Truncation Error

http://ct.gsfc.nasa.gov/amr.html

Page 24: A Brief Introduction to Godunov Methods

A sequence {xn} is convergent to L if there exists an N such that |xn-L|<ε for all n>N

A simulation Sn is convergent to the true solution S if there exists a mesh spacing based on n such that ||Sn-S||<ε

Main point: Mesh spacing gets smaller, simulation becomes like true solution

Convergent

Page 25: A Brief Introduction to Godunov Methods

Therefore, if we have a consistent method (truncation error goes to 0), and it is TVD (no extra wiggles), it should converge to the true solution as the mesh becomes increasingly more fine

Lax Equivalence Theorem

A consistent scheme is convergent if and only if it is stable.

Page 26: A Brief Introduction to Godunov Methods

1. Reconstruct profiles for each variable◦ Constant, linear, parabolic, …◦ Force monotonicity by adjusting profile

coefficients2. Solve the local Riemann problem at each

cell interface3. Integrate in time and determine cell

averages4. Repeat

Godunov’s Scheme

Page 27: A Brief Introduction to Godunov Methods

The Riemann problem describes the interaction of hyperbolic systems at an interface with a jump discontinuity

Riemann Problem

PL

uL

ρL

PR

uR

ρL

What is the flux of our conserved quantities here?

Page 28: A Brief Introduction to Godunov Methods

Need to determine the average u/p state at the interface to determine fluxes

FLASH implements the two shock Riemann solver described by Colella and Glaz (1985).

The solver operates by decomposing A(U) into left, right, and center eigenvectors

These eigenvectors specify a set of characteristic equations that determine potential interface values

One is then able to integrate along these characteristics to determine the intersection point in the u-p plane

Riemann Problem

0)(0

xA

txtUUUFU

Page 29: A Brief Introduction to Godunov Methods

Assume area is known, fluxes are constant w.r.t. CS (I2) using the average u/p at the interface, and we can determine the average amount of stuff in the CV (I1)

DiscretizationGdAUUdV

dtd

CSCV

nF )(

CVfacesii

jj

CVfacesii

GtUU

GUdtd

AF

AF

1

Page 30: A Brief Introduction to Godunov Methods

Using the above information coupled with the reconstruction of density, we can determine the average fluxes

Now that we have the average fluxes, we can determine how much “stuff” should cross the boundary in ∆t time

Application of the discretization of a conservation law gives us the new cell average!

Determining New Cell Averages

Page 31: A Brief Introduction to Godunov Methods

In order to accurately resolve shocks, the interpolated variable profiles need to be modified

In the vicinity of the shock front, all profiles are forced to be lower order fits (Remember Godunov’s Theorem!)

Shock Treatment

Page 32: A Brief Introduction to Godunov Methods

Information theory limits the admissible time step

If you move too far ahead in time, information (advective or acoustic) from one fluid packet may completely jump a cell

Therefore, must enforce that fluid packet signals may only move into the adjacent cell each time step

Courant-Friedrichs-Lewy (CFL) Condition

1)(

C

xtau