Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

55
Remark: foils with „black background“ can be skipped, they are aimed to the more advanced courses Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 2013 Overview of CFD numerical methods Computer Fluid Dynamics E181107 CFD2 2181106

description

Computer Fluid Dynamics E181107. 2181106. CFD2. Overview of CFD numerical methods. Remark : fo i l s with „ black background “ can be skipped, they are aimed to the more advanced courses. Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3. CFD and PDE. CFD 2. - PowerPoint PPT Presentation

Transcript of Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

Page 1: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

Remark: foils with „black background“ can be skipped, they are aimed to the more advanced courses

Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 2013

Overview of CFD numerical methods

Computer Fluid Dynamics E181107CFD22181106

Page 2: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

CFD and PDECFD2

CFD problems are described by transport partial differential equations (PDE) of the second order (with second order derivatives). These equations describe transport of mass, species, momentum, or thermal energy. Result are temperature, velocities, concentrations etc. as a function of x,y,z and time t

PDE of second order are classified according to signs of coefficients at highest derivatives of dependent variable (for more details, see next slides):Hyperbolic equations (evolution, typical for description of waves, finite speed of information transfer)

Parabolic equations (evolution problems, information is only in the direction of evolution variable t - usually time but it could be also distance from the beginning of an evolving boundary layer)

Eliptic equations (typical for stationary problems, infinite speed of information transfer)

fxt

2

2

2

2

fxy

2

2

2

2

fxt

2

2

0)( 2 Sau

0

yc

tconvection by velocity c

Examples: supersonic flow around a plane, flow in a Laval nozzle, pulsation of gases at exhaust or intake pipes

Examples: evolution of boundary layer (in this case t-represents spatial coordinate in the direction of flow and x is coordinate perpendicular to the surface of body)

Examples: subsonic flows around bodies (spheres, cylinders), flow of incompressible liquids

Page 3: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

CFD and PDECFD2

Why is it important to distinguish types of PDE?

Because different methods are suitable for different types (e.g. central differencing in elliptical region and time marching schemes in hyperbolic or parabolic regions)

Page 4: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

Characteristics (1/3)CFD2

f can be function of x,y, and first derivatives.

yx(),y()-parametrically defined curve, where first derivatives p(),q() are specified

x

Page 5: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

Characteristics (2/3)CFD2

Right hand side is fully determined by prescribed first derivatives (by boundary conditions) along selected curve

Proof!!!

Page 6: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

Characteristics (3/3)CFD2

Is the solution of quadratic equation correct? Check signs.

Page 7: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

Characteristics CFD2

fxt

2

2

2

2

xt xt

x

t

Value at point x,t is determined only by conditions at red boundary

Domain of dependence

There can be discontinuity across the characteristic lines)

Wave equation - hyperbolic

Page 8: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

PDE type - example CFD2

One and the same equation can be in some region elliptic, in other hyperbolic (for example regions of subsonic and supersonic flow, separated by a shock wave).

An example is Prandl-Glauert equation describing steady, inviscid, compressible and isentropic (adiabatic) flow of ideal fluid around a slender body (e.g. airfoil)

