2ª aula evolution equation. the finite volume method

24
2ª aula Evolution Equation. The Finite Volume Method.

Upload: lawrence-hardeman

Post on 01-Apr-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 2ª aula Evolution Equation. The Finite Volume Method

2ª aulaEvolution Equation.

The Finite Volume Method.

Page 2: 2ª aula Evolution Equation. The Finite Volume Method

Objective of the lecture1. The Students “mise à zero” as francophone say.2. To show that the conservation principle can be written

on:– Words (is a concept)– Integral equation form,– Differential form (can have analytical solution),– Algebraic form (used by mathematical models).

3. To recall methods to solve advection. Temporal discretisation, stability and numerical diffusion.

4. To tell about the need for initial and boundary conditions and about the difficulties to get them.

Page 3: 2ª aula Evolution Equation. The Finite Volume Method

• Fluxes:– Advective: (Why the sign “-”)?

– Diffusive:

The Integral Equation

• Accumulation Rate:

vol

volcdtt

MonRateAccumulati

dAnucA

.

dAncA

.

)(. io

surfaceCV

SSdAnAnvdVt

Page 4: 2ª aula Evolution Equation. The Finite Volume Method

Differential Evolution Equation

SinksSourcesoutFlowinFlowoRateAccumulati

)( kkjj

k SiSox

c

xdt

dc

)( kkj

kjj

k PFx

ccu

xt

c

The rate of accumulation is “minus” the divergence of the fluxes + (Souces-Sinks)

)( kkjjj

kjk SiSox

c

xx

cu

t

c

Or:

Page 5: 2ª aula Evolution Equation. The Finite Volume Method

Finite Volume

)(. io

surfaceCV

SSdAnAnvdVt

The Finite (Control) Volume :1) isolates a portion of the space,2) systematises budgets’ computation

across its faces,3) Computes the rate of accumulation,4) Permits the computation of a property

rate of change.

SinksSourcesoutFlowinFlowoRateAccumulati

Page 6: 2ª aula Evolution Equation. The Finite Volume Method

Computational grid

Page 7: 2ª aula Evolution Equation. The Finite Volume Method

Assuming uniform concentration inside the volume one gets

txx

txx

ttxx

ttxx VolcVolc

t

xxt

xxttxx

ttxx VolcVolc

tx

tx

ttx

ttx VolcVolc

t

cVolcVolcd

tt

MonRateAccumulati

ttt

vol

vol

Page 8: 2ª aula Evolution Equation. The Finite Volume Method

Finite Volume in a 1D case

tx

tx

ttx

ttx VolcVolc t

xxt

xxttxx

ttxx VolcVolc

t

xxt

xxttxx

ttxx VolcVolc

