numerical pde techniques for scientists and …dbalsara/numerical-pde-course/ch1/...numerical pde...

75
Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara ([email protected] ) Please visit:- http://www.nd.edu/~dbalsara/Numerical-PDE-Course 1

Upload: doankhanh

Post on 28-Aug-2018

251 views

Category:

Documents


2 download

TRANSCRIPT

Page 2: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

Chp 1 : Overview of PDEs of Relevance to Science and

EngineeringBy

Prof. Dinshaw S. Balsara

2

Page 3: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

1.1) Introduction

Precise solutions needed for problems in science, engineering and applied math.

Many of these problems governed by partial differential equations (PDEs).

Analytical solutions to PDEs, few and limited.

Very effective numerical solution techniques are now available.

Powerful computers make it possible to obtain solutions to large, real-world problems.

Algorithms make it happen. They apply to broad classes of PDEs, not to a specific PDE. Learn general classes of algorithms and you can solve broad classes of PDEs. Emphasis on theory and technique. 3

Page 4: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

4

Broad classes of PDEs of interest (with pedestrian introductions):

Hyperbolic PDEs : Enable information to propagate as waves.Examples: Water waves, sound waves, oscillations in a solid structure and electromagnetic radiation.

Parabolic PDEs : Enable information to travel as diffusive processes.Examples: heat transfer, mass diffusion in the ground, diffusion of photons out of the sun.

Elliptic PDEs : Don’t have time variation, convey action at a distance.Examples: Gravitational field, electrostatics.

We first study solution techniques for these PDEs piecemeal and then learn how to assemble them together for more complex PDEs.

Since we all have most direct experience with fluids, we will use the Navier Stokes equations as our motivating example. Several other PDEs of practical interest are also introduced in this chapter.

Page 5: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

5

1.2) Derivation of the Fluid Equations

While this topic is well-known to some and not at all to others, it helps to bring everyone up to speed. Navier Stokes equations will serve as our touchstone system because it has all the ingredients that we want to study.

We do not dwell on details; we just provide as much intuitive background as is needed for understanding the nature of the PDEs.

Continuum behavior on the macroscopic scales arises from discrete molecular dynamics on the microscopic scales. Gives insight into PDEs.

1.2.1) Importance of CollisionsThere are about 1019 molecules of air in a 1 cm3 volume of air in this room. Simplifying assumption – single type of molecule.

Each molecule would minimally have a position vector x and a momentum vector p . Describe by a distribution function f(x,p,t) . (Note f(x,p,t) d3p has units of number of particles per unit volume.) Problem: The degrees of freedom are too large;would soon overwhelm us.

Page 6: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

6

Molecules make very frequent collisions with one another. The collisions totally scramble the initial momentum of the colliding particles. Important Question: How quickly does this scrambling take place?

Fortunately, once collisions have acted, statistical mechanics enables us to make a profound simplification.

Let n be the number density of molecules and σ be their cross section. The mean free path, l, is the distance each molecule can coast before it collides with another: l ~ 1/(nσ) ; l ~ 10-4 cm for air in this room.a~ 10-8 cm, σ ~ 10-15 cm2 for molecules.

Disk showing collision cross section. Radius of “spherical” molecule is “a” Area of disk is σ=π (2a)2.

a

a 2a

Page 7: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

7

Particles in a gas move with a velocity that is comparable to the speed of sound in the gas.

Let the particle speed be wT . For air in this room , wT ~ 3×104 cm/sec.

The time between collisions is given by τ ~ l/ wT . Again for air in this room we have τ ~ 3×10-9 sec.

The fluid approximation then holds if the length of the system L >> land the timescales over which we observe the system are T >> τ .

In all systems where the gas meets this scaling, we may easily use the fluid approximation. It is easily met for air in this room.

The fluid approximation then guarantees that the local velocity distribution of the molecules is almost Gaussian (recall statistical mechanics). This is a tremendous simplification in our distribution function : f(x,p,t) . The temperature and density then govern this distribution as just two independent parameters in the fluid’s rest frame.

Page 8: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

8

Mass conservation and the fact that molecules are neither created or destroyed enable us to write an expression for the density:

The frequent collisions ensure that molecules that form a parcel of gas do not stray too far from each other. This enables us to define a concept of bulk fluid velocity, v (check these equations for dimensional consistency):

Thus the total velocity u of a particle is made up of its mean velocity vplus its fluctuation from the mean, w . I.e. u = v + w .

v ∆t

( ) ( ) 3, , , t m f t d pρ ≡ ∫x x p

( ) ( ) ( ) 3, , , , t t f t d pρ ≡ ∫x v x p x p

Frequent collisions keep particles bunched up.

Availability of control volume permits us to apply Newton’s law to the same particles.

( ) 3 Remember , , has units of number d e .nsity

f t d p← x p

Page 9: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

9

The energy of a single particle of mass m is then given by p2/(2m) . Thus we write the total energy density as:

Since the fluctuating velocity satisfies a Maxwell-Boltzmann distribution up to a reasonable approximation (though not valid for non-ideal effects), we can write the distribution function as:

The total energy density can now be shown to be a sum of the internal energy density and the kinetic energy density:

Thermodynamics then gives equation of state :

( ) ( )2

3, , , 2

t f t d pm

ε ≡ ∫px x p

( ) ( )( )( )

( )( )( )

2 ,

2 T ,3/2

, 1, , e 2 T ,

m tm k tt

f tm m k t

ρ

π

−−

=p v x

xxx p

x

( ) ( ) ( ) ( )2P , 1, , ,1 2t

t t tρε = +Γ −

xx x v x

T PP ; e1

Rρµ

= =Γ −

Notice: we are in the local rest frame of the fluid.

Page 10: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

10

1.2.2) The Boltzmann Equation

Without collisions, particles coast along their original trajectories, while responding to external forces F . The dynamics is quite uninteresting:

With collisions, we introduce a very interesting dynamics:

How a collision can scramble the phase space is constrained by momentum and energy conservation, consider the constraints in the diagram below. Question: How many degrees offreedom does the collision have?

Remaining d.o.f. governed by scatteringcross-section :

+ + = 0 f f ft m

∂ ∂ ∂∂ ∂ ∂

p Fx p

c

+ + = f f f ft m t

δδ

∂ ∂ ∂ ∂ ∂ ∂

p Fx p

1pp

/p

/1p( )/ /

1 1, | ,σ p p p p

Write it out in component form to make sure you understand it.←

Page 11: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

11

Let incident particle be p and target particle be p1 . Number density of particles that scatter out of phase space (x,p) in a unit time is given by:

cm/sec #/cm3 cm2 #/cm3

Number density of particles that scatter into phase space (x,p) per unit time is given by:

Thus the total effect of the collision terms gives us the final Boltzmann equation (Question: Can you dimensionally analyze the RHS?)

( ) ( ) ( ) ( ) ( )1 / / / / 31 1 1 1 1

+ + =

, | , , , , , , , , , d d p

f f ft m

