Top Banner
Challenges for Challenges for finite volume finite volume models models Haroldo F. de Campos Haroldo F. de Campos Velho Velho [email protected] [email protected] http://www.lac.inpe.br/ http://www.lac.inpe.br/ ~haroldo ~haroldo
42
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Challenges for finite Challenges for finite volume modelsvolume models

Haroldo F. de Campos VelhoHaroldo F. de Campos Velho

[email protected] [email protected]

http://www.lac.inpe.br/~haroldohttp://www.lac.inpe.br/~haroldo

Page 2: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Outline Outline

1.1. Few words on finite volume (FV) approachFew words on finite volume (FV) approach

2.2. Patankar’s FV approach for CFDPatankar’s FV approach for CFD

3.3. The driven cavity flowThe driven cavity flow

4.4. InvestigationsInvestigationsa)a) Mixed gridsMixed grids

b)b) Fractal cavityFractal cavity

5.5. Step back: some FV discretizationsStep back: some FV discretizations

Page 3: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Few words on finite volumeFew words on finite volume

1.1. We can consider some strategies for solving PDEWe can consider some strategies for solving PDEa)a) Domain decomposition Domain decomposition

b)b) Boundary decompositionBoundary decomposition

c)c) Spectral methodsSpectral methods

2.2. Finite volume is a domain decomposition methodFinite volume is a domain decomposition methoda)a) Partition the computational domain into control volumes (which are Partition the computational domain into control volumes (which are

not necessarily the cells of the mesh)not necessarily the cells of the mesh)

b)b) Discretise the integral formulation of the Discretise the integral formulation of the conservation laws over each over each control volume (Gauss divergence theorem).control volume (Gauss divergence theorem).

c)c) Solve the resulting set of algebraic equations or update the values of Solve the resulting set of algebraic equations or update the values of the dependent variables.the dependent variables.

Page 4: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

FV: integral formFV: integral form

A key issue: integral form of conservation law:A key issue: integral form of conservation law:

applying the Gauss divergence theoremapplying the Gauss divergence theorem

(there are some advantages for considering conservative form (there are some advantages for considering conservative form instead of non-conservative one)instead of non-conservative one)

0 t

0),(),(

dFdvFt

tr

0 t

0 t

dnFddFd

Page 5: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Source termsSource terms

It is difficult to maintain the balance of the formIt is difficult to maintain the balance of the form

applying standard finite volume approach:applying standard finite volume approach:

Gauss theorem can not be applied to the source term. Gauss theorem can not be applied to the source term.

SFt

tr

),(

dSdnFd t

Page 6: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

An application: incompressible fluidAn application: incompressible fluid

1.1. We starting from the fluid dynamics formulationWe starting from the fluid dynamics formulation

2.2. Initial and boundary conditionsInitial and boundary conditions

0 v

vR

pvvt

v

e

21

),0[),( :with tr

)()0,( 0 rvrv

),(),( trvtrv

r

:at

r

:at

Page 7: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Some remarks on incompressible fluidSome remarks on incompressible fluid

1.1. Incompressible fluid is consider a simpler version Incompressible fluid is consider a simpler version of the N-S equation.of the N-S equation.

2.2. Is it the above statement true?Is it the above statement true?

3.3. Yes and no:Yes and no:

Yes: there are less equations to be solved.Yes: there are less equations to be solved.

No: Who is the integration factor?No: Who is the integration factor?

Page 8: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Integration factorIntegration factor

1.1. Simple ODE:Simple ODE:

2.2. the integration factor is: , thereforethe integration factor is: , therefore

)()( tgtaydt

dy

ate

)( )()( tgeyedt

dtgetay

dt

dye atatatat

t

taat dgeeyty0

)(0 )()(

Page 9: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Integration factorIntegration factor

1.1. Matrix ODE:Matrix ODE:

2.2. If If PP-1-1 exists: exists:

)()( tGtYdt

dYQP

)()( )()( 11 tHtYdt

dYtGtY

dt

dY APQP

t

tt deeYtY0

)(0)( AA )()( :where 11 tGtH PQPA

Page 10: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Integration factorIntegration factor

1.1. Incompressible fluid: who is the pressure?Incompressible fluid: who is the pressure?

2.2. Is there an integration factor?Is there an integration factor?

3.3. Clearly: Clearly: MM-1-1 does not exist. Mathematical tools: does not exist. Mathematical tools:a)a) Drazin generalized inverse (ODE) - after discretizationDrazin generalized inverse (ODE) - after discretization

b)b) Application of a type singular semi-group (PDE).Application of a type singular semi-group (PDE).

