Sunteți pe pagina 1din 29

CFD Processing & Its steps

Presented By: Dr. Ali M. A. Seory.


Mechanical Eng. Dept.
Fluid Mechanics Section
University of Khartoum.

CFD LAB
Computational
Fluid
Dynamics
2
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 used or programmed (solvers, pre- and post-
processing utilities)
CFD enables scientists and engineers to perform ‘numerical
experiments’ (i.e. computer simulations) in a ‘virtual flow laboratory’

CFD LAB
Computational Fluid Dynamics
Examples of CFD applications 3

Game !!!!
Please distinct between real experiment and CFD Simulation.

CFD Simulation

Real experiment

CFD LAB
Computational Fluid Dynamics
Examples of CFD applications 4

CFD LAB
Computational Fluid Dynamics
Examples of CFD applications 5

Smoke plume from an oil fire in Baghdad

CFD LAB
Computational Fluid Dynamics
Examples of CFD applications 6

CFD LAB
Computational Fluid Dynamics
Experiments vs. Simulations 7

ƒ CFD gives an Experiments Simulations Simulations


insight into flow
Quantitative description of Quantitative prediction of
patterns that are flow phenomena using flow phenomena using
difficult, expensive measurements CFD software
or impossible to for one quantity at a time for all desired quantities
study using at a limited number of with high resolution in
traditional points and time instants space and time
(experimental) for a laboratory-scale
for the actual flow domain
techniques model
for a limited range of for virtually any problem
problems and operating and realistic operating
conditions conditions

Error sources: Error sources: modeling,


measurement errors, flow discretization, iteration,
disturbances by the probes implementation

CFD LAB
Computational Fluid Dynamics
Experiments vs. Simulations 8

ƒ As a rule, CFD does not replace the measurements completely but the
amount of experimentation and the overall cost can be significantly
reduced.
Experiments Simulations
expensive cheap(er)
slow fast(er)
sequential parallel
single-purpose multiple-purpose
Equipment and personnel CFD software is portable,
are difficult to transport easy to use and modify

ƒ The results of a CFD simulation are never 100% reliable because


• the input data may involve too much guessing or imprecision
• the mathematical model of the problem at hand may be inadequate
• the accuracy of the results is limited by the available computing power
CFD LAB
Computational Fluid Dynamics
Fluid characteristics & CFD 9

ƒ The reliability of CFD simulations is greater :


• for laminar/slow flows than for turbulent/fast ones
• for single-phase flows than for multi-phase flows
• for chemically inert systems than for reactive flows

CFD LAB
Computational Fluid Dynamics
How does CFD make predictions? 10

ƒ CFD uses a computer to solve the mathematical equations for the problem at
hand. The main components of a CFD design cycle are as follows:
¾ the human being (analyst) who states the problem to be solved
¾ scientific knowledge (models, methods) expressed mathematically
¾ the computer code (software) which embodies this knowledge and
provides detailed instructions (algorithms)
¾ the computer hardware which performs the actual calculations
¾ the human being who inspects and interprets the simulation results

ƒ CFD is a highly interdisciplinary research area which lies at the interface of


physics, applied mathematics, and computer science

CFD LAB
Computational Fluid Dynamics
Equations of Motion 11

ƒ For steady laminar flow of a viscous, incompressible, Newtonian


fluid without free-surface effects, the equations of motion are the
continuity equation (conservation equation)

ƒ V is the velocity of the fluid

Equation (1)

CFD LAB
Computational Fluid Dynamics
Equations of Motion … cont…. 12

ƒ The Navier–Stokes equation is


( a transport equation) that
represents transport of linear
momentum throughout the
computational domain

ƒ Assumption: that both ρ and ν


(ν = μ/ρ).are constants.
for 3-D flow, there are four
coupled differential equations
for four unknowns, u, v, w, and
P
ƒ for compressible flow, Eqs.1
and 2 would need to be Equation (2)
modified appropriately CFD LAB
Computational Fluid Dynamics
Solution Procedure 13

ƒ The following steps are performed to solve Eqs. 1 & 2


numerically. (order of some of the steps is interchangeable “steps
2 through 5”)
¾ Step 1: Chose the computational domain
¾ Step 2: Specify the Boundary conditions
¾ Step 3: Specify the type of fluid
¾ Step 4: Select the numerical parameters and the solution
algorithms
¾ Step 5: Specify the initial conditions,
¾ Step 6: Begin the solution,
¾ Step 7: post-process the obtained results
¾ Step 8: Calculate the Global properties
CFD LAB
Computational Fluid Dynamics
Solution Procedure - Step 1 - Chose the computational domain 14

ƒ grid (also called a mesh) is generated;


ƒ the domain is divided into many small elements called cells.
ƒ For (2-D), the cells are areas. For (3-D), the cells are volumes
ƒ Each cell is a tiny control volume in which discretized versions of
the conservation equations are solved.
ƒ The quality of a CFD solution is highly dependent on the quality
of the grid.

CFD LAB
Computational Fluid Dynamics
Solution Procedure - Step 1 - Chose the computational domain – cont…. 15

ƒ Cell types
¾ Hex/Quad (Structured)
ƒ Less susceptible to numeric error
ƒ Easy to control – better mesh
quality
¾ Tet (Unstructured)
ƒ Easy to implement
ƒ Easy to refine locally
¾ Choice is a trade-off
ƒ Set-up time
ƒ Computational expense
ƒ Numerical diffusion
CFD LAB
Computational Fluid Dynamics
Solution Procedure - Step 1 - Chose the computational domain – cont…. 16

ƒ Modern commercial CFD codes come with their own grid


generators or a third party grid generation programs are
available.
ƒ Grids are either structured or unstructured
32 cells 76 cells 38 cells

structured Unstructured triangular and quadrilateral

ƒ fewer cells are usually generated with a structured grid than with
an unstructured grid.

CFD LAB
Computational Fluid Dynamics
Solution Procedure - Step 1 - Chose the comp… – cont…. 17

ƒ Regardless the type of grid chosen (structured or not, quad. or triangular, etc.), it is the
quality of the grid that is most critical for reliable CFD solutions.
ƒ For 2-D cells is equiangle skewness, defined as
⎛ θ max − θequal θequal − θ min ⎞
Q EAS = MAX ⎜ , ⎟⎟
⎜ 180 − θequal θequal
⎝ ⎠

ƒ The expansion ratio at these cells is ΔxA/ΔxB. (under 1.2 will not pose problems for the
solution)
ƒ The aspect ratio at cell A is ΔxA/ΔyA. (values of 2-3 should not be a problem if the flow
direction is parallel to the longest side of the cell)
ƒ These last ratios should not be too great, in order to avoid convergence problems and
inaccuracies.

CFD LAB
Computational Fluid Dynamics
Solution Procedure - Step 1 - Chose the comp… – cont…. 18

ƒ Example :
ƒ An example is shown in Fig. for the case of a computational domain with a small acute
angle at the upper-right corner.
ƒ For this example we have adjusted the node distribution so that the grid in any case
contains between 60 and 70 cells for direct comparison.

Type No. of Cells (QEAS)max


(a) Structured 64 0.83
(b) unstructured 70 0.76
(c) unstructured 67 0.87
(d) hybrid 62 0.76

ƒ To avoid large values of (QEAS)max at a sharp corner is


to round off the sharp corner (no any effect on the flow).
Use of multi blocking (fig b), (QEAS)max =0.53 & 62 cells.

CFD LAB
Computational Fluid Dynamics
Solution Procedure - Step 1 - Chose the comp… – cont…. 19

ƒ Grid Adaption:
ƒ Grid adaption adds more cells where needed to resolve the flow field without pre-
processor.

initial grid contours of


pressure
initial grid

final grid
contours of
pressure final
grid

2D Planar Shell : Adapt grid in regions of high pressure


gradient to better resolve pressure jump across the shock.
CFD LAB
Computational Fluid Dynamics
Solution Procedure - Step 1 - Chose the comp… – cont…. 20

ƒ Guidelines :
¾ Grid lines should be aligned with the streamlines of the flow
ƒ In complex geometries flow pattern is not obvious

¾ The change of the gradients should be resolved


¾ Wall functions for turbulence models have restrictions for
placement of nodes near the wall
ƒ Flow dependent and not geometry dependent so may take some iterations

¾ Generally the more cells the more accurate solution


ƒ However, more cells require more time

¾ Low quality cells yields a less accurate solution


ƒ Really low quality grids will not converge into a solutions

CFD LAB
Computational Fluid Dynamics
Solution Procedure - Step 1 - Chose the comp… – cont…. 21

ƒ Examples :

CFD LAB
Computational Fluid Dynamics
Solution Procedure - Step 2: Specify the Boundary conditions 22

ƒ The type of flow that is modeled is determined by the imposed boundary


conditions.
ƒ Appropriate boundary conditions are required in order to obtain an accurate
CFD solution.
ƒ For 2-D, B. C’s are applied on edges or lines of computational domain
ƒ For 3-D, B. C’s are applied on faces or planes of computational domain
ƒ There are several types of boundary conditions available:
ƒ Wall Boundary Conditions
ƒ Inflow/Outflow Boundary Conditions
ƒ Miscellaneous Boundary Conditions
ƒ Internal Boundary Conditions
ƒ

CFD LAB
Computational Fluid Dynamics
Solution Procedure - Step 2: Specify the Boundary conditions …. Cont…. 23

ƒ Wall Boundary Conditions


¾ It is the simplest boundary condition since fluid cannot pass through a
wall, the normal component of velocity is set to zero relative to the wall
along a face on which the wall boundary condition is prescribed.
¾ Also for the no-slip condition, the tangential component of velocity at a
stationary wall is set to zero.
¾ If the energy equation is being solved, either wall temperature or wall
heat flux must also be specified (but not both).
¾ If a turbulence model is being used, turbulence transport equations are
solved, and wall roughness may need to be specified (fortunately the
default options of most modern CFD codes are sufficient for many
applications involving turbulent flow) (see Wilcox, 1998),

CFD LAB
Computational Fluid Dynamics
Solution Procedure - Step 2: Specify the Boundary conditions …. Cont…. 24

ƒ Wall Boundary Conditions …. Cont….


¾ Moving walls and walls with specified shear stresses can also be
simulated in many CFD codes.
¾ There are situations where we desire to let the fluid slip along the wall
(we call this an “inviscid wall”) ex: free surface of a swimming pool or hot
tub.
ƒ Inflow/Outflow Boundary Conditions
¾ Several options at the boundaries through which fluid enters the
computational domain (inflow) or leaves the domain (outflow).
¾ They are generally categorized as either velocity-specified conditions or
pressure specified conditions.
¾ At a velocity inlet, we specify the velocity of the incoming flow along the
inlet face.
¾ If energy and/or turbulence equations are being solved, the temperature
and/or turbulence properties of the incoming flow need to be specified as
well. CFD LAB
Computational Fluid Dynamics
Solution Procedure - Step 2: Specify the Boundary conditions …. Cont…. 25

ƒ Inflow/Outflow Boundary Conditions …. Cont….


¾ At a pressure inlet: the total pressure along the inlet face (ex. flow
coming into the computational domain from a pressurized tank of known
pressure or from the far field where the ambient pressure is known).
¾ At a pressure outlet, fluid flows out of the computational domain. The
static pressure along the outlet face; in many cases this is atmospheric
pressure (zero gage pressure). ex. the pressure is atmospheric at the
outlet of a subsonic exhaust pipe open to ambient air
¾ reverse flow across the outlet. It is usually an indication that the
computational domain is not large enough. If reverse flow warnings
persist as the CFD solution iterates, the computational domain should be
extended.

CFD LAB
Computational Fluid Dynamics
Solution Procedure - Step 2: Specify the Boundary conditions …. Cont…. 26

ƒ Miscellaneous Boundary Conditions


¾ Some boundaries of a computational domain are neither walls nor inlets
or outlets, but rather enforce some kind of symmetry or periodicity.
¾ the periodic boundary condition is useful when the geometry involves
repetition.
¾ The symmetry boundary condition forces flow field variables to be mirror
imaged across a symmetry plane. Mathematically, gradients of most flow
field variables in the direction normal to the symmetry plane are set to
zero across the plane of symmetry.
symmetry

periodic

CFD LAB
Computational Fluid Dynamics
Solution Procedure - Step 2: Specify the Boundary conditions …. Cont…. 27

ƒ Internal Boundary Conditions


¾ It is imposed on faces or edges that do not define a boundary of the
computational domain, but rather exist inside the domain.
¾ This boundary condition is necessary for situations in which the
computational domain is divided into separate blocks or zones.
¾ This boundary condition is be useful for post-processing as well, since a
predefined face is present in the flow field, on whose surface one can plot
velocity vectors, pressure contours, etc.

CFD LAB
Computational Fluid Dynamics
Solution Procedure - Step 3: Specify the Fluid type 28

ƒ The type of fluid (water, air, gasoline, etc.) is specified, along with fluid
properties (temperature, density, viscosity, etc.).
ƒ Many CFD codes have built-in property databases for common fluids, making
this step relatively painless.

CFD LAB
Computational Fluid Dynamics
29

Continue Next Lecture

CFD LAB
Computational Fluid Dynamics

S-ar putea să vă placă și