63
,

Numerical Simulation of 1D Compressible Flows

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Numerical Simulation of 1D Compressible Flows

Numerical Simulation of 1D Compressible Flows

by

Marcus B. Armstrong, B.S.

A Thesis

in

Mathematics

Submitted to the Graduate Faculty

of Texas Tech University

In Partial Fulllment

of the Requirements for

the Degree of

MASTER OF SCIENCE

Approved

Dr. Kevin Long

Comittee Chair

Dr. Victoria Howle

Dr. Akif Ibraguimov

Mark Sheridan

Dean of the Graduate School

December, 2014

Page 2: Numerical Simulation of 1D Compressible Flows

c⃝ Copyright 2014 Marcus B. Armstrong

Page 3: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Acknowledgments

I would like to express my deep gratitude to Dr. Long for his guidance, patience, constant encourage-

ment, and critique of this work. Furthermore, I would like to thank Dr. Howle for her teachings in

numerical analysis and fostering my enthusiasm for numerical methods. My grateful thanks are also

extended to Dr. Ibraguimov, whose lectures on partial dierential equations proved to be invaluable.

Finally, I would like to thank my family and friends for their encouragement and support through-

out my studies.

ii

Page 4: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Contents

i v

Acknowledgements....................................................................................................................................... Abstract..............................................................................................................................................................List of Figures........................................................................................................................................................

vi

1. Euler Equations.......................................................................................................................................... 11.1 Conservation of Mass Derivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Conservation of Momentum Derivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.2.1 Pressure Force Contribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2.2 Gravitational Force Contribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2.3 Full Conservation of Momentum Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.3 Conservation of Energy Derivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2. The CFL Condition.................................................................................................................................... 52.1 Denition of Convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 Denition of Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.3 Denition of Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.4 CFL Condition Derivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.5 Implications of the CFL Condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.6 The Lax Equivalence Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.7 Global Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3. Rankine − Hugoniot Conditions............................................................................................................... 83.1 Conservation of Mass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83.2 Conservation of Momentum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.3 Conservation of Energy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.4 The Jump Condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

4. The Riemann Problem of the 1D Euler Equations......................................................................... 114.1 Denition of the 1D Riemann Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114.2 1D Euler Riemann Problem Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

4.2.1 Genuine Nonlinearity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124.2.2 Rarefaction Waves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124.2.3 Contact Waves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134.2.4 Shock Waves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4.3 Integral Solution to the 1D Euler Riemann Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.3.1 Solving for mL, mR, and p∗ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.3.2 Solving for u∗ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164.3.3 Solving for S1 and S2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5. A Scalar Example : Traffic Flow............................................................................................................. 195.1 Trac Flow Riemann Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5.1.1 Contact Wave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205.1.2 Shock Wave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205.1.3 Rarefaction Wave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

5.2 Conclusions from Trac Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

6. Integral Solution of the Sod Shock Tube........................................................................................... 22

iii

Page 5: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

7. The Lax Method............................................................................................................................................ 277.1 Von Nuemann Stability Analysis of the Lax Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277.2 Lax Truncation Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287.3 Lax Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

8. The Lax − Wendroff Method.................................................................................................................... 298.1 Two-Step Lax-Wendro Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298.2 One-Step Lax-Wendro Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308.3 Von Nuemann Stability Analysis of the Lax-Wendro Method . . . . . . . . . . . . . . . . . . . . . . . . . 308.4 Lax-Wendro Truncation Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318.5 Lax-Wendro Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

9. Results.................................................................................................................................................................. 329.1 Lax Method Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329.2 Lax Method Residual Proles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369.3 Lax Temporal Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409.4 Lax Spatial Error on [0,1] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419.5 Lax Spatial Error on Rarefactive Fan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429.6 Lax-Wendro Method Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439.7 Lax-Wendro Method Residual Proles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479.8 Lax-Wendro Temporal Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519.9 Lax-Wendro Spatial Error on [0,1] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529.10 Lax-Wendro Spatial Error on Rarefactive Fan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

10. Conclusions..................................................................................................................................................... 54

Bibliography........................................................................................................................................................... 55

iv

Page 6: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Abstract

From clouds twirling overhead to the endlessly lapping waves of the oceans, uids and gases have

important impacts on everyday living. However, as ordinary and commonplace uid and gaseous

phenomena are, simulating them can be a dicult proposition due to the interconnectedness of

forces such as convection, diusion, turbulence, and compression. In fact, many problems in uid

dynamics remain unanswered - such as a universal expression for turbulence.

Despite its diculties, computational uid mechanics oers a wide variety of applications. Through

use of simulation engineers can ensure their bridges will withstand tempestuous conditions without

the need of costly physical models, surgeons can practice their procedures in real-time environments

without worry of killing a patient, and audiences in cinemas everywhere can be immersed into a

fantasy world aided by renderings of realistic uid and gaseous ow.

In this paper the derivation of the Euler Equations used to model such ows will be demonstrated.

This will illustrate the forces that are at work in a uid ow, possibly providing implications that

have numerical benets. Necessary conditions for numerical stability will then be established, giving

rise to implications that are essential to computational uid dynamics. Additionally the Rankine-

Hugonoit conditions, a set of three equations that must hold true for the characteristics in a shock

wave, will be dened and derived.

The primary sample problem analyzed in this paper is the Sod Shock Tube, a classic problem

used in the testing of numerical methods for accuracy due to the existence of an analytic solution. In

this paper we will take a look at the analytic solution to this problem, as well as analyzing the char-

acteristics that compose its solution. Then, to better understand the nature of the characteristics,

we will demonstrate how such characteristics arise in trac ow.

Finally, an analysis of two numerical methods that may be used to approximate compressible

ow in one dimension will be performed; The Lax Method and the Lax-Wendro Method. Using

the analytic solution as a reference, we will see how well these functions perform as a means of

approximating the nature of the Sod shock tube. Furthermore, necessary conditions for stability

and convergence for both methods will be established, which will allow us to anticipate the numerical

results.

v

Page 7: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

List of Figures

1.1 Control Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

3.1 RH Conditions Graphical Figure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

4.1 Rarefaction Wave Graphic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

4.2 Contact Wave Graphic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4.3 Shock Wave Graphic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4.4 Sod Shock Model Figure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

5.1 Characteristic / Flow Prole for Trac Contact Wave . . . . . . . . . . . . . . . . . 20

5.2 Characteristic and Flow Prole for Trac Shock Wave . . . . . . . . . . . . . . . . . 20

5.3 Characteristic and Flow Prole for Trac Rarefactive Fan . . . . . . . . . . . . . . . 21

6.1 Analytic Density Proles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

6.2 Analytic Velocity Proles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

6.3 Analytic Pressure Proles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

6.4 Analytic Energy Proles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

7.1 Lax Method Schematic Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

8.1 Lax-Wendro Schematic Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

9.1 Lax Density Proles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

9.2 Lax Velocity Proles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

9.3 Lax Pressure Proles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

9.4 Lax Energy Proles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

9.5 Lax Density Residuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

9.6 Lax Velocity Residuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

9.7 Lax Density Residuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

9.8 Lax Energy Residuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

9.9 Lax Temporal Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

9.10 Lax spatial Errors on [0,1] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

9.11 Lax spatial Errors on Rarefactive Fan . . . . . . . . . . . . . . . . . . . . . . . . . . 42

9.12 Lax-Wendro Density Proles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

9.13 Lax-Wendro Velocity Proles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

9.14 Lax-Wendro Pressure Proles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

9.15 Lax-Wendro Energy Proles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

9.16 Lax-Wendro Density Residuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

9.17 Lax-Wendro Velocity Residuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

9.18 Lax-Wendro Pressure Residuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

9.19 Lax-Wendro Energy Residuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

9.20 Lax-Wendro Temporal Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

9.21 Lax-Wendro spatial Error on [0,1] . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

9.22 Lax-Wendro spatial Error on Rarefactive Fan . . . . . . . . . . . . . . . . . . . . . 53

vi

Page 8: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Chapter 1

Euler Equations

The behavior of a compressible ow is given by the Euler Equations:

dρdt +∇ · (ρu) = 0

∂u∂t + (u · ∇)u = −∇p

ρ + g

∂∂t

[E] +∇ · [(E + p)u] = 0

Which may be expressed as the following in one dimension:

∂ρ∂t +

∂[ρu]∂x = 0

∂[ρu]∂t + ∂[ρu2+p]

∂x = 0

∂[E]∂t + ∂[u(E+p)]

∂x = 0

In these equations, u denotes the local magnitude of the velocity in the x direction, ρ denotes

the local density, p denotes the local pressure (typically given by an equation of state), and E =

ρ(ϵ+ |u|2

2

)denotes local energy, where ϵ is local internal energy. The three equations ensure