; 0)(

p

vvN

p

v

t

KM

0

01

00

01

2

eRK

M

Page 11: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Integrating incompressible fluidIntegrating incompressible fluid

1.1. Deriving a Poisson equation for pressureDeriving a Poisson equation for pressure

2.2. with Neumann boundary conditionswith Neumann boundary conditions

)(1 22 vHvvvR

pe

nn

ne

vvt

vv

Rn

p 21

Page 12: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

FV: discrete versionFV: discrete version

1. The flux terms are discretised by1. The flux terms are discretised by

where is the numerical flux.where is the numerical flux.

faces

* kk nFdnF

*kF

Page 13: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

FV: discrete versionFV: discrete version

1. For 2D flow:1. For 2D flow:

mp

ii

imn

im IA

Htv ,,

1,

1

pf

mFfm

em

i

nm

im SnvR

vvAt

vH

fi

11,

imp

i dm

pI

i

,

ii

Page 14: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

FV: discrete versionFV: discrete version

1. For 2D flow:1. For 2D flow: ii

fSm

F

Ffn

A

pf

i

if

ii

edge theoflength andpoint mean :,

volumecontrol theof edges ofset the:

edge the vector tonormal the:

subdomain for area :

Page 15: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

FV: discrete versionFV: discrete version

For 2D flow (pressure: white; velocities: blue):For 2D flow (pressure: white; velocities: blue):

Patankar staggered grid control volume (red)Patankar staggered grid control volume (red)

ii

yx vv ,

p

ppyx vv ,

yx vv ,

nodeGrid cell

Page 16: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

FV: discrete version – a question:FV: discrete version – a question:

Looking at the figure: Why Looking at the figure: Why

should not we use a simple should not we use a simple

triangular control volumetriangular control volume

(black), instead of red one? (black), instead of red one?

ii

And then, the bad dream started …And then, the bad dream started …

Page 17: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

What would we want?What would we want?

1.1. We were trying to study a fluid flow inside of a We were trying to study a fluid flow inside of a fractal domain.fractal domain.

2.2. The first idea is to use unstructured gridsThe first idea is to use unstructured grids

3.3. We were also interested to investigate a mixed grid We were also interested to investigate a mixed grid (combining structured grid + unstructured grid).(combining structured grid + unstructured grid).

4.4. Why is someone interested in mixed grid? Why is someone interested in mixed grid?

5.5. Obvious reason: improve computational Obvious reason: improve computational performance.performance.

Page 18: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Driven cavity flowDriven cavity flow

1.1. This is easier fluid dynamical problem that it must This is easier fluid dynamical problem that it must be solved by numerical process.be solved by numerical process.

Page 19: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Studing fractal cavity flowStuding fractal cavity flow

1.1. Koch curve generator:Koch curve generator:

2.2. Two pre-fractals:Two pre-fractals:

Page 20: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Studing fractal cavity flowStuding fractal cavity flow

1.1. Fractal cavity + finite volume decompositionFractal cavity + finite volume decomposition

Page 21: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Mixed grids (Chimera/Dragon grid)Mixed grids (Chimera/Dragon grid)

Page 22: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

FV: unstructured gridsFV: unstructured gridsbaricenter

Page 23: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

FV: unstructured gridsFV: unstructured grids

1.1. Grid-(a): work!Grid-(a): work!

2.2. Grid-(b): doesn’t workGrid-(b): doesn’t work

3.3. Grid-(c): doesn’t workGrid-(c): doesn’t work

4.4. Grid-(d): doesn’t workGrid-(d): doesn’t work

Why?Why?

Page 24: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.
Page 25: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.
Page 26: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Answering the questionAnswering the question

1.1. S. Abdallah (J. Comput. Phys., 70, 1987) has shown S. Abdallah (J. Comput. Phys., 70, 1987) has shown that structured grids obey the that structured grids obey the compatibility equationcompatibility equation..

2.2. How about the unstrutured grids? How about the unstrutured grids?

Page 27: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Answering the questionAnswering the question

1.1. The compatibility equation: it is an identity in fluid The compatibility equation: it is an identity in fluid dynamics.dynamics.

2.2. The solution for the Poisson eqution for pressure The solution for the Poisson eqution for pressure exists if the compatibility condition is verified:exists if the compatibility condition is verified:

dnpdp 2

Page 28: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Discrete compatibility equationDiscrete compatibility equation

1.1. Using the discrete pressure Poisson equationUsing the discrete pressure Poisson equation

2.2. Assuming (Assuming (SSaa edge size): edge size):

N

iii

N

iii

ii

dnpdnH11

a

aaaa nfSdnf )(

0])[( Aa

aaa nHpS

Page 29: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Discrete compatibility conditionDiscrete compatibility condition

AanHp aa ,0)(CC

pf

mFfm

em

i

nm

im SnvR

vvAt

vH

fi

11,

Page 30: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Discrete compatibility equationDiscrete compatibility equation

310t

310t210t

Page 31: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Fractal cavities propertiesFractal cavities properties

1.1. Attractors for fractal cavities:Attractors for fractal cavities:

(a) standard cavity (b) fractal cavity(a) standard cavity (b) fractal cavity

Page 32: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Co-localized approachesCo-localized approaches

1.1. Someone should be surprised with the results, where Someone should be surprised with the results, where cell-center and cell-vertex did not work.cell-center and cell-vertex did not work.

2.2. Beause, some authors have used cell-center and cell-Beause, some authors have used cell-center and cell-vertex, and such procedures presented good results.vertex, and such procedures presented good results.

3.3. What’s wrong?What’s wrong?

Page 33: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Co-localized approachesCo-localized approaches

1.1. Actually, nothing is wrong.Actually, nothing is wrong.

2.2. However, the evil is in details: However, the evil is in details: a)a) Co-localized variables and cell-center:Co-localized variables and cell-center:

