CFD Lecture1
CFD Lecture1
CFD Lecture1
Fluid (gas and liquid) flows are governed by partial differential equations which
represent conservation laws for the mass, momentum, and energy.
Computational Fluid Dynamics (CFD) is the art of replacing such PDE systems
by a set of algebraic equations which can be solved using digital computers.
http://www.mathematik.uni-dortmund.de/kuzmin/cfdintro/cfd.html
What is CFD?
Computational Fluid Dynamics (CFD) provides a qualitative (and
sometimes even quantitative) prediction of fluid flows by means of
mathematical modeling (partial differential equations)
numerical methods (discretization and solution techniques)
software tools (solvers, pre- and postprocessing utilities)
CFD enables scientists and engineers to perform numerical experiments
(i.e. computer simulations) in a virtual flow laboratory
real experiment
CFD simulation
CFD simulations by L
ohner et al.
Simulations
expensive
slow
sequential
single-purpose
Simulations
cheap(er)
fast(er)
parallel
multiple-purpose
Fluid characteristics
Macroscopic properties
density
viscous
inviscid
viscosity
compressible
incompressible
pressure
steady
unsteady
temperature
laminar
turbulent
velocity
single-phase
multiphase
Problem statement
2.
Mathematical model
IBVP = PDE + IC + BC
3.
Mesh generation
4.
Space discretization
5.
Time discretization
algebraic system Ax = b
6.
Iterative solver
7.
CFD software
implementation, debugging
8.
Simulation run
9.
Postprocessing
Verification
10.
Problem statement
What is known about the flow problem to be dealt with?
What physical phenomena need to be taken into account?
What is the geometry of the domain and operating conditions?
Are there any internal obstacles or free surfaces/interfaces?
What is the type of flow (laminar/turbulent, steady/unsteady)?
What is the objective of the CFD analysis to be performed?
computation of integral quantities (lift, drag, yield)
snapshots of field data for velocities, concentrations etc.
shape optimization aimed at an improved performance
What is the easiest/cheapest/fastest way to achieve the goal?
Mathematical model
1. Choose a suitable flow model (viewpoint) and reference frame.
2. Identify the forces which cause and influence the fluid motion.
3. Define the computational domain in which to solve the problem.
4. Formulate conservation laws for the mass, momentum, and energy.
5. Simplify the governing equations to reduce the computational effort:
use available information about the prevailing flow regime
check for symmetries and predominant flow directions (1D/2D)
neglect the terms which have little or no influence on the results
model the effect of small-scale fluctuations that cannot be captured
incorporate a priori knowledge (measurement data, CFD results)
6. Add constituitive relations and specify initial/boundary conditions.
Discretization process
The PDE system is transformed into a set of algebraic equations
1. Mesh generation (decomposition into cells/elements)
structured or unstructured, triangular or quadrilateral?
CAD tools + grid generators (Delaunay, advancing front)
mesh size, adaptive refinement in interesting flow regions
2. Space discretization (approximation of spatial derivatives)
finite differences/volumes/elements
high- vs. low-order approximations
3. Time discretization (approximation of temporal derivatives)
explicit vs. implicit schemes, stability constraints
local time-stepping, adaptive time step control
CFD simulations
The computing times for a flow simulation depend on
the choice of numerical algorithms and data structures
linear algebra tools, stopping criteria for iterative solvers
discretization parameters (mesh quality, mesh size, time step)
cost per time step and convergence rates for outer iterations
programming language (most CFD codes are written in Fortran)
many other things (hardware, vectorization, parallelization etc.)
The quality of simulation results depends on
the mathematical model and underlying assumptions
approximation type, stability of the numerical scheme
mesh, time step, error indicators, stopping criteria . . .
Classification of errors
Acknowledged errors
Physical modeling error due to uncertainty and deliberate simplifications
Discretization error approximation of PDEs by algebraic equations
spatial discretization error due to a finite grid resolution
temporal discretization error due to a finite time step size
Iterative convergence error which depends on the stopping criteria
Round-off errors due to the finite precision of computer arithmetic
Unacknowledged errors
Computer programming error: bugs in coding and logical mistakes
Usage error: wrong parameter values, models or boundary conditions
Awareness of these error sources and an ability to control or preclude the
error are important prerequisites for developing and using CFD software
http://www.ansys.com
commercial
FLUENT
http://www.fluent.com
commercial
STAR-CD
http://www.cd-adapco.com
commercial
FEMLAB
http://www.comsol.com
commercial
FEATFLOW
http://www.featflow.de
open-source
As of now, CFD software is not yet at the level where it can be blindly used by
designers or analysts without a basic knowledge of the underlying numerics.
Experience with numerical solution of simple toy problems makes it easier to
analyze strange looking simulation results and identify the source of troubles.
New mathematical models (e.g., population balance equations for disperse
systems) require modification of existing / development of new CFD tools.
Literature
1. CFD-Wiki
http://www.cfd-online.com/Wiki/Main Page