CFD Fundamentals and Applications
Metin Ozen, Ph.D., CFD Research Corporation Ashok Das, Ph.D., Applied Materials Kim Parnell, Ph.D., Parnell Engineering and Consulting
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
1
AGENDA n n n n n n n n n
9:00-9:05 Introductions by Scott Burr 9:05-10:30 CFD Fundamentals by Metin Ozen 10:30-10:45 Break 10:45-12:00 Applications in Semiconductor Industry by Ashok Das 12:00-1:00 LUNCH 1:00-2:15 Applications in Biomedical Industry by Kim Parnell 2:15-2:30 Break 2:30:3:45 CFD Applications by Metin Ozen 3:45-4:00 Q&A
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
2
Some CFD Books n
Computational Fluid Dynamics: The Basics with Applications John David Anderson
n
Computational Methods for Fluid Dynamics Joel H. Ferziger
n
Turbulence Modeling for CFD David C. Wilcox
n
http://www.sali.freeservers.com/engineering/cfd/cfd_books.html
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
3
Definitions of CFD on the WEB n n
n
n
Computational Fluid Dynamics (CFD); the simulation or prediction of fluid flow using computers Computer modeling of fluid behaviour, for example the flow of fuel/air mixture into a combustion chamber. Computational Fluid Dynamics refers to computational solutions of differential equations, such as the Navier Stokes set, describing fluid motion. …
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
4
What is CFD?1 n
CFD has grown from a mathematical curiosity to become an essential tool in almost every branch of fluid dynamics, from aerospace propulsion to weather prediction. CFD is commonly accepted as referring to the broad topic encompassing the numerical solution, by computational methods, of the governing equations which describe fluid flow, the set of the Navier-Stokes equations, continuity and any additional conservation equations, for example energy or species concentrations.
1 - http://www.cranfield.ac.uk/sme/cfd/
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
5
CFD RESEARCH CORPORATION - Major Application Areas of CFD
Semiconductor Equipment & Processes
Biochips BioMedical MEMS
Combustion Propulsion
Microelectronics Photonics
Environmental CBW Protection
Fuel Cells Power Conversion
Aerodynamics Aerostructures
ASME-SCVS Professional Development Series
Plasmas Non-Equilibrium Thermal CFD Fundamentals & Applications
6
What is CFD? n
As a developing science, Computational Fluid Dynamics has received extensive attention throughout the international community since the advent of the digital computer. The attraction of the subject is twofold. Firstly, the desire to be able to model physical fluid phenomena that cannot be easily simulated or measured with a physical experiment, for example weather systems or hypersonic aerospace vehicles. Secondly, the desire to be able to investigate physical fluid systems more cost effectively and more rapidly than with experimental procedures.
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
7
What is CFD? n
There has been considerable growth in the development and application of Computational Fluid Dynamics to all aspects of fluid dynamics. In design and development, CFD programs are now considered to be standard numerical tools, widely utilised within industry. As a consequence there is a considerable demand for specialists in the subject, to apply and develop CFD methods throughout engineering companies and research organisations.
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
8
Commercial CFD Codes - 1 n n n n n n n n n n n n n n n n n n n n n n
ACRi ARSoftware (TEP: a combustion analysis tool for windows) COSMIC NASA Fluent Inc. (FLUENT, FIDAP, POLYFLOW, GAMBIT, TGrid, Icepak, Airpak, MixSim) Flowtech Int. AB (SHIPFLOW: analysis of flow around ships) Fluid Dynamics International, Inc. (FIDAP) ANSYS-CFX (CFX: 3D fluid flow/heat transfer code) ICEM CFD (ICEM CFD, Icepak) KIVA (reactive flows) CFD Research Corporation (ACE: reactive flows) Computational Dynamics Ltd. (STAR-CD) Analytical Methods, Inc. (VSAERO, USAERO, OMNI3D, INCA) AeroSoft, Inc. (GASP and GUST) Ithaca Combustion Enterprises (PDF2DS) Flow Science, Inc. (FLOW3D) ALGOR, Inc. (ALGOR) Engineering Mechanics Research Corp. (NISA) Reaction Engineering International (BANFF/GLACIER) Combustion Dynamics Ltd. (SuperSTATE) AVL List Gmbh. (FIRE) IBM Corp. catalogue (30 positions) Sun Microsystems catalogue (70 positions)
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
9
Commercial CFD Codes – 2 n n n n n n n n n n n n n n n n n n n n n n
Cray Research catalogue (100 positions) Silicon Graphics, Inc. catalogue (75 positions) Pointwise, Inc. (Gridgen - structured grids) Simulog (N3S Finite Element code, MUSCL) Directory of CFD codes on IBM supercomputer environment ANSYS, Inc. (FLOTRAN) Flomercis Inc. (FLOTHERM) Computational Mechanics Corporation Computational Mechanics Company, Inc. (COMCO) KASIMIR (shock tube simulation program) Livermore Software Technology Corporation (LS-DYNA3D) Advanced Combustion Eng. Research Center (PCGC, FBED) NUMECA International s.a. (FINE, FINE/Turbo, FINE/Aero, IGG, IGG/Autogrid) Computational Engineering International., Inc. (EnSight, ...) Blocon Software Agency (HEAT2, HEAT3) Adaptive Research Corp. (CFD2000) Unicom Technology Systems (VORSTAB-PC) Incinerator Consultants Incorporated (ICI) PHOENICS/CHAM (multi-phase flow, N-S, combustion) Innovative Aerodynamic Technologies (LAMDA) XYZ Scientific Applications, Inc. (TrueGrid) South Bay Simulations, Inc. (SPLASH)
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
10
Commercial CFD Codes - 3 n n n n n n n n n n n n n n n n n n n n n n
PHASES Engineering Solutions Engineering Sciences, Inc. (UNIC) Catalpa Research, Inc. (TIGER) Swansea NS codes (LAM2D, TURB) Engineering Systems International S.A. (PAM-FLOW, PAM-FLUID) Daat Research Corp. (COOLIT) Flomerics Inc. (FLOVENT) Innovative Research, Inc. Centric Engineering Systems, Inc. (SPECTRUM) Blue Ridge Numerics, Inc. WinPipeD Exa Corporation (PowerFLOW) Polyflow s.a. Flow Pro Computational Aerodynamics Systems Co. Tahoe Design Software ADINA-F YFLOW PSW Advanced Visual Systems Flo++ KSNIS
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
11
Commercial CFD Codes - 4 n n n n n n n n n n n n n n n n n n n n n n
Flowcode Concert SMARTFIRE VISCOUS Polydynamics Cullimore and Ring Technologies, Inc. (SINDA/FLUINT, SINAPS) Linflow (ANKER - ZEMER ENGINEERING) PFDReaction Airfoil Analysis Institute of Computational Continuum Mechanics GmbH CFD++ RADIOSS-CFD VECTIS MAYA Simulation Compass Arena Flow Newmerical Technologies International CFDpc NIKA EFDLab SC/Tetra TES International ACUITIV
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
12
Computational Fluid Dynamics2 n
Computational Fluid Dynamics is concerned with obtaining numerical solution to fluid flow problems by using computers. The advent of high-speed and large-memory computers has enabled CFD to obtain solutions to many flow problems including those that are compressible or incompressible, laminar or turbulent, chemically reacting or non-reacting.
2 - http://www.sali.freeservers.com/engineering/cfd/#gotop
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
13
Computational Fluid Dynamics n
The equations governing the fluid flow problem are the continuity (conservation of mass), the NavierStokes (conservation of momentum), and the energy equations. These equations form a system of coupled non-linear partial differential equations (PDEs). Because of the non-linear terms in these PDEs, analytical methods can yield very few solutions.
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
14
Governing (Navier-Stokes) Equations (in Cartesian Tensor form) n
Continuity - Conservation of mass ??/?t + ?(?ui)/?xi = 0
n
Navier-Stokes - Conservation of Momentum ?(?vi)/?t + ?(?vivj)/?xj = ?Bi - ?p/?xi - ?/?x i [2/3µ(?vj/?x j)] + ?/?xj [µ(?vi/?x j + ?vj/?xi)]
(For compressible and viscous flows)
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
15
Computational Fluid Dynamics n
In general, closed form analytical solutions are possible only if these PDEs can be made linear, either because non-linear terms naturally drop out (eg., fully developed flows in ducts and flows that are inviscid and irrotational everywhere) or because nonlinear terms are small compared to other terms so that they can be neglected (eg., creeping flows, small amplitude sloshing of liquid etc.). If the non-linearities in the governing PDEs cannot be neglected, which is the situation for most engineering flows, then numerical methods are needed to obtain solutions.
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
16
Governing (Navier-Stokes) Equations n
Continuity - Conservation of mass ??/?t + ?(?u)/?x + ?(?v)/?y + ?(?w)/?z = 0
(For compressible and viscous flows)
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
17
Governing (Navier-Stokes) Equations n
Conservation of Momentum ?[?u/?t + u?u/?x + v?u/?y + w?u/?z] = ?Bx - ?p/?x (2/3)?/?x[µ(?u/?x+?v/?y + ?w/?z)] + 2?/?x(µ?u/?x) + ?/?y[µ(?u/?y + ?v/?x)]+?/?z[µ(?u/?z+?w/?x)] ?[?v/?t + u?v/?x + v?v/?y + w?v/?z] = ?By - ?p/?y (2/3)?/?y[µ(?u/?x+?v/?y + ?w/?z)] + 2?/?y(µ?v/?y) + ?/?z[µ(?v/?z + ?w/?y)]+?/?x[µ(?v/?x+?u/?y)] ?[?w/?t + u?w/?x + v?w/?y + w?w/?z] = ?Bz - ?p/?z (2/3)?/?z[µ(?u/?x+?v/?y + ?w/?z)] + 2?/?z(µ?w/?z) + ?/?x[µ(?w/?x + ?u/?z)] + ?/?y[µ(?w/?y + ?v/?z)]
(For compressible and viscous flows)
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
18
Computational Fluid Dynamics n
CFD is the art of replacing the differential equation governing the Fluid Flow, with a set of algebraic equations (the process is called discretization), which in turn can be solved with the aid of a digital computer to get an approximate solution. The well known discretization methods used in CFD are Finite Difference Method (FDM), Finite Volume Method (FVM), Finite Element Method (FEM), and Boundary Element Method (BEM).
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
19
CFD – SOLUTION METHODS n
FDM – Resistance Network
n
FEM – [K] {u} = {F}
n
FVM – [A] {Φ} = {Q}
n
BEM – [B] {d} = {P}
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
20
Computational Fluid Dynamics2 n
Computational Fluid Dynamics (CFD) provides a good example of the many areas that a scientific computing project can touch on, and its relationship to Computer Science. Fluid flows are modeled by a set of partial differential equations, the Navier-Stokes equations. Except for special cases no closed-form solutions exist to the Navier-Stokes equations.
2 - http://www.sali.freeservers.com/engineering/cfd/#gotop
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
21
CFD - DISCRETIZATION n
n
Solving a particular problem generally involves first discretizing the physical domain that the flow occurs in, such as the interior of turbine engine or the radiator system of a car. This discretization is straightforward for very simple geometries such as rectangles or circles, but is a difficult problem in CAD for more complicated objects. This issue necessitates automatic mesh generation.
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
22
CFD – PROBLEM SIZE n
On the discretized mesh the Navier-Stokes equations take the form of a large system of nonlinear equations; going from the continuum to the discrete set of equations is a problem that combines both physics and numerical analysis; for example, it is important to maintain conservation of mass in the discrete equations. At each node in the mesh, between 3 and 20 variables are associated: the pressure, the three velocity components, density, temperature, etc. Furthermore, capturing physically important phenomena such as turbulence requires extremely fine meshes in parts of the physical domain. Currently meshes with 20 000 to 2 000 000 nodes are common, leading to systems with up to 40 000 000 unknowns.
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
23
CFD - SOLVERS n
n
n
n n
That system of nonlinear equations is typically solved by a Newton-like method, which in turn requires solving a large, sparse system of equations on each step. Methods for solving large sparse systems of equations are a hot topic right now, since that is often the most time-consuming part of the program, and because the ability to solve them is the limiting factor in the size of problem and complexity of the physics that can be handled Direct methods, which factor the matrices, require more computer storage than is permissible for all but the smallest problems. Iterative methods use less storage but suffer from a lack of robustness: they often fail to converge. The solution is to use preconditioning; that is, to premultiply the linear system by some matrix that makes it easier for the iterative method to converge.
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
24
CFD – PARALLEL PROCESSING n
CFD problems are at the limits of computational power, so parallel programming methods are used. That brings in the research problem of how to partition the data to assign parts of it to different processors; usually domain decomposition methods are applied. Domain decomposition is often expressed as a graph partitioning problem, namely finding a minimum edge cut partitioning of the discrete mesh, with roughly the same number of nodes in each partition set.
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
25
CFD – VISUALIZATION n
Once the solution is found, analyzing, validating, and presenting it calls into play visualization and graphics techniques. Those techniques are useful for more than just viewing the computed flow field. Visualization can help with understanding the nature of the problem, the interaction of algorithms with the computer architecture, performance analysis of the code, and, most importantly, debugging!
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
26
TYPICAL PROCEDURE n
CONCEPT/DESIGN
n
GEOMETRY
n
DISCRETIZATION/MESHING
n
ENVIRONMENT – VOLUME CONDITIONS – BOUNDARY CONDITIONS – INITIAL CONDITIONS
n
SOLUTION
n
VISUALIZATION
n
(OPTIMIZATION)
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
27
CFD – PROBLEM SIZE3 n
In CFD, the flow region or calculation domain is divided into a large number of finite volumes or cells. The governing partial differential equations are discretized using a wide range of techniques: finite difference, finite volume or finite element. This provides a set of algebraic equations (corresponding to the respective partial differential equations) for each dependent variable in each cell volume or cell. A two dimensional isothermal incompressible flow is governed by three equations, namely, the continuity equation (conservation of mass), and two momentum equations (Newton's Second Law), one for each coordinate. For example consider the flow between the two parallel plates shown in the figure.
3 - http://www.cfdnet.com
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
28
CFD – PROBLEM SIZE3 n
For example consider the flow between the two parallel plates shown in the figure.
n
If the calculation domain is divided into 100 rectangular cells, then there will be 100 algebraic equations for each velocity component and 100 equations for the pressure, giving a total of 300 simultaneous algebraic equations.
3 - http://www.cfdnet.com
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
29
CFD – PROBLEM SIZE3 n
These are gathered into matrices which are solved by an iterative procedure. Once the solution is obtained we have the values of the dependent variables (two velocities and pressure) at each one of the cells. Thus, the numerical solution gives the values of the dependent variables at discrete locations, and intermediate values have to be obtained by interpolation. Thus, the finer the grid the better the solution, however, the computational effort (CPU and memory) increases proportionaly.
3 - http://www.cfdnet.com
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
30
CFD – FLUID PROPERTIES n
Fluid is defined as a substance that cannot resist stress by static deformation.
n
Both gases and liquids are fluids.
n
Density : defined as the mass of a small fluid element divided by its volume (units in kg/m3)
mass ρ= volume ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
31
CFD – FLUID PROPERTIES n
Viscosity: is defined in terms of the force needed to pull a flat plate at constant speed across a layer of fluid (Units in N.s/m 2 or Poise) F v
Layer of fluid
Shear strain
du τ =µ dy
Shear stress
n
Kinematic viscosity is defined as
µ ν = ρ ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
32
CFD – NEWTONIAN/NON-NEWTONIAN •Newtonian Fluid Fluids for which the shear stress-shear rate relation is a straight line passing through the origin.
•Common Newtonian Fluids Water and air
•Non-Newtonian Fluid Fluids that have a viscosity which may be a function of not only the fluid velocity, but also the velocity gradient
•Common Non-Newtonian Fluids Blood and alcohol
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
33
CFD – EFFECT OF VISCOSITY n
Viscosity is a kind of internal friction.
n
Viscosity prevents neighboring layers of fluid from sliding freely past one another.
n
Fluid in contact with the wall is stationary (no-slip condition).
Velocity of fluid varies from zero to a maximum along the axis
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
34
CFD – REYNOLDS NUMBER n
Reynolds number is a dimensionless number.
n
Reynolds number is the ratio of the inertial to viscous forces. It is defined as:
ρvL Re = µ
n
Flow is characterized as LAMINAR or TURBULENT based on the Reynolds number (>2100 turbulent)
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
35
CFD – LAMINAR/TURBULENT
Re=1.54
Re=105 Re=9.6
Re=13 Re=150 ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
36
CFD – LAW OF CONTINUITY Mass Conservation: the rate of change of the conserved quantity within a control volume minus the rate at which the conserved quantity leaves the control volume
A2V2 A1V1
d < ρ > Adz =< ρV >1 A1 − < ρV > 2 A2 ∫ dt ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
37
CFD – CONSERVATION OF MOMENTUM Newton’s second law states that the time rate of change of the momentum of a fluid element is equal to the sum of the forces on the element. Navier-Stokes Equation
∂ ρv = −[∇ ⋅ ρvv] − ∇p − [∇.τ ] + ρg ∂t Rate of change of momentum
Convection
Pressure
Viscous
Surface forces
ASME-SCVS Professional Development Series
Gravitational
Body forces
CFD Fundamentals & Applications
38
CFD – INCOMPRESSIBLE FLUIDS When the density of the fluid is constant, the form of continuity equation and the momentum equation changes. This applies to fluids where large pressure changes result in only slight variations in density. Density variations are primarily a function of temperature gradients rather than pressure gradients. f ( P ,V , T ) = 0 Equation of state dV = (
0
∂V ∂V ) P dT + ( ) T dP ∂T ∂P
1 ∂V Isothermal compressibility κ = − V ∂ P T ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
39
CFD – COMPRESSIBLE FLUIDS n
When density varies appreciably as a result of pressure and temperature. The static temperature becomes a function of velocity and stagnation temperature.
n
Compressibility becomes important when the Mach Number becomes greater than about 0.3.
n
Mach Number is defined as the ratio of an object’s speed to the speed of sound in the medium through which the object is traveling:
v M= a
n
when M is less than 1 the flow is subsonic, while supersonic flows are with Mach numbers greater than one.
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
40
CFD – BOUNDARY LAYER The no-slip boundary condition at the wall leads to the formation a Boundary Layer. A boundary layer is a thin fluid layer near the wall which experiences velocity variations. Inside the boundary layer the fluid velocity goes from some finite value at the boundary layer edge to zero at the wall in a very short distance.
∞
u δ * = ∫ (1 − ) dy v 0
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
41
CFD – BOUNDARY LAYER δ is defined as the distance from the wall where the velocity has increased to 99 percent of the freestream velocity. δ* is defined as the distance to which streamlines outside the boundary layer are displaced away from the wall.
U=0.99u
y Flow u
δ x Boundary layer thickness U Flow
ASME-SCVS Professional Development Series
u δ* Displacement thickness CFD Fundamentals & Applications
42
CFD – SOME PLANNING n
Is the flow laminar or turbulent?
n
Is the fluid Newtonian or Non-Newtonian?
n
Is the fluid compressible or incompressible?
n
Is boundary layer and near wall solution of importance?
n
What are the fluid properties and are they dependent on state variables (T, P,..)?
n
What are the dominant physics?
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
43
CFD – APPLICATIONS
CFD-ACE(U) Introduction and Overview
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
44
CFD – CFD-ACE+ OVERVIEW
n
n
n
CFD-ACE+ System – CFD-ACE(U) Modules – Unique Attributes Theory – General Transport Equation – Discrete Methods – Solution Procedure – Linear Equation Solvers – Under-Relaxation Graphical User Interface
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
45
CFD – CFD-ACE+ SYSTEM CFD-GEOM
CFD-GUI
CFD-VIEW
Computational Grid and BC / VC Locations Input Files
(1) Geometry and Grid Generation (2) Problem Setup (3) Solution Generation (4) Post Processing
Graphical Results
Batch Solver CFD-ACE(U) Text Results
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
46
CFD – CFD-ACE+ MODULES Your Building Blocks for a Multi-Disciplinary Simulation Core Modules
Optional Modules
Optional Modules
FLOW
STRESS
FREE SURFACES
HEAT TRANSFER
PLASMA
SPRAY
TURBULENCE
ELECTRIC
TWO-FLUID
M IXING
MAGNETIC
MONTE-CARLO RAD
USER SCALAR
ELECTROPLATING
RADIATION
ELECTROKINETICS
CAVITATION
BIO-CHEMISTRY
GRID DEFORMATION
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
47
CFD – UNIQUE ATTRIBUTES n
n
Structured or Unstructured Grid Systems – quadrilateral ( ), hexahedral ( ) – triangle ( ), tetrahedral ( ), prism ( Arbitrary Interfaces – mix and match grid systems – parametric part studies – fully conservative
Stream Traces on First Design
), polyhedral (
+
)
=
Close-Up of Interface Velocity Vectors on Second Design
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
48
CFD – UNIQUE ATTRIBUTES Parallel Processing – optional feature – automatic domain decomposition
Speedup Factor
n
16
Ideal Speedup
12
11.6
8 6.4 4 1.8
3.4 2.6
Actual Speedup
1.0 0 0
4
8
12
16
Number of Processors
n
User Subroutines – ability to customize the solver for special needs • • • • • • • •
boundary conditions properties source terms output initial conditions time step grid deformation much more...
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
49
CFD – TRANSPORT EQUATION r ∂ρφ + ∇ • ( ρVφ ) = ∇ • (Γ∇φ ) + Sφ ∂t transient
convection
diffusion
diffusion
source
convection
source Control Volume
convection
∂ρφ ∂t diffusion
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
50
CFD – TRANSPORT EQUATION
n
n
General Transport Equation Can Be Used for All Transported Quantities – momentum (ρu, ρv, ρw) – turbulence (κ, ε) – enthalpy (H) – species or mixture fractions (fi, Yi) – user scalar (φ), etc. Equations are Non-linear and Coupled – simultaneous solution difficult • discretize • iterate
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
51
CFD – DISCRETE METHODS n
Calculation Domain Sub-divided into Discrete Control Volumes (Cells) – grid generation process
n
Variables Calculated at Centers of Cells – assumed constant over entire cell
6 equally spaced cells
8 cells with stretching N
n
Build Equation for Each Variable at Each Cell
W
P
a Pφ P = a Eφ E + aW φW + a N φ N + a Sφ S + a H φ H + a Lφ L + Sφ H
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
L E
S 52
CFD – DISCRETE METHODS a Pφ P = ∑ a nbφnb + Sφ n
Each anb Represents Effects of Convection and Diffusion N – e.g., at the west face ρ wu w AwφW • convection = W (φW − φ P ) uw Aw P • diffusion =Γw ∆w
E
S
– rearrange and assemble link coefficients Γw aW = − ρ wu w + Aw ∆w a P = ∑ anb ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
53
CFD – DISCRETE METHODS n
Spatial Differencing Scheme Determines Face Values – 1st-order upwind, central, 2nd-order upwind, etc. φW if u w ≥ 0 1st-upwind φw = φP if u w < 0 x
u
central x x W
n
x
P
φw =
φW + φ P 2
3 φ - 1 φ if u ≥ 0 w W 2 WW 2nd-upwind φw = 2 3 1 φP - φW if u w < 0 2 2
Upwind Blending Used to Maintain Stability φ w = α φ w 1st −upwind + (1 − α )φ w higher −order (α is a user input)
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
54
CFD – DISCRETE METHODS n
Source Term ( S ) Contains Terms Other Than Convection and Diffusion – transient term, boundary conditions, under-relaxation, etc. – linearized
S = SU + S Pφ P
n
Final Equation
a Pφ P = ∑ a nbφnb + SU + S Pφ P
(a P − S P )φ P = ∑ a nbφnb + SU
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
55
CFD – SOLUTION PROCEDURE At At t=t t=tff Prescribe Prescribe Initial Initial Flow Flow Field Field tt == tt ++ ∆t ∆t Evaluate Evaluate Link Link Coefficients Coefficients (a’s) (a’s) Solve Solve Velocities Velocities Evaluate Evaluate Mass Mass Imbalances Imbalances
SIMPLEC
Solve Solve Pressure Pressure Correction Correction
Repeat Repeat For For Each Each Time Time Step Step (transient simulations (transient simulations only) only)
Correct Correct p, p, u, u, v, v, w w Repeat Repeat For For Each Each Solution Iteration Solution Iteration (until (until solution solution stops stops changing) changing)
Solve Solve Enthalpy Enthalpy Solve Solve Mixture/Species Mixture/Species Fractions Fractions Solve Solve Turbulence Turbulence // Scalar Scalar // Etc. Etc.
Stop Stop
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
56
CFD – LINEAR EQUATION SOLVERS n
Need to Solve Sparse Matrix of Equations
A
φ = R
A
an 1 a n3 = a n2
an 2
an 3 an 2
a n1
an 3
an 2 an 1
a n1 an 1
an 1 an 2
# cells
# cells n
Use an Iterative Linear Equation Solver – conjugate gradient squared (CGS) – conjugate gradient squared + preconditioning (CGS+Pre) – algebraic multigrid (AMG)
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
57
CFD – LINEAR EQUATION SOLVERS
n
Anywhere in Solution Procedure where SOLVE is Found Attempt Attempt to to Solve Solve Aφ = R
∑ φ −φ
Solve Solve φφ
*
< criteria
yes
DONE DONE
no
sweep sweep == sweep sweep ++ 11
sweep > maxsweeps
yes
STOP STOP with with WARNING WARNING
no
(criteria and maxsweeps are user inputs) ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
58
CFD – UNDER RELAXATION n
Used to Constrain the Solution From One Iteration to the Next – necessary to prevent divergence of the solution procedure – different methods for the solved and auxiliary variables
n
Inertial Under-Relaxation (Solved Variables) – add a term to each side of the equation (aP − S P )φ P + IaPφ P = ∑ anbφ nb + SU + IaPφ P* (I is a user input) * φ = φ P – at convergenceP
so there is no effect
– I usually varies from ~0.0 to ~2.0 with ~0.2 the default – increasing the value of I adds constraint (stability) ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
– increasing the value of I slows convergence
59
CFD – UNDER RELAXATION
n
Linear Under-Relaxation (Auxiliary Variables) – auxiliary variables are not directly solved for but are computed during the solution procedure • density, pressure, temperature, viscosity, etc. – specifies the amount of “correction” to be applied
φnew = φold + α φ ′
(α is a user input)
α is bounded from 0.0 to 1.0 with 1.0 the default – decreasing the value of α adds constraint (stability) – decreasing the value of α slows convergence
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
60
CFD – GRAPHICAL USER INTERFACE CFD-GEOM
CFD-GUI
CFD-VIEW
Computational Grid and BC / VC Locations Input Files
(1) Geometry and Grid Generation (2) Problem Setup (3) Solution Generation (4) Post Processing
Graphical Results
Batch Solver CFD-ACE(U) Text Results
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
61
CFD – GRAPHICAL USER INTERFACE n
n
What CFD-GUI Is: – graphical front end to the CFD-ACE(U) solver – expert system for setting up multi-disciplinary simulations • guides user through the setup process • protects user from inappropriate inputs • provides reasonable default inputs – solver controller (submit / save / stop) – solver monitor (residuals / output) What CFD-GUI Is Not: – CFD-GUI is not a solver
ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
62
CFD – GRAPHICAL USER INTERFACE Title Bar Menu Bar Tool Bar
Control Panel
Graphics Area
Model Explorer
Status Line ASME-SCVS Professional Development Series
CFD Fundamentals & Applications
63