0% found this document useful (0 votes)
25 views7 pages

Introduction to Computational Fluid Dynamics

The document introduces Computational Fluid Dynamics (CFD), explaining its definition, principles, stages of simulation, and fluid-flow equations. It highlights the importance of discretisation methods, particularly focusing on the finite-volume method, which is emphasized for its applicability in simulating viscous, incompressible flow. Additionally, it includes appendices with notation, hydrostatics, and examples to illustrate the concepts discussed.

Uploaded by

profopar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views7 pages

Introduction to Computational Fluid Dynamics

The document introduces Computational Fluid Dynamics (CFD), explaining its definition, principles, stages of simulation, and fluid-flow equations. It highlights the importance of discretisation methods, particularly focusing on the finite-volume method, which is emphasized for its applicability in simulating viscous, incompressible flow. Additionally, it includes appendices with notation, hydrostatics, and examples to illustrate the concepts discussed.

Uploaded by

profopar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1.

INTRODUCTION TO CFD SPRING 2024

1.1 What is computational fluid dynamics?


1.2 Basic principles of CFD
1.3 Stages in a CFD simulation
1.4 Fluid-flow equations
1.5 The main discretisation methods
Appendices
Examples

1.1 What is Computational Fluid Dynamics?

Computational fluid dynamics (CFD) is the use of computers


and numerical methods to solve problems involving fluid flow.

CFD has been successfully applied in many areas of fluid mechanics. These include
aerodynamics of cars and aircraft, hydrodynamics of ships, flow through pumps and turbines,
combustion and heat transfer, chemical engineering. Applications in civil engineering include
wind loading, vibration of structures, wind and wave energy, ventilation, fire, explosion
hazards, dispersion of pollution, wave loading on coastal and offshore structures, hydraulic
structures such as weirs and spillways, sediment transport. More specialist CFD applications
include ocean currents, weather forecasting, plasma physics, blood flow, biofluidics, heat
transfer around electronic circuitry, metal casting.

These applications involve many different fluid phenomena. In particular, the CFD techniques
used for high-speed aerodynamics (where compressibility is significant, but viscous and
turbulence effects are often unimportant) are very different from those used to solve the
incompressible, turbulent flows typical of mechanical and civil engineering.

Although many elements of this course are widely applicable, the focus will be on simulating
viscous, incompressible flow by the finite-volume method.

CFD 1–1 David Apsley


1.2 Basic Principles of CFD

The approximation of a continuously-varying quantity in terms of values at a finite number of


points is called discretisation.

The following are common to any CFD simulation.

continuous discrete
curve approximation
(1) The flow field is discretised; i.e. field variables
(𝜌, 𝑢, 𝑣, 𝑤, 𝑝, …) are approximated by their
values at a finite number of nodes.

f
(2) The equations of motion are discretised:
2 d𝑓 Δ𝑓 𝑓2 − 𝑓1
derivatives → algebraic approximations ≈ =
(continuous) (discrete) f d𝑥 Δ𝑥 𝑥2 − 𝑥1
1
x
x

(3) The resulting system of algebraic equations is solved to give values at the nodes.

1.3 Stages in a CFD Simulation

The main stages in a CFD simulation are:

Pre-processing:
– formulate problem (geometry, equations, boundary conditions);
– computational mesh (set of control volumes).

Solving:
– discretise the governing equations;
– solve the resulting algebraic equations.

Post-processing:
– analyse (calculate derived quantities: forces, flow rates, ... );
– visualise (graphs and plots).

CFD 1–2 David Apsley


1.4 Fluid-Flow Equations

The equations of fluid flow are based on fundamental physical conservation principles:
• mass: change of mass = 0
• momentum: change of momentum = force × time
• energy: change of energy = work + heat
In fluid flow these are usually expressed as rate equations; i.e. rate of change = …

Additional equations may apply for non-homogeneous fluids (e.g. particle load, dissolved
chemicals, multiple species, …).

These conservation principles may be expressed mathematically as either:


• integral (control-volume) equations;
• differential equations.

1.4.1 Integral (Control-Volume) Approach

This describes how the total amount of a physical quantity (mass, V


momentum, energy, …) changes within a finite region of space
(control volume). Over an interval of time:
CHANGE = (AMOUNT ENTERING – AMOUNT LEAVING) + AMOUNT CREATED
In fluid mechanics this is usually expressed in rate form by dividing by the time interval (and
transferring net transfer through the boundary to the LHS):
TIME DERIVATIVE NET FLUX SOURCE
( ) + ( ) = ( ) (1)
of amount in V through boundary of V inside V

The flux (rate of transport through a surface) is further subdivided into:


advection1 – movement with the flow;
diffusion – net transport by random molecular or turbulent motion.

TIME DERIVATIVE ADVECTION+DIFFUSION SOURCE


( ) + ( ) = ( ) (2)
of amount in V through boundary of V inside V

This is a canonical equation, independent of whether the physical quantity is mass, momentum,
chemical content, etc. Thus, instead of lots of different equations, we can consider the
numerical solution of a generic scalar-transport equation (Section 4).