Conservation of Mass, Conservation of Momentum, and Conservation of Energy respectively, and

furthermore follows from applying natural principles to a controlled volume of uid. The derivation

of such equations are below, each outlined by [Denker, 2002].

Figure 1.1: Control Volume

1.1 Conservation of Mass Derivation

Suppose there exists a uid with local density ρ(x, y, z, t) and local velocity u(x, y, z, t). Consider a

control volume V with a boundary S. It follows that the total mass of this volume is given by the

volume integral

M =´ρdV

Dierentiating this expression with respect to time reveals that the rate of change of the mass is

given by

∂M∂t =

´∂ρ∂t dV

1

Page 9: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

However, the control volume's mass can change only by uid owing across the boundary S.

Therefore

∂M∂t =

´(ρu) · dS

Using Green's Theorem the above surface integral may be re-expressed as the volume integral

∂M∂t = −

´∇ · (ρu)dV

Then, by combining equations it follows that

´∂ρ∂t dV = −

´∇ · (ρu)dV

The above expression must be true for any given volume V , and thus the integrands must be

point-wise equivalent. Therefore

∂ρ∂t = −∇ · (ρu)

This yields the expression for local conservation of mass [Denker, 2002]:

dρdt +∇ · (ρu) = 0

1.2 Conservation of Momentum Derivation

Suppose there exists a uid with local density ρ(x, y, z, t) and local velocity u(x, y, z, t). Consider a

control volume V with a boundary S. It follows that the bulk momentum of this volume is given by

Πi =´ρuidV

where i indexes over the components of velocity. Dierentiating each expression with respect to

time yields the rate of change

∂Πi

∂t =´ ∂(ρui)

dt dV

Under the assumptions that there are no eld forces, pressure forces, or viscous forces, the only

way a change in momentum can occur is through momentum carried across the uid boundary.

Therefore

∂Πi

∂t =´(ρui)u · dS

This expression alternatively can be written in Einstein Summation Notation as

∂Πi

∂t =´(ρui)u · dS

Using Green's Theorem the above surface integral may be re-expressed as the volume integral

∂Πi

∂t = −´∇j(ρuiuj)dV

Then, by combining equations it follows that

´ ∂(ρvi)∂t dV = −

´∇j(ρuiuj)dV

2

Page 10: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

The above expression must be true for any given volume V , and therefore the integrands must

be point-wise equivalent. Therefore

∂(ρui)∂t = −∇j(ρuiuj)

This yields the expression for local conservation of momentum [Denker, 2002]:

∂(ρui)∂t +∇j(ρuiuj) = 0

Alternatively, this equation may be expressed as

∂(ρui)∂t +∇ · (u

⊗(ρu)) = 0

where⊗

denotes the tensor product.

1.2.1 Pressure Force Contribution

Now consider pressure forces that could contribute to changes in momentum. Such a force would

contribute to the uid particles in the control volume themselves. Therefore the pressure force is of

the form

F pressurei =

´pdiS

which can be re-expressed using Green's Theorem as the volume integral [Denker, 2002]:

F pressurei = −

´∇ipdV

1.2.2 Gravitational Force Contribution

A uniform eld force such as gravity, on the other hand, contributes to the rate of change of

momentum in the form [Denker, 2002]:

F gravityi = −

´ρgidV

1.2.3 Full Conservation of Momentum Equation

Combining the local conservation of momentum equation , the pressure force equation, and the

gravitational force equation yields the full equation of motion:

∂(ρui)∂t +∇j(ρuiuj) = −∇ip+ ρgi

However, by expanding the left-hand side the above equation can be expressed as

ρ∂ui

∂t + ui∂ρ∂t + ui∇j(ρui) + ρuj∇j(ui) = −∇ip+ ρgi

which, by applying the conservation of mass yields [Denker, 2002]:

ρ∂ui

∂t + ρuj∇j(ui) = −∇ip+ ρgi

This alternatively can be written in vector notation as:

ρ∂u∂t + ρ(u · ∇)u = −∇p+ ρg

Additionally, this equation can be written in per-unit-mass form by dividing through by ρ.

∂u∂t + (u · ∇)u = −∇p

ρ + g

3

Page 11: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

1.3 Conservation of Energy Derivation

In uid and gaseous ows energy can arise in a number of ways. In the most basic of ows, energy

exists in one of two forms: thermal energy and kinetic energy. For a given ow eld the thermal

energy per unit mass (or more colloquially, specic thermal energy) is denoted by the variable e.

Likewise the specic kinetic energy of a uid is related to the uid's ow by ekinetic =|u|22 . Thus for

a uid with local density ρ(x, y, z, t) and local velocity u(x, y, z, t) under a control volume V with a

boundary S, the total energy is given by [Denker, 2002]:

´ρ(e+ |u|2

2 )dV

This total energy can be altered in only one of two ways. Either energy is being transferred

across the control volume surface through advection, or the exterior ow is applying work to the

control volume. Therefore the rate of change of the total energy in the control volume is given by

the expression

∂∂t

´ρ(e+ |u|2

2 )dV = −´dV

ρ(e+ |u|22 )u · ndS+

´dV

pu · ndS

By applying the Divergence Theorem, the above may be written as

∂∂t

´ρ(e+ |u|2

2 )dV +´∇ ·

[ρ(e+ |u|2

2 + p/ρ)u]dV = 0

This statement is true for any choice of control volume V . Therefore it follows that the total

change of energy is given by [Denker, 2002]:

∂∂t

[ρ(e+ |u|2

2

)]+∇ ·

[ρ(e+ |u|2

2 + p/ρ)u]= 0

Note that this matches the form stated previously by the substitution E = ρ(e+ |u|2

2

). In this

form E represents the total energy of the system.

4

Page 12: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Chapter 2

The CFL Condition

Before we begin our attempts to numerically solve the Euler Equations, its benecial to rst ensure

such approximations would be convergent and stable.

2.1 Denition of Convergence

Denition. A numerical method is said to be convergent if the numerical approximation of a given

problem approaches the exact solution of that problem as the mesh size h → 0 and time step t → 0

[Burden, 2005].

2.2 Denition of Stability

Denition. A numerical method for solving a linear evolutionary partial dierential equation is

said to be stable on the time interval [0,T] if the total variation of the numerical solution at the

xed time T remains bounded as the time step size goes towards zero [Burden, 2005]:

limt→0

∥∥uexact(x, T )− un+1approx(x, T )

∥∥ < C

2.3 Denition of Consistency

Denition. A numerical method is said to be consistent if the truncation error Tn is such that for

any ϵ > 0 there exists a grid displacement h(ϵ) such that [Burden, 2005]:

|Tn| < ϵ for any 0 < h < h(ϵ)

2.4 CFL Condition Derivation

Rather than directly examining the conditions necessary for a numerical approximation to be con-

vergent and stable on a general system of hyperbolic conservation laws ∂u∂t + ∂F (u)

∂x = 0, we will

simplify our analysis to the linearized approximation ∂u∂t = −c∂u∂x as a model problem [Trefethen,

1994]. Consider the advection equation:

∂u∂t = −c∂u∂x

where c = c(x, t) is the speed of sound in the medium. It follows that u(x, t) must be of the form

u(x, t) = f(x− ct)

Suppose that u(x, t) = A(t)eikx is a solution to the advection equation ["Advection Equation."]

[Press & al, 1992]. This would imply:

∂∂t

[A(t)eikx

]= − ∂

∂x

[cA(t)eikx

]However, by applying forward dierences in time and central dierences in space, the above is

approximately equal to:

5

Page 13: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

1t

[A(t+t)eikx −A(t)eikx

]= − c

2x

[A(t)eik(x+x) −A(t)eik(x−x)

]Dividing through by A(t)eikx yields:

1t

[A(t+t)

A(t) − 1]= − c

2x

[eik(x) − eik(x)

]Let ξ = A(t+t)

A(t) − 1. It then follows that:

1t [ξ] = − c

2x

[eik(x) − eik(x)

]And therefore:

ξ = − ct2x

[eik(x) − eik(x)

]Now, given that 1

2

[eik(x) − eik(x)

]= sinh(ikx) = isin(kx):

ξ = − ctx i ∗ sin(kx)

In order for this calculation to be stable as a numerical approximation, it must be the case that

∥ξ∥2 < 1. Therefore:

∥ξ∥2 =

√[− ct

x i ∗ sin(kx)]2

< 1

This reduces to the following since sin(kx) < 1:

∥ξ∥2 =

√[ctx

]2< 1

Therefore:

ctx < 1

