44
Advanced Methods for Numerical Fluid Dynamics and Heat Transfer (MVKN70) Rixin Yu September, 2019 1

Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Advanced Methods for Numerical

Fluid Dynamics and Heat Transfer

(MVKN70)

Rixin Yu

September, 2019

1

Page 2: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Course plans (2019)Week 1 (36): RY (Basic discretization)

Week 2 (37): RY (Compressible flow, part 1)

Week 3 (38): BS (Heat transfer/Radiation)

Week 4 (39): RY (Compressible flow, part 2)

Week 5 (40): RY (Reacting flow)

Week 6 (41): Two guest lectures (Saab/Volvo)

Week 7 (42): Theory exam, Final group project presentation.

-------------

Monday Tuesday Wednesday Thursday

(1h lecture/1h exercise)

------------

To pass the course:

(i) Handle in all homeworks in each 6 weak

(ii) Attend all 5 computer-exercises in Thursday

(iii) Theory test + Group project

RY: Dr. Rixin Yu: tel: 222 3814; e-mail: [email protected]

BS: Prof. Bengt Sundén: tel: 2228605, email; [email protected]

2

Page 3: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Main course contents• The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05)

– Low speed (incompressible), flow problem with slightly simple physics

• This “advance” CFD course (MVKN70)

– Numerical methods dealing with flow problems with complex physics

• High speed, compressible flow (week 1,2,4)

– Shock-wave, discontinuity

• Multi-physics flow problems

– Advanced heat transfer : thermal radiation problem (week 3)

– Reacting flow,combustion (week 5)

– Other types of specific multi-physics flow problem (not covered in this course )

» Multiphase flows (Spray)

» Magnetohydrodynamics (MHD)

» Micro-fluid, non-Newtonian

» …..

3

Page 4: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Lecture 1.a

An overview of computation methods

applicable to fluid flow problems

4

Page 5: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Broad overview of CFD methods

• Different frameworks of computational methods (able to deal with the fluid-

mechanics problems)

– Classic methods (P.D.E. (N.S. equations) discretization onto a grid approximation )

• Finite volume/Finite difference

– Discretization on a grid (mesh) with predetermined connectivity

» Numerical Schemes to turn a system of P.D.E.s into an

approximated set of algebraic equations.

» Basic tools: Taylor expansion, interpolation/extrapolation.

» Concepts: Order of accuracy (truncation error), Neumman stability

analysis, boundary conditions treatments,

– The nature way towards extension to handle complex problem

» Deforming grid, (Adaptive) mesh refinement

• Finite element, (pseudo) spectral methods (X)

– Other methods

• Meshfree methods (Smooth particle hydrodynamics, X)

• Lattice Boltzmann Methods (X)

5

Page 6: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Spectral methods(One-dimentional Fourier transform)

� � ≔ � �� � ⋅ ��

signal

Finite Difference

Finite Volume

….

Spectral method

Finite element

�� = −1Decomposition of a physical-signal into the sum of a series of simple-waves of different amplitude

6

Page 7: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Spectral method: Fourier transform

∫ �� ⋅ ������ ∶= ���� = � 1, � = �′0, � ≠ �′For each simple (Fourier) wave, it is easy to calculate derivative (to assist solving differential equation)

��� �� = ? ����� �� = ?

�� � ∶= ∫ � � ��� To find the amplitude of each decomposed simple wave:

It is computational afforable to perform Fourier Transform to calculate amplitude.

• The discrete Fast-Fourier-Transform (FFT)

• Computationally-efficient, reducing operation counts from O(��) to O( � log (�) ) , where � is number of discrete grid count.

• The simplest version is Cooley-Tukey algorithm which works for �=2&, • other advanced FFT algorithm version can handle N as arbitrary as prime number.

• FFTW (free software, parallel implementation available)

Any two different simple-waves (� ,�’) are orthogonal (which makes the decomposition possible!)

� � × �� � � � �� = −�� × ��

Decomposition of a physical-signal into the sum of a series of simple-waves of different amplitude

7

Page 8: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Demonstration of spectral method for solving a differential equation

Which of the following equations are easy to solve?