- Frink’s approach (AIAA, 1994): he use a different - Frink’s approach (AIAA, 1994): he use a different interpolation scheme.interpolation scheme.

- Marthur-Marthy (Num. Heat Transf., 1997): they uses a - Marthur-Marthy (Num. Heat Transf., 1997): they uses a different scheme to compute the gradient.different scheme to compute the gradient.

b)b) Velocities located at vertex, and pressure at barycenter: Velocities located at vertex, and pressure at barycenter:

- Thomadakis-Leschziner (Num. Methods Fluids, 1996): - Thomadakis-Leschziner (Num. Methods Fluids, 1996): The control volume is computed with union of barycenter, The control volume is computed with union of barycenter, we used median-dual scheme.we used median-dual scheme.

Page 34: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Spectral schemes x Finite volumeSpectral schemes x Finite volume

1.1. Finite volume approaches can be used in a more Finite volume approaches can be used in a more complex domain (geometry). complex domain (geometry).

2.2. Recent results are indicating that for high resolution, Recent results are indicating that for high resolution, spectral schemes have a bigger computational effort spectral schemes have a bigger computational effort than finite volume.than finite volume.

3.3. Which is the future for the spectral schemes?Which is the future for the spectral schemes?

4.4. Maybe, it depends on the type of computing used.Maybe, it depends on the type of computing used.

Page 35: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Spectral schemes x Finite volumeSpectral schemes x Finite volume

1.1. Transforms (FFT/Legendre) could be implemented Transforms (FFT/Legendre) could be implemented in a hybrid computing: hardware and software for in a hybrid computing: hardware and software for processing. processing.

2.2. Hybrid computing: Hybrid computing:

FPGA, GPU. FPGA, GPU.

Page 36: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Spectral schemes x Finite volumeSpectral schemes x Finite volume

1.1. Enhancing the computing: appering the first optical Enhancing the computing: appering the first optical processors. processors.

2.2. Optical processors (FPGA):Optical processors (FPGA):(a) Lenslet (Mar/2003) (b) Intel (Feb/2006)(a) Lenslet (Mar/2003) (b) Intel (Feb/2006)

Page 37: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Final remarksFinal remarks

1.1. Structured grid the compatibility equation is always Structured grid the compatibility equation is always verified.verified.

2.2. Compatibility condition can be used to select a type Compatibility condition can be used to select a type of unstrutured grid.of unstrutured grid.

3.3. Nothing is neutral in numerical approximation.Nothing is neutral in numerical approximation.

4.4. Remember: the evil is in details.Remember: the evil is in details.

Page 38: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Preliminar Analysis

• Smallest cube: L = 120 h-1 Mpc1.7107 2.2106 particules runing time ~ 60 h

• redshift computed z = 10.0, 1.0, 0.1 e 0.0

• Edge effect L z <n>239.5 Mpc todos 1.22120 Mpc 10.0 1.23120 Mpc 1.0 1.27120 Mpc 0.1 1.29120 Mpc 0.0 1.30

Page 39: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Percolation (FoF)• Percolation radius

Rperc = b <R> f = n / <n> 2/ b3

• Mass scales: M(Np) M(M) class 1 71010 small and galaxies

LMC 2 1010 M

2-50 21011—31012 “regular” galaxiesVia-Láctea 7 1011 M

M87 3 1012 M

50-15k 31012 —11015 groups or clustersGrupo Local 4 1012 M

Coma 1 1015 M

> 15k > 11015 superaclustersSA Local 2 1015 M

• Rperc b f Np

Gal. 0.1 0.11 1500 2-50 VL 10 part. (R=100-150 kpc)Cluster 0.184 0.2 250 50-15000 Gr. Local 55 part.SA 1.25 1.15 2 > 15000 SA Local 30000 part.

Page 40: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.
Page 41: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.
Page 42: Challenges for finite volume models Haroldo F. de Campos Velho haroldo@lac.inpe.brharoldo.

Obrigado pela atenção.Obrigado pela atenção.