And thus for a choice of x and a given sound speed c, t must be such that ["Advection

Equation."] [Press & al, 1992]:

t < ∆xc

This condition is called the CFL condition, named after Richard Courant, Kurt Friedrichs,

and Hans Lewy, who discovered the condition in 1928 ["Advection Equation."] [Press & al, 1992]

[Trefethen, 1994].

2.5 Implications of the CFL Condition

The practical implications of the CFL conditions are signicant. Though it would be ideal to use

any time step we wished in the calculation of a numerical answer (for the sake of quick results),

∆t is bounded by stability constraints. Furthermore, though the error may diminish as the grid

displacement gets small, the time step necessary for stability is directly proportional to the grid

displacement. Lastly, a similar analysis can be performed for any nite dierence method, and thus

stability constraints will need to be analyzed before such methods are used.

6

Page 14: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

2.6 The Lax Equivalence Theorem

It can be shown [Trefethen, 1994] that the convergence of a numerical solution is guaranteed by

stability, provided the approximation is consistent. This statement is called the Lax Equivalence

Theorem.

Theorem. Let Sk be a consistent approximation to a well-posed linear initial value problem. Then

Sk is convergent if and only if it is stable.

2.7 Global Accuracy

Furthermore, it can be shown [Trefethen, 1994] that by combining the denition of stability with

the Lax Equivalence Theorem, a statement of global accuracy can be established.

Theorem. Let convergent approximation method of order accuracy p be applied to a well-posed

initial value problem. Then the numerical solution has accuracy of order p for all t ∈ [0, T ].

7

Page 15: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Chapter 3

Rankine-Hugoniot Conditions

In this paper numerical approximations to the Euler Equations will be performed on the Sod Shock

Tube, a specic Riemann Problem. In this problem the spatial domain is divided into two regions.

The rst region is compressed by a high pressure force, while the second region is at a relaxed

equilibrium. The compressed region is suddenly released, generating a shock wave that travels

through the medium. The Rankine-Hugonoit conditions describe the relationship between opposing

sides of this shock wave in one-dimensional ow. For a shock wave propagating at a speed Us, one

can derive these relations by analyzing the Euler equations under a coordinate system moving with

the shock. The Rankine-Hugonoit conditions themselves are as follows [Feynman & al, 1964]:

ρ1u1 = ρ2u2

ρ1u21 + p1 = ρ2u

22 + p2

e1 +12u

21 +

p1

ρ1= e2 +

12u

22 +

p2

ρ2

In these equations u1 and u2 denote the magnitude of the uid velocity pre and post-shock, ρ1

and ρ2 denote the uid density pre and post-shock, p1 and p2 denote the local pressure force pre

and post-shock, and e1 and e2 denote the internal energy of the ow pre and post-shock. Much like

the Euler equations, the Rankine-Hugonoit are statements of the balance of forces that must be in

play to ensure Conservation of Mass, Conservation of Momentum, and Conservation of Energy. The

existence of such conditions are useful, as they provide a means to compare numerical solutions to

their analytic counterparts. The derivations of each case are below.

Figure 3.1: RH Conditions Graphical Figure

3.1 Conservation of Mass

For a coordinate system traveling with a shock wave propagating at a speed of Us, the mass continuity

equation

∂ρ∂t +

∂[ρu]∂x = 0

reduces to the steady state form

8

Page 16: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

∂[ρu]∂x = 0

Now consider a region containing the shock discontinuity at xs and extending x in either

direction. Integrating the stead-state equation over this region yields

´ xs+x

xs−x∂[ρu]∂x dx = [ρu]

xs+xxs−x

Letting ρ1, u1represent the constant density and velocity post-shock and ρ2, u2 represent the

constant density and velocity pre-shock, it follows that

ρ1u1 = ρ2u2

is the condition that must be satised to ensure mass conservation across the shock wave [Feyn-

man & al, 1964].

3.2 Conservation of Momentum

Under the same coordinate system as 3.1, the momentum continuity equation reduces to the steady-

state form of

∂[ρu2+p]∂x = 0

Integrating this equation over the region containing the shock discontinuity at xs and extending

x in either direction yields

´ xs+x

xs−x∂[ρu2+p]

∂x dx =[∂[ρu2+p]

∂x

]xs+x

xs−x

Letting ρ1, u1represent the constant density and velocity post-shock and ρ2, u2 represent the

constant density and velocity pre-shock, it follows that

ρ1u21 + p1 = ρ2u

22 + p2

is the condition that must be satised to ensure momentum conservation across the shock wave

[Feynman & al, 1964].

3.3 Conservation of Energy

Using the same coordinate system as 3.1, the energy conservation equation reduces to the steady-

state form

∂[ρu(E+p/ρ)]∂x = 0

Integrating this equation over the region containing the shock discontinuity at xs and extending

x in either direction yields

´ xs+x

xs−x∂[ρu(E+p/ρ)]

∂x dx =[∂[ρu(E+p/ρ)]

∂x

]xs+x

xs−x

Letting ρ1, u1represent the constant density and velocity post-shock and ρ2, u2 represent the

constant density and velocity pre-shock, it follows that:

ρ1u1(e1 +12u

21 +

p1

ρ1) = ρ2u2(e2 +

12u

22 +

p2

ρ2)

Applying the Conservation of Mass condition, this reduces to [Feynman & al, 1964]:

e1 +12u

21 +

p1

ρ1= e2 +

12u

22 +

p2

ρ2

9

Page 17: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

3.4 The Jump Condition

Furthermore, it is useful to dene a generalized jump condition for a hyperbolic conservation law.

Consider the expression

∂u∂t + ∂[f(u)]

∂x = 0

over a region (x1, x2) such that there is a discontinuity in the conserved scalar quantity u.

Suppose this discontinuity occurs at some x1 < xS < x2. Integrating over the region (x1, x2), it

follows that:

∂∂t

´ x2

x1udx = −

´ x2

x1

∂∂xf(u)dx

Therefore, due to the discontinuity at xS :

∂∂t

[´ xS

x1udx+

´ x2

xSudx

]= −´ x2

x1

∂∂xf(u)dx

And so:

∂∂t

[´ xS

x1udx+

´ x2

xSudx

]= −f(u) |x2

x1

Thus:

u1∂xS

dt − u2∂xS

dt +´ xS

x1

∂u∂t dx+

´ x2

xS

∂u∂t dx = −f(u) |x2

x1

By letting x1 → xs and x2 → xs the integral terms´ xS

x1

∂u∂t dx and

´ x2

xS

∂u∂t dx both go to zero.

Therefore:

u1∂xS

dt − u2∂xS

dt = −f(u) |x2x1

Solving this expression for ∂xS

dt gives:

uS = f(u1)−f(u2)u1−u2

where us =∂xS

dt is the shock speed. Additionally, us must be such that

f ′(u2) < uS < f ′(u1)

(where f ′(u1) and f ′(u2) are the characteristic speeds pre-shock and post-shock) to ensure en-

tropy always increases [Feynman & al, 1964].

10

Page 18: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Chapter 4

The Riemann Problem of the 1D Euler Equations

Now that the governing Euler Equations have been derived, numerical stability established, and the

RH conditions dened, we can begin to discuss a classical uid dynamics problem in great detail.

In this paper we will be examining the Sod Shock Tube, a specic form of a Riemann problem. A

Riemann problem consists of a conservation law (or a set of conservation laws) paired with piecewise

constant data containing a single discontinuity, typically at zero.

4.1 Denition of the 1D Riemann Problem

Let Ω be an open subset of R. Let u be a vector-valued function from × [0,∞) to Rn. Let f(u)

be a smooth function from Rn into Rn. Then the initial value problem∂u∂t + ∂f(u)

∂x = 0

u(x0) =

uL

uR

x ≤ 0

x > 0

with uL = uR, uL, uR ∈ R is called a Riemann Problem in 1D [Fossati & al, 2014].

4.2 1D Euler Riemann Problem Characteristics

As stated in section 2, the Euler equations represent conservation of mass, momentum, and energy

for a compressible uid. By expressing the system in terms of specic volume v, velocity u, and

specic entropy s the equations can alternatively be expressed in the quasilinear form [Fossati & al,

2014]: ∂v∂t + u∂v

dx − v ∂udx = 0

∂u∂t + u∂u

∂x + v(

∂p∂v

)s

∂v∂x + v

(∂p∂s

)v

∂s∂x = 0

∂s∂t + u ∂s

∂x = 0

Let wT = (v, u, s) and A(w) be the Jacobian matrix

A(w) =

u −v 0

v(

∂p∂v

)s

u v(

∂p∂s

)v

0 0 u

The system may be expressed in the compact form

∂w∂t +A(w)∂w∂x = 0

By nding the eigenvectors of the matrix A, characteristic curves of the Euler Equations may be

established. The eigenvalues of A, found by calculating det(A− λI) = 0, are given by

λ1(w) = u−√(

∂p∂ρ

)s, λ2(w) = u, λ3(w) = u+

√(∂p∂ρ

)s

11

Page 19: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

where c(s, v) =

√(∂p∂ρ

)sis the speed of sound of the medium [Fossati & al, 2014]. Once the

eigenvalues have been established, the corresponding eigenvectors are found by solving Aei = λiei

for ei. The right eigenvectors corresponding to λ1, λ2, and λ3 respectively are:

e1(w) =

v

c(s, v)

0

, e2(w) =

−(

∂p∂s

)v

0(∂p∂v

)s

, e3(w) =

v

−c(s, v)

0

Thus, for each eigenvalue-eigenvector pair there is a characteristic eld and an associated wave

traveling at the speed of sound [Fossati & al, 2014].

4.2.1 Genuine Nonlinearity

The ith characteristic eld associated with the ith eigenvalue and eigenvector is said to be genuinely

nonlinear if it is such that [Evans, 2010]:

ei(w) · ∇λi(w) = 0 ∀w

With this denition, it can be shown that the rst and third characteristic elds are genuinely

nonlinear, while the second characteristic eld is such that e2(w) · ∇λ2(w) = 0 (and is said to be

linearly degenerate). It follows that the second characteristic is a wave following the discontinuity

(called the contact wave), while the rst and third characteristic elds may be either a compressive

shock wave or a rarefactive fan propagating from the initial discontinuity. Which of these waves

occur for a given problem is dependent upon the entropy of the system. Each wave type is outlined

below by the denitions provided in [Evans, 2010].

4.2.2 Rarefaction Waves

Theorem. Suppose there exists an ek(w) and λk such that ek(w) · ∇λk(w) = 0 ∀w. If uR is such

that λk(uR) > λk(uL), then there exists a continuous integral solution u of Riemann's Problem that

is a k-simple wave constant along characteristic lines passing through the origin. This u is called a

centered k-rarefaction wave. [Evans, 2010]

Figure 4.1: Rarefaction Wave Graphic

12

Page 20: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

4.2.3 Contact Waves

Theorem. Suppose there exists an ek(w) and λk such that ek(w) · ∇λk(w) = 0. Additionally

suppose uR is such that F (uR) − F (uL) = c(uR − uL) and λk(uL) = c(uR − uL) = λk(uR) . Then

the integral solution u below satises the system of conservation laws F, and the line x = λit is said

to be a k-contact discontinuity wave. [Evans, 2010]

u(x, t) =

uL

uR

x < λkt

x > λkt

Figure 4.2: Contact Wave Graphic

4.2.4 Shock Waves

Theorem. Suppose there exists an ek(w) and λk such that ek(uL) · ∇λk(uL) = 0. Additionally

suppose uR is such that F (uR) − F (uL) = c(uR − uL) and λk(uL) < c(uR − uL) < λk(uR). Then

the integral solution below satises the system of conservative laws F, and u is said to be a k-shock

wave. [Evans, 2010]

u(x, t) =

uL

uR

x < c(uR − uL)t

x > c(uR − uL)t

Figure 4.3: Shock Wave Graphic

13

Page 21: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

4.3 Integral Solution to the 1D Euler Riemann Problem

In conservation form, the Euler Equations may be written as [Sod, 1987]

∂ρ∂t +

∂[m]∂x = 0

∂[m]∂t + ∂[(m2/ρ)+p]

∂x = 0

∂[ρE]∂t + ∂[(m/ρ)(E+p)]

∂x = 0

where m = ρu is momentum, E = ρϵ + 12ρu

2, and internal energy ϵ is given by ϵ = p/(γ − 1)ρ.

Furthermore, p = A(S)pγ , where A(S) is a function of entropy [Sod, 1987]. In order to work with

the wave characteristics found in 5.2, a solution u(x, t) will be applied to the integral form of the

system, which is found by integrating the Euler equations in the (x,t) plane with x ≥ 0, t ≥ 0 and

applying Green's Theorem. The integral forms are [Sod, 1987]:´ρdx+

´mdt = 0

´mdx+

´((m2/ρ) + p)dt = 0

´ρEdx+

´((m/ρ)(E + p))dt = 0

Now, consider the Riemann problem in 5.1 with uL = SL(ρL, uL, pL) and uR = SR(ρR, uR, pR).

The solution of this system at times t > 0 will look like the below gure [Sod, 1987]:

Figure 4.4: Sod Shock Model Figure

In this gure the region S∗ is at a steady state, while the regions S1and S2 are either shock waves

or rarefactive compression waves, as found in section 5.1. Each state must be separated by the lines

l1 and l2. Furthermore, the contact wave ∂x∂t = u∗ separates S∗into two parts. Between each part

u∗ and p∗ are equivalent, but ρ∗ varies in general [Sod, 1987]. In order to construct a solution to

the Riemannian problem, the values of u∗, p∗ , and ρ∗ must be found. Likewise, the related values

in S1and S2 must be found as well.

4.3.1 Solving for mL, mR, and p∗

To nd necessary conditions on the values of p∗, dene the quantities mL and mR as follows [Sod,

1987]:

14

Page 22: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

mL = (pL − p∗)/(uL − u∗)

mR = (pR − p∗)/(uR − u∗)

Furthermore, suppose that left-hand and right-hand waves are both shock waves. Applying the

RH conditions, it must additionally be true that

mL = pL(uL − UL) = ρ∗(u∗ − UL)

mR = pR(uR − UR) = ρ∗(u∗ − UR)

where UL and UR denote the velocity of the left-hand and right-hand waves respectively. There-

fore it follows that [Sod, 1987]:

mR = (ρRpR)1/2ϕ( ρ∗

pR)

mL = (ρLpL)1/2ϕ( ρ∗

pL)

where ϕ(x) =(γ+12 x+ γ−1

2

)1/2for x ≥ 1 and ϕ(x) =

(γ−12γ1/2x+ 1−x

1−x(γ−1)/(2γ)

)for x ≤ 1

Additionally, a third equation can be derived by removing u∗ in the denitions of mL and mR,

then solving for p∗:

mL = (pL − p∗)/(uL − u∗) and mR = (pR − p∗)/(uR − u∗)

⇒ mL(uL − u∗) = (pL − p∗) and mR(uR − u∗) = (pR − p∗)

⇒ (uL − u∗) = (1/mL)(pL − p∗) and (uR − u∗) = (1/mR)(pR − p∗)

⇒ u∗ = uL − (1/mL)(pL − p∗) and u∗ = uR − (1/mR)(pR − p∗)

⇒ uL − (1/mL)(pL − p∗) = uR − (1/mR)(pR − p∗)

⇒ uL − uR = (pL/mL)− (pR/mR)− (1/mL − 1/mR)(p∗)

⇒ uL − uR − (pL/mL) + (pR/mR) = −(1/mL − 1/mR)(p∗)

⇒ [uL − uR − (pL/mL) + (pR/mR)]/(1/mL − 1/mR) = p∗

⇒ p∗ = [uL − uR + pL

mL+ pR

mR]/( 1

mL+ 1

mR)

This expression, coupled with yields a system of three equations of the unknowns mL, mR, and

p∗. Upon choosing initial values for each unknown, the solution can be found through repeated

iteration of these three equations [Sod, 1987].

15

Page 23: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

4.3.2 Solving for u∗

By once more considering the denitions of mL and mR, an equation can be derived that will yield

u∗ once the values of p∗, mL, and mR are known:

mL = (pL − p∗)/(uL − u∗) and mR = (pR − p∗)/(uR − u∗)

⇒ mL(uL − u∗) = (pL − p∗) and mR(uR − u∗) = (pR − p∗)

⇒ pL −mL(uL − u∗) = p∗ and pR −mR(uR − u∗) = p∗

⇒ pL −mL(uL − u∗) = pR −mR(uR − u∗)

⇒ pL − pR −mLuL +mRuR = (mR −mL)u∗

⇒ u∗ = [pL − pR −mLuL +mRuR]/(mR −mL)

⇒ u∗ = [pL − pR +mLuL +mRuR]/(mR +mL)

4.3.3 Solving for S1 and S2

Once the values in the region S∗ have been determined, considerations will need to be made to

determine the wave phenomena that are physically admissible (by entropy) in the regions S1 and

S2. As shown above in the [Sod Shock Model Figure], the uid initially at x ≤ 0 is separated from

the uid initially at x > 0 by the contact discontinuity ∂x∂t = u∗. There are 10 possible cases, each

outlined by [Sod, 1987]:

1. Suppose a sample point ξnx lies to the left of the line ∂x∂t = u∗ (such that ξnx < u∗

t2 ). If

the left-hand wave is a shock wave, where p∗ > pL, and ξnx is to the left of the shock line∂x∂t = UL, then it follows that ρ = ρL, u = uL, and p = pL.

2. Suppose a sample point ξnx lies to the left of the line ∂x∂t = u∗ (such that ξnx < u∗

t2 ).

If the left-hand wave is a shock wave, where p∗ > pL, and ξnx is to the right of the shock

line ∂x∂t = UL, then it follows that ρ = ρ∗, u = u∗, and p = p∗. ρ∗ is given by the calculation

ρ∗ = mL/(UL − u∗), which comes from the RH conditions.

3. Suppose a sample point ξnx lies to the left of the line ∂x∂t = u∗ (such that ξnx < u∗

t2 ). If

the left-hand wave is a rarefaction wave, where p∗ ≤ pL. The rarefaction wave is bounded to

the left by ∂x∂t = uL − cL, where cL = (γpL/ρL)

12 denotes the speed of sound, and is bounded

to the right by the line ∂x∂t = u∗− c∗, where c∗ = (γp∗/ρ∗)

12 . The uid ow is adiabatic in this

region, and thus the equation of state p = A(S)pγ , where S denotes entropy, may be expressed

as p = Apγ , where A is a constant. Applying the isentropic law pLρ−γL = p∗ρ

−γ∗ it follows that

ρ∗ = (p∗/A)−γ . If ξnx lies to the left of the rarefaction wave, then ρ = ρL, u = uL, and

p = pL.

4. Suppose a sample point ξnx lies to the left of the line ∂x∂t = u∗ (such that ξnx < u∗

t2 ). If

the left-hand wave is a rarefaction wave, where p∗ ≤ pL. The rarefaction wave is bounded to

the left by ∂x∂t = uL − cL, where cL = (γpL/ρL)

12 denotes the speed of sound, and is bounded

to the right by the line ∂x∂t = u∗− c∗, where c∗ = (γp∗/ρ∗)

12 . The uid ow is adiabatic in this

16

Page 24: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

region, and thus the equation of state p = A(S)pγ , where S denotes entropy, may be expressed

as p = Apγ , where A is a constant. Applying the isentropic law pLρ−γL = p∗ρ

−γ∗ it follows

that ρ∗ = (p∗/A)−γ . If ξnx lies inside the rarefaction wave, the slope of the line passing

through the origin and (ξnx, t2 ) is equivalent to the characteristic line ∂x

∂t = u− c. In other

words, u− c = 2ξnxt . With the isentropic law, the denition of c, and the Riemann invariant

2c(γ − 1)−1 + u = 2cL(γ − 1)−1 + uL, the terms ρ, u, and p can be calculated. Applying

the isentropic law it follows that p = pLρ−γL ργ = Aργ . Solving the Riemann invariant for

c yields c = cL + 12 (γ − 1)(uL − u), which when substituted into u − c = 2ξn

xt yields

u = 2γ+1

(2ξnx

t + cL + γ−12 uL

). Similarly, substituting this expression of c into c = (γp/ρ)

12

and solving for ρ yields the expression p =(

c2

γA

) 1γ−1

.

5. Suppose a sample point ξnx lies to the left of the line ∂x∂t = u∗ (such that ξnx < u∗

t2 ). If

the left-hand wave is a rarefaction wave, where p∗ ≤ pL. The rarefaction wave is bounded to

the left by ∂x∂t = uL − cL, where cL = (γpL/ρL)

12 denotes the speed of sound, and is bounded

to the right by the line ∂x∂t = u∗− c∗, where c∗ = (γp∗/ρ∗)

12 . The uid ow is adiabatic in this

region, and thus the equation of state p = A(S)pγ , where S denotes entropy, may be expressed

as p = Apγ , where A is a constant. Applying the isentropic law pLρ−γL = p∗ρ

−γ∗ it follows that

ρ∗ = (p∗/A)−γ . If ξnx lies to the right of rarefaction wave, it follows that ρ = ρ∗, u = u∗,

p = p∗.

6. Suppose a sample point ξnx lies to the right of the line ∂x∂t = u∗(such that ξnx ≥ u∗

t2 ).

If the right wave is a shock wave, where p∗ > pR, and if ξnx lies to the left of the shock

line ∂x∂t = UR, then it follows that ρ = ρ∗, u = u∗, and p = p∗. ρ∗ is given by the calculation

ρ∗ = −mR/(u− UR), which comes from the RH conditions.

7. Suppose a sample point ξnx lies to the right of the line ∂x∂t = u∗(such that ξnx ≥ u∗

t2 ).

If the right wave is a shock wave, where p∗ > pR, and if ξnx lies to the right of the shock

line ∂x∂t = UR, then it follows that ρ = ρR, u = uR, and p = pR.

8. Suppose a sample point ξnx lies to the right of the line ∂x∂t = u∗(such that ξnx ≥ u∗

t2 ).

If the right wave is a rarefaction wave, where p∗ ≤ pR, then the wave is bounded on the left

by ∂x∂t = u∗ + c∗ where c∗ = (γp∗/ρ∗)

12 , and on the right-hand side by the line ∂x

∂t = uR + cR

where cR = (γpR/ρR)12 . ρ∗ = (p∗/A)

1/γ comes from the isentropic law pRρ−γR = p∗ρ

−γ∗ = A.

If ξnx lies to the left of the rarefaction wave, then it follows that ρ = ρ∗, u = u∗, p = p∗.

9. Suppose a sample point ξnx lies to the right of the line ∂x∂t = u∗(such that ξnx ≥ u∗

t2 ).

If the right wave is a rarefaction wave, where p∗ ≤ pR, then the wave is bounded on the left

by ∂x∂t = u∗ + c∗ where c∗ = (γp∗/ρ∗)

12 , and on the right-hand side by the line ∂x

∂t = uR + cR

where cR = (γpR/ρR)12 . ρ∗ = (p∗/A)

1/γ comes from the isentropic law pRρ−γR = p∗ρ

−γ∗ = A.

If ξnx lies inside the right rarefaction wave, the slope of the characteristic ∂x∂t = u + c is

equivalent to the slope of the line passing through the origin and (ξnx, t2 ). In other words,

u + c = 2ξnxt . With the isentropic law, the denition of c, and the Riemann invariant

2c(γ − 1)−1 − u = 2cR(γ − 1)−1 − uR, the terms ρ, u, and p can be calculated. Applying

the isentropic law it follows that p = pRρ−γR ργ = Aργ . Solving the Riemann invariant for

c yields c = cR + 12 (γ − 1)(u − uR), which when substituted into u + c = 2ξn

xt yields

17

Page 25: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

u = 2γ+1

(2ξnx

t − cR + γ−12 uR

). Similarly, substituting this expression of c into c = (γp/ρ)

12

and solving for ρ yields the expression p =(

c2

γA

) 1γ−1

.

10. Suppose a sample point ξnx lies to the right of the line ∂x∂t = u∗(such that ξnx ≥ u∗

t2 ).

If the right wave is a rarefaction wave, where p∗ ≤ pR, then the wave is bounded on the left

by ∂x∂t = u∗ + c∗ where c∗ = (γp∗/ρ∗)

12 , and on the right-hand side by the line ∂x

∂t = uR + cR

where cR = (γpR/ρR)12 . ρ∗ = (p∗/A)

1/γ comes from the isentropic law pRρ−γR = p∗ρ

−γ∗ = A.

If ξnx lies to the right of the rarefaction wave, then ρ = ρR, u = uR, and p = pR.

18

Page 26: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Chapter 5A Scalar Example: Trac Flow

To illustrate the concepts behind the aforementioned characteristics, lets examine how shock waves

and rarefaction waves might occur in the ow of trac [LeVeque, 1992].

Consider the ow of cars on a highway. Let ρ denote car density (in cars per mile) and let u be

the local velocity.

Since its clear that the number of cars in a given area can only be so large before major vehicular

damage is caused, it follows that the car density ρ is such that 0 ≤ ρ ≤ ρmax, where ρmax is the

density at which the cars are bumper to bumper. Since the change in car density over time is given

by the amount of cars that move in and out of the mile of interest, it follows that:

∂ρ∂t +

∂(ρu)∂x = 0

For this expression to be linear, the velocity u must be a function of the car density ρ. The

simplest model of this behavior is the linear relationship [LeVeque, 1992]:

u(ρ) = umax

(1− ρ

ρmax

)With this relationship between the car density and the car velocity, the above governing equation

can be written in the form:

∂ρ∂t +

∂(f(ρ))∂x = 0

where

f(ρ) = ρu(ρ) = ρumax

(1− ρ

ρmax

)The characteristic speed for this expression is thus given by:

f ′(ρ) = umax

(1− 2ρ

ρmax

)Furthermore, by applying the general jump condition, the shock speed for a discontinuity in the

density prole must travel at the rate:

s =(

f(ρL)−f(ρR)ρL−ρR

)= umax

(1− ρL+ρR

ρmax

)5.1 Trac Flow Riemann Problem

Lets suppose that over the course of a really long stretch of road the car densities are initially such

that

ρ(x, 0) =

ρL x ≤ 0

ρR x > 0

Where ρL, ρR are constants between 0 and ρmax. Furthermore, lets suppose the cars are moving

from left to right on a single-lane highway for the sake of simplicity. There are three possible

scenarios that describe the nature of movements and positioning of the cars [LeVeque, 1992].

19

Page 27: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

5.1.1 Contact Wave

If ρL = ρR, then the cars are evenly distributed across the entire highway. Since the velocity u of

each car is linearly dependent upon its surrounding environment it immediately follows that every

car has the same velocity:

f ′(ρR) = umax

(1− 2ρR

ρmax

)Therefore, the position of any car at any point in time may be calculated by the characteristic

equation [LeVeque, 1992]:

x(t) = umax

(1− 2ρR

ρmax

)t+ x0

Figure 5.1: Characteristic / Flow Prole for Trac Contact Wave

5.1.2 Shock Wave

If ρL < ρR, then the car distribution is more compact in the latter half of the highway than the

former. Therefore the cars on the leftmost half of the highway are traveling faster than cars in the

rightmost half. As a car approaches the mass of slower moving cars it must slow. In turn, the car

behind it must slow as well. This slowing of cars creates a shock wave that travels backwards from

the trac congestion [LeVeque, 1992].

Figure 5.2: Characteristic and Flow Prole for Trac Shock Wave

20

Page 28: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

5.1.3 Rarefactive Fan

If ρL > ρR, the car distribution is more compact in the former half of the highway than the latter.

A good way to visualize this scenario is with a trac light. At a red light a line of tightly compacted

cars are waiting for permission to move. Once the light turns green, the road ahead is now free to

enter. As the rst car moves it creates space for the car behind it. This process creates a chain

reaction that travels back across the highway. This case is characterized by the rarefactive fan we

discussed earlier [LeVeque, 1992].

Figure 5.3: Characteristic and Flow Prole for Trac Rarefactive Fan

5.2 Conclusions from Trac Flow

Though the interactions of uids and gases are more intricate than the trac ow systems, the

general concept is the same. When regions of high density interact with regions of low density chain

reactions are set o that propagate across the domain. We will now look at a test case for the

Riemann problem of the Euler Equations - the Sod shock tube.

21

Page 29: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Chapter 6

Integral Solution of the Sod Shock Tube

The Sod Shock Tube is a Riemann problem often used as a standard problem in numerical hydro-

dynamics due to the existence of an analytic solution. In the Sod Shock Tube, the time evolution

of Euler equations in 1D are analyzed under the following initial conditions:

(ρ, v, p)t=0 =

(1.0, 0.0, 1.0) if 0 ≤ x ≤ 0.5

(0.125, 0.0, 0.1) if 0.5 < x ≤ 1

(ρ, v, p)x=0 = (1.0, 0.0, 1.0), (ρ, v, p)x=1 = (0.125, 0.0, 0.1), and γ = 1.4

The integral solution to this problem is as follows [Sod, 1978][Stone & al, 1992]:

ρ(x, t) =

1.0 x ≤ 0.5− 1.183216t

(Cs/1.183216)5 0.5− 1.183216t < x ≤ 0.5− 0.11817t

0.44215 0.5− 0.11817t < x ≤ 0.5 + 0.89095t

0.27394 0.5 + 0.89095t < x ≤ 0.5 + 1.6387t

0.125 x > 0.5 + 1.6387t

u(x, t) =

0.0 x ≤ 0.5− 1.183216t−5(0.5−x)

6(t+1.183216) 0.5− 1.183216t < x ≤ 0.5− 0.11817t

0.89095 0.5− 0.11817t < x ≤ 0.5 + 0.89095t

0.89095 0.5 + 0.89095t < x ≤ 0.5 + 1.6387t

0.0 x > 0.5 + 1.6387t

p(x, t) =

1.0 x ≤ 0.5− 1.183216t

ρ(x, t)1.4 0.5− 1.183216t < x ≤ 0.5− 0.11817t

0.3190 0.5− 0.11817t < x ≤ 0.5 + 0.89095t

0.3190 0.5 + 0.89095t < x ≤ 0.5 + 1.6387t

0.1 x > 0.5 + 1.6387t

E(x, t) =

2.5 x ≤ 0.5− 1.183216t2p(x,t)

5 + 12ρ(x, t) (u(x, t))

20.5− 1.183216t < x ≤ 0.5− 0.11817t

0.97299 0.5− 0.11817t < x ≤ 0.5 + 0.89095t

0.90623 0.5 + 0.89095t < x ≤ 0.5 + 1.6387t

0.25 x > 0.5 + 1.6387t

where Cs =

0.5−x6t + 0.98601

22

Page 30: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Figure 6.1: Analytic Density Proles

23

Page 31: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Figure 6.2: Analytic Velocity Proles

24

Page 32: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Figure 6.3: Analytic Pressure Proles

25

Page 33: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Figure 6.4: Analytic Energy Proles

26

Page 34: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Chapter 7

The Lax Method

The rst method that will be analyzed in this paper is the Lax Method. The Lax Method is likely

the simplest scheme, both in philosophy and construction. Consider an expression of the form

∂u(x,t)∂t = −∂[f(u(x,t))]

∂x

for independent variables x and t and an initial state u(x, 0) in one-dimension. Furthermore

consider a grid of n equally spaced Grid Spacing of displacement x about the problem domain.

One can approximate the solution u(x, t + t) by taking the spatial average of each node at the

time u(x, t). This gives rise to the scheme [Denker, 2002]:

uj+1i = 1

2 (uji+1 + uj

i−1)−t2x (f

ji+1 − f j

i−1)

Figure 7.1: Lax Method Schematic Diagram

7.1 Von Nuemann Stability Analysis of the Lax Method

Suppose u(x, t) = A(t)eikx is a solution of the advection equation. Applying the Lax Method, it

follows that:

An+1eikj∆x = 12 [A

neik(j+1)∆x +Aneik(j−1)∆x]− c∆t2∆x

[Aneik(j+1)∆x −Aneik(j−1)∆x

]Dividing through by A(t)eikx, it follows that the magnication factor ξ is given by:

ξ = 12

[eik∆x + e−ik∆x

]− c∆t

2∆x

[eik∆x − e−ik∆x

]ξ = cosh(ik∆x)− c∆t

∆x sinh(ik∆x)

Given that sinh(ik∆x) = i ∗ sin(k∆x) and cosh(ik∆x) = cos(k∆x), it follows that |ξ| is givenby:

|ξ| =√cos2(k∆x) +

(c∆t

∆x

)2sin(k∆x)

27

Page 35: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Since sin2(k∆x) ≤ 1 and cos2(k∆x) ≤ 1, it follows that:

|ξ| ≤ 1 if and only if c∆t∆x ≤ 1

And thus:

|ξ| ≤ 1 if and only if ∆t ≤ ∆xc

Therefore the Lax Method is stable if the CFL condition is satised [Denker, 2002].

7.2 Lax Truncation Error

Consider the advection equation:

∂u(x,t)∂t = −c∂u(x,t)∂x

By taking the forward temporal dierence and spatial average of u(x, t), the above may be

expressed as:

u(x,t+t)−u(x,t)t = −cu(x+x,t)+u(x+x,t)

2x +O(x2)

Isolating u(x, t+t) gives:

u(x, t+t) = u(x, t)− c t2x [u(x+x, t) + u(x+x, t)] +O(x2)

But u(x, t) may be approximated by 12 [u(x+x, t) + u(x−x, t)]. This gives the Lax method:

u(x, t+t) = 12[u(x+x, t) + u(x−x, t)]− c t

2x [u(x+x, t) + u(x+x, t)] +O(x2)

Therefore the Lax method has local truncation error O(x2) and is said to be an O(x) method

[Sod, 1978].

7.3 Lax Algorithm

The following outlines the implementation of the Lax Method used in this paper:

1. For a given domain of [0, L], discretize the domain into n equally spaced grid points.

2. Initialize the value at each grid point by the given initial conditions. Initialize time and the

time step.

3. For each grid point uj , calculate f(uj) by the given gradients. Fix the value of boundary grid

points.

4. Update grid point uj by the Lax Step.

5. Update the current time.

6. Update the time step by applying the CFL condition.

7. Return to step 3.

28

Page 36: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Chapter 8

The Lax-Wendro Method

The second method that will be analyzed is the Lax-Wendro Method. Much like the Lax Method,

the Lax-Wendro Method uses nite dierences to approximate solutions to hyperbolic partial dier-

ential equations. Unlike the Lax Method however, central nite dierences are applied at a temporal

half-step, ultimately resulting in second-order accuracy in time and space. Below, we shall look at

two ways in which the Lax-Wendro method may be expressed.

8.1 Two-Step Lax-Wendro Method

Consider the equation ∂udt = −∂f(u)

∂x . Rather than using solely the information from uji to approxi-

mate the information at uj+1i , instead extrapolate to the half time step u

j+1/2i rst. This gives rise

to the scheme [Denker, 2002]:

uj+1/2i = uj

i +t2

(−∂f(u)

∂x |(i,j+1/2)

)uj+1i = uj

i +t(−∂f(u)

∂x |(i,j+1/2)

)However, ∂f(u)

∂x |(i,j+1/2) can be approximated by central nite dierences:

uj+1i = uj

i −tx

(fj+1/2i+1/2 − f

j+1/2i−1/2

)Where, in turn, both f

j+1/2i+1/2 and f

j+1/2i−1/2 can be calculated using the Lax Method:

uj+1i = 1

2 (uji+1 + uj

i−1)−t2x (f

ji+1 − f j

i−1)

This yields [Denker, 2002]:

uj+1/2i−1/2 = 1

2 (uji + uj

i−1)−t2x (f

ji − f j

i−1)

uj+1/2i+1/2 = 1

2 (uji + uj

i+1)−t2x (f

ji+1 − f j

i )

Therefore the Two-Step Lax-Wendro Method is given by [Denker, 2002]:

Step 1:

uj+1/2i−1/2 = 1

2 (uji + uj

i−1)−t2x (f

ji − f j

i−1)

uj+1/2i+1/2 = 1

2 (uji + uj

i+1)−t2x (f

ji+1 − f j

i )

Step 2:

uj+1i = uj

i −tx

(fj+1/2i+1/2 − f

j+1/2i−1/2

)

29

Page 37: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

8.2 One-Step Lax-Wendro Method

By substituting the equations from the rst step of the Two-Step Lax-Wendro Method directly

into the second step, a One-Step Lax-Wendro Method may be derived:

un+1j = un

j − t2x

[unj+1 − un

j−1

]+ (t)2

2(x)2

[unj+1 + un

j−1 − 2unj

]Though this implementation of the Lax-Wendro Method is slightly more accurate than the

Two-Step Method, it can be more dicult to implement across systems of PDE's [Denker, 2002].

Thus in our implementation we opted for the Two-Step form. However, the One-Step Method form

is still quite useful when performing a Von Neumann stability analysis, as done below.

Figure 8.1: Lax-Wendro Schematic Diagram

8.3 Von-Neumann Stability Analysis of the Lax-Wendro Method

Suppose u(x, t) = A(t)eikx is a solution of the advection equation. Applying the One-Step Lax-

Wendro Method, it follows that:

An+1eikj∆x =

Aneikj∆x− c∆t2∆x

[Aneik(j+1)∆x −Aneik(j−1)∆x

]+ c(∆t)2

2(∆x)2

[Aneik(j+1)∆x +Aneik(j−1)∆x − 2Aneikj∆x

]Dividing through by A(t)eikx, it follows that the magnication factor ξ is given by:

ξ = 1− c∆t2∆x

[eik∆x − e−ik∆x

]+ c(∆t)2

2(∆x)2

[eik∆x + e−ik(∆x − 2

]ξ = − c∆t

2∆x

[eik∆x − e−ik∆x

]+ c(∆t)2

2(∆x)2

[eik∆x + e−ik(∆x

]ξ = − c∆t

∆x sinh(ik∆x) + c(∆t)2

(∆x) cosh(ik∆x)

Given that sinh(ik∆x) = i ∗ sin(k∆x) and cosh(ik∆x) = cos(k∆x), it follows that |ξ| is givenby:

|ξ| =√(

c∆t∆x

)2sin2(k∆x) +

(c(∆t)2

(∆x)2

)2

cos2(k∆x)

Since sin2(k∆x) ≤ 1 and cos2(k∆x) ≤ 1, it follows that:

|ξ| ≤ 1 if and only if c∆t∆x ≤ 1

30

Page 38: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

And thus:

|ξ| ≤ 1 if and only if ∆t ≤ ∆xc

Therefore the Lax-Wendro Method is stable if the CFL condition is satised [Denker, 2002].

8.4 Lax-Wendro Truncation Error

Consider the Taylor Series:

u(x, t+t) = u(x, t) + ∂u∂tt+ 1

2∂2u∂t2 t2 + ...

Under the advection equation ∂udt = −c∂u∂x . Furthermore:

∂2ud∂t2 = −c ∂

∂t

(∂u∂x

)= −c ∂

∂x

(∂u∂t

)= c2 ∂2u

∂x2

Therefore:

u(x, t+t) = u(x, t)− c∂u∂xt+ c2

2∂2u∂x2t2 + ...

Which, after replacing the derivatives with nite dierences, yields the Lax-Wendro Method:

un+1i = un

i − ct2x

(uni+1 − un

i−1

)+ c2

2

(tx

)2 (uni+1 + un

i−1 − 2uni

)+O(x3)

Therefore the Lax method has local truncation error O(x3) and is said to be an O(x2)method

[Sod, 1978].

8.5 Lax-Wendro Algorithm

The following outlines the implementation of the Lax-Wendro Method used in this paper:

1. For a given domain of [0, L], discretize the domain into n equally spaced grid points.

2. Initialize the value at each grid point by the given initial conditions. Initialize time and the

time step.

3. For each grid point uj , calculate f(u)j by the given gradients. Fix the value of boundary grid

points.

4. Calculate uj+1/2 by the Lax Step.

5. For each grid point uj+1/2, calculate f(uj+1/2) by the given gradients.

6. Update each grid point uj by the second Lax-Wendro Step.

7. Update the current time.

8. Update the time step by applying the CFL condition.

9. Return to step 3.

31

Page 39: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Chapter 9

Results

9.1 Lax Method Solutions

Lax Method Solutions of First 0.5 Seconds of Sod Shock Tube Problem with 1024 Grid Points.

Figure 9.1: Lax Density Proles

32

Page 40: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Figure 9.2: Lax Velocity Proles

33

Page 41: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Figure 9.3: Lax Pressure Proles

34

Page 42: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Figure 9.4: Lax Energy Proles

35

Page 43: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

9.2 Lax Method Residual Proles

Lax Method Residuals of First 0.5 Seconds of Sod Shock Tube Problem with 1024 Grid Points

Figure 9.5: Lax Density Residuals

36

Page 44: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Figure 9.6: Lax Velocity Residuals

37

Page 45: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Figure 9.7: Lax Density Residuals

38

Page 46: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Figure 9.8: Lax Energy Residuals

39

Page 47: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

9.3 Lax Temporal Error

Lax Temporal RMS Error Evolution of the Sod Shock for 1024 Grid Points.

Figure 9.9: Lax Temporal Errors

40

Page 48: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

9.4 Lax Spatial Error on [0,1]

Lax Spatial RMS Error Evolution for the Sod Sock Tube's Rarefactive Fan for Grid Spacing 2−6,

2−7, 2−8, 2−9, and 2−10 at 0.25 seconds.

Figure 9.10: Lax spatial Errors on [0,1]

41

Page 49: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

9.5 Lax Spatial Error on Rarefactive Fan

Lax Spatial Error Evolution for the Sod Sock Tube's Rarefactive Fan for Grid Spacing 2−6, 2−7,

2−8, 2−9, and 2−10 at 0.25 seconds.

Figure 9.11: Lax spatial Errors on Rarefactive Fan

42

Page 50: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

9.6 Lax-Wendro Method Solutions

Lax-Wendro Method Solution of First 0.5 Seconds of Sod Shock Tube Problem with 1024 Grid-

points

Figure 9.12: Lax-Wendro Density Proles

43

Page 51: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Figure 9.13: Lax-Wendro Velocity Proles

44

Page 52: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Figure 9.14: Lax-Wendro Pressure Proles

45

Page 53: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Figure 9.15: Lax-Wendro Energy Proles

46

Page 54: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

9.7 Lax-Wendro Method Residual Proles

Lax-Wendro Method Residuals of First 0.5 Seconds of Sod Shock Tube Problem with 1024 Grid

Points.

Figure 9.16: Lax-Wendro Density Residuals

47

Page 55: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Figure 9.17: Lax-Wendro Velocity Residuals

48

Page 56: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Figure 9.18: Lax-Wendro Pressure Residuals

49

Page 57: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Figure 9.19: Lax-Wendro Energy Residuals

50

Page 58: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

9.8 Lax-Wendro Temporal Error

Lax-Wendro Temporal RMS Error Evolution for the Sod Shock Tube for 1024 Grid Points

Figure 9.20: Lax-Wendro Temporal Errors

51

Page 59: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

9.9 Lax-Wendro Spatial Error on [0,1]

Lax-Wendro Spatial RMS Error Evolution for the Sod Shock Tube for Grid Spacing 2−6, 2−7, 2−8,

2−9, and 2−10 at 0.25 seconds.

Figure 9.21: Lax-Wendro spatial Error on [0,1]

52

Page 60: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

9.10 Lax-Wendro Spatial Error on Rarefactive Fan

Lax-Wendro Spatial RMS Error Evolution for the Sod Sock Tube's Rarefactive Fan for Grid Spacing

2−6, 2−7, 2−8, 2−9, and 2−10 at 0.25 seconds.

Figure 9.22: Lax-Wendro spatial Error on Rarefactive Fan

53

Page 61: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Chapter 10

Conclusions

Looking at the results, it's clear that the Sod Shock Tube modeled above follow the rarefaction-

contact-shock solution of the general Riemann problem, as predicted by the exact solution in section

5.4. Surprisingly, by looking solely at the error estimates on [0,1] the methods are remarkably similar;

giving roughly rst order accuracy. Given the local truncation error calculations performed earlier,

it was a little shocking to yield results with similar error proles. However, by restricting the error

estimates to the smooth rarefactive fan, it becomes clear that the Lax-Wendro method is giving

second order results - just not where the discontinuities occur.

Since both methods have assumptions of smoothness built into them, it makes sense that either

method would over-shoot or undershoot the analytic solution. This also explains why the Gibbs

phenomenon is so prevalent in the Lax-Wendro case. An interesting idea for future research would

be to analyze how methods of higher order handle the discontinuities and how such assumption of

smoothness aect the error across the entire domain. Furthermore, a venture into a wider variety

of methods may lead to approximations with better accuracy and performance in time. Extending

the analysis further into a wider variety of test problems may also yield insight into which methods

handle particular problems with the most ease and grace.

54

Page 62: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

Bibliography

1. "Advection Equation." Institut Für Theoretische Physik. Web. <http://pauli.uni-

muenster.de/tp/leadmin/lehre/NumMethoden/WS0910/ScriptPDE/Advection.pdf>.

2. Burden, R. L., and J. D. Faires. Numerical Analysis. 8th ed. Section 2.4 Error Analysis for

Iterative Methods. 2005.

3. Denker, John. "Derivation of Euler's Equations." Physics Documents (2002). Av8n.com. Web.

<http://www.av8n.com/physics/euler-ow.htm>.

4. Evans, Lawrence C. "Systems of Conservation Laws." Partial Dierential Equations. 2nd ed.

Vol. 19. American Mathematical Society, 2010. 579-592. Print.

5. Feynman, R. P., R. P. Leighton, and M. Sands. The Feynman Lectures on Physics. 3rd ed.

Vol. I-III. Addison-Wesley, Reading, MA, 1964. Print.

6. Fossati, Marco, and Luigi Quartapelle. "The Riemann Problem of the Euler

Equations for Classical and Nonclassical Fluids." Department of Aerospace Science

and Technology (2014). Ingegneria Aerospaziale - Politecnico Di Milano. Web.

<http://www.aero.polimi.it/~quartape/bacheca/materiale_didattico/slides.pdf>.

7. Harada, Takahiro, Seiichi Koshizuka, and Yoichiro Kawaguchi. "Smoothed Par-

ticle Hydrodynamics on GPUs." Proceedings of the Computer Graphics Interna-

tional (2007): 63-70. Página Inicial / Instituto De Informatica UFRGS. Web.

<http://www.inf.ufrgs.br/cgi2007/cd_cgi/papers/harada.pdf>.

8. Hernquist, Lars, and Neal Katz. "TREESPH: A Unication of SPH with

the Hierarchical Tree Method." The Astrophysical Journal Supplement Series 70

(1988): 419-46. The Smithsonian/NASA Astrophysics Data System. Web.

<http://adsabs.harvard.edu/abs/1989ApJS...70..419H>.

9. Hosseini, S. Majid, and James J. Feng. "Pressure Boundary Conditions for Comput-

ing Incompressible Flows with SPH." Journal of Computational Physics 230.19 (2011):

74737487. Department of Mathematics, University of British Columbia, Vancouver. Web.

<http://www.math.ubc.ca/~jfeng/Publications/PDFs/11_JCP.pdf>.

10. Hu, X. Y., and N. A. Adams. "An Incompressible Multi-phase SPH Method."

Journal of Computational Physics 227.1 (2007): 264278. Science Direct. Web.

<http://www.sciencedirect.com/science/article/pii/S0021999107003300>.

11. Ihmsen, Markus, Jens Cornelis, Barbara Solenthaler, Christopher Horvath, and

Matthias Teschner. "Implicit Incompressible SPH." IEEE Transactions on Visualiza-

tion and Computer Graphics 20.3 (2014): 426-35. ACM Digital Library. Web.

<http://dl.acm.org/citation.cfm?id=2574356>.

12. LeVeque, Randall J. Trac Flow. Numerical Methods for Conservation Laws. 2nd ed. Berlin:

Birkhauser, 1992. 41-45. Print.

55

Page 63: Numerical Simulation of 1D Compressible Flows

Texas Tech University, Marcus B. Armstrong, December 2014

13. Monaghan, J. J. "Smoothed Particle Hydrodynamics." Annual Review of As-

tronomy and Astrophysics 30 (1992): 543-74. Annual Reviews. Web.

<http://www.annualreviews.org/doi/abs/10.1146/annurev.aa.30.090192.002551>.

14. Morton, K. W., and D. F. Mayers. Numerical Solution of Partial Dierential Equations. 2nd

ed. Cambridge UP, 2005. Print.

15. Müller, Matthias, David Charypar, and Markus Gross. "Particle-Based Fluid Simula-

tion for Interactive Applications." Proceedings of the 2003 ACM SIGGRAPH/Eurographics

Symposium on Computer Animation (2003): 154-59. ACM Digital Library. Web.

<http://dl.acm.org/citation.cfm?id=846298>.

16. Mukai, Nobuhiko. "Simulations with Particle Method." Computer Graphics. Rijeka, Croatia:

InTech, 2012. 111-119. Print.

17. Noutcheuwa, Rodrigue Keou, and Robert G. Owens. "A New Incompressible Smoothed Par-

ticle Hydrodynamics-Immersed Boundary Method." International Journal of Numerical Anal-

ysis and Modeling 3.2 (2012): 126-67. Department of Mathematics and Statistics, University

of Alberta. Web. <http://www.math.ualberta.ca/ijnamb/Volume-3-2012/No-2-12/2012-02-

02.pdf>.

18. Press, William H., Saul A. Teukolsky, William T. Vetterling, and Brian P. Lettering. Numerical

Recipies in C: The Art of Scientic Computing. 2nd ed. New York: Cambridge UP, 1992.

Print.

19. Rezzolla, Luciano. "Numerical Methods for the Solution of Partial Dierential Equa-

tions." Lecture Notes for the COMPSTAR School on Computational Astrophysics (2011).

Max Planck Institute for Gravitational Physics (Albert Einstein Institute). Web.

<http://www.aei.mpg.de/~rezzolla/lnotes/Evolution_Pdes/evolution_pdes_lnotes.pdf>.

20. Sod, Gary A. "A Survey of Several Finite Dierence Methods for Systems of Nonlinear Hy-

perbolic Conservation Laws." Journal of Computational Physics 27.1 (1978): 1-31. Web.

<http://www.tat.physik.uni-tuebingen.de/~kley/lehre/bhydro/sod-paper.pdf>.

21. Stone, J. M., and Norman, M. L. 1992, The Astrophysical Journal Supplement Series, 80,

753-790. "ZEUS-2D: A Radiation Magnetohydrodynamics Code for Astrophysical Flows in

Two Space Dimensions. I. The Hydrodynamic Algorithms and Tests"

22. Shu, Chi-Wang. "Numerical Methods for Hyperbolic Conservation

Laws." Brown University (2006). Andreas Klöckner's Web Page. Web.

<http://mathema.tician.de/dl/academic/notes/257/257.pdf>.

23. Trefethen, Lloyd N. "Accuracy, Stability, and Convergence." Finite Dierence and Spectral

Methods for Ordinary and Partial Dierential Equations. 1994. 146-185. Print.

24. Yang, Lipeng, Shuai Li, Aimin Hao, and Hong Qin. "Realtime Two-Way Coupling of Meshless

Fluids and Nonlinear FEM." Computer Graphics Forum 31.7 (2012): 20372046. ACM Digital

Library. Web. <http://dl.acm.org/citation.cfm?id=2399351>.

56