+ All Categories
Transcript
Page 1: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Finite Volume Discretization

MMVN05ROBERT SZASZ

Page 2: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Goal & Outline

• 1D Cartesian

– Diffusion

– Source

– Convection

– Time dependent

• 2D Cartesian

• 2D Unstructured

Partial Differential

Equation(s)

Set of Algebraic

Equations

Page 3: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

The Finite Volume Method

• Generic transport equation

• Integrate over a control volume

𝜕𝜌𝜙

𝜕𝑡+ 𝑑𝑖𝑣 𝜌𝑢 𝜙 = 𝑑𝑖𝑣 Γ𝑔𝑟𝑎𝑑 𝜙 + 𝑆

Time

evolutionConvection Diffusion Source

term

𝑉

𝜕𝜌𝜙

𝜕𝑡𝑑𝑉 +

𝑉

𝑑𝑖𝑣 𝜌𝑢 𝜙 𝑑𝑉 = 𝑉

𝑑𝑖𝑣 Γ𝑔𝑟𝑎𝑑 𝜙 𝑑𝑉 + 𝑉

𝑆 𝑑𝑉

Page 4: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Discretization in 1D

Control volume boundaries

Control volume

P EWew

Dx

dxPe

dxPEdxWP

Page 5: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Diffusion problems in 1D

𝑑𝑖𝑣 Γ𝑔𝑟𝑎𝑑 𝜙 + 𝑆 = 0

𝑉

𝑑𝑖𝑣 Γ𝑔𝑟𝑎𝑑 𝜙 𝑑𝑉 + 𝑉

𝑆 𝑑𝑉 = 0

P EWew

DxdxPe

dxPEdxWP

𝐎

𝑛. Γ𝑔𝑟𝑎𝑑 𝜙 𝑑𝐎 + 𝑉

𝑆 𝑑𝑉 = 0

Γ𝐎𝜕𝜙

𝜕𝑥𝑒

− Γ𝐎𝜕𝜙

𝜕𝑥𝑀

+ 𝑆𝑉 = 0

Γ𝑒𝐎𝑒𝜕𝜙

𝜕𝑥𝑒

− Γ𝑀𝐎𝑀𝜕𝜙

𝜕𝑥𝑀

+ Su + Sp𝜙P = 0

Linear approximation

Page 6: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Diffusion problems in 1D

P EWew

DxdxPe

dxPEdxWP

Γ𝑒𝐎𝑒𝜕𝜙

𝜕𝑥𝑒

− Γ𝑀𝐎𝑀𝜕𝜙

𝜕𝑥𝑀

+ Su + Sp𝜙P = 0

𝜙𝑃Γ𝑒𝐎𝑒𝛿𝑥𝑃𝐞

+Γ𝑀𝐎𝑀𝛿𝑥𝑊𝑃

− 𝑆𝑃 = 𝜙𝑊Γ𝑀𝐎𝑀𝛿𝑥𝑊𝑃

+ 𝜙𝐞Γ𝑒𝐎𝑒𝛿𝑥𝑃𝐞

+ 𝑆𝑢

Γ𝑒 =Γ𝑊+Γ𝑃

2, Γ𝑀 =

Γ𝐞+Γ𝑃

2, 𝜕𝜙

𝜕𝑥 𝑒=𝜙𝐞−𝜙𝑃

𝛿𝑥𝑃𝐞, 𝜕𝜙

𝜕𝑥 𝑀=𝜙𝑃−𝜙𝑊

𝛿𝑥𝑊𝑃

These are usually stored

𝜙𝑃𝑎𝑃 = 𝜙𝑊𝑎𝑊 + 𝜙𝐞𝑎𝐞 + 𝑆𝑢

Page 7: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Boundaries

P Eew

DxdxPe

dxPE

Case 1: is known𝜙𝑀 = 𝐹𝑀

Γ𝑒𝐎𝑒𝜕𝜙

𝜕𝑥𝑒

− Γ𝑀𝐎𝑀𝜕𝜙

𝜕𝑥𝑀

+ Su + Sp𝜙P = 0

𝜕𝜙

𝜕𝑥𝑀

