relativistic hydrodynamics zah/ss17/ln- 3 & 4 f(x) · relativistic hydrodynamics zah/ss17/ln- 3...

13
Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 ________________________________ LN_5&6 / S. 1 Taylor expansion: Let ƒ(x) be an infinitely differentiable real function. At any point x in the neighbourhood of x=x 0 , the function can be represented as a power series of the following form: (n) 2 3 0 0 0 0 0 0 0 0 0 0 f (x ) f( ) f( ) f( ) f(x)= ( ) f( ) ( ) ( ) ( ) ! 1! 2! 3! n n x x x x x x x x x x x x n where n! stands for the factorial of n and f (n) (x0) for the n-th derivative of f at x =x0. Examples: The function f(x)= e x in the neighborhood of x=0 has the following Taylor series: 2 3 4 x x x 1+x + 2 6 24 x e Q: 3 5 If the TE of f(x)= sin(x) around 0 is: sin(x) = x - 3! 5! What is the TE of f(x)= around x=0? sin( ) x x x x e x f(x) f(a) x X0 Hint: Let sin( ) x e x has an expansion of the form: 2 3 1 2 3 3 3 5 2 3 1 2 3 3 c +c x +c x +c x sin( ) c +c x +c x +c x x- 3! 5! x x e x x x e

Upload: duongmien

Post on 23-Aug-2019

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 f(x) · Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 _____ LN_5&6 / S. 2 Interpolation techniques By interpolation we mean a procedure

Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4

________________________________ LN_5&6 / S. 1

Taylor expansion:

Let ƒ(x) be an infinitely differentiable real function.

At any point x in the neighbourhood of x=x0, the function ƒ(x)

can be represented as a power series of the following form:

(n)2 30 0 0 0

0 0 0 0 0

0

f (x ) f ( ) f ( ) f ( )f(x)= ( ) f( ) ( ) ( ) ( )

! 1! 2! 3!

n

n

x x xx x x x x x x x x

n

where n! stands for the factorial of n and f(n)(x0) for the n-th derivative of “ f ” at x =x0.

Examples:

The function f(x)= ex in the neighborhood of x=0 has the following Taylor series:

2 3 4x x x1+x +

2 6 24

xe

Q:

3 5

If the TE of f(x)= sin(x) around 0 is: sin(x) = x -3! 5!

What is the TE of f(x)= around x=0?sin( )

x

x xx

e

x

f(x)

f(a)

x

X0

Hint: Let sin( )

xe

x has an expansion of the form:

2 3

1 2 3 3

3 52 3

1 2 3 3

c +c x +c x +c xsin( )

c +c x +c x +c x x-3! 5!

x

x

e

x

x xe

Page 2: Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 f(x) · Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 _____ LN_5&6 / S. 2 Interpolation techniques By interpolation we mean a procedure

Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4

________________________________ LN_5&6 / S. 2

Interpolation techniques

By interpolation we mean a procedure for approximating the value of the function at the

point x which is located inside the interval.

By extrapolation

we mean a procedure for approximating the value of the function f(x) at an exterior point

:

Linear interpolation can be used for both procedures:

2 1 1

2 1 1

2 12 1 1

1

11 2 1

2 1

y(x ) - y(x ) y(x) - y(x ) =

y(x ) - y(x ) = y(x) - y(x )

y(x) = y(x ) - y(x ) - y(x )

x x x x

x x

x x

x x

x x

1x

2xx