* 2/*

2/ xxxx cQUcdA ***

*2/

dA

x

cc xxxxx

* 2/*

2/. xxxxAcQUcdAdAnuc

***

*2/.

dA

x

ccdAnc xxx

xx

A

In 1D case properties can change along one direction only.

Page 9: 2ª aula Evolution Equation. The Finite Volume Method

Summing up

txx

txx

ttxx

ttxx VolcVolc

t

xxt

xxttxx

ttxx VolcVolc

tx

tx

ttx

ttx VolcVolc

x

ccA

x

ccACQCQtVolcVolc xxx

xxxxx

xxxxxxxxxtx

tx

ttx

ttx 2/2/2/2//

Page 10: 2ª aula Evolution Equation. The Finite Volume Method

Shrinking the volume to zero

)( kkjjj

kjk PFx

c

xx

cu

t

c

That is the 1D advection-diffusion equation for one property. In a 3D case, for a generic property “k” one would get:

That represents the conservation principle in one point

x

ccA

x

ccACQCQtVolcVolc xxx

xxxxx

xxxxxxxxxtx

tx

ttx

ttx 2/2/2/2//

xAVol And assuming that the volume is a parallelepiped that doesn’t change in time:

x

c

xx

uc

t

c

Knowing that:

Page 11: 2ª aula Evolution Equation. The Finite Volume Method

Algebraic form Requires hypothesis. The upwind formulation with Q>0

x

ccA

x

ccAQcQctVolcVolc xxx

xxxxx

xxxxxxtx

tx

ttx

ttx 2/2/2/2//

0:

0:

0:

0:

*2/

**2/

*2/

**2/

*2/

**2/

*2/

**2/

xxxxxx

xxxxx

xxxxx

xxxxxx

ucc

ucc

ucc

ucc

x

ccA

x

ccACQCQtVolcVolc xxx

xxxxx

xxxxxxxxxtx

tx

ttx

ttx 2/2/2/2//

tx

tx

ttx

ttx VolcVolc t

xxt

xxttxx

ttxx VolcVolc

t

xxt

xxttxx

ttxx VolcVolc

Page 12: 2ª aula Evolution Equation. The Finite Volume Method

Hypothesis impose stability conditions

tttttx

xxxxxxxxtx

ttx

xxxxx

xxxxxxxx

tx

ttx

xxxxxC

x

tC

x

t

x

tuC

x

t

x

tuc

x

ccc

x

CCu

t

cc

x

ccA

x

ccACCAuxAcc

222

2

2/2/

21

2

x

ccA

x

ccACQCQtVolcVolc xxx

xxxxx

xxxxxxxxxtx

tx

ttx

ttx 2/2/2/2//

Stability condition:

0212

x

t

x

tu

ti

tii

ti

tti xxi

CfCeCdc

11

Page 13: 2ª aula Evolution Equation. The Finite Volume Method

Average values on faces => Central Differences

*

*2/

**

2/

2

2

xxxxx

xxxxx

ccc

ccc

**

2/2/

222

x

cc

x

cc

x

cc

x

cc xxxxxxxxxxt

xxttxx

Page 14: 2ª aula Evolution Equation. The Finite Volume Method

Explicit Central Differences

tttttx

t

xxxxx

t

xxxxx

txxxx

tx

ttx

xxxxxC

x

t

x

tuC

x

tC

x

t

x

tuc

x

ccA

x

ccACCAuxAcc

222

2/2/

21

Stability conditions:

0212

x

t

02

x

t

x

tu

Page 15: 2ª aula Evolution Equation. The Finite Volume Method

Understanding the Central Differences

• Why are CD instable without diffusion? – Resp: They violate the transportive property of advection.

The computing point learns about the downstream property value through advection, which is physically impossible.

• Why can be stable with diffusion• Resp: Because diffusion transports information in any

direction. If the diffusive transport is stronger than advective, the process becomes physically correct.

Page 16: 2ª aula Evolution Equation. The Finite Volume Method

More Questions• Can explicit central differrences be used on advection is dominant?

– Resp: No. In that case difusion transports upstream much less than advection transport downstream (Grid Reynolds number is large).

• If diffusion is dominant is better to use centra differences or upwind?– Central differences are better they have second order accuracy and introduce

less numerical diffusion.• What about an implicit algorithm? Would it be stable without diffusion?

– Resp: Yes. In implicit algorithms fluxes are computed using the new concentrations. If Advection would generate negative concentrations the leaving flux would become positive. Thos means that it is impossible to generate negative concentrations.

• Even in upwind? – Resp: In upwind case the concentration can become negative only if we

remove from a volume more than its content. But since what is leaving the volume is computed at the end of the time step negative values can not be generated.

Page 17: 2ª aula Evolution Equation. The Finite Volume Method

Other methods for advection• Upwind: Assumes that the concentration at the face is equal

to the upstream concentration.• Central Differences: Assume the average between both sides. • What if a 2nd order polynom was considered (using 3

points)? One would get the QUICK: (Quadratic Upstream Interpolation for Convective Kinematics):

• It has 3rd order accuracy. It has increased stability problems next to boundaries.

• What is the best method?

18

118

386

281

83

186

21

21

0

0

iiiii

iiiii

CCCCQ

CCCCQ

Page 18: 2ª aula Evolution Equation. The Finite Volume Method

Algorithm for implicit methods

tttxx

ttx

tt

tt

xxxxxtt

xxxtx

ttx

tt

xxxxx

tt

xxxxx

ttxxx

tx

ttx

xxxCc

x

tc

x

t

x

tuC

x

t

x

tu

x

ccc

x

CCu

t

cc

x

ccA

x

ccACCAuxAcc

222

2

2/2/

21

2

ti

tti

ttii

tti CCfCeCd

ii

111

itt

itt

iitt

i TICfCeCdii

11

1

Page 19: 2ª aula Evolution Equation. The Finite Volume Method

The Semi-implicit method (Crank – Nicholson)

ti

tii

ti

tti

ttii

tti iiii

CfCeCdCfCeCd1111 2

1

2

11

2

1

2

1

2

11

2

1

Page 20: 2ª aula Evolution Equation. The Finite Volume Method

Initial and Boundary Conditions

• Initial conditions are less important in dissipative systems (high sinks).

• Boundary conditions are less important when Sources and/or sinks are important?

Ci

Ci-1

Ci+1

ti

tti

ttii

tti CCfCeCd

ii

111

Page 21: 2ª aula Evolution Equation. The Finite Volume Method

Boundary conditions

• Diffusion:– Requires the knowledge of concentrations outside

the domain. If not known zero gradient is usually the best option

• Advection– When the flow enters the domain carries

information from outside that must be known.

Page 22: 2ª aula Evolution Equation. The Finite Volume Method

How to know the external boundary condition?

• Gradients can be considered null if sources and sinks are important.

• Otherwise nested models are required!

)( kkjjj

kjk PFx

c

xx

cu

t

c

Page 23: 2ª aula Evolution Equation. The Finite Volume Method

23

¼°

Downscaling

I n v e s t i n g i n o u r c o m m o n f u t u r e .

Page 24: 2ª aula Evolution Equation. The Finite Volume Method

Summary• The finite control volume helps us to think about fluxes. That is usually

good..• Explicit methods get instable when the amount removed from a volume is

higher than the volume contained inside. • Central differences assume linear concentration evolution between adjacent

finite volumes. They cannot respect the transportive property of advection.• The QUICK method assume a quadratic evolution between adjacent centres.

Requires three points and consequently cannot be used next to boundaries. It does not respect completely the transportive property and can generate instabilities. It is better if combined with upwind.

• The finite volume method puts into evidence the advantage of combining methods for advection.

• Initial and boundary conditions choice determine the quality of the results.