f t f t f t f tm

σ

∂ ∂ ∂∂ ∂ ∂

− − Ω ∫

p Fx p

p pp p p p x p x p x p x p

( ) ( ) ( )13 3 / / 31 1 1 1

c; sink

d p , , d p , | , d , , d p f f t f tt m

δ σδ

− = Ω ∫ ∫

p px p p p p p x p

( ) ( ) ( )/ /

13 / 3 / / / / 3 /1 1 1 1

c; source

d p , , d p , | , d , , d p f f t f tt m

δ σδ

− = Ω ∫ ∫

p px p p p p p x p

Page 12: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

12

1.2.3) Moments of the Boltzmann Equation

Consider the definitions:

We see that they are just moments of the distribution function. Boltzmann equation gave us dynamics, but not quite in the variables we need.

Consequently, to obtain time-evolutionary equations of the above fluid variables, take the following moments of the Boltzmann equation:

We get

Derivatives and integrals can be interchanged for the first two terms. The third term requires a little bit of deft manipulation, as we will show.Question: Why does the last term, i.e. RHS, integrate to zero?

( ) ( ) ( ) ( ) ( )

( ) ( )

3 3

23

, , , ; , , , , ;

, , , 2

t m f t d p t t f t d p

t f t d pm

ρ ρ

ε

≡ ≡

∫ ∫

x x p x v x p x p

px x p

( ) ( ) ( )2

; ; 2

mm

ψ ψ ψ= = =pp p p p

( ) ( ) ( ) ( )3 3

c

+ + = f f f fd p d pt m t

δψ ψ ψ ψδ

∂ ∂ ∂ ∂ ∂ ∂

∫ ∫pp p p F p

x p

Page 13: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

13

( ) ( ) ( )3 31 , , ; , , f t d p n f t d pn

ψ ψ≡ ≡∫ ∫p x p x p

We have the following supporting definition for the averaging process:

Page 14: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

14( ) ( ) + = 0

n n nt m

ψ ψ ψ∂ ∇ − ∇ ∂

pp F p

( ) ( ) ( ) ( )3 3

c

+ + = f f f fd p d pt m t

δψ ψ ψ ψδ

∂ ∂ ∂ ∂ ∂ ∂

∫ ∫pp p p F p

x p

Page 15: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

15

The net result is

The averages in the above equation require the supporting definitions :

This is known as Chapman-Enskog theory for fluids or the BBGKY hierarchy.

( ) ( ) + = 0

n n nt m

ψ ψ ψ∂ ∇ − ∇ ∂

pp F p

( ) ( ) ( )3 31 , , ; , , f t d p n f t d pn

ψ ψ≡ ≡∫ ∫p x p x p

Page 16: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

16

1.2.4) The Continuity Equation

Set ψ(p) = m in

to get :

Notice, very importantly, that this is a conservation form. Question: Can you think of other equations in conservation form? What does an equation in conservation form tell us? What are the units of mass flux?

An equivalent non-conservative, i.e. primitive, form :

Question: When is the primitive form useful? What is the import of the RHS?

( ) ( ) + v = 0 + = 0 i

it x tρ ρρ ρ∂ ∂ ∂

⇔ ∇∂ ∂ ∂

v

+ = + =

Dt Dt t

∂ ∂∇ − ∇ ⇔ ≡ ∇ − ∇

∂ ∂v v v v

ρ ρ ρρ ρ ρ ρ

( ) ( ) + = 0

n n nt m

ψ ψ ψ∂ ∇ − ∇ ∂

pp F p

Page 17: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

17

( ) ( ) ( ) + = 0 with

n n n mt m

ψ ψ ψ ψ∂ ∇ − ∇ = ∂

pp F p p

( ) + = 0 tρ ρ∂

∇∂

v

Page 18: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

The Lagrangian derivative / material derivative, shown above, has a form that occurs very often in fluid dynamics:

It is very important to intuitively understand the Lagrangian derivative . Question: What is it tracing?

18Mountain range

Wind flowVelocity vectors

Mountain range

Wind flowstreamlines

Connect the wind velocity vectors toobtain streamlines of the velocity field

+

DDt t

∂≡ ∇

∂v

Page 19: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

19

1.2.5) The Momentum Equation

Set ψ(p) = p = m (v + w) (v == mean velocity;w == fluctuation) to get:

Notice now that :

Question: What can we say about the correlation between the fluctuating parts of the velocity? Describe situations where you might expect a correlation.

Using our definition of pressure : we get:

( ) ( )( )( )v + v w v w = a i i i j j i

jt xρ ρ ρ∂ ∂

+ +∂ ∂

( )( )v w v w v v + w wi i j j i j i j+ + =

( ) ( )( ) ( )2

3 22

,1 1P , , , 3 3

m tt f t d p

mρ ρ

−≡ ≡∫

p v xx x p w

21w w P ; w w viscous stress3i j ij ij ij ij i jρ δ π π ρ δ= − ≡ − ←w

Page 20: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

20

( ) ( ) ( ) ( ) + = 0 with

n n n mt m

ψ ψ ψ ψ∂ ∇ − ∇ = = ∂

pp F p p p v + w

( ) ( )( )( )v + v w v w = a i i i j j i

jt xρ ρ ρ∂ ∂

+ +∂ ∂

Page 21: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

21

The final momentum equation in conserved form then becomes:

Here ai is an acceleration, a = F/m .

It is an interesting trick to learn how to find the corresponding primitive form of the momentum equation:

Question: Which one of Mr. Newton’s 3 laws are you reminded of?

With viscous terms, this is known as the Navier Stokes equations; without the viscous terms, we call it the Euler equations.

( ) ( )v + v v + P = a i i j ij ij i

jt xρ ρ δ π ρ∂ ∂

−∂ ∂

v P = + a +

ii ij

i j

DD t x x

ρ ρ π∂ ∂−

∂ ∂

Page 22: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

22

1.2.6) The Energy Equation

Set ψ(p) = m (v + w)2 / 2 to get an equation for the total energy density. We get:

Question: Can you interpret the RHS intuitively? On dimensional grounds, what does it tell you?

As before, we have to interpret the angled brackets as follows:

2 e 2ρε = + v

( )( )2 + v w + = v a 2 i i i i

it xρ ρε∂ ∂ + ∂ ∂

v w

( )( )2 2 2 21 1v w + = v + v + w w v + w 2 2 2 2i i i i i j j iρ ρ ρ ρ ρ+ v w v w w

KineticEnergyDensity

ThermalEnergyDensity

P pressure &viscous stresses

ij ijδ π−Question: What is this term?

Page 23: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

23

( ) ( ) + = 0

n n nt m

ψ ψ ψ∂ ∇ − ∇ ∂

pp F p

( )( )2 + v w + = v a 2 i i i i

it xρ ρε∂ ∂ + ∂ ∂

v w

Page 24: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

24

The energy equation in conservation form is then given by:

A little bit of work (i.e. subtracting off the kinetic energy density) gives us an equation for the internal energy density in primitive form as:

