of 13 /13
Chapter 4 M. Darwish ([email protected] ) American University of Beirut MECH 663 The Finite Volume Method
• Author

others
• Category

## Documents

• view

19

0

Embed Size (px)

### Transcript of The Finite Volume Method Finite Volume... · Chapter 4 M. Darwish ([email protected]) American...

• Chapter 4M. Darwish ([email protected])

American University of BeirutMECH 663

The Finite Volume Method

• The General Scalar Equation

∂ ρφ( )∂t

transient term

+ ∇. ρuφ( )convective term

= ∇ ⋅ Γ∇φ( )diffusion term

+ Qφ φ( )source term

Time derivative

Source term

Control VolumeCV

Diffusion

The scalar equation is a balance equation written in differential form

• Balance Form

∂ ρφ( )∂t

dVV∫ + ρuφ( ) ⋅ dS

∂V∫ = Γ∇φ( ) ⋅ dS

∂V∫ + Q φ( )dV

V∫

Time derivative

Source term

Control VolumeCV

Diffusion

∂V

V

∂ ρφ( )∂t

dVVP

∫ + J ⋅ dSf∫

⎝ ⎜ ⎜

⎠ ⎟ ⎟

f = nb VP( )∑ = Qφ φ( )dVP

VP

To recover the balance form we integrate over some CV

∂ ρφ( )∂t

dVV∫ + ρuφ( ) ⋅ dS

f∫

⎝ ⎜ ⎜

⎠ ⎟ ⎟

f = nb V( )∑ − Γ∇φ( ) ⋅ dS

f∫

⎝ ⎜ ⎜

⎠ ⎟ ⎟

f = nb V( )∑ = Q φ( )dV

V∫

J = JC + JD

= ρuφ( ) − Γ∇φ( )PSf1f1

Sf2

f2

f3 f4

Sf4

Sf3

discrete CV

• Flux Integration

ρuφ( ) ⋅ dSf∫

⎝ ⎜ ⎜

⎠ ⎟ ⎟

f = nb VP( )∑ − Γ∇φ( ) ⋅ dS

f∫

⎝ ⎜ ⎜

⎠ ⎟ ⎟

f = nb VP( )∑

P

Nf

P

Nf

P

Nf

1 point gauss integration

2 point gauss integration

3 point gauss integration

J ⋅ dSf∫ = J ⋅S( )ip

ip( f )∑

= Jip ⋅ wipS fip( f )∑

ρuφ( ) f ⋅S f

ρuφ( )1 f( ) ⋅ w1 f( )S f + ρuφ( )2 f( ) ⋅ w2 f( )S f

• Volume Integration

P

1 point gauss integration

4 point gauss integration

9 point gauss integration

P P

Q φ( )dVPVP

∂ ρφ( )∂t

dVVP

= QipVip( )ip(P )∑

QPVP

Q1 P( )V1 P( ) + Q2 P( )V2 P( ) + Q3 P( )V3 P( ) + Q4 P( )V4 P( )

• Semi-Discretized Equation

wip ρuφ( )ip ⋅S f( )ip~ ip( f )∑

f = nb VP( )∑ − wip Γ∇φ( )ip ⋅S f( )

ip~ ip( f )∑

f ~ faces VP( )∑ = wipQipΩP

ip~ ip VP( )∑

PN1

N4

N3

N2

J1

J2

J3

J4

• ρuφ −Γ∇φ( )b ⋅Sb

BC: Flux Specified

bnt

P

Sb

e

dPb

qb,specified

−Γ∇φ( )b ⋅nbSpecified Flux

= qb,specified

ub = 0

= −Γ∇φ( )b ⋅nbSb

= qb,specified Sb

Wall

• BC: Value Specified

b

n

tP

Sb

Φb,specified

Inlet

φb = φb,specified

ρu( )b known

Jb ⋅Sb = ρuφ( )b ⋅Sb

No Diffusion

= ρbub ⋅Sb( )φb,specified

= Fbφb,specified

• Spatial Variation

φ(x) = φP + x − xP( ) ⋅ ∇φ( )P + 12 x − xP( )2 : ∇∇φ( )P

+ 13! x − xP( )3 :: ∇∇∇φ( )P + …

+ 1n! x − xP( )n:::n(∇∇∇

n φ)P + …

φ(x) = φP + x − xP( ) ⋅ ∇φ( )P + O Δx 2( )ΦP

Φ(x)

∇ΦPxP

x

∇∇ΦP

• Mean Value Theorem

φ P =1ΩP

φ( )dΩΩP

= 1ΩP

φP + x − xP( ) ⋅ ∇φ( )P + O Δx2( )[ ]dΩ

ΩP

= φP1ΩP

dΩΩP

∫ + 1ΩPx − xP( )dΩ

ΩP

∫ ⋅ ∇φ( )P +1ΩP

O Δx 2( )dΩΩP

= φP + O Δx2( )

ΦP

• Problem 3.4Consider one-dimensional diffusion in the calculation domain shown in the figure below with ∆x =1 for all control volumes. Assume that the source term Q=50x, and that Γ is constant with a value Γ=1. Let the boundary values of f be Φ0=100 and Φ4=500a Write the discrete equations for each of the cells 1, 2 and 3.Solve the discrete equation set using Gauss-Seidel iteration and report the resulting cell-centroid valuesCompute the diffusion flux at each of the cell faces f0, f12, f23 and f4 using the same discretization approximations made in obtaining the discrete equationsShow that the conservation principle is satisfied on each discrete cell and on the whole domainFind the exact solution to this problem. Find the percentage error in the computed solution at each cell centroid

21 3

(δx) (δx)

(∆x)

(δx)/2 (δx)/2

(∆x)(∆x)

Φ0=1000 4

Φ4=500

• Problem 3.5Consider the computational domain in the figure below. Using the conservation of mass principle compute the mass flux at faces f12, f23 and f4.

Write the steady state transport equation for a scalar, Φ, being advected through the domain with no diffusion and no source terma. Write the discrete equations for cells 1, 2 and 3 (Use the upwind profile),b. If we assume that (dΦ/dx)4 = 0 compute the value of Φ4. c. If (∆x=1) and (∆y=0.5) compute the values of Φ1, Φ2, Φ3 and Φ4.

21 3

(δx) (δx)

(∆x)

(δx)/2 (δx)/2

(∆x)

(∆x)

0 4(∆y)

(3∆y)

• Problem 3.6Consider the computational domain shown below. Write the diffusion equation for this domain for Γ=1 and Q=0Write discrete equations for cells 1,2 and 3Can you find a unique solution for Φ1, Φ2 and Φ3. Explain ?

21 3

(δx) (δx)

(∆x)

(δx)/2 (δx)/2

(∆x)(∆x)

0 4