An algebraic equation for a real-valued �: �> − ?�� + A = 0, with ?, A are constants.

A differential equation for �(�) : BCB�C � � + ? BD

B�D � � + A� � = 0, for � ∈ (−∞, +∞)Assume � only

contains a single �simple-wave of � � = ����,

then:��� � = �� × ��������� � = −�� × �����>��> � = +�> × ����

�> −?�� +A × ���� = 0��(�) = G HIJ KLMN, �� �> −?�� +A = 00, OPℎRS�T

8

Page 9: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Multi-dimentional Fourier transform

U �, J : = W W XYZ,�(Z�[�\) �

Z

�JU OR U]

with �� = −1

……

..…

Decomposition into simple,

multidimentional-waves9

Page 10: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Spectral method for solving multidimensional linear P.D.E.

• A simple linear partial differential equation (Poisson eq.)

^�^�� + ^�^J� N �, J = U �, J ,

N �, J : = W W N]Z,� × (Z�[�\) �

Z U �, J : = W W U]Z,� × (Z�[�\)

Z^�^�� + ^�^J� N �, J : = W W −N]Z,�(_� + ��) × (Z�[�\)

ZU(�, J) ∶= W W U]Z,� × (Z�[�\) �

Z

N]Z,� = − U]Z,� (_� + ��)

Decompose u and g into the sum of simple 2D Fourier waves

U �, J = U � + 2`, J= U(�, J + 2`)with �, J ∈ [0,2`]in a periodic domain

For each (j,k), we get a

simple algebraic relation.

and

Then:

10

Page 11: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Spectral methods for nonlinear P.D.E.

N �, P : = W N]�(P)�� �

The nonlinear viscous burger′s equation ( periodic in � ∈ 0,2` , solve for P ≥ 0)

W ^̂P N]� + ��2 W N]dN]e

d[ef� + ��N]�

� = 0

^̂P N + 12 ^̂� N� = ^�^�� N

For solving N]� at a wave number k , the above relation is not algebraic any more

due to the involvement of other wave numbers p and q. If the nonlinear term take

more complicated expression, the computation can become expensive!.

As a simplification to the incompressible N.S. equation ^gh + h ⋅ i h = −ij + ki�h; i ⋅ h = 0

Fourier decomposition in � (not P)

N]� Pl[m − N]� PlPl[m − Pl = n�j. (N]� , N]d , NYe) pgq1st order time advancement:

11

Page 12: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Pseudo-spectral methods for solving nonlinear PDE

�OR � ∈ 0,2` , P ≥ 0

N �, P ≔ W N]�(P)�� �

Nonlinear burger′s eq.

W ^̂P N]� + 12 ��Ψs�(P) + ��N]�

� = 0

^̂P N + 12 ^̂� N� = ^�^�� N

N(�, P)N(�, P) = Ψ(�, P) tu gu � vdwxyzu{|y| }|wl~u|& u~ � W Ψs�(P)�� �

N]� Pl[m − N]� PlPl[m − Pl = n�j. ( N]� , Ψs�) pgq

Time advancement,

(simple calculation)

Compute N�in x-space !

Back to x-space,

inverse Fourier

Transform of N]�

12

Page 13: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Spectral method: Pros/Cons

• Spectral methods and Finite Element Method are closely related

– Spectral methods use a “global” “orthogonal” basis functions that are

non-zero over whole domain.

• Excellent error properties of “exponential convergence” (in other words, the

spectral methods is very accurate when solution is smooth)

– FEM can be viewed as using a “local” basis functions that are non-zero

only on small subdomain.

• Spectral methods works better with simple-geometry(e.g. periodic)

having smooth solutions , it can be less expensive.

• Spectral methods are not good for discontinuous problem, (no

known 3D spectral “shock capture” results), link to Gibbs

phenomenon.

Functional approximation of

square wave using 5 harmonics 125 harmonics25 harmonics 13

Page 14: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

General overview of CFD methods

• Different frameworks of computational methods (able to

deal with the fluid-mechanics problems in a whole)

– Classic methods (P.D.E. (NS) discretization onto a grid approximation )

• Finite volume/Finite difference

• Finite element, (pseudo) spectral methods (X)

– Other methods

• Meshfree methods (Smooth particle hydrodynamics, X)

• Lattice Boltzmann Methods (X)

14

Page 15: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Meshfree methodsSmooth particle hydrodynamics (SPH)

SPH of dam break from youtube

Useful refernce:

wikipediaM.B. Liu, G.R. Liu, Smoothed Particle Hydrodynamics (SPH): an Overview and Recent Developments, Arch Comput. Methods Eng, 2010, 17:25

DOI 10.1007/s11831-010-9040-7

http://www.ita.uni-heidelberg.de/~dullemond/lectures/num_fluid_2011/Chapter_12.pdf

http://www2.mpia-hd.mpg.de/~dullemon/lectures/fluiddynamics08/chap_10_sph.pdf

15

Page 16: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

SPH• It is a mesh-free lagrangian methods to simulate

continuum media.

– Initially developed in 1977 for astrophysical problems, then

extended to many fields: volcanology and oceanography...

– Ideals: • The gas cloud is represented by a set of discrete blob of gas,

these particles interacts with neighboring particles through a

repelling force(pressure), but otherwise they are like normal

moving particles.

16

Page 17: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

SPH

• SPH methods– Divide the fluid into a set of discrete particles elements. These elements have a

spatial length over which their properties are smoothed by a kernel function.

– Physical properties at a certain location receive contributions from nearby

particles, the contribution of each particle are weighted according to their

distances from the particle of interests. Spatial derivative of a quantile can be

easily obtained.

– Only solve equation of motion for all particles, which is a set of ODE equations.

• Easy mass and energy conservation, particles themselves represent mass. No negative

density can happen.

• Pressure can be evaluated directly from weighted contribution of neighboring particles,

instead of solving the (Poisson) equations. as in grid-based technique.

17

Page 18: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

SPH

Divergence-Free SPH for Incompressible and Viscous Fluids, from youtube

18

Page 19: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

SPH• Benefits over traditional grid/based technique.

– Versatile, easy to deal with problems of free surface, deformable boundary and

moving interface.

• SPH can do real-time simulation water/air simulations(for games)

– For problems with complicate geometry setting or problems with large

deformation, SPH can self-adapt its resolution (computing power is

automatically focused to there where mass is). • Analogous to grid-based methods, it become an automatic version of adaptive mesh refinements

(AMR) without technique complexity.

– Simple and robust method, easier for numerical implementation:

• Challenges and problems

– To quickly find the nearest neighboring particles • Connectivity information is not available as in the grid-based method

– Require large number of particles, less accurate ,• Noise due to discrete approximation of kernel interpolants,

• large numerical shear viscosity

• Tends to smear out shocks and contact discontinuity

19

Page 20: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

General overview of CFD methods

• Different frameworks of computational methods (able to

deal with the fluid-mechanics problems in a whole)

– Classic methods (P.D.E. (NS) discretization onto a grid approximation )

• Finite volume/Finite difference

• Finite element, (pseudo) spectral methods (X)

– Other methods

• Meshfree methods (Smooth particle hydrodynamics, X)

• Lattice Boltzmann Methods (X)

20

Page 21: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Lattice Boltzmann Method

Slide taken from Steven Orzag ‘s presentation

21

Page 22: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Lattice Boltzmann methods(LBM)

• Different levels of observations(microscopic<mesoscopic<macroscopic)– Macroscopic behavior of a system may not dependent on the details of the microscopic

interactions.

• In the middle mesoscopic level, keep some part of the “particle” concept,

allow those particles only staying in the lattice points, therefore only finite

number of discrete velocity values

22

Page 23: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

LBMCellular Automaton, conway’s game of life(1970)

Very simple set of rules: Any live cell with fewer than two live neighbours dies, as if caused by underpopulation.

Any live cell with two or three live neighbours lives on to the next generation.

Any live cell with more than three live neighbours dies, as if by overpopulation.

Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

creates complex life-like patterns !

23

Page 24: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

LBM• Cell automaton rules for modeling gas dynamics:

• Particle only live in nodes of a given Lattice.

• A finite number of allowed states for each node, n �, P• Two stage evolutions

• 1: Streamn � + ���, P + ΔP = n r, t• 2: collide n � + ���, P + ΔP − n r, t = Ω I �, P

• Lattice Boltzmann Method

• Use a probability function: �(P, �, �) • Similar to Boltzmann eq. for gas dynamics

• Average the probability to compute Fluid

quantities.

• Model the collision term Ω• Relax toward equilibrium state

24

Page 25: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Lattice Boltzmann methods(LBM)• Advantages

– Fundamental research tool

• Theoretically appealing: the knowledge of interaction between

molecules can directly incorporate physical terms

– Success in wide range of applications

• Complex, multiphase/Multicomponent flows.

– Coupled flow with heat transfer and chemical

reactions.

– Multiphase flow with small droplet and bubbles,

flow through porous media.

– Run efficiently on massively parallel architectures,

• LBM algorithm is local (cell interacts with only

neighbors) and explicit in time.

• computer cluster, GPU, even FPGA(mobile chips).

• Parallel post-processing

– LBM algorithm is 1st order PDE, much simple for

programming than Naiver-stokes equation based

solver. • Easy boundary conditions treatment

25

Page 26: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Lattice Boltzmann methods(LBM)

• Limitations:

– Only limited number of commercial software is

available.

• The method is relatively “new”!

– Numerical instability can develop when viscosity

become small.

– High Mach number flows in aerodynamics is still

difficult for LBM.

• Shock-discontinuity, strong gradients.

26

Page 27: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Lecture 1.b

• Contents

– Review important properties of simple1D wave

(advection) equations • Emphasis on physical perspective, not on rigorous derivation.

– Analytical solution of 1D discontinuity problem • The Riemann problem

– Provide powerful ideal for late developing of numerical scheme treating shocks

• Reference Book for all lectures in week 1

– Computational fluid mechanics and heat transfer, by J.C. Tannehill, D. A. Anderson and R. H. Pletcher

• Chapter 4.4:

– Introduction,

– 4.4.1-4.4.3

– 4.4.8-4.4.9

– 4.4.11-4.4.12. 27

Page 28: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Why to study the simple 1D wave equations ?

��g � + ��� �⃗ � = 0, where � and �⃗ LR 3 × 1 KAPOR

��g � + [�] ��� � = 0 , where [�] ≡ ���� is 3x3 matrix

Let simplify Naiver-stokes equations + Ideal gas law (j = ���), let’s drop viscous terms (into Euler Eq.) and reduce 3D3D3D3D1111D (P, �, J, �)^̂P

��N�(A�� + N�2 ) + ^̂�

�N�NN + j�N(A�� + N�2 ) + jN = 000

nonnonnonnonconservative form

cccconservative form

1D Euler equation:

28

Page 29: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Why to study the simple 1D wave equation? (cont’d)

^̂P � + ^̂� �⃗ � = 0

^̂P � + ^̂� � � = 0, ^̂P � + ^�^� ⋅ ^̂� � = 0

Reduce the complexity in � and �⃗ (of size 3x1

vector) to a single component scalar of � and � �respectively

���n: 11 �(�, P) depends on space & time

(2) Assume �(�,x) does not depend on �Conservative form

Nonconservative form

About the conservative/non-conservative form:

For to hold, �(�, P) must remains smooth in �.When �(�, P) contains discontinuity in �, we should use the conservative form

which is derived from the fundamental physical “conservation” laws.

��� � � =�~�e ⋅ ��� �

29

Page 30: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

The simplest linear advection equation 1with constant N for all x and t

^̂P �(�, P) + N ⋅ ^̂� �(�, P) = 0Introduce a new coordinate �, P → ¡, ¢ ,

G� ¡, ¢ =P(¡, ¢) =¡ + N ⋅ ¢¢

The value of � holds constant constant constant constant for different τ (or t) along the entire trajectory x ξ, τ at a fixed ξ. In the (x,t) graph, the line with fixed value of ¡ is called characteristic line, � − NP=¡~� , therefore B�Bg = N.¨̈g � ≡ �e ©,ª�ª |z� © is analogy to the concept of “substantial

derivative” or “material derivative” often used in fluid

mechanics.

^� ¬, ­^­ pz� ¬ = ^̂P � �, P ^P^­ + ^̂� � �, P ^�^­ = 0→ � ¡, ¢ = AOITP. pz� ©

¡ = −1 ¡ = 0 ¡ = 1

On a (�, P) graph, N is the

inverse slope of the

characteristic line.

0012 3

�21−1

P

30

Page 31: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

The simplest linear advection equation 1 (Cont’d)with constant N for all x and t

N = ®�®g = AOITP. > 0, inversion of slope

P = 0ΔP

NΔP

�(�, 0) �(�, ΔP)

The “characteristic” wave and the wave diagram used for solving wave equation.

P = 0ΔP

�(�, 0)�(�, ΔP)

TjLA �

1) It does not matter which profile of the initial � � |gf° takes, it can even be discontinuous.

2) The simple advection just shift the intial profile � � |gf°; if starting from an initially smooth � � |gf°, discontinuity in � � |g will never be created for any P > 0.

^̂P �(�, P) + N ⋅ ^̂� �(�, P) = 0

31

Page 32: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

The simplest linear advection equation 1 (Cont’d)

Method of characteristics and boundary condition. (B.C.)

P

0 �±�w

��g � �, P + N ⋅ ��� � �, P = 0 solve for � ∈ �w , �± , P ∈ [0, ∞)

P∗ �∗?

�∗

��∗,g∗= � ³´, µ∗�(�∗��¶)/{P# �#?

�#��#,g#= � ³# �¹µ#,°

Set B.C.

here as� = KLMN

32

Page 33: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Linear advection equation 2with a spatial-dependent advection speed N(�)^̂P �(�, P) + N(�) ⋅ ^̂� �(�, P) = 0,

New coordinate �, P ¬, ­G� ¬, ­ =P(¬, ­) =¬ + ∫ N � ¬, ¢∗ �¢∗ª° ­

ººP � ≡ ^̂­ � ¬, ­ p~�yB ¬ = ^̂P � ⋅ ^P^­ + ^̂� � ⋅ ^�^­ = 0→ � = AOITP. p~�yB ©

N(�)P = 0ΔP2ΔP3ΔPCurved characteristic lines

P = 010ΔP 20ΔP 30ΔP

Follow the wave trajectory, a point in the upwinding direction can approach infinitely-close to a downwind

point, but can never catch it in finite time. Therefore discontinuity in � � |g can not form in finite time, if

starting from an initially smooth profile of � � |gf°.

ZOOM

N(�)

33

Page 34: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Advection equation 2 (Cont’d)with a spatial-dependent advection speed N(�)

P = 0ΔP

^̂P �(�, P) + N(�) ⋅ ^̂� �(�, P) = 0,

space �

N(�)

�(�)

space �

�(�, 0)�(�, ΔP)

34

Page 35: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Linear advection equation 3of conservative quantity with a spatial-dependent advection velocity u(x)

^̂P �(�, P) + »»� h � ¼ �, ½ = 0

^̂P � �, P + N � ^̂� � �, P = −�(�, P) ^̂� N �

^̂P � + ^̂� �(�, �) = 0

ººP � = −� �, P ^̂� N � ≠ 0

Indeed, lets Integrate � over �w < � < �± ,^̂P � ��¿

�¶�� + N �± � �± , P − N �w � �w , P = 0,

the above integration can change in time !

Rewrite above

P = 0ΔP 2ΔP 3ΔP

��°

� value may not stay

constant following a

characteristic wave

35

Page 36: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Summary: General flux-form of conservation equations

^̂P �(�, P) + ^̂� �(�, �) = 0

� �, � ≝ 12 ��

^̂P � + � ^̂� � = 0

� �, � ≝ N � ⋅ �mLinear Example 1 New example: Nonlinear Inviscid burge’s equation

^̂P � + ^�^� p�fxulvg^̂� � = − ^�^� pefxulvg

The Euler equation is in this form!

Nonconservative form:

Linear Example 3

� �, � ≝ N ⋅ �m

^�^P + N ^�^� = 0 ^�^P + N � ^�^� = −� ^N^� ≠ 0Nonconservative form: Nonconservative form:

Linear Example 2 can not be expressed in conserved form

36

Page 37: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Non-linear wave equationInviscid burger’s eq.

^̂P � + ^̂� (12 ��) = 0 ººP � ≡ ^̂P � + � ^̂� (�) = 0

� space

The characteristic wave

speed u = �(�, ½) now

also depends on time t !

(1) � along any characteristic line must hold constant.

(2) Since the wave speed N=� dictates the slope of characteristic

wave, every characteristc lines must be straight.

Nonlinearity cause

formation of discontinuity

in � �, P from an initially

smooth profile of �(�, 0) in

finite time37

Page 38: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Solve inviscid burger's equation before formation of discontinuity

^̂P � + ^̂� (12 ��) = 0 ººP � ≡ ^̂P � + � ^̂� (�) = 0

space x

x

2ΔP

t = 0

� � pg°

� � |�Ág

Characteristic

wave diagram ΔP

� � pÁg

38

Page 39: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Lets focus on the time-evolution of a “single” discontinuityaccording to the inviscid burger’s equation^̂P � + ^̂� (12 ��) = 0

space x

Space x

ΔP t = 0

Initial profile

of � � |g°

ººP � ≡ ^̂P � + � ^̂� (�) = 0

space x

Later profile � � |Ág ?

Characteristic

wave diagram

39

Page 40: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

The Riemann problemfor the inviscid-burgers equation

shockwave Expansion

The Riemann problem: “Initial value problem composed of a conservation equation together with piecewise

constant data having a single discontinuity”

space x

�Â

�à ��

?

�Ã

space x

? ?

� �, 0 � �, ΔP

� > �à � < �Ã

40

Page 41: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

The Riemann problemThis is the analytic solution for inviscid-burgers equation

shockwave Expansion, Rarefaction waves

space

�Â

�Ã�Â

�Ã

space

Wave diagram from solving Riemann problem for inviscid burger’s equation.

Note: the analytical solution tells that the characterizer line are straight

from the origin !!!

41

Page 42: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

Solution of Riemann problem for inviscid burge eq.What is the speed of the “middle” value point?

shockwave Expansion, Rarefaction waves

t = 0

2ΔPΔP

t = 0

2ΔPΔP

Space xSpace x

ΔP 2ΔP0 ΔP 2ΔP0

1: The middle point speed in both cases are the same : c = eÄ[eÅ� (with c≝ B�ÆÇÈBg and q �&B , P = eÄ[eÅ� ).

2: For the shockwave case, the continuity just do simple translation in time, this seems to be similar to a linear-

advection problem with a constant convection speed set to be c. 42

Page 43: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

How to solve the Riemann problem?for inviscid burgers equation

Exact (Analytic) solutions:

1) Galilean invariance (�∗ = � − A; �∗ = � + AP; P∗ = P )^̂P∗ �∗ + 12 ^^�∗ �∗� = 02) Self-similarity: (All characteristical lines at the discontinuity are straight)

Given initial condition: � � > 0[, P = 0 = N| ; � � < 0[, P = 0 = NÊ� �, P = Ë �P ; �OR P > 0L−L

space

−L+L

^̂P � + 12 ^̂� �� = 0

� �, P = G−L, � > 0[L, � < 0� � �, P = Ì �P , −L < �P < L∓L , ouPT�� L?OK 43

Page 44: Advanced Methods for Numerical Fluid Dynamics and Heat ... · • The sibling CFD course offered in our department (Numerical Fluid Dynamics and Heat Transfer, MMVN05) – Low speed

The Riemann problem for the nonlinear Euler equations (three coupled equations)

The classic shock tube problem:

quite complex.

1) Self similar (���Îg )

2) 5 regime due to 3 wave characters

(note Euler eq. are for 3 variables j, K, �)

a) Rarefaction fan

b) contact discontinuity

c) Shock (Rankine-Hugoniot relation)

K(�, Pm)

Pm

j(�, P°)� �, P°K(�, P°)j(�, Pm)�(�, Pm)

44(To be explained in detail next week!)