=𝜙𝑃 − 𝐹𝑀𝛿𝑥𝑀𝑃

Case 2: is known

Eastern boundary similarly

𝜕𝜙

𝜕𝑥𝑀

= 𝐺𝑀

𝜙𝑃𝑎𝑃 = 𝜙𝐞𝑎𝐞 + 𝑆𝑢

Page 8: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Building the system of equations

1 2 N

𝜙𝑃𝑎𝑃 = 𝜙𝑊𝑎𝑊 + 𝜙𝐞𝑎𝐞 + 𝑆𝑢

𝜙1𝑎1,1 = 𝜙2𝑎2,1 + 𝑆1

3

Page 9: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Building the system of equations

1 2 N

𝜙𝑃𝑎𝑃 = 𝜙𝑊𝑎𝑊 + 𝜙𝐞𝑎𝐞 + 𝑆𝑢

𝜙1𝑎1,1 = 𝜙2𝑎2,1 + 𝑆1

𝜙2𝑎2,2 = 𝜙1𝑎1,2 + 𝜙3𝑎3,2 + 𝑆2

3

Page 10: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Building the system of equations

1 2 N

𝜙𝑃𝑎𝑃 = 𝜙𝑊𝑎𝑊 + 𝜙𝐞𝑎𝐞 + 𝑆𝑢

𝜙1𝑎1,1 = 𝜙2𝑎2,1 + 𝑆1

𝜙2𝑎2,2 = 𝜙1𝑎1,2 + 𝜙3𝑎3,2 + 𝑆2

3

𝜙3𝑎3,3 = 𝜙2𝑎2,3 + 𝜙4𝑎4,3 + 𝑆3

Page 11: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Building the system of equations

1 2 N

𝜙𝑃𝑎𝑃 = 𝜙𝑊𝑎𝑊 + 𝜙𝐞𝑎𝐞 + 𝑆𝑢

𝜙1𝑎1,1 = 𝜙2𝑎2,1 + 𝑆1

𝜙2𝑎2,2 = 𝜙1𝑎1,2 + 𝜙3𝑎3,2 + 𝑆2

3

𝜙3𝑎3,3 = 𝜙2𝑎2,3 + 𝜙4𝑎4,3 + 𝑆3

𝜙𝑁𝑎𝑁,𝑁 = 𝜙𝑁−1𝑎𝑁−1,𝑁 + 𝑆𝑁

Page 12: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Convection-Diffusion problems in 1D

𝑑𝑖𝑣 𝜌𝑢 𝜙 = 𝑑𝑖𝑣 Γ𝑔𝑟𝑎𝑑 𝜙

𝑉

𝑑𝑖𝑣 𝜌𝑢 𝜙 𝑑𝑉 = 𝑉

𝑑𝑖𝑣 Γ𝑔𝑟𝑎𝑑 𝜙 𝑑𝑉

𝐎

𝑛. 𝜌𝜙𝑢 𝑑𝐎 = 𝐎

𝑛. Γ𝑔𝑟𝑎𝑑 𝜙 𝑑𝐎

P EWew

DxdxPe

dxPEdxWP

𝑢𝑒𝑢𝑀

(source terms not considered for simplicity)

𝜌𝑢𝐎𝜙 𝑒 − 𝜌𝑢𝐎𝜙 𝑀 = Γ𝐎𝜕𝜙

𝜕𝑥𝑒

− Γ𝐎𝜕𝜙

𝜕𝑥𝑀

Assume Ae=Aw=A and denote fluxes as:

𝐹𝑀 = 𝜌𝑢 𝑀 𝐹𝑒 = 𝜌𝑢 𝑒 𝐷𝑀 =Γ𝑀𝛿𝑥𝑊𝑃

𝐷𝑒=Γ𝑒𝛿𝑥𝑃𝐞

𝐹𝑒𝜙𝑒 − 𝐹𝑀𝜙𝑀 = 𝐷𝑒 𝜙𝐞 − 𝜙𝑃 − 𝐷𝑀(𝜙𝑃 − 𝜙𝑊)

Page 13: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Convection-Diffusion problems in 1D