(

1x

2x

f(X1) f(X2) F = ?

f(X1) f(X2) f = ?

1 2 1

2

If for x < x <x the functions f (x )

and f (x ) are used to evaluate f (x),

then the procedure is called interpolation.

1 2 1 2

1 2

If for x < x < x or x < x < x the

functions f (x ) and f (x ) are used to

evaluate f (x), then the procedure is

called EXTRA-polation.

Page 3: Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 f(x) · Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 _____ LN_5&6 / S. 2 Interpolation techniques By interpolation we mean a procedure

Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4

________________________________ LN_5&6 / S. 3

0 0 1 1

Polynomial interpolation:

Assume we are given the following n+1 points:

(x ,y ), (x ,y ), , (x ,y ).

With the help of these points, we want to

have an approximation for the additional point (x, y).

The s

n n

n n-1

n n-1 0

trategy here is to construct a polynomial of degree n, such that

y(x) = a x + a x + ... a .

As this polynomial goes through the above n+1 points, it therefore must

satisfy the following equa

1

n 0 n-1 0 0 01

1 0 0 0

n 1 n-1 1 0 1 1

1 1 1

1

1n n-1 0 n

n

`

tions:

a x + a x + ... a = yx x x 1

a x + a x + ... a = yx x x 1

1

a x + a x + ... a = yx x x 1

n n

n n

n n

n n

n n

n nn n

n n

0

1 1

0

X

n

n

n

a y

a y

a y

0 0

1 1

2 2

2 : Assume we are given the following points:

(x ,y ) = (1,2) Use these points to find a

(x ,y ) = (2,3) polynomial approximation for

y at x = 5/2? (x ,y ) = (3,1)

Q

Q1: what does it mean, when the matrix X is singular? Give examples!

Page 4: Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 f(x) · Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 _____ LN_5&6 / S. 2 Interpolation techniques By interpolation we mean a procedure

Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4

________________________________ LN_5&6 / S. 4

0 0 1 1

Lagrange interpolation:

Assume we are given the following points:

(x ,y ), (x ,y ), , (x ,y ).

Based on these points, Lagrange suggested the following approximation

for y at x:

y(x) =

n n

j jN

j j kj=0 j

j k

31 20

0 1 0 2 0 3

y =y(x )

y = y (x), where x - x(x)

x -x

Example

are the following set of points (x,y):

1 2 3 4

8 7 6 5

x - xx - x x - x 1(x) ( 2

x -x x -x x -x 6

n

k j

Given

x

y

x

0 321

1 0 1 2 1 3

0 312

2 0 2 1 2 3

0 13

3 0 3 1

)( 3)( 4)

x - x x - xx - x 1(x) ( 1)( 3)( 4)

x -x x -x x -x 2

x - x x - xx - x 1(x) ( 1)( 2)( 4)

x -x x -x x -x 2

x - x x - x(x)

x -x x -x

x x

x x x

x x x

2

3 2

x - x 1 ( 1)( 2)( 3)

x -x 6

1 1 y(x) = 8 ( 2)( 3)( 4) 7 ( 1)( 3)( 4)

6 2

1 1 + 6 ( 1)( 2)( 4) 5 ( 1)( 2)( 3)

2 6

x x x

x x x x x x

x x x x x x

Page 5: Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 f(x) · Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 _____ LN_5&6 / S. 2 Interpolation techniques By interpolation we mean a procedure

Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4

________________________________ LN_5&6 / S. 5

j j-1 j j-1finite space

x

j j-1

23

j-1 j-1 j j x xx

Backward difference (u > 0):

T(x ) - T(x ) T - TT ΔTT =

x Δx x - x h

And how good is this approxation? Taylor expansion

hT = T(x )= T(x -h) = T h T + T + O(h )

2

Subtit

j

2j j-1 x xx

Trunc

x

ation err

x=

r

x

o

ute this expression:

T - TΔT T (T- hT +(h /2) T )= T - O(h)

Δx h h

The scheme is first order accurate also.

Finite difference discretization:

How to represent

Tu

x in finite space?

j+1 j j+1 jfinite space

x

j+1 j

23

j+1 j+1 j j x xx

Forward difference (u < 0):

T(x ) - T(x ) T - TT ΔTT = =

x Δx x - x h

But how good is this approxation? Taylor expansion

hT = T(x )= T(x h) = T h T + T + O(h )

2

Subtitut

j

Truncation e

2j+1 j x xx

x

x=x

rror

ing this expression:

T - T T hT +(h /2) T TΔT= T + O(h)

Δx h h

The scheme is first order accurate.

Page 6: Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 f(x) · Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 _____ LN_5&6 / S. 2 Interpolation techniques By interpolation we mean a procedure

Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4

________________________________ LN_5&6 / S. 6

j j+1

2

xx 2

j j-1 j+1 jfinite space

j j-1

j j-1 j+1 j

j j+1

x=x x=x

Higher order derivatives:

T T TT ( ) , where

x x x

F(x ) - F(x ) F - FΔF=

x Δx x - x h

T - T T - TΔT ΔTF , F

Δx h Δx h

Subtitute these exp

F

F Fx x

F

2j j-1

j j-1 j+1 j j-12 2

23

j 1 j 1 j j x xx

j

ression:

F - FT ΔF 1 1= F - F T - 2T T

x Δx h h h

But how good is this approxation? Taylor expansion

h T = T(x )= T(x h) = T h T + T + O(h )

2

Δ ΔT 1 ( ) TΔx Δx h

2

+1 j j-1 xx - 2T T = T + O(h )

The scheme is second order accurate.

Page 7: Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 f(x) · Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 _____ LN_5&6 / S. 2 Interpolation techniques By interpolation we mean a procedure

Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4

________________________________ LN_5&6 / S. 7

The one-dimensional heat equation:

Consider the following heat diffusion equation:

Assume that both edges of the metal rod are kept at certain constant temperatures Tu and Td.

Let the rod be heated at the center for a certain period of time. How do the initial,

intermediate and final profiles of the temperature look like?

Intuitively (without performing analytical or numerical calculation) we may expect that: the BCs and the ICs may play an essential role in determining the form and evolution of the

solution at any time t.

There are two types of problems: Initial value and boundary value problems. The strength of

dependence on the ICs and BCs determine the type of the problem.

2

2.

T T

t x

In the absence of transport, the heat diffuses in a symmetric

manner, provided the diffusion coefficient, χ, and the BC are

symmetric too. If advection (transport) is included, then this symmetry will be

broken as there is a preferable direction for heat transport, which is exemplified in

the following two figures.

u > 0

Page 8: Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 f(x) · Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 _____ LN_5&6 / S. 2 Interpolation techniques By interpolation we mean a procedure

Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4

________________________________ LN_5&6 / S. 8

The heat equation: discretization:

The temperature depends on t as well as on x, i.e, T = T(t,x). Thus

for each value of “x” and value of “t” there is a suitable value for T

(hopefully a unique value).

1

1 11

1

1 1

2

( )x x x

(pointwise)(1 2 ) ,

Time Explicit

where s = discretizationx

n n n n n n

j j j j j jn n

j j

n n n n

j j j j

T T T T T TT f T

t

T sT s T sT

t

t

x

T

tn

xj

T(tn,xj) = Tnj

An explicit discretization of this equation yields the following form:

2

2

T T

t x

Page 9: Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 f(x) · Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 _____ LN_5&6 / S. 2 Interpolation techniques By interpolation we mean a procedure

Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4

________________________________ LN_5&6 / S. 9

2

2

T T

t x

22

a 2L (T) = + O( t) + O( x )

T T

t x

Truncation error

Consistency: The finite space representation ( )aL T of the equation t xxT = χ T is

said to be consistent, if the truncation error goes to zero as , x 0.t (local analysis)

Stability: The finite space representation ( )aL T of the equation t xxT = χ T is

said to be numerically stable, if accumulated errors do not grow with time (non-local).

Prediction power of explicit procedures:

Accuracy ↔ more point to include

↔ larger domain

(like weather forecast)

The weather in Heidelberg: time versus domain

Page 10: Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 f(x) · Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 _____ LN_5&6 / S. 2 Interpolation techniques By interpolation we mean a procedure

Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4

________________________________ LN_5&6 / S. 10

Weak and strong solutions of Navier-Stokes equations The equations describing the evolution of incompressible viscous fluid flows are called

the Navier-Stokes equations (that were formulated around 1830s) and read:

3

x y z

0

= (u ,u ,u ), , = viscosity, p = pressure, = domain in R , = boundary,

I =(0, T) and u = initial value.

twhere u u u

For a given data, it was proven by Leray (1934) that the Navier-Stokes equations have at least one weak

solution. However, it was still not clear, whether the weak solution is unique.

Now by a weak solution we mean a solution that satisfies the above partial differential equations on

average, but not necessary in a pointwise manner. For example, the derivatives may not exist at certain

points.

However, a strong solution is said to satisfy the equations everywhere and at each point of the domain

For numerical mathematicians, the above-mentioned theorems implies the following:

Different conservative numerical methods may yield different solutions, in most cases the number

of grid points here is relatively small.

Different conservative numerical methods that are numerically stable and consistent must converge

to the same weak solution if the number of grid points is relatively large.

Lax-Wendroff theorem: The numerical solution q is said to be a weak solution for the analytical

equation ( )L q , if the numerical scheme employed is conservative, consistent and the numerical

procedure converges.

Conservation convergence weak solution

Lax theorem:

If q has been obtained using a conservative and consistent scheme, then q converges to a weak

solution of the analytical problem when j , i.e., when the number of grid points goes to

infinity.

Page 11: Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 f(x) · Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 _____ LN_5&6 / S. 2 Interpolation techniques By interpolation we mean a procedure

Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4

________________________________ LN_5&6 / S. 11

You cannot claim to have found a weak solution for the physical problem, unless you carried out the

caculations with sufficiently large number of grid points, beyond which doubling the number of grid

points yield no noticeable improvement of the numerical solution.

From Fletcher : “Computational techniques ... (1990)

From Fletcher : “Computational techniques ... (1990)

Page 12: Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 f(x) · Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 _____ LN_5&6 / S. 2 Interpolation techniques By interpolation we mean a procedure

Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4

________________________________ LN_5&6 / S. 12

2

2: Given is the heat equation: in the domain D=[t] [x] [0,1] [0,1] together with

the IC and BC: T(t=0) = 1, T(t,0) = 2, T(t,1)=2.

Solve the equation using the FTCS formulation,

T TQ

t x

1

1 1

2

x

i.e., (1 2 ) , where

s = t / , =1 and N ( umber of grid points in x-direction) 100 for the

following s-values: s = 0.1, 0.2, 0.4, 0.8, 1.2.,

Plot th

n n n n

j j j jT sT s T sT

x n

e solutions at times: t = 0.1, 0.2, 0.4 and 1.0.

Page 13: Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 f(x) · Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4 _____ LN_5&6 / S. 2 Interpolation techniques By interpolation we mean a procedure

Relativistic Hydrodynamics ZAH/SS17/LN- 3 & 4

________________________________ LN_5&6 / S. 13