0)1( 2

2

2

22

yxM

yv

xu

,

x

y

Function (x,y) is velocity potential, M is Mach number (ratio of velocity of fluid and speed of sound). For M<0 (subsonic flow region) the equation is elliptic, for M>1 (supersonic flow) the equation is hyperbolic. See wikipedia.

Another example: Laval nozzle

Page 9: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

PDE type – example PWV CFD2

Pulse Wave Velocity in elastic pipe (latex tube, arteries)

Model-hyperbolic equations

Experiment-cross correlation technique using high speed cameras

Macková, H. - Chlup, H. - Žitný, R.: Numerical model for verification of constitutive laws of blood vessel wall. Journal of Biomechanical Science and Engineering. 2007, vol. 2, no. 2/1, p. s66.

Page 10: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

PDE type – example WHCFD2

Water Hammer experiment with elastic pipe (latex tube, artificial artery)

Model-hyperbolic equations

Experiment-cross correlation technique using high speed cameras

Pressure sensors

Page 11: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

Kp

CFD2 Hyperbolic equations WHFlows in a pipe. Time dependent cross section A(t,x), or time dependent mean velocity v(t,x). Compressible fluid or elastic pipe. Relationship between volume and pressure is characterised by modulus of elasticity K [Pa]

Problem is to predict pressure and flowrate courses along the pipeline p(t,x), v(t,x). Basic equations: continuity and momentum balance (Bernoulli). In simplified form

* 0

| | 02

p vKt x

v p f v vt x D

neglected convective term. f-is friction factor

pA

AKKK

1

*

2apK

related to speed of sound a

,02

22

2

2

xpa

tp

*Ka Speed of soundVelocity v(t,x) can be eliminated by neglecting

friction, giving

Page 12: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

CFD2 Hyperbolic equations WHHow to derive equations of characteristics

2 0

z

p vat x

v p et x

multiply by and add both equations

2

this could be this could be directional derivative directional derivative

1( ) ( )

= + = +

zp p v va et x t x

dp p x p dv v x vdt t t x dt t t x

21 adtdx

sticcharacteristiccharacteri

, 1 adtdxa

dtdx

a

Page 13: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

CFD2 Hyperbolic equations WHThere are two characteristic lines corresponding to two values of

A

C

x1=at

Integration along the characteristic line from A to C

B

x2=-at

Integration along the characteristic line from B to C

Page 14: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

Method of characteristicCFD2

1 ( ( | | | |))2 2

A BC A B A A B B

p p fhv v v v v v va aD

( ( ) ( | | | |))2 2

A BC A B B B A A

p pa fhp v v v v v va aD

Solution of previous system of 2 algebraic equations

v(t)

p=p0 C

B

||2 BB

BCBC vv

aDfh

appvv

A||

2)( AAACAC vv

Dfhvvapp

A B

Cx2=-atx1=at

h

h/a

Page 15: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

Method of characteristicCFD2

l=1;d=0.01;rho=1000;f=0.1;a=1;p0=2e3;v0=(p0*2*d/(l*rho*f))^0.5n=101;h=l/(n-1);v(1:n)=v0;p(1)=p0;for i=2:n p(i)=p(i-1)-f*rho*v0^2*h/(2*d);enddt=h/a;tmax=3;itmax=tmax/dt;fhr=f*h/(2*a*d); for it=1:itmax t=it*dt; for i=2:n-1 pa=p(i-1);pb=p(i+1);va=v(i-1);vb=v(i+1); pc(i)=a/2*((pa+pb)/a+rho*(va-vb)+fhr*(vb*abs(vb)-va*abs(va))); vc(i)=0.5*((pa-pb)/(rho*a)+va+vb-fhr*(vb*abs(vb)+va*abs(va))); end pc(1)=p0; vb=v(2);pb=p(2); vc(1)=vb+(pc(1)-pb)/(a*rho)-fhr*vb*abs(vb); vc(n)=v0*valve(t); va=v(n-1);pa=p(n-1); pc(n)=pa-rho*a*(vc(n)-va)+f*h*rho/(2*d)*va*abs(va); vres(it,1:n)=vc(1:n); pres(it,1:n)=pc(1:n); p=pc;v=vc;endpmax=max(max(pres))/p0x=linspace(0,1,n);time=linspace(0,tmax,itmax);contourf(x,time,pres,30)

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

2

2.5

3

200

400

600

800

1000

1200

1400

1600

1800

2000

n=301

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

2

2.5

3

200

400

600

800

1000

1200

1400

1600

1800

2000

n=101time (0-3 s)

Pressure profiles

Pipe L=1m, D=0.01 m, speed of sound a=1 m/s, inlet pressure 2 kPa (steady velocity v=0.6325 m/s).

Page 16: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

Method of characteristicCFD2

Incorrect boundary condition at exit (elastic and rigid tube connection)

1 ( | |)2C A A C A Afhv v p p v v

a D

Le

| | 02

e

e e

p pv f v vt L D

A

C

e

||2

)( AABCBC vvD

fhvvapp

Bernoulli at an elastic tube| | 0

2v p f v vt x D

| | ( ) 02

ee

e e

p pp f v v D Dx L DD

Bernoulli at a rigid tube

D

| | ( ) 02

C D C ee

e e

p p p p f v v D Dh L DD

Page 17: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

Method of characteristicCFD2

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

2

2.5

3

-400

-200

0

200

400

600

n=401,Le=0, pmax=669

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

2

2.5

3

-600

-400

-200

0

200

400

600

n=401,Le=0.5, pmax=669

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

2

2.5

3

-400

-200

0

200

400

600

n=401,Le=1, pmax=709

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

2

2.5

3

-400

-200

0

200

400

600

n=401,Le=2, pmax=803

0 0.5 1 1.5 2 2.5 3-0.5

-0.4

-0.3

-0.2

-0.1

0

0.1

0.2

0.3

0.4

0.5

function vrel=pump(t)vrel=0.5*sin(3*t);

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

2

2.5

3

-400

-200

0

200

400

600

n=401,Le=0.1, pmax=669

Classical numerical methods (Lax Wendroff), require at least slightly flexible connected pipe. MOC seems to be working with a rigid pipe too?

Page 18: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

NUMERICAL METHODS CFD2

The following slides are an attempt to overview frequently used numerical methods in CFD. It seems to me, that all these methods can be classified as specific cases of Weighted Residual Methods.

Schiele

Page 19: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

MWR methods of weighted residuals CFD2

Principles of Weighted Residual Methods will be demonstrated for a typical transport equation (steady state) – transport of matter, momentum or energy

0)( 2 Sau

Convective transport

Dispersion (diffusion) Inner sources

Numerical solution (x,y,z) is only an approximation and the previous equation will not be satisfied exactly, therefore the right hand side will be different from zero

),,()( 2 zyxresSau

res(x,y,z) is a RESIDUAL of differential equation. A good approximation should exhibit the smallest residuals as possible, or zero weighted residuals

( , , ) ( , , ) 0, i 1,2,...NiV

res x y z w x y z dxdydz wi are selected weighting functions, and V is the whole analyzed region.

Page 20: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

Approximation – base CFD2

Approximation is selected as linear combination of BASE functions Nj(x,y,z)

j

jj zyxNzyx ),,(),,(

0))((

))((

2

2

Vi

jjj

jjj

Vi

dxdydzwSNaNu

dxdydzwSau

Substituting into weighted residuals we obtain system of algebraic equations for coefficients I (N-equations for N-selected weight functions wi)

Page 21: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

Weighting functionsCFD2

Weighting functions can be suggested more or less arbitrarily in advance and independently of calculated solution. However there is always a systematic classification and families of weighting functions. Majority of numerical methods can be considered as MWR corresponding to different classes of weighting functions

Spectral methods (analytical wi(x))

Finite element methods (Galerkin – continuous weighting function)

Control volume methods (discontinuous but finite weighting function)

Collocation methods (zero residuals at nodal points, infinite delta functions) )( ii xxw

xi

)()( 2/12/1 iii xxhxxhw

xi

xi

(or Finite Volume methods)

(Boundary element methods)

(Finite Differences)

Page 22: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

SPECTRAL METHOD ORTHOGONAL FUNCTIONSCFD2

General characteristics

Analytical approximation (analytical base functions)Very effective and fast (when using Fast Fourier Transform)Not very suitable for complex geometries (best case are rectangular regions)

0

)()(j

jj xPTxT

Page 23: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

SPECTRAL METHOD ORTHOGONAL POLYNOMIALSCFD2

Weight functions and base functions are selected as ORTHOGONAL functions (for example orthogonal polynomials) Pj(x). Orthogonality in the interval x (a,b) means

b

aijji dxxPxPxg )()()(

In words: scalar product of different orthogonal functions is

always zero.

Page 24: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

WHY ORTHOGONAL?CFD2

Why not to use the simplest polynomials 1,x,x2,x3,…? Anyway, orthogonal polynomials are nothing else than a linear combination of these terms? The reason is that for example the polynomials x8 and x9 look similar and are almost linearly dependent (it is difficult to see the difference by eyes if x8 and x9 are properly normalised). Weight functions and base functions should be as different (linearly independent) as possible. See different shapes of orthogonal polynomial on the next slide. Remark: May be you know, that linear polynomial regression fails for polynomials of degree 7 and higher. The reason are round-off errors and impossibility to resolve coefficients at higher order polynomial terms (using arithmetic with finite number of digits). You can perform linear regression with orthogonal polynomials of any degree without any problem.

There is other reason. Given a function T(x) it is quite easy to calculate coefficients of linear combination without necessity to solve a system of algebraic equations:

0

)()(j

jj xPTxT

b

ajj dxxTxPT )()(

Proof!!!

Page 26: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

SPECTRAL METHOD FOURIER EXPANSIONCFD2

Goniometric functions (sin, cos) are orthogonal in interval (-,).Orthogonality of. Pn(x)=cos nx follows from

])sin()sin([21

))cos()(cos(21coscos

nmxnm

nmxnm

dxxnmxnmnxdxmx

for m=n, otherwise 0

In a similar way the orthogonality of sin nx can be derived. From the Euler’s formula follows orthogonality of jxijxexP ijx

j sincos)(

Linear combination of Pj(x) is called Fourier’s expansion

0

)()(j

jj xPTxT

Proof!!!

The transformation T(x) to Tj for j=0,1,2,…, is called Fourier transform and its discrete form is DFT T(x1), T(x2),…. T(xN) to T1,T2,…TN . DFT can be realized by FFT (Fast Fourier Transform) very effectively.

i-imaginary unit

Page 27: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

SPECTRAL METHOD EXAMPLECFD2

Poisson’s equation (elliptic). This equation describes for example temperature in solids with heat sources, Electric field, Velocity potential (inviscid flows).

),(2

2

2

2

yxfxT

yT

Fourier expansion of two variables x,y (i-imaginary unit, not an index)

)(),( kyjxijk eTyxT )(),( kyjxi

jk efyxf

Substituting into PDE )()(22 )( kyjxijk

kyjxijk efekjT

22 kjf

T jkjk

Evaluated Fourier coefficients of solution

Technical realizationUse FFT routine for calculation fjk

Evaluate Tjk T(x,y) by inverse FFT

Page 28: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

FINITE ELEMENT methodCFD2

General characteristics

Continuous (but not smooth) base as well as weighting functionsSuitable for complicated geometries and structural problemsCombination of fluid and structures (solid-fluid interaction)

Page 29: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

FINITE ELEMENT methodCFD2

1 2

3

x

y

4

56

Base functions Ni(x), Ni(x,y) or Ni(x,y,z) and corresponding weight functions are defined in each finite element (section, triangle, cube) separately as a polynomial (linear, quadratic,…). Continuity of base functions is assured by connectivity at nodes. Nodes xj are usually at perimeter of elements and are shared by neighbours.

Base function Ni (identical with weight function wi) is associated with node xi and must fulfill the requirement: (base function is 1 in associated node, and 0 at all other nodes)

ijji xN )(

In CFD (2D flow) velocities are approximated by quadratic polynomial (6 coefficients, therefore 6 nodes ) and pressures by linear polynomial (3 coefficients and nodes ). Blue nodes are prescribed at boundary.

Verify number of coeffs.!

Page 30: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

FINITE ELEMENT exampleCFD2

),(2

2

2

2

yxfxT

yT

0)),(()),(( 2

2

2

2

dyxwfyT

yw

xT

xwdyxf

xT

yTw

)()( xNTxT jj

fdNTdy

Ny

Nx

Nx

Ni

n

jj

jiji

1

)(

fdNTA i

n

jjij

1

Poisson’s equation

MWR and application of Green’s theorem

Base functions are identical with weight function (Galerkin’s method)

wi(x)=Ni(x)

Resulting system of linear algebraic equations for Ti

Derive Green’s theorem!

Page 31: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

BOUNDARY element methodCFD2

General characteristics

Analytical (therefore continuous) weighting functions. Method evolved from method of singular integrals (BEM makes use analytical weight functions with singularities, so called fundamental solutions). Suitable for complicated geometries (potential flow around cars, airplanes… )Meshing must be done only at boundary. No problems with boundaries at infinity.Not so advantageous for nonlinear problem.

Introductory course on BEM including Fortran source codes is freely available in pdf ( Whye-Teong Ang  2007)

Page 32: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

BOUNDARY element exampleCFD2

),(2

2

2

2

yxfxT

yT

Poisson’s equation

MWR and application of Green’s theorem twice (second derivatives transferred to w)

Weight functions are solved as a fundamental solution of adjoined equation

Green’s theorem!

fwdxdywdyTn

xTndxdy

yw

yT

xw

xT

yx )()(

fwdxdyd

ywT

yTwn

xwT

xTwndxdy

yw

xwT yx ))()(()( 2

2

2

2

),(2

2

2

2

iiii yyxx

yw

xw

ii r

yxw 1ln21),(

22 )()( iii yyxxr

Singularity: Delta function at a point x i,yi Delta function!Solution (called Green’s function) is

Verify!

Page 33: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

BOUNDARY element exampleCFD2

Substituting w=wi (Green’s function at point i)

fwdxdyd

ywT

yTwn

xwT

xTwndxdy

yw

xwT yx ))()(()( 2

2

2

2

dxdyfwdyw

nxw

nTyTn

xTnwyxT i

iy

ixyxiii )]()([),(

N

jjj NTT

1

)()(

N

jjnj NT

nT

1

)()(

Solution T at arbitrary point xi,yi is expressed in terms of boundary values

Γ2 (normal derivative)

Γ1 (fixed T)At any boundary point must be specified either T or normal derivative of T, not both simultaneously.

Page 34: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

BOUNDARY element exampleCFD2

Γ2 (normal derivative)

Γ1 (fixed T)

dxdyfwdNyw

nxw

nTwT iji

yi

xjinj )]([0

dxdyfwdNyw

nxw

nTdNwT iji

yi

xjjinj )(

Values at boundary nodes not specified as boundary conditions must be evaluated from the following system of algebraic equations:

Page 35: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

FINITE VOLUME methodCFD2

Will be discussed in more details in this course

General characteristic:

Discontinuous weight functionsStructured, unstructured meshes.Conservation of mass, momentum, energy (unlike FEM).Only one value is assigned to each cell (velocities, pressures).

Page 36: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

FINITE VOLUME exampleCFD2

),(2

2

2

2

yxfxT

yT

0)),(()),(()),(( 2

2

2

2

2

2

2

2

ii

dyxfTdyxfxT

yTdyxf

xT

yTw

i

iTPTETW

TN

TS

0),()),(( iii

dyxfTdndyxfT

xPS

PSy

PW

PWx

PN

PNy

PE

PE hyyTT

hxxTT

hyyTT

hxxTT

Tdni

yxPP hhyxfdyxfi

),(),(

Poisson’s equation

MWR (Green’s theorem cannot be applied because w(x) is discontinuous)

Gauss theorem (instead of Green’s)

hy

hx

Page 37: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

FINITE DIFFERENCES methodCFD2

Will be discussed in more details in this course

General characteristic:

Substitution derivatives in PDE by finite differences.Transformation from computational (rectangular) to physical (curvilinear) domain

Suitable first of all for gas dynamic (compressible flows – aerodynamics)

Page 38: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

Finite differences methods specify zero residuals in selected nodes (the same requirement as in classical collocation method). However, residuals in nodes are not calculated from a global analytical approximation (e.g. from orthogonal polynomials), but from local approximations in the vicinity of zero residual node.

It is very easy technically: Each derivative in PDE is substituted by finite difference evaluated from neighbouring nodal values.

FINITE DIFFERENCES CFD2

211

2

2 2x

TTTxT iii

Ti Ti+1Ti-1

x

xTT

xT ii

1

xTT

xT ii

211

Upwind 1st order

Central differencing 2st order

Central differencing 2st order

Verify!

Page 39: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

FINITE DIFFERENCES exampleCFD2

jijijijijijiji f

yTTT

xTTT

,21,,1,

2,1,,1 22

),(2

2

2

2

yxfyT

xT

Poisson’s equation

Ti,jTi+1,jTi-1,j

Ti,j+1

Ti,j-1

x y

Eliptic equation – it is necessary to solve a large

system of algebraic equations

Page 40: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

FINITE DIFFERENCES exampleCFD2

exact solution0

xTc

tT

)(),( ctxTxtT

Wave equation (pure convection)

tn+1/2

tn

tn+1

xk-1 xk+1xk

x

t/2

First step – Lax’s scheme with time step t/2

Second step – central differences

Lax Wendroff method

tn+1/2

tn

tn+1

xk-1 xk+1xk

x

t

Hyperbolic PDE-it is possible to use explicit method

?

1/2 1/21 11/2 1/2

1 12 20 0/ 2 / 2

n n n nn nk k k k

n n n nk kk k k k

T T T TT TT T T Tc ct x t x

1 1/2 1/21/2 1/2 0

n n n nk k k kT T T T

ct x

Page 41: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

FINITE DIFFERENCES exampleCFD2

Wave equation (pure convection)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-2.5

-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

2.5x 10

120 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

0

0.2

0.4

0.6

0.8

1

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

x [m]

CFL=0.1

CFL=1

CFL=1.1

dt=0.011;c=1;l=1;n=101;dx=l/(n-1); cfl=c*dt/dxfor i=1:n x(i)=(i-1)*dx; if x(i)<0.1 t0(i)=0; else t0(i)=1; endendtmax=1.;itm=tmax/dt;for it=1:itm for i=2:n-1 ta(i)=(t0(i-1)+t0(i))/2-cfl*(t0(i)-t0(i-1))/2; end ta(1)=t0(1);ta(n)=t0(n); for i=2:n-1 t(i)=t0(i)-cfl*(ta(i+1)-ta(i)); end t(1)=t0(1);t(n)=t0(n); tres(it,:)=t(:); t0=t;end

Stability restriction when using explicit methods

1

xtcCFL

in this case the PDE is integrated along

characteristic

Page 42: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

MESHLESS methodsCFD2

General characteristics

Not available in commercial software packagesSuitable for problems with free boundaryMultiphase problemsEasy remeshing (change of geometry) / in fact no meshing is necessary

Page 43: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

MESHLESS methodsCFD2

Recommended literature: Shaofan Li, Wing Kam Liu: Meshfree Particle Method, Springer Berlin 2007 (MONOGRAPhy analyzing most of the mentioned method and applications in mechanics of elastoplastic materials, transient phenomena, fracture mechanics, fluid flowm biological systems, for example red blood cell flow, heart vale dynamics). Summary of Galerkin Petrov integral methods Atluri S.N., Shen S.: The meshless local Petrov Galerkin (MLPG) method, CMES, vol.3, No.1, (2002), pp.11-51. Collocaton method: Shu C., Ding H., Yeo K.S.: Local radial basis function-based differential quadrature method and its application to solve two dimensional incompressible Navier Stokes equations, Comp.Methods Appl.Mech.Engng, 192 (2003), pp.941-954

There exist many methods that can be classified as meshless, for example SPH (smoothed particle hydrodynamics), Lattice Boltzman (model od particles), RKP (Reproducing Kernel Particle method, Liu:large deformation Mooney), MLPG (Meshless Local Petrov Galerkin), RBF (Radial basis function, wave equation). All the methods approximate solution by the convolution integrals

ydyhyxwyxcxh

nconvolutio-SPH classicalmethods RKP MLS,at

aplied correction

)(),(),()(

Page 44: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

MESHLESS methods collocationCFD2

12

N+1

N

N+2

Radial base functions )()( jj rxN where is simply a distance from node j.jj xxr

linear

cubic

Gaussian

multiquadrics

rr )(3)( rr

2

)( crer

22)( crr

Most frequently used radial base functions

Page 45: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

MESHLESS methods EXAMPLECFD2

12

N+1

N

N+2

),(2

2

2

2

yxfxT

yT

),( yxgT

n

jjj rTyxT

1

)(),( 22 )()( jjj yyxxr

),())()(

(1

2

2

2

2

ii

n

jj

jj yxfTy

rx

r

),()(1

ii

n

jjj yxgrT

22222 )()()( cyyxxcrr jjjj

22

22

2

2 )(

cr

cyyx

j

j

22

22

2

2 )(

cr

cxxy

j

j

Poisson’s equation

Boundary conditions

Approximation

i=1,2,….,N (inner points)

i=N+1,N+2,…,n (boundary)

For multiquadric radial function

Page 46: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

MESHLESS method EXAMPLE RBFCFD2

Result is a system of n-linear algebraic equations that can be solved by any solver. In case of more complicated and nonlinear equations (Navier Stokes equations) the system can be solved for example by the least square optimization method, e.g. Marquardt Levenberg.

Few examples of papers available from Science Direct

Page 47: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

MESHLESS method EXAMPLE RBFCFD2

Page 48: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

This radial base function (TPS) was used in this paper

MESHLESS method EXAMPLE RBFCFD2

Page 49: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

Comparison with results obtained by FVM package CFD-ACE

MESHLESS method EXAMPLE RBFCFD2

Page 50: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

MESHLESS method EXAMPLE RBFCFD2

Page 51: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

Local topology: each point is associated with nearest NF points

……

This is Hardy multiquadrics radial base function

MESHLESS method EXAMPLE RBFCFD2

Page 52: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

MESHLESS methods EXAMPLECFD2

Moving Least Squares

Page 53: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

Benchmark-pure convection

MESHLESS method EXAMPLE RBFCFD2

Page 54: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

FLUENT 6.2

MESHLESS method EXAMPLE RBFCFD2

Page 55: Rudolf Žitný, Ústav procesní a zpracovatelské techniky ČVUT FS 201 3

MESHLESS Navier StokesCFD2

Elsevier500 articles on Meshless Navier Stokes