𝜕(𝜌𝑢)

𝜕𝑥= 0

The continuity equation must be also fullfilled:

P EWew

DxdxPe

dxPEdxWP

𝑢𝑒𝑢𝑀

𝜌𝑢𝐎 𝑒 − 𝜌𝑢𝐎 𝑀 = 0

𝐹𝑒 − 𝐹𝑀 = 0

Page 14: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Convection-Diffusion problems in 1D

P EWew

DxdxPe

dxPEdxWP

𝑢𝑒𝑢𝑀

𝐹𝑒𝜙𝑒 − 𝐹𝑀𝜙𝑀= 𝐷𝑒 𝜙𝐞 − 𝜙𝑃 − 𝐷𝑀(𝜙𝑃 − 𝜙𝑊)

How to estimate fe, fw?

Central difference scheme:𝜙𝑒 =

𝜙𝑃 + 𝜙𝐞2

𝜙𝑀 =𝜙𝑊 + 𝜙𝑃

2

𝐷𝑀 +𝐹𝑀2+ 𝐷𝑒 −

𝐹𝑒2𝜙𝑃 = 𝐷𝑀 +

𝐹𝑀2𝜙𝑊 + 𝐷𝑒 −

𝐹𝑒2𝜙𝐞

𝑎𝑃𝜙𝑃 = 𝑎𝑊𝜙𝑊 + 𝑎𝐞𝜙𝐞

Page 15: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Fig. 5.4. N=5, u=0.1 m/s, F=0.1, D=0.5 Fig.5.5. N=5, u=2.5 m/s, F=2.5, D=0.5

Fig.5.6. N=20, u=2.5 m/s, F=2.5, D=2.0

WHY?

Page 16: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Properties of discretization schemes

• Conservativeness

– Estimate the fluxes in a consistent manner!

Fig.5.7

Fig.5.8

Page 17: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Properties of discretization schemes

• Boundedness

– In the absence of sources, the value of a property

should be bounded by its boundary values

– Requirements:

» All coefficients the same sign

»∑ 𝑎𝑛𝑏

𝑎𝑝′≀ 1 𝑎𝑡 𝑎𝑙𝑙 𝑛𝑜𝑑𝑒𝑠, < 1 𝑎𝑡 𝑜𝑛𝑒 𝑛𝑜𝑑𝑒 𝑎𝑡 𝑙𝑒𝑎𝑠𝑡

Page 18: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Properties of discretization schemes

• Transportiveness

– Where is the information transported?

Fig.5.9

Page 19: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Assessment of the central differencing

scheme

• Conservativeness: OK

• Boundedness:

ae<0 for Pee=Fe/De>2 !!!

• Transportiveness: Not OK!

• Accuracy: 2nd order

𝐷𝑀 +𝐹𝑀2+ 𝐷𝑒 −

𝐹𝑒2𝜙𝑃 = 𝐷𝑀 +

𝐹𝑀2𝜙𝑊 + 𝐷𝑒 −

𝐹𝑒2𝜙𝐞

Page 20: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Upwind differencing scheme

• Compute the convective term depending on the flow

direction:

P EWew

DxdxPe

dxPEdxWP

𝑢𝑒𝑢𝑀

𝜙𝑒 = 𝜙𝑃 𝜙𝑀= 𝜙𝑊

P EWew

DxdxPe

dxPEdxWP

𝑢𝑒𝑢𝑀

𝜙𝑒 = 𝜙𝐞 𝜙𝑀= 𝜙𝑃

Page 21: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Upwind differencing scheme

• Assessment:

– Conservativeness: OK

– Boundedness: OK

– Transportiveness: OK

– Accuracy: 1st order

Fig.5.15

Page 22: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Hybrid differencing scheme

• Combine schemes:

– Central for Pe=F/D < 2

– Upwind for Pe > 2

• Assessment:

– Conservativeness: OK

– Boundedness: OK

– Transportiveness: OK

– Accuracy: 1st order

Page 23: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Power-law scheme

• More accurate than hybrid

• Diffusion set to 0 for Pe>10

• For Pe < 10 polynomial expression is used to evaluate

the fluxes