Questions: Interpret each of the terms on the RHS in the equation above. What is the connection with the first law of thermodynamics?

One can make connection with the second law of thermodynamics as:

( )( ) + P v v + F = v a

condi j ji i i i

it xπ ρε ε∂ ∂

+ −∂ ∂

( ) v F v e + e v = P +

condi i i

i iji i i jt x x x x

π∂ ∂ ∂∂ ∂− −

∂ ∂ ∂ ∂ ∂

vs T + What does this equation do at shocks?

cond iij

j

DDt x

ρ π ∂= − ∇ ←

∂F

2 21 1with F w . Also recall, .2 2

condi i e≡ = +w vρ ρε

Page 25: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

25

1.3) The Euler Equations

Notice that we have 6 variables (density, 3 velocities, internal energy and pressure) but only 5 equations. This is called the closure problem. The equation of state helps close the system, i.e. provides the one extra equation needed to get the number of equations == number of unknowns.

Question: How do the dimensions of the fluxes relate to the dimensions of the conserved variables? Interpret your answer physically?

Primitive form is v. useful for analytic work; conserved form for computation (especially when discontinuities present). Question : Why?

( )

( ) ( )

Conservation form: Primitive form: + v = 0 =

v + v v + P = 0

ii

i i j ijj

Dt x Dt

t x

ρ ρρ ρ

ρ ρ δ

∂ ∂− ∇

∂ ∂

∂ ∂⇔

∂ ∂

v

( )( ) ( )

v P = 0

D e + P v = 0 = e + P D

i

i

ii

DD t x

t x t

ρ

ε ε

∂+

∂ ∂+ − ∇

∂ ∂v 2 e 2ρε = + v

Page 26: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

26

Notice that the fluid variables evolve in time in response to their own spatial gradients. This is often the case with most PDEs.

Question: So what makes the conservation form so special? Answer: Gauss’ Law. Let’s focus on the continuity equation and the figure below.

When discontinuities/shocksare present, we have no hope ofpredicting the flow structure inside a zone in our computational mesh. However, the conservation form remains valid!

x

zy

A1A4

A5

vxρ

vzρ

v yρ

( ) ( ) ( )

1 2 3 4

V

V A A A A

A

v v v = 0

+ v v + v v

+ v

yx z

x x y y

z

dx dy dzt x y z

dx dy dz dy dz dy dz dx dz dx dzt

dx dy

ρρ ρρ

ρ ρ ρ ρ ρ

ρ

∂∂ ∂∂ + + + ⇒ ∂ ∂ ∂ ∂

∂− −

∫∫∫

∫∫∫ ∫∫ ∫∫ ∫∫ ∫∫

5 6A

v = 0z dx dyρ−∫∫ ∫∫

Page 27: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

27

x

zy

A1A4

A5

vxρ

vzρ

v yρ

( ) ( ) ( )V

v v v = 0

yx z dx dy dzt x y z

ρρ ρρ ∂∂ ∂∂ + + + ∂ ∂ ∂ ∂

∫∫∫

1 2 3 4

5 6

V A A A A

A A

+ v v + v v

+ v v = 0

x x y y

z z

dx dy dz dy dz dy dz dx dz dx dzt

dx dy dx dy

ρ ρ ρ ρ ρ

ρ ρ

∂− −

∫∫∫ ∫∫ ∫∫ ∫∫ ∫∫

∫∫ ∫∫

( )V

V

=

v =

x

dx dy dzt

dx dy dzx

ρ

ρ

∂∂

∂∂

∫∫∫

∫∫∫

Page 28: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

28

x

y

(3,2)

1 2 3 4 5

5

4

3

2

1

Introducing concepts of a mesh, zones and timestep.

Role of timestep in conveying information.

Value of conservation form on a mesh.

Page 29: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

29

1.4) The Navier Stokes Equations

As before, the equation of state helps close the system.

Notice though, that we now have extra terms for the viscosity and heat flux. Theory alone cannot specify these terms; experiments are needed. We have the following stress-strain relation for the viscous stresses:

For the thermal conduction we have: parabolicterms

( )

( )

Conservation form: Primitive form: + v = 0 =

v + v v +

ii

i i jj

Dt x Dt

t x

ρ ρρ ρ

ρ ρ

∂ ∂− ∇

∂ ∂

∂ ∂∂ ∂

v

( )

( )( ) ( )

v PP = 0 = 0

v D e + P v v + F = 0 = e + P + D

iij ij ij

i j

cond cond ii j ji i ij

i j

DD t x x

t x t x

δ π ρ π

π πε ε

∂ ∂− ⇔ + −

∂ ∂

∂∂ ∂+ − − ∇ − ∇

∂ ∂ ∂v F

( ) v v 2 ;

3ji

ij ij ij ijj i

D Dx x

π µ δ∂∂

≡ ≡ + − ∇∂ ∂

v

Tcond κ≡ − ∇F

Page 30: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

30

Intuitive introduction to viscosity for shear flow:

x-momentum equation shows us that µ must scale as ρ l2 / τ .

x

y

vx

y

2 2xv is large.y∂ ∂

vIt can be shown that is always positive.

Question: What is the physical import of the above statement?

iij

jxπ ∂

Page 31: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

31

Intuitive introduction to shocks; a fast-moving stream of fluid collides with a stationary/slow-moving stream:

Questions: Can you make a traffic-flowanalogy to this situation?

Which has higher density, shockedor unshocked gas? Explain using thecontinuity equation.

What about entropy?Explain your answer via entropy equation.

What is the role of the viscous terms?

Can one have shocks form withouthaving the viscous terms dominate atsmall scales? (Multiple answers possible.)

22x xv 0 and v is large at the shock.x x∂ ∂ ∂ ∂

x

x

vx

Unshocked Gas:Density lowMean velocity highRMS velocity low

Shocked Gas:Density highMean velocity lowRMS velocity high

Page 32: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

32

1.5) Classifying and Understanding PDEs(Or How to read a PDE like a book)1.5.1) Motivation

Let’s start simple with scalar PDEs. Consider our first example:

Analyzing a PDE is same as bringing out its character. Since the above PDE has a wave character, i.e. it is hyperbolic, we try harmonic modes:

The harmonic modes take on a time-evolution that is purely multiplicative with no change in the amplitude. Such modes are called the eigenmodesof the PDE. “ω” is the eigenvalue associated with that eigenmode.So here we started with a PDE that we knew to be hyperbolic and divined its mathematical character.

+ a + b = 0 What does it remind you of? How does move in 2d? t x yρ ρ ρ ρ∂ ∂ ∂

←∂ ∂ ∂

( ) ( )

( ) ( ) ( )

0 1

a b 0 1

, , = + e Substitution in the PDE gives : a + b

, , = + e Propagating wave-like modes.

x y

x y

i k x k y tx y

i k x t k y t

x y t k k

x y t

ωρ ρ ρ ω

ρ ρ ρ

+ −

− + −

=

⇒ ←

Page 33: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

33

( ) ( ) 0 1

Substitute , , = + e in + a + b = 0

x yi k x k y tx y tt x y

ω ρ ρ ρρ ρ ρ + − ∂ ∂ ∂∂ ∂ ∂

( ) ( ) ( ) a b 0 1, , = + e with a + b x yi k x t k y t

x yx y t k kρ ρ ρ ω − + − =

Page 34: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

34

Consider the heat equation in 2d with constant coefficients:

Again, let us put in harmonic modes to bring out the character of this well-known parabolic PDE:

Such modes are called the eigenmodes of the PDE. “ω” is the eigenvalueassociated with that eigenmode.So here we started with a PDE that we knew to be parabolic and divined its mathematical character.

Now the ideas can be combined. -- A super simple chemo-taxis example:

2 2

2 2

T T T = + t x y

κ ∂ ∂ ∂ ∂ ∂ ∂

( ) ( ) ( )( ) ( ) ( )2 2

2 20 1

0 1

T , , = T + T e Substitution in the PDE gives : =

T , , = T + T e A - solution

x y

x y x y

i k x k y tx y

i k x k y k k t

x y t i k k

x y t time decaying

ω

κ

ω κ+ −

+ − +

− +

⇒ ←

2 2

2 2

+ a + b + = s t x y x yρ ρ ρ ρ ρκ

∂ ∂ ∂ ∂ ∂− ∂ ∂ ∂ ∂ ∂

Page 35: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

35

( ) ( ) 2 2

0 1 2 2

T T TSubstitute T , , = T + T e in = +

x yi k x k y tx y tt x y

ω κ+ − ∂ ∂ ∂ ∂ ∂ ∂

( ) ( ) ( ) ( )2 2 2 2

0 1T , , = T + T e with = x y x yi k x k y k k tx yx y t i k kκ

ω κ+ − +

− +

Page 36: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

36

1.5.2) Characteristic Analysis of the Euler Equations

Let us write the 1d Euler equations in a matrix form:

We think of the variables with subscript “0” as the constant values around which we introduce small fluctuations, i.e. the variables with subscript “1”. This has the advantage that it freezes the matrix. We get:

Notice that for systems we have to analyze the above characteristic matrix. Its determinant yields the characteristic equation with solutions:

( )( )( )

x0 1

( k x t)x x x x x0 x1

0 1x

v 0 , 1 v + 0 v v = 0 . Try the wave-like solution : v , v + v e

P P P , P P0 P v

i

x tx t

t xx t

ω

ρρ ρ ρ ρ ρ

ρ−

∂ ∂ = ∂ ∂ Γ

x0 0 x0 01 1 1

x1 x0 x1 x0 x10 0

1 1 10 x0 0 x0

v 0 v 01 1 v + k 0 v v = 0 . Use to get : 0 v v = 0

P P P0 P v 0 P v

i i k

ρ λ ρρ ρ ρω λ ω λ

ρ ρλ

− − ≡ − Γ Γ −

1 2 3 0x0 0 x0 x0 0 0

0

P = v c ; = v ; = v c ; c speed of soundλ λ λρ

Γ− + ≡ ←

Page 37: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

37

vv 0 ;

v v Pv 0 ;

v v e e Pv e + P 0 with e = 1

xx

x xx

x xx

t x x

t x x

t x x x

ρ ρ ρ

ρ

∂∂ ∂+ + =

∂ ∂ ∂∂ ∂ ∂ + + = ∂ ∂ ∂

∂ ∂∂ ∂+ + =

∂ ∂ ∂ ∂ Γ −

x

x x x

x

v 0 1 v + 0 v v = 0

P P0 P v

t x

ρρ ρ

ρ

∂ ∂ ∂ ∂ Γ

Page 38: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

38

x0 01 1

x1 x0 x10

1 10 x0

v 01 v + k 0 v v = 0 with

P P0 P v

i i k

ρρ ρω λ ω

ρ

− ≡ Γ

1 2 3 0x0 0 x0 x0 0 0

0

P = v c ; = v ; = v c ; c λ λ λρ

Γ− + ≡

Equations linearized about a constant state: ( )0 0 0, v , Pxρ

Page 39: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

39

We can use a space-time diagram to trace the waves. The lines are called characteristic curves.Question: Identify sub-sonic and supersonic flow situations by drawing space-time diagrams for them. Are the characteristic curves always straight lines?Analysis of the right eigenvectors yields a lot of further insight:

x

t1

x0 0 = v cλ − 2x0 = vλ

3x0 0 = v cλ +

0 01 2 3

0 02 2

0 0 0 0

1 = c ; = 0 ; = c

c 0 cr r r

ρ ρ

ρ ρ

3 21 x1 1 0 0 0 0Observe from that the fluctuations have to have the ratios:- : v : P = :c : c

I.e. the ratios are preset and all these fluctuations produce in the velocity andpressure fluctuati

rcompressions

ρ ρ ρ

3

21 x1 1

ons these are - (see the eigenvalue ).

Observe from that the fluctuations have to have the ratios:- : v : P = 1:0:0I.e. no pressure or velocity fluctuations; only changes

right going sound waves

r

λ

ρ

2

in the density these are (see the eigenvalue ). They are with the fluid velocity.entropy waves advectedλ

Page 40: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

40

The right eigenvectors form a complete basis set in a 3-d vector space.There exists an orthonormal set of left eigenvectors. They are:

1 2 32 2 2

0 0 0 0 0

1 1 1 1 1 = 0 ; = 1 0 ; = 02 c 2 c c 2 c 2 c

l l lρ ρ

−−

t=0

t=1

t=2

t=3

t=4

t=5

Wave propagation can be via longitudinal or transverse fluctuations. Question: Which one is which in the figure below? Which one represents sound waves?

Page 41: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

41

1 2 32 2 2

0 0 0 0 0

1 1 1 1 1 = 0 ; = 1 0 ; = 02 c 2 c c 2 c 2 c

l l lρ ρ

−−

( )x0 0

1 x1 1 x00

0 x0

1 2 3x0 0 x0 x0 0

v 01v P 0 v = 0

0 P v

= v c ; = v ; = v c ;

λ ρ

ρ λρ

λ

λ λ λ

− − Γ −

− +

Page 42: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

42

How is all this machinery of eigenvalues and eigenvectors useful?

Imagine you have a mean fluid state and you impose a small Gaussian pulse, i.e. a perturbation. How do you predict its time-evolution?

We know that each right eigenvector is a pure wave that travels with a preset speed. So use the left eigenvectors to find out what fraction of the initial perturbation contributes to each of the waves. This is given to us by the eigenweights:

The time-evolution of the Gaussian perturbation is then given by:

( )( )( )

2 20 1

x x0 x1 0 1

0 1

, 0v , 0 v + v e = V + V e P , 0 P P

x x

x tx tx t

ρ ρ ρ− −

= = =

=

( ) ( ) ( )1 1 2 2 3 3 1 2 3

1

1 1 2 2 3 31 1 1

. . in order to write V we need to find , , and .

= V ; = V ; = V

i e r r r

l l l

α α α α α α

α α α

= + +

( )( )( )

( ) ( ) ( )22 231 2

0 0 01 2 3

x x0 0 02 2

0 0 0 0 0

, 1v , v + c e + 0 e + c e P , P c 0 c

x tx t x t

x tx tx t

λλ λ

ρ ρ ρ ρα α α

ρ ρ

− −− − − −

= −

Page 43: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

43

t =0

t =1

t =2

t =3

t =4

x

t3

x0 0 = v cλ +

2x0 = vλ

1x0 0 = v cλ −

The initial Gaussian pulse propagates away as three Gaussian pulses with amplitudes given by the eigenweights and speeds given by the eigenvalues.

The shaded region in the space-time diagram shows the range of influence. I.e. it gives us the portions of space-time that get influenced by the initial perturbation.Notice that the extremal wave speeds, λ1 and λ3 , determine the range of influence.

Page 44: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

44

x

t

3x0 0 = v cλ +

2x0 = vλ

1x0 0 = v cλ −

Say that the x-axis is seeded with small fluctuations at t=0. Question: If we pick a space-time point (x,t) with t>0, which points on the original x-axis will influence its evolution?

Realize that information travels at a finite speed in a hyperbolic system.

Since the characteristics curves are straight lines, in our linearized system, it is easy to find that domain by propagating the characteristics backward. Again, the extremal wave speeds, λ1 and λ3 , are very useful in identifying this domain.

The shaded region shows the domain of dependence in space-time.

Page 45: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

45

1.5.3) Generalized Definition of a Hyperbolic PDE

Many, though not all, hyperbolic systems can be written in conservation form:

“U” is the vector of “M” conserved variables and “F”, “G” and “H” are the flux vectors. “S” is the vector of source terms. One can then obtain the characteristic matrices “A”, “B” and “C”, which are all M×M :

The hyperbolic property then depends on the eigenstructure of the characteristic matrices.

Often times, as with Euler eqns., it is easier to analyze the hyperbolic system in terms of primitive variables V :

( ) ( ) ( ) ( )U F U G U H U S Ut x y z+ + + =

( ) ( )( )( ) ( ) ( )

,U A(U) U B(U) U C(U) U S U In component form A(U) F U U

F U G U H Uwith A(U) ; B(U) ; C(U)

U U U

t x y z i j i j+ + + = ≡ ∂ ∂

∂ ∂ ∂≡ ≡ ≡

∂ ∂ ∂

U VU V ; V UV U

δ δ δ δ∂ ∂ = = ∂ ∂

Page 46: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

46

Any general hyperbolic system can then be written as:

( )( )

V A(V) V B(V) V C(V) V S V

F UV U Vwith A(V) ; S(V) S(U) if it is in conservation form.U U V U

t x y z+ + + =

∂∂ ∂ ∂ ≡ ≡ ∂ ∂ ∂ ∂

The system is then said to be hyperbolic if each of the matrices “A”, “B” and “C” admit “M” real eigenvalues and a complete set of “M” right eigenvectors. This also ensures the existence of orthonormal left eigenvectors. I.e. solutions are wave-like when propagating in all directions.

Above definition gives us the useful properties that :

1) Waves can propagate in any direction.

2) Any small initial fluctuation can be evolved forward in time for at least a short amount of time. It enables us to do dynamics.

Page 47: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

47

( ) ( ) ( ) ( ) ( )U F U G U H U S U U A(U) U B(U) U C(U) U S Ut t x y zx y z+ + + = → + + + =

( )U VU V ; V U V A(V) V B(V) V C(V) V S V V U t x y zδ δ δ δ∂ ∂ = = → + + + = ∂ ∂

Page 48: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

48

Let us now focus on the 1d case. We assume that the characteristic matrix “A” is frozen about some constant state V0 . For small fluctuations V1 about that constant state, we have

1 1

1 2

V V A 0

where A admits an ordered set of real eigenvalues: ...

We have left and right eigenvectors of A so that : A ; A =1,..,

M

m m m m m m

t xM

Mr r l l m M

λ λ λ

λ λ

∂ ∂+ =

∂ ∂≤ ≤ ≤

= = ∀

Let the left and right eigenvectors be orthonormalized w.r.t. each other.

When the eigenvalues are degenerate we use Gram-Schmidt orthonormalization to obtain linearly independent eigenvectors.

Page 49: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

49

The next three steps are purely formal but yields a very compact and useful notation that is used over and over in this field:1) Let “R” be a matrix of right eigenvectors whose mth column is given by . 2) Let “L” be the matrix of left eigenvectors whose mth row is given by . We want L R = I , i.e. L is left inverse of R.3) Define .We then have:

The whole purpose of the formal build-up so far is so that we can do dynamics. I.e. , given a constant state V0 and a small initial fluctuation V1(x) about it, we wish to predict the time-evolution of V1(x) .

mr

ml 1 2Λ diag , ,..., Mλ λ λ≡

A = Λ ; A Λ ; A = Λ ; A = Λ R R L L L R R L=

1 1

1 2 2 2

0 0 0 0

; ; =

0 0

M

M M

lr r r l

R L

l

λλ

λ

= = Λ

Fig. schematically shows the structure of the matrices R, L and Λ .

Page 50: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

Left-multiply the evolution equation to get:

For the mth component of W we have:

50

Now say that we start with initial conditions V0 + V1(x) at t = 0.

The fluctuation in the mth eigenweight at t=0 is given by:

At a later time, t > 0, in light of its evolution equation, the eigenweightis given by:

The time-dependent solution for t > 0 is given by:

V. Imp. Question:Why is the material in this Sub-section so very useful?

( ) ( )1 Vm mw x l x≡

( )m mw x tλ−

( ) ( )01

V , = V + M

m m m

mx t w x t rλ

=

−∑

( )1 11

V V A 0 + Λ = 0 with Vt xL L R L W W W Lt x

∂ ∂+ = ⇒ ≡

∂ ∂

0 for 1,...,m m mt xw w m Mλ+ = =

Page 51: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

51

1 11

V V A 0 + Λ = 0 with Vt xW W W Lt x

∂ ∂+ = → ≡

∂ ∂

( ) ( )10 for 1,..., with V at 0m m m m mt xw w m M w x l x tλ+ = = ≡ =

Page 52: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

52

1.5.4) Analysis of the Navier Stokes EquationHaving studied parabolic scalar equations, let’s study the Navier Stokes equations as a system of parabolic equations.

Viscous and conductive terms involve higher spatial derivatives – make equation set parabolic. Question: For the Navier Stokes equations, can you identify a good set of primitive variables?

Equations in 1D:-

Linearize about a constant state:-

( ) ( ) ( )

xx

2x x x

x 2

2 2x x

x 2

v v 0

v v v T T 4 v 0 3

4 1 1 v vT T T v + 1 T 03

t x xR R

t x x x x

t x x R x R x

ρ ρ ρ

ρ µµ ρ µ ρ

µ µ κ µ

∂∂ ∂+ + =

∂ ∂ ∂∂ ∂ ∂∂ ∂

+ + + − =∂ ∂ ∂ ∂ ∂

Γ − Γ −∂ ∂∂ ∂ ∂ + Γ − − − = ∂ ∂ ∂ ∂ ∂

( )( )( )

0 1 ( k x t)

x x0 x1

0 1

,v , v + v e T , T T

i

x tx tx t

ω

ρ ρ ρ−

=

Page 53: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

53

( ) ( )

xx

2x x x

x 2

2x x

x

v v 0

v v v T T 4 v 0 3

4 1 v vT T v + 1 T 0 Setting =03

t x xR R

t x x x x

t x x R x

ρ ρ ρ

ρ µµ ρ µ ρ

µ µκ

∂∂ ∂+ + =

∂ ∂ ∂∂ ∂ ∂∂ ∂

+ + + − =∂ ∂ ∂ ∂ ∂

Γ −∂ ∂∂ ∂ + Γ − − = ∂ ∂ ∂ ∂

( )

x0 01

0x0 x1

0 01

0 x0

v 0T 4v k v 0

3T

0 1 T v

R Ri

λ ρ ρµλ

µρ ρ µλ

− − − = Γ − −

Page 54: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

54

( )

x0 01

0x0 x1

0 01

0 x0

v 0T 4v k v 0 ; no thermal conduction -- =0

3T

0 1 T v

R Ri

λ ρ ρµλ κ

µρ ρ µλ

− − − = Γ − −

Page 55: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

55

Let us simplify by setting κ = 0. The resulting eigenvalues are:

Questions: What happens to the eigenvalues for the sound waves? Interpret real and imaginary parts physically.

Generalizing: We see that the equations become parabolic because of the extra presence of a gradient of the solution in the fluxes. We can write the general form as:

Note though that we do need to have solutions that are decaying in time.

When spatial derivatives with third and higher order are present, analyze on a case-by-case basis. General-purpose numerical methods not available yet.

2 22 2 2 2

1 x0 0 2 x0 3 x0 02 20 0 0 0

4 2 4 2v c k k ; v ; v + c k k 9 3 9 3

i iµ µ µ µλ λ λρ ρ ρ ρ

= − − − = = − −

( ) ( ) ( ) ( ) ( ) ( ) ( )U F U G U H U F U, U G U, U H U, U S Ut ni ni nix y z x y z+ + + + ∇ + ∇ + ∇ =

Page 56: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

56

1.6) Incompressible Flow Equations

Sound speed in water ~ 2000 m/s. A v. fast speedboat goes ~ 20 m/s. If the sound waves are to be captured numerically in a code, the code’s time step would drop by a factor of 100! Thus we really desire an approximation tha can make the sound waves drop out of the system.

Liquids, like water, are almost incompressible – ρ remains constant.

The sound waves drop out of the system when that approximation is made Recall that to sustain a sound wave, we do need density fluctuations.

The continuity equation then gives = 0 there is no eqn for density evolution.

1The momentum equation gives + = P t

Taking its divergence gives an elliptic equation for the pressρ

∇ • ⇒

∂∇ − ∇

v

v v v

( )2

ure : P = no need for an evolutionary eqn for thermal energy.ρ∇ − ∇ ∇ ⇒v v

Page 57: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

57

1.7) Shallow Water Equations

Water in lakes and oceans forms a very thin layer of incompressible fluidon the earth’s surface. We want to treat it like a 2d problem.

We simplify the problem by considering a flat patch in the (x,y) plane. Details of the z-velocity are not important to us.

However, zbottom = − h(x,y) changes with position. We care about ztop = η(x,y,t) because it determines waves/tsunamis etc.

The gravitational potential drives the evolution of such waves. Thus, even though we neglect z-velocity, we have to keep track of the geopotential : φ(x,y,t) = g (η(x,y,t) + h(x,y) ) .

x

z

zbottom = − h(x,y)

ztop = η(x,y,t)

Page 58: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

58

x y2 2

x x x y2 2

y x y y

v v 0 v + v 2 + v v = v v v v 2

Source terms unavoidable when we have varying bathymetry.

In primitive form,

x

y

g ht x y

g h

φ φ φφ φ φ φ φφ φ φ φ φ

∂ ∂ ∂ + ∂ ∂ ∂ ∂ + ∂

x y

x x x y x

y x y y y

we have:

v 0 v 0 0v + 1 v 0 v + 0 v 0 v = v 0 0 v v 1 0 v v

The characterisitic analysis of these equations is easy enough

x

y

g ht x y

g h

φ φ φ φ φ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂

1 2 3x x x

and yields:

v ; v ; v Question: Interpret these waves.λ φ λ λ φ= − = = + ←

Page 59: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

59

1.8) Maxwell’s Equations

Useful in non-linear optics, designing fiber optic cables. Also needed for designing stealth technology.

Written as:

0 Faraday's Law

4 Generalized Ampere's Law

4 Gauss's Law = 0 Divergence-Free Co

ct

ct

∂+ ∇× = ←

∂∂

− ∇× = − ←∂

∇ = ←∇ ←

B E

D H J

DB

π

π ρnstraint

Closure only obtained by constitutive relationships:-Relate magnetic induction to magnetic field : = Relate displacement vector to the electric field : = Assume

B HD E

µε

simple, linear scalar relations (material media require tensorial relationships).

Page 60: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

60

0

4

4

= 0 Constraint can be important to the fidelity of the solution processMethods have also been developed to sweep any magnetic divergence of

ct

ct

µπ

ε επ ρ

ε

∂+ ∇× =

∂∂

− ∇× = −∂

∇ =

∇ ←

H E

E H J

E

B

x

y

z

x

y

z

f the mesh.

For now, we write the linear equations in a form that it designed to reveal thecharacteristic matrix:

E 0 0 0 0 0 0E 0 0 0 0 0E 0 0 0 0 0

+ B 0 0 0 0 0 0B 0 0 0 0 0B 0 0 0 0 0

cc

tc

c

εε

µµ

−∂

∂ −

x

y

z

x

y

z

EEE

= 0BBB

Question: What are the eigenvectors of this system telling us?

x

Page 61: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

61

1.9) The Magnetohydrodynamic Equations

Very useful in terrestrial fusion expts., interiors of stars, solar wind, magnetospheres of stars and planets. Needed: large system + lo resistivity

When gas it hot enough, it becomes partially/fully ionized. Charged particles gyrate around magnetic fields matter and field are tightly coupled. Magnetohydrodynamics (MHD) is the simplest approximation.

Viewed over large enough length scales, plasma is neutral local charge imbalances are v. rapidly neutralized in plasma’s rest frame.

Viewed over large enough time scales, i.e. longer than plasma waves

The B-field is locked in the plasma Lorenz-force acts in momentum eqn:

0t∂ ∂ =D

( ) 1 = P + + Recall: current needed to sustain B-field!

DD t c

ρ π− ∇ × ∇ ←v J B

Page 62: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

62

/ /

We also need an evolutionary equation for B field :

0 Faraday's Law; = Ampere's Law4

In the fluid's (primed) rest frame we have Ohm's law:

Lorenz Transform to

cct π

σ

−∂

+ ∇× = ← ∇× ←∂

=

B E J B

J E

( )/ /

/ /

1 the fluid's rest frame to get : ; +

Ohm's Law in the Eulerian frame of reference then gives:1 1 = +

4This gives us our

c

cc c

σ σπσ

= = ×

= ⇒ = + × ⇒ − × ∇×

J J E E v B

J E J E v B E v B B

( )

( ) ( ) ( )

22

2

- :

+ 4

1 1 1Write the Lorenz force as : = + 4 8 4

evolutionary equation for the B fieldc

t

c

πσ

π π π

∂= ∇× × ∇

× = − × ∇× − ∇ ∇

B v B B

BJ B B B B B

Question: Interpret these 2 terms

Page 63: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

63

( )

( )

( )

2 1The momentum equation then gives : = P + + + 8 4

The full set of ideal MHD equations in Conservation form can then be written as:

+ v = 0

v +

ii

i

DD t

t x

t

ρ ππ π

ρ ρ

ρ

− ∇ ∇ ∇

∂ ∂∂ ∂∂ ∂

∂ ∂

v B B B

( )( )

( ) ( )( )

( )

( )

2

2

22

v v + P + /8 B B 4 = 0

+ P + /8 v B /4 = 0

with = 0

1 Pwith = e + + and e 2 8 1

Question: Can you spot the magneti

i j ij i jj

i ii

x

t x

t

ρ π δ π

π π

ρπ

ε ε

ε

∂ ∂+ − ⋅

∂ ∂∂

= ∇× × ∇∂

≡Γ −

B

B v B

B v B B

Bv

c energy density and Poynting flux on this page?

Page 64: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

6464

Flux Freezing Approximation for Ideal MHD

The magnetic fields are frozen into the fluid and move with the fluid in the ideal MHD limit.

Thus if the fluid is compressed transversely to the magnetic field direction, the magnetic fields get squished too. This gives us an extra magnetic pressure term. Hint: Think of B2 / 8 π to see how it works.

If the fluid is pulled longitudinal to the magnetic field direction, the magnetic fields also produce extra magnetic tensional forces, just like a bunch of rubber bands that are pulled on end.

Magnetic pressure

Magnetic Tension

Original field configuration

Page 65: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

65

The equations of MHD have seven propagating wave families.

The Riemann problem ( I.e. the cell-break problem) tells us how these families propagate at discontinuities. This eminently physical procedure is used to build some of the most robust and accurate numerical schemes for MHD.

Right-going fast wave

Right-going Alfven wave

x

t

Right-going slow wave

Entropy wave

Left-going slow wave

Left-going Alfven wave

Left-going fast wave

Space-Time Diagram for MHD Waves

Page 66: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

66

1.10) Flux Limited Diffusion (FLD) Radiation HydrodynamicsIt is tempting to build a “hydrodynamic” approximation for photons interacting with atoms. Question: What are the deficiencies in that? (Hint: Compare σCouloumb to σThompson .)

The Flux Limited Diffusion approximation does not solve this problem. It does, however, make it possible to arrive at a more tractable set of equations that can be solved.

Works best in the optically thick regime. Provides gracious breakdown in the optically thin regime. Question: What do these two regimes mean?

For some problems, we only care for the optically thick regime. FLD is ok in such situations because it assumes that photons diffuse through matter.

Mathematically: Assert that the radiation energy density E is the only variable of interest. Claim that radiation flux F and radiation pressure tensor P obtained from it. We will not derive, but give feel for equations.

Page 67: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

67

( ) ( )

0

0 0

2 2 2

E + E + Interpret these terms ; is flux limiter.

Question: With being the reciprocal of a mean free path, can you interpret ?

E = 1 R + 3 R 1 ; R 2

R

R R

c

c

λ λκ

κ κ

= − ∇ ←

− − ⊗ =

F v v P

P I n n

( )

( ) ( )

( )( ) ( )

2 2

0

00

0

EE + R ; = ; R = E E

The final equations are:

+ v = 0

Ev + v v + P =

+ P v = 4 B E + 2 1

R

ii

i i j ijj i

Pi P

i R

t x

t x x

ct x

λ λκ

ρ ρ

ρ ρ δ λ

κκ π λκ

ε ε

∇∇−

∂ ∂∂ ∂∂ ∂ ∂

−∂ ∂ ∂

∂ ∂+ − − − ∂ ∂

n

v

( )

22

0

2

0

20 2

0 00

3 R E E2

3 R E + E v = E 2

3 R 4 B E 2 1 E + E2

Question: Interpret t

P

ii R

PP P

R

c

ct x

cc

κ

λκ

κκ π λ κκ

−∇ −

−∂ ∂ ∇ ∇ ∂ ∂ −

+ − − − ∇

v

vv

he RHS terms. Interpret all the terms in the radiation energy equation.

Page 68: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

68

1.11) Radiative TransferWhen the medium is not optically thick, photons do not propagate diffusively. We then have to treat the propagation of photons more carefully.

Photons can be absorbed or emitted by matter. (Give examples where this happens) They also scatter off the matter. (Question: Give terrestrial and stellar examples of scattering.)

In such situations, at each location “x”, we study the propagation of photons in each direction “Ω”.

The amount of radiant energy (in a frequency range ν to ν + dν) propagating per unit time through an infinitesimal area dA that is orthogonal to Ω is given by the radiation intensity:

Question: How is this analogous to a distribution function for gas particles? Hint: for a photon, E = h ν = p c.

( ), , , I t d dA dx Ω Ων ν

Page 69: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

69

The radiative transfer equation for photons is the analogue of the collisional Boltzmann equation:

( ) ( ) ( ) ( )( )( ) ( )( ) ( )

1 , , , + , , , = , , T , ,

, , , , , , ,

+

bI t I t t I tc t

t t I t

ν ν κ ν ν

κ ν σ ν ν

σ

∂∇

∂− +

x Ω Ω x Ω x x

x x x Ω

x

( ) ( ) ( )/ / /, , , , , ,

4t

I t dν

νπ

Φ∫ Ω Ω x Ω Ω

Note: This is not just one equation for a single Ω, but rather a set of equations for the ordinates, Ω, spanning all directions.

The left hand side just says that photons stream freely in the absence of matter (and, therefore, in the absence of collisions with matter).

The right hand side contains the effect of photon-matter interaction. Question: Interpret each of the terms. Why does Ib depend on the temperature of matter? κ is the absorption opacity and σ is the scattering opacity. How do those terms differ in the right hand side?

Page 70: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

70

First simplification: Speed of light >> all other speeds. time-dependence can be dropped.

Second simplification: Solve for a small number of frequency bins –picket fence approximation. Alternatively, integrate over all frequencies –gray approximation.

Third simplification: Solve only for a small set of ordinate directions. For each integer “N” there are only N ( N + 2) ordinates. Gives rise to an SN method.

Fourth simplification: Oftentimes, the matter is assumed stationary.

( ) ( ) ( )( )( ) ( )( ) ( )( ) ( ) ( )

( )2

1

, , = , T ,

, , , ,

, + , , ,

4

i i b

i

N N

j i j jj

I I

I

w I+

=

− +

Φ∑

Ω x Ω x x

x x x Ω

xΩ Ω x Ω

ν κ ν ν

κ ν σ ν ν

σ νν

π

Page 71: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

71

1.12) Equations of Linear Elasticity

We can stretch a spring and verify the linear relation in Hooke’s law. Restoring force (stress) proportional to deformation (strain).

Imagine plucking the spring. Set up compressible oscillations.

We can also set up transverse oscillations.

At an atomic level, the force comes from the deformation of atomic bonds

Undeformed Extensional strain Shear strain

Page 72: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

72

( )

( ) ( ) ( )( )

original positionsshifted posi

Let the of the "atoms"/mass points be : , ,After application of strain, the tons

Displacement

are : X , , , ,Y , , , ,Z , , ,

:

We seek a definition

v

fo

ector

x y z

x y z t x y z t x y z t

=

=

≡ −

x

X

δ X x

( ) ( )

r strain that is independent of translations or solid body rotations.Consider . It eliminate translations

rot

does .

Solid body are given by anti-symmetric

3

t

3 ten

ensor

sor

: at

:

ions T ∂ ∂ − ∂

×

δ x δ

x

x

δ

( ) ( )

x y

2

The is , therefore, given by the

We will shortly see how r the stress tensor

tenso

.

The is defin

elates to the strain tensor

r :

ve ed by :

2

v ,v ,vlocity

T

l

strain symmetric

inearly

∂ ∂ +

∂ ∂

v

ε

δ x

σ

ε δ x

( ) ( )

( ) ( )

z

11 x

X , Y , Z

and satisfies of the foc rm : X , , , X , , ,

1 v

onsistency conditions

t x

t t t

x y z t x y z tt x x t

ε

= ∂ ∂ ∂ ∂ ∂ ∂

∂ ∂ ∂ ∂∂ = − = = ∂ ∂ ∂ ∂ ∂

δ

δδ

δ

Page 73: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

73

( ) ( ) ( )

11 x 22 y 33 z

12 x y 23 y y 13 x

x 11 12 13

z

v 0 ; v 0 ; v 0 ;1 1 1 v v 0 ; v

Dynamical equations

v 0 ; v v 0 ;2 2 2

v 0

given

;

by:

t x t y t

t x y z

z

t y x t z x t z x

ε ε ε

ε

ρ σ σ σ

ε ε

∂ − ∂ = ∂ − ∂ = ∂ − ∂ =

∂ − ∂ + ∂ = ∂ − ∂ + ∂ = ∂ − ∂ + ∂ =

∂ − ∂ − ∂ − ∂ =

y 12 22 23

z 13 23 33

i.e. 6 consistency conditions and 3 components of Newton's laws.

The linear stress-s

v

tr

ain relation is a constitutive relationshi

0 ; v

p giv

0 ;

en

t x y z

t x y z

ρ σ σ σ

ρ σ σ σ

∂ − ∂ − ∂ − ∂ =

∂ − ∂ − ∂ − ∂ =

11 11

22 22

33 33

12 12

23 23

13 13

by:2 0 0 0

2 0 0 02 0 0 0

= 0 0 0 2 0 00 0 0 0 2 00 0 0 0 0 2

and are Lame parameters and are related to th

σ εµσ εµσ εµσ εµσ εµσ µ

µε

Λ + Λ Λ Λ Λ + Λ Λ Λ Λ + Λ

′ e Young's modulus " " and Poisson ratioE n" ".µ

Page 74: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

74

( )( )

( )( )( )

11 x y z

22 x y z

33 x y z

12 x y

23 y y

2 v v v 0

v 2 v v 0

v v 2 v 0

v v 0

v v 0

The final form of the equations for is :

t x y z

t x y z

t x y z

t y x

t z x

linear elasticityσ µ

σ µ

σ µ

σ µ

σ µ

∂ − Λ + ∂ − Λ ∂ − Λ ∂ =

∂ − Λ ∂ − Λ + ∂ − Λ ∂ =

∂ − Λ ∂ − Λ ∂ − Λ + ∂ =

∂ − ∂ + ∂ =

∂ − ∂ + ∂ =

( )x 11 12 13

y 12 22 23

z 13 23

2

x

3

13

3

1

z

For x-directional variations we can again write a cha

v 0

racteristic matrix and obtain:

v 0 v

v 0

0

;

v

t x y z

t x y z

t x y z

t x

P

z

c

ρ σ σ σ

λ

ρ σ σ σ

ρ σ σ σ

σ µ

λ

∂ − ∂ −

∂ − ∂ + ∂

∂ − ∂ =

∂ − ∂ − ∂ − ∂ =

∂ − ∂ − ∂ − ∂ =

= −

=

3 4 5 6 7 8 9

2where ;

Question: Interpret these modes. What do they tell you? Explain why you get 6 pr

; 0 ; ;

opagating modes.

S

P

S

S

P

c

c c c

cµ µρ ρ

λ λ λ λ λ λ λ= = − = = = = = =

Λ += =

Page 75: Numerical PDE Techniques for Scientists and …dbalsara/Numerical-PDE-Course/ch1/...Numerical PDE Techniques for Scientists and Engineers By Prof. Dinshaw S. Balsara (dbalsara@nd.edu)

7575

( ) ( )

( )( ) ( )

( ) ( )( )

( )

2 2 2 2

2 2 2 2

v 0

1 v + + v v E E B B + P + = 02

1 P + + v + 02

; =0

ii

i i j i j i j ijij

i ii

t x

h ht x

h ht x

t

ρ γ ρ γ

ρ γ ρ γ γ δ

ρ γ ρ γ

∂ ∂+ =

∂ ∂

∂ ∂ × − − + ∂ ∂

∂ ∂ − + × = ∂ ∂ ∂

= ∇× × ∇ •∂

E B E B

E B E B

B v B B

( )

;

= 1 + P - 1h ρ

= − ×

Γ Γ

E v B

1.13) Relativistic Magnetohydrodynamics(Rel-MHD) in Conservation form.(c=1)1) Compare with non-relativistic case. Lab frame v/s rest frame.2) Notice that the thermal energy and magnetic energy contribute to the inertia in the momentum equations. Similarly for Lorentz factor. Why?3)The rest mass energy & magnetic energy contribute to the energy density.4) Notice the promotion of the magnetic field to a 4-vector.5) Notice that the induction equation remains unchanged owing to the fact that Maxwell’s Equations are already Lorentz-invariant!