29
Computational Fluid Dynamics: The Finite-Volume Method David Apsley

Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Computational Fluid Dynamics:The Finite-Volume Method

David Apsley

Page 2: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

1. Introduction

Page 3: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

What is …Computational Fluid Dynamics?

The use of computers and

numerical methods to solve

problems involving fluid flow

Page 4: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Aerodynamics

Page 5: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Wind Loading

Page 6: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Turbine Technology

Page 7: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Vortex Shedding

Page 8: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Dispersion of Pollution

Page 9: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Ventilation

Page 10: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Particle-Laden Plumes (Sea Outfalls)

(ex302)ra=1040 kg/m3

(ex322)ra=1020 kg/m3

(ex336)ra=1020 kg/m3

Ua=0.026 m/s

free surface

D U0

0z

h

r0,

Uar a,

Ws

solid bed

Page 11: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Sediment Scour

River bend Bridge pier

Page 12: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Discretisation

Field variables:

Equations:

continuouscurve

discreteapproximation

f

x x

f

2

1

d𝑓

d𝑥≈

Δ𝑓

Δ𝑥=

𝑓2 − 𝑓1𝑥2 − 𝑥1

Page 13: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Basic Principles of CFD

1. Discretise space:

replace field variables (r, 𝑢, 𝑣, 𝑤, 𝑝, …) by values at a finite number of nodes

2. Discretise equations:

continuum equations → algebraic equations

3. Solve:

large system of simultaneous equations

Page 14: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Stages of a CFD Analysis

• Pre-processing:

‒ formulate problem (geometry, equations, boundary conditions)

‒ construct computational mesh

• Solving:

‒ discretise

‒ solve

• Post-processing:

‒ analyse

‒ visualise (graphs and plots)

Page 15: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Fluid-Flow Equations

• Mass: change of mass = 0

• Momentum: change of momentum = force × time

• Energy: change of energy = work + heat

• (Other constituents)

In fluid mechanics, these are normally expressed in rate form

Page 16: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Form of Equations

• Integral (control-volume)

• Differential

Page 17: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Integral (Control-Volume) Approach

→ Finite-volume method for CFD

Consider the budget of any transported physical quantity in any control volume

V

CHANGE = IN − OUT + CREATED

CHANGE

time+

OUT − IN

time=

CREATED

time

TIME DERIVATIVEof amount in 𝑉

+NET FLUX

through boundary of 𝑉=

SOURCEinside 𝑉

TIME DERIVATIVEof amount in 𝑉

+ADVECTION + DIFFUSIONthrough boundary of 𝑉

=SOURCEinside 𝑉

Page 18: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Differential Equations For Fluid Flow

• Derived by considering the rate of change at a point; i.e. using infinitesimal control volumes

• Discretisation gives a finite-difference method for CFD

• Several types:

‒ fixed-point (“Eulerian”): conservative

‒ moving with the flow (“Lagrangian”): non-conservative

‒ derived variables; e.g. potential flow

Page 19: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Main Methods for CFD

• Finite-difference:

‒ discretise differential equations

• Finite-volume:

‒ discretise control-volume equations

• Finite-element:

‒ represent solution as a weighted sum of basis functions

i,j

i,j+1

i,j-1

i-1,j i+1,j

ew

v

nv

s

uu

0 =𝜕𝑢

𝜕𝑥+𝜕𝑣

𝜕𝑦

𝑢(x) = )𝑢α𝑆α(x

0 = net mass outflow

≈𝑢𝑖+1,𝑗 − 𝑢𝑖−1,𝑗

2Δ𝑥+𝑣𝑖,𝑗+1 − 𝑣𝑖,𝑗−1

2Δ𝑦

= ρ𝑢𝐴 𝑒 − ρ𝑢𝐴 𝑤 + ρ𝑣𝐴 𝑛 − ρ𝑣𝐴 𝑠

Page 20: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Advantages of the Finite-Volume Method in CFD

• Rigorously enforces conservation

• Flexible in terms of:

‒ geometry

‒ fluid phenomena

• Directly relatable to physical quantities

Page 21: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

b

Page 22: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Examples

Page 23: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Example Q1

Water (density 1000 kg m–3) flows at 2 m s–1 through a circular pipe of diameter 10 cm. What is the mass flux 𝐶across the surfaces 𝑆1 and 𝑆2?

2 m/s

10 c

m

S S12

45o

Page 24: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Water (density 1000 kg m–3) flows at 2 m s–1 through a circular pipe of diameter 10 cm. What is the mass flux 𝐶 across the surfaces 𝑆1 and 𝑆2?

2 m/s

10 c

m

S S12

45o

𝑆1: mass flux (𝐶) = ρ𝑢𝐴

= 1000 × 2 ×π × 0. 12

4

= 15.7 kg s−1

𝑆2: the same!

In general: 𝐶 = ρu • A

𝐶 = ρ(𝑢 cos θ)𝐴

)𝐶 = ρ𝑢(𝐴 cos θ

Page 25: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Example Q2

A water jet strikes normal to a fixed plate as shown. Compute the force 𝐹 required to hold the plate fixed.

Fu = 8 m/s

D = 10 cm

Page 26: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

A water jet strikes normal to a fixed plate as shown. Compute the force 𝐹 required to hold the plate fixed.

Fu = 8 m/s

D = 10 cm

force on fluid = momentum flux out − momentum flux in

momentum flux = mass flux × velocity

−𝐹 = 0 − (ρ𝑈𝐴)𝑈

𝐹 = ρ𝑈2𝐴

= 1000 × 82 ×π × 0. 12

4

= 503 N

Page 27: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

Example Q3

An explosion releases 2 kg of a toxic gas into a room of dimensions 30 m 8 m 5 m. Assuming the room air to be well-mixed and to be vented at a speed of 0.5 m s–1 through an aperture of area 6 m2, calculate:

(a) the initial concentration of gas in ppm by mass;

(b) the time taken to reach a safe concentration of 1 ppm.

(Take the density of air as 1.2 kg m–3.)

Page 28: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

An explosion releases 2 kg of a toxic gas into a room of dimensions 30 m 8 m 5 m. Assuming the room air to be well-mixed and to be vented at a speed of 0.5 m s–1 through an aperture of area 6 m2, calculate:(a) the initial concentration of gas in ppm by mass;

𝑉 = 30 × 8 × 5 = 1200 m3

mass of fluid × concentration = mass of toxin

(ρ𝑉)ϕ0 = 2 kg

ϕ0 =2

1.2 × 1200

Volume V

Concentration

U

area A

= 1.389 × 10−3

1389 ppm

Page 29: Computational Fluid Dynamics: The Finite-Volume Method...Computational Fluid Dynamics? The use of computers and numerical methods to solve problems involving fluid flow Aerodynamics

An explosion releases 2 kg of a toxic gas into a room of dimensions 30 m 8 m 5 m. Assuming the room air to be well-mixed and to be vented at a speed of 0.5 m s–1 through an aperture of area 6 m2, calculate:(b) the time taken to reach a safe concentration of 1 ppm.

𝑉 = 1200 m3

Volume V

Concentration

U

area A𝐴 = 6 m2

𝑈 = 0.5 m s−1

ϕ0 = 1389 ppm

Change in amount of toxin = amount in − amount out

Rate of change of amount of toxin = rate of entering − rate of leaving

d

d𝑡(ρ𝑉ϕ) = 0 − (ρ𝑢𝐴)ϕ

d𝑡= −

𝑢𝐴

𝑉ϕ, ϕ = ϕ0 at 𝑡 = 0

d𝑡= −λϕ λ =

𝑢𝐴

𝑉= 0.0025 s−1

ϕ = ϕ0e−λ𝑡

eλ𝑡 =ϕ0

ϕ

𝑡 =1

λlnϕ0

ϕ=

1

0.0025ln 1389 = 2895 s

≈ 48 min