Page 24: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

The QUICK scheme

• Quadratic Upstream Interpolation for Convective Kinetics

• Higher order & Upwind

• Face values of f obtained from quadratic functions

• Diffusion terms can be evaluated from the gradient

of the parabola

• For uw>0

• For ue>0

𝜙𝑀 =6

8𝜙𝑊 +

3

8𝜙𝑃 −

1

8𝜙𝑊𝑊

𝜙𝑒 =6

8𝜙𝑃 +

3

8𝜙𝐞 −

1

8𝜙𝑊

Fig.5.17

Page 25: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

The QUICK scheme

• Generic form:

• Issues at boundaries: no second neighbours

– Create virtual ‘mirror nodes’ by linear extrapolation

𝑎𝑃𝜙𝑃 = 𝑎𝑊𝜙𝑊 + 𝑎𝐞𝜙𝐞 + 𝑎𝑊𝑊𝜙𝑊𝑊 + 𝑎𝐞𝐞𝜙𝐞𝐞

Fig.5.18

Page 26: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

The QUICK scheme

• Assessment

– Conservativeness: OK

– Boundedness:

» Only conditionnaly stable!

– Reformulated versions

to improve stability

– Transportiveness: OK

– Accuracy: better formal

accuracy than upwind

– Possible over/undershoots

Fig.5.20

Page 27: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

General upwind-biased schemes

• ‘Pure’ upwind:

• Linear upwind differencing:

• QUICK:

• Central differencing:

• General:

𝜙𝑒 = 𝜙𝑃

𝜙𝑒 = 𝜙𝑃 +1

2(𝜙𝑃 − 𝜙𝑊)

𝜙𝑒 = 𝜙𝑃 +1

8(3𝜙𝐞 − 2𝜙𝑃 − 𝜙𝑊)

𝜙𝑒 = 𝜙𝑃 +1

2(𝜙𝐞 − 𝜙𝑃)

𝜙𝑒 = 𝜙𝑃 +1

2𝜓(𝜙𝐞 − 𝜙𝑃)

Page 28: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

General upwind-biased schemes

• UD

• CD

• LUD

• QUICK𝜙𝑒 = 𝜙𝑃 +

1

2𝜓(𝜙𝐞 − 𝜙𝑃)

𝜓 = 𝜓(𝑟)

𝑟 =𝜙𝑃 − 𝜙𝑊𝜙𝐞 − 𝜙𝑃

𝜓 𝑟 = 0

𝜓 𝑟 = 1

𝜓 𝑟 = 𝑟

𝜓 𝑟 = (3 + 𝑟)/4

Fig.5.21

Page 29: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

TVD schemes

• Total Variation Diminishing

• Criteria:

– Upper limit for TVD:

f1

f2

f3

f4

f5

𝑇𝑉 𝜙= 𝜙2 − 𝜙1 + 𝜙3 − 𝜙2+ 𝜙4 − 𝜙3 + |𝜙5 − 𝜙4|

Fig.5.23

𝜓 𝑟 ≀ 2𝑟 𝑟 ≀ 1

𝜓 𝑟 ≀ 2 𝑟 > 1

Page 30: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

TVD

• For second order:

– Must go through (1,1)

– Limited by CD and LUD

• To treat forward and

backward differencing

consistently: symmetry

property:

• Flux limiters

𝜓 𝑟

r= 𝜓(1/𝑟)

Fig.5.24

Fig.5.25

Page 31: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Unsteady flows

𝜕𝜌𝜙

𝜕𝑡+ 𝑑𝑖𝑣 𝜌𝑢 𝜙 = 𝑑𝑖𝑣 Γ𝑔𝑟𝑎𝑑 𝜙 + 𝑆

𝑉

𝜕𝜌𝜙

𝜕𝑡𝑑𝑉 +

𝑉

𝑑𝑖𝑣 𝜌𝑢 𝜙 𝑑𝑉 = 𝑉

𝑑𝑖𝑣 Γ𝑔𝑟𝑎𝑑 𝜙 𝑑𝑉 + 𝑉

𝑆 𝑑𝑉

𝑡

𝑡+Δ𝑡

𝑉

𝜕𝜌𝜙

𝜕𝑡𝑑𝑉𝑑𝑡 +

𝑡

𝑡+Δ𝑡

𝑉

𝑑𝑖𝑣 𝜌𝑢 𝜙 𝑑𝑉 𝑑𝑡

= 𝑡

𝑡+Δ𝑡

𝑉

𝑑𝑖𝑣 Γ𝑔𝑟𝑎𝑑 𝜙 𝑑𝑉 𝑑𝑡 + 𝑡

𝑡+Δ𝑡

𝑉

𝑆 𝑑𝑉𝑑𝑡

Page 32: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Unsteady 1D heat conduction

• c – specific heat [J/(kg K)]

𝜌𝑐𝜕𝑇

𝜕𝑡=𝜕

𝜕𝑥𝑘𝜕𝑇

𝜕𝑥+ 𝑆

P EWew

DxdxPe

dxPEdxWP

𝑡

𝑡+Δ𝑡

𝑉

𝜌𝑐𝜕𝑇

𝜕𝑡𝑑𝑉𝑑𝑡 =

𝑡

𝑡+Δ𝑡

𝑉

𝜕

𝜕𝑥𝑘𝜕𝑇

𝜕𝑥𝑑𝑉𝑑𝑡 +

𝑡

𝑡+Δ𝑡

𝑉

𝑆𝑑𝑉𝑑𝑡

𝑉

𝑡

𝑡+Δ𝑡

𝜌𝑐𝜕𝑇

𝜕𝑡𝑑𝑡𝑑𝑉 =

𝑡

𝑡+Δ𝑡

𝑘𝐎𝜕𝑇

𝜕𝑥𝑒

− 𝑘𝐎𝜕𝑇

𝜕𝑥𝑀

𝑑𝑡 + 𝑡

𝑡+Δ𝑡

𝑆Δ𝑉𝑑𝑡

Page 33: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Unsteady 1D heat conduction

𝑉

𝑡

𝑡+Δ𝑡

𝜌𝑐𝜕𝑇

𝜕𝑡𝑑𝑡𝑑𝑉 =

𝑡

𝑡+Δ𝑡

𝑘𝐎𝜕𝑇

𝜕𝑥𝑒

− 𝑘𝐎𝜕𝑇

𝜕𝑥𝑀

𝑑𝑡 + 𝑡

𝑡+Δ𝑡

𝑆Δ𝑉𝑑𝑡

𝜌𝑐 𝑇𝑃 − 𝑇𝑃0 ΔV =

𝑡

𝑡+Δ𝑡

𝑘𝐎𝑇𝐞 − 𝑇𝑃𝛿𝑥𝑃𝐞

− 𝑘𝐎𝑇𝑃 − 𝑇𝑊𝛿𝑥𝑊𝑃

𝑑𝑡 + 𝑡

𝑡+Δ𝑡

𝑆Δ𝑉𝑑𝑡

Assume uniform T

In control volume

and use backward

differencing

Use central

differencing

How do TE,TW and TP vary in time? Assume

a linear function:@ t+Dt @ t

𝐌𝑇 = 𝑡

𝑡+Δ𝑡

𝑇𝑑𝑡 = 𝜃𝑇 + 1 − 𝜃 𝑇0 Δ𝑡

Page 34: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Unsteady 1D heat conduction

𝜌𝑐 𝑇𝑃 − 𝑇𝑃0 ΔV =

𝑡

𝑡+Δ𝑡

𝑘𝐎𝑇𝐞 − 𝑇𝑃𝛿𝑥𝑃𝐞

− 𝑘𝐎𝑇𝑃 − 𝑇𝑊𝛿𝑥𝑊𝑃

𝑑𝑡 + 𝑡

𝑡+Δ𝑡

𝑆Δ𝑉𝑑𝑡

Divide by A and Dt:

𝜌𝑐 𝑇𝑃 − 𝑇𝑃0Δ𝑥

Δ𝑡

= 𝜃 𝑘𝑇𝐞 − 𝑇𝑃𝛿𝑥𝑃𝐞

− 𝑘𝑇𝑃 − 𝑇𝑊𝛿𝑥𝑊𝑃

+ (1 − 𝜃) 𝑘𝑇𝐞0 − 𝑇𝑃

0

𝛿𝑥𝑃𝐞− 𝑘

𝑇𝑃0 − 𝑇𝑊

0

𝛿𝑥𝑊𝑃+ 𝑆Δ𝑥

𝑎𝑃𝑇𝑃= 𝑎𝑊 𝜃𝑇𝑊 + 1 − 𝜃 𝑇𝑊

0 + 𝑎𝐞 𝜃𝑇𝐞 + 1 − 𝜃 𝑇𝐞0

+ 𝑎𝑃0 − 1 − 𝜃 𝑎𝑊 − 1 − 𝜃 𝑎𝐞 𝑇𝑃

0 + 𝑏

Page 35: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Explicit scheme

𝜃 = 0

𝑎𝑃𝑇𝑃 = 𝑎𝑊𝑇𝑊0 + 𝑎𝐞𝑇𝐞

0 + 𝑎𝑃0 − 𝑎𝑊 − 𝑎𝐞 + 𝑆𝑃 𝑇𝑃

0 + 𝑆𝑢

TP can be directly computed

First order

Can be negative! To assure stability:

Δ𝑡 < 𝜌𝑐Δ𝑥 2

2𝑘

Very small timesteps when the grid is refined!

Page 36: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Implicit scheme

𝜃 = 1

𝑎𝑃𝑇𝑃 = 𝑎𝑊𝑇𝑊 + 𝑎𝐞𝑇𝐞 + 𝑎𝑃0𝑇𝑃0 + 𝑆𝑢

Several unknowns -> System of equations

Unconditionally stable

First order

Page 37: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Crank-Nicolson scheme

𝜃 =1

2

𝑎𝑃𝑇𝑃 = 𝑎𝑊𝑇𝑊 + 𝑇𝑊

0

2+ 𝑎𝐞

𝑇𝐞 + 𝑇𝐞0

2+ 𝑎𝑃

0 −𝑎𝑊2−𝑎𝐞2+𝑆𝑃2𝑇𝑃0 + 𝑆𝑢

System of equations

To assure stability:

Δ𝑡 < 𝜌𝑐Δ𝑥 2

𝑘

Very small timesteps when the grid is refined!

Second order

Page 38: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Unsteady 1D convection-diffusion

• Similarly to unsteady diffusion

• Additional stability limits due to convection

𝜕𝜌𝜙

𝜕𝑡+𝜕𝜌𝑢𝜙

𝜕𝑥=𝜕

𝜕𝑥Γ𝜕𝜙

𝜕𝑥+ 𝑆

Page 39: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Finite volume method for 2D Cartesian

grids

• E.g. diffusion problem:

Fig.4.12

𝜕

𝜕𝑥Γ𝜕𝜙

𝜕𝑥+𝜕

𝜕𝑊Γ𝜕𝜙

𝜕𝑊+ 𝑆 = 0

Δ𝑉

𝜕

𝜕𝑥Γ𝜕𝜙

𝜕𝑥𝑑𝑉 +

Δ𝑉

𝜕

𝜕𝑊Γ𝜕𝜙

𝜕𝑊𝑑𝑉

+ Δ𝑉

𝑆𝑑𝑉 = 0

Γ𝑒𝐎𝑒𝜙𝐞 − 𝜙𝑃𝛿𝑥𝑃𝐞

− Γ𝑀𝐎𝑀𝜙𝑃 − 𝜙𝑊𝛿𝑥𝑊𝑃

+ Γ𝑛𝐎𝑛𝜙𝑁 − 𝜙𝑃𝛿𝑊𝑃𝑁

− Γ𝑠𝐎𝑠𝜙𝑃 − 𝜙𝑆𝛿𝑊𝑆𝑃

+ 𝑆Δ𝑉 = 0

𝑎𝑃𝜙𝑃 = 𝑎𝑊𝜙𝑊 + 𝑎𝐞𝜙𝐞 + 𝑎𝑆𝜙𝑆 + 𝑎𝑁𝜙𝑁 + 𝑆𝑢 = 0

Page 40: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Finite Volume Method on unstructured

grids

P

ni

DA

𝑉

𝜕𝜌𝜙

𝜕𝑡𝑑𝑉 +

𝑉

𝑑𝑖𝑣 𝜌𝑢 𝜙 𝑑𝑉

= 𝑉

𝑑𝑖𝑣 Γ𝑔𝑟𝑎𝑑 𝜙 𝑑𝑉 + 𝑉

𝑆 𝑑𝑉

𝜕

𝜕𝑡

𝑉

𝜌𝜙 𝑑𝑉 + 𝐎

𝑛. 𝜌𝑢 𝜙 𝑑𝐎 = 𝐎

𝑛. Γ𝑔𝑟𝑎𝑑 𝜙 𝑑𝐎 + 𝑉

𝑆 𝑑𝑉

𝜕

𝜕𝑡

𝑉

𝜌𝜙𝑑𝑉 + ∑ Δ𝐎𝑖

𝑛𝑖 . 𝜌𝑢 𝜙 𝑑𝐎 = ∑ Δ𝐎𝑖

𝑛𝑖 . Γ𝑔𝑟𝑎𝑑 𝜙 𝑑𝐎 + 𝑉

𝑆 𝑑𝑉

• ni can be computed based on grid topology

Page 41: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Diffusion term

• Central differencing

• Only true if the grid is

orthogonal

Δ𝐎𝑖

𝑛𝑖 . Γ𝑔𝑟𝑎𝑑 𝜙 𝑑𝐎 ≈

𝑛𝑖 . Γ𝑔𝑟𝑎𝑑 𝜙 Δ𝐎𝑖 ≈

Γ𝜙𝐎 − 𝜙𝑃Δ𝜉

Δ𝐎𝑖

Fig.11.15

Page 42: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Non-orthogonal grids

• Can be computed as:

n. grad𝜙Δ𝐎𝑖

=𝑛. 𝑛Δ𝐎𝑖𝑛. 𝑒𝜉

𝜙𝐎 − 𝜙𝑃Δ𝜉

−𝑒𝜉 . 𝑒𝜂 Δ𝐎𝑖

𝑛. 𝑒𝜉

𝜙𝑏 − 𝜙𝑎Δ𝜂

Fig.11.17

Page 43: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Non-orthogonal grids

• Compare to:

n. grad𝜙 Δ𝐎𝑖 =𝑛. 𝑛Δ𝐎𝑖𝑛. 𝑒𝜉

𝜙𝐎 − 𝜙𝑃Δ𝜉

−𝑒𝜉 . 𝑒𝜂 Δ𝐎𝑖

𝑛. 𝑒𝜉

𝜙𝑏 − 𝜙𝑎Δ𝜂

Direct gradient Cross-diffusion

Known Interpolated

Can be (pre)computed (and stored) based on grid topology.

n. grad𝜙 Δ𝐎𝑖 =𝜙𝐎 − 𝜙𝑃Δ𝜉

Δ𝐎𝑖

Page 44: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Convective term

• Approximate as:

Δ𝐎𝑖

𝑛𝑖 . 𝜌𝜙𝑢 𝑑𝐎 ≈

𝜙𝑖 Δ𝐎𝑖

𝑛𝑖 . 𝜌𝑢 𝑑𝐎 ≈ 𝜙𝑖𝐹𝑖

Fi = Convective flux

normal to the surface

element.

Usually stored.Fig.11.15

Page 45: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

fi

• Upwind differencing

– Fi>0 fi=fP

– Fi<0 fi=fA

• Linear upwind differencing

• QUICK

• TVD

• 


𝜙𝑖 = 𝜙𝑃 + 𝛻𝜙𝑃 . Δ𝑟

Needs to be computed!

Page 46: Finite Volume Discretization MMVN05 - Strömningsteknik · Convection-Diffusion problems in 1D W P E w e Dx dx Pe d WP dx PE 𝑒 𝑒𝜙𝑒− 𝜙 =𝐷𝑒𝜙𝐞−𝜙𝑃−𝐷

Top Related