The finite-volume method is based on approximating control-volume equations.

1
Some authors – but not this one – prefer the term convection to advection.

CFD 1–3 David Apsley


1.4.2 Differential Equations

In regions without shocks, interfaces or other discontinuities, fluid-flow equations can also be
written in differential forms (Section 2). These describe what is going on at a point rather than
over a whole control volume. Mathematically, they can be derived by making the control
volumes infinitesimally small. There are many ways of writing these differential equations.

Finite-difference methods approximate some differential form of the governing equations.

1.5 The Main Discretisation Methods


i,j+1
(i) Finite-Difference Method
i-1,j i,j i+1,j
Discretise differential equations; e.g. for mass:
∂𝑢 ∂𝑣 𝑢𝑖+1,𝑗 − 𝑢𝑖−1,𝑗 𝑣𝑖,𝑗+1 − 𝑣𝑖,𝑗−1 i,j-1
0 = + ≈ +
∂𝑥 ∂𝑦 2Δ𝑥 2Δ𝑦

(ii) Finite-Volume Method


vn
Discretise integral (control-volume) equations; e.g. uw ue
0 = net mass outflow = (𝜌𝑢𝐴)𝑒 − (𝜌𝑢𝐴)𝑤 + (𝜌𝑣𝐴)𝑛 − (𝜌𝑣𝐴)𝑠 vs

(iii) Finite-Element Method

Express the solution as a weighted sum of shape functions 𝑆𝛼 (x); e.g. for velocity:

𝑢(x) = ∑ 𝑢𝛼 𝑆𝛼 (x)

Substitute into one of several forms of the governing equations and solve for the coefficients
(aka degrees of freedom, or weights) 𝑢𝛼 .

The finite-element method is popular in solid mechanics (geotechnics, structures) because:


• it has considerable geometric flexibility;
• general-purpose software can be used for a wide variety of physical problems.

The finite-volume method is popular in fluid mechanics because:


• it rigorously enforces conservation;
• it is flexible in terms of both geometry and fluid phenomena;
• it is directly relatable to physical quantities (mass flux, etc.).

This course will focus on the finite-volume method.

CFD 1–4 David Apsley


In the finite-volume method ...

(1) A flow geometry is defined.

(2) The flow domain is decomposed into a set of control


volumes or cells called a computational mesh or grid.

(3) The control-volume equations are discretised – i.e.


approximated in terms of values at nodes – to form a set of
algebraic equations.

(4) The discretised equations are solved numerically.  b

CFD 1–5 David Apsley


APPENDICES

A1. Notation

Position/time:
x ≡ (𝑥, 𝑦, 𝑧) or (𝑥1 , 𝑥2 , 𝑥3 ) position; (𝑧 usually vertical when gravity is important)
𝑡 time

Field variables:
u ≡ (𝑢, 𝑣, 𝑤) or (𝑢1 , 𝑢2 , 𝑢3 ) velocity
𝑝 pressure
(𝑝– 𝑝atm is gauge pressure; 𝑝∗ = 𝑝 + 𝜌𝑔𝑧 is piezometric pressure)
𝑇 temperature
𝜙 concentration (amount per unit mass or volume)

Fluid properties:
𝜌 density
𝜇 (dynamic) viscosity
(𝜈 ≡ 𝜇/𝜌 is the kinematic viscosity)
Γ diffusivity

A2. Hydrostatics

At rest, pressure forces balance weight. This hydrostatic relation can be written
d𝑝
Δ𝑝 = −𝜌𝑔Δ𝑧 or = −𝜌𝑔 (3)
d𝑧
The same equation also holds in a moving fluid if vertical acceleration is much smaller than 𝑔.

If density is constant, (3) can be written as either


Δ(𝑝 + 𝜌𝑔𝑧) = 0

𝑝∗ ≡ 𝑝 + 𝜌𝑔𝑧 = constant (4)


𝑝∗ is the piezometric pressure. For a constant-density flow without a free surface, gravitational
forces can be eliminated entirely from the equations by working with the piezometric pressure.

A3. Equation of State

In compressible flow, pressure, density and temperature are connected by an equation of state.
The most common is the ideal gas law:
𝑝 = 𝜌𝑅𝑇, 𝑅 = 𝑅0 /𝑚 (5)
where 𝑅0 is the universal gas constant, 𝑚 is the molar mass and 𝑇 is the absolute temperature.
For ideal gases, temperature is related to internal energy 𝑒 or enthalpy ℎ (per unit mass) by
𝑒 = 𝑐𝑣 𝑇, ℎ = 𝑐𝑝 𝑇 (6)
𝑐𝑣 and 𝑐𝑝 are specific heat capacities at constant volume and constant pressure respectively.

CFD 1–6 David Apsley


Examples

The following simple examples develop the control-volume notation to be used in the rest of
the course.

Q1.
Water (density 1000 kg m–3) flows at 2 m s–1 45
o

10 cm
2 m/s
through a circular pipe of diameter 10 cm. What S1 S2
is the mass flux C across the surfaces 𝑆1 and 𝑆2 ?

D = 10 cm Q2.
A water jet strikes normal to a fixed plate as shown.
F Compute the force 𝐹 required to hold the plate fixed.
u = 8 m/s

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 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.)

Q4.
A burst pipe at a factory causes a chemical to seep into a river at a rate of 2.5 kg hr–1. The river
is 5 m wide, 2 m deep and flows at 0.3 m s–1. What is the average concentration of the chemical
(in kg m–3) downstream of the spill?

CFD 1–7 David Apsley

Common questions

Powered by AI

Piezometric pressure, defined as the sum of gauge pressure and the hydrostatic component (1 p + ρgz2), is used in fluid dynamics to eliminate gravitational forces from equations for constant-density flows without a free surface. This simplification allows engineers to focus on the variances in pressure and velocity without accounting directly for gravitational effects, streamlining calculations in problems such as pipe flow, where vertical acceleration is much smaller than the gravitational force .

The finite-volume method is preferred in fluid dynamics for several reasons: it strictly enforces conservation laws, offering flexibility with geometries and various fluid phenomena, and results are directly related to physical quantities like mass flux. This method excels when managing complex flow domains with varying geometries or in simulations requiring strict adherence to conservation principles, such as in incompressible, viscous flows often found in mechanical and civil engineering applications .

The finite-volume method is well-suited for simulating viscous, incompressible flows due to its flexibility in handling complex geometries and its rigorous conservation of physical quantities like mass, momentum, and energy. Its approach involves dividing the domain into control volumes and applying the conservation laws at a macroscopic level across these volumes, which directly aligns with the physical interpretation of incompressible flow scenarios found in mechanical and civil engineering tasks, such as wind loading on structures or fluid behavior in hydraulic systems .

Differentiating between advection and diffusion is crucial in fluid dynamics and CFD simulations because they represent fundamentally different transport mechanisms. Advection describes transport via bulk fluid movement, capturing the directional flow of quantities like mass or energy. Diffusion involves transport due to random molecular motion or turbulence, which spreads quantities across concentration gradients. Accurately modeling each process is essential for predicting flow behavior and ensuring the physical realism of simulations, particularly in scenarios where mixing and dispersion are significant, such as pollutant dispersal .

The computational mesh plays a crucial role in CFD by decomposing the flow domain into smaller control volumes or cells, where field variables are approximated at discrete points or nodes. The quality and density of the mesh can significantly impact the accuracy and convergence of the simulation results. A finer mesh leads to higher resolution and potentially more accurate results, capturing detailed flow features, but increases computational cost and time. Conversely, a coarser mesh reduces computational demands but may result in loss of detail and inaccuracies, particularly in regions with complex geometries or steep gradients .

Integral control-volume equations, representing conservation principles, are foundational to solving CFD problems. They describe how mass, momentum, and energy change within a control volume by equating flow rates with source terms, ensuring that calculated quantities align with physical laws across the domain. By using these principles, CFD effectively manages complex, multidimensional flow fields, providing accurate, stable solutions. Their adaptability to varying control volumes makes them indispensable in handling diverse geometries and flow conditions encountered in practical applications .

The essential conservation equations in fluid dynamics are the conservation of mass, momentum, and energy. These can be expressed in rate form or as either integral (control-volume) equations or differential equations. In incompressible, viscous flows typical of mechanical engineering, these equations may focus on momentum and mass, whereas high-speed aerodynamics problems involving compressibility use differential equations derived from these conservation principles. Fluid dynamics problems may apply these equations differently: mass conservation ensures mass in cells is conserved; momentum equations take forces and velocities into account, and energy conservation relates to heat and work interactions .

The key steps in conducting a CFD simulation include pre-processing, solving, and post-processing. Pre-processing involves problem formulation, defining geometry, setting equations, and establishing boundary conditions, which prepare the computational mesh or grid by dividing the domain into control volumes. Solving includes discretising the governing equations using methods like finite-volume, turning them into algebraic equations, which are then solved numerically to find the nodal values. Post-processing entails analyzing results by computing derived quantities such as forces and flow rates and visualizing data through graphs and plots to interpret the flow behavior .

The equation of state for an ideal gas, typically expressed as p = ρRT, simplifies the analysis of compressible fluid flows by directly relating pressure, density, and temperature. It allows for the reduction of variables in modeling as changes in one property can predict others, facilitating numerical solutions. This relationship aids in understanding flow dynamics in compressible scenarios, such as high-speed aerodynamics, where temperature changes significantly impact flow properties .

The finite-difference method discretizes differential equations directly, approximating derivatives with differences between values at grid points. For example, a derivative like ∂u/∂x is estimated by the difference quotient of values at adjacent points. Conversely, the finite-volume method discretizes integral equations over control volumes, ensuring the conservation of physical quantities by calculating net outflows through surfaces of the control volume, making it more suitable for fluid dynamics as it remains directly relatable to physical quantities such as mass flux .

You might also like