Vous êtes sur la page 1sur 25

Chapter 2

Introduction to CFD

Introductory FLUENT
Training

ANSYS, Inc. Proprietary April 28, 2009


© 2009 ANSYS, Inc. All rights reserved. 2-1 Inventory #002600
Introduction to CFD
What is CFD? Training Manual

• Computational fluid dynamics (CFD) is the science of predicting fluid flow,


heat and mass transfer, chemical reactions, and related phenomena by
solving numerically the set of governing mathematical equations
– Conservation of mass
– Conservation of momentum
– Conservation of energy
– Conservation of species
– Effects of body forces
– Etc.

• The results of CFD analyses are relevant in:


– Conceptual studies of new designs
– Detailed product development
– Troubleshooting
– Redesign

• CFD analysis complements testing and experimentation by reducing total


effort and cost required for experimentation and data acquisition.
ANSYS, Inc. Proprietary April 28, 2009
© 2009 ANSYS, Inc. All rights reserved. 2-2 Inventory #002600
Introduction to CFD
How Does CFD Work? Training Manual

• ANSYS CFD solvers are based on the


finite volume method
– Domain is discretized into a finite set of Control
control volumes Volume*

– General conservation (transport) equations


for mass, momentum, energy, species, etc.
are solved on this set of control volumes
Fluid region of pipe flow is
discretized into a finite set
of control volumes.

Unsteady Convection Diffusion Generation Equation Variable


Continuity 1
– Partial differential equations are X momentum u
discretized into a system of algebraic Y momentum v
Z momentum w
equations
Energy h
– All algebraic equations are then solved
numerically to render the solution field
* FLUENT control volumes are cell-centered (i.e. they correspond
directly with the mesh) while CFX control volumes are node-centered
ANSYS, Inc. Proprietary April 28, 2009
© 2009 ANSYS, Inc. All rights reserved. 2-3 Inventory #002600
Introduction to CFD
CFD Modeling Overview Training Manual

• Problem Identification
Problem Identification 1. Define your modeling goals
1. Define goals 2. Identify the domain you will model
2. Identify domain
• PreProcessing and Solver Execution
Pre-Processing 3. Create a solid model to represent the
3. Geometry
domain
4. Design and create the mesh (grid)
4. Mesh
5. Set up the physics (physical models,
5. Physics material properties, domain properties,
6. Solver Settings boundary conditions, …)
6. Define solver settings (numerical
Update Model

schemes, convergence controls, …)


Solve
7. Compute and monitor the solution
7. Compute solution

• Post-Processing
9.

Post Processing 8. Examine the results.


8. Examine results 9. Consider revisions to the model.
ANSYS, Inc. Proprietary April 28, 2009
© 2009 ANSYS, Inc. All rights reserved. 2-4 Inventory #002600
Introduction to CFD
1. Define Your Modeling Goals Training Manual

Problem Identification
1. Define goals
2. Identify domain

• What results are you looking for (i.e. pressure drop, mass flow rate),
and how will they be used?
– What are your modeling options?
• What physical models will need to be included in your analysis (i.e. turbulence,
compressibility, radiation)?
• What simplifying assumptions do you have to make?
• What simplifying assumptions can you make (i.e. symmetry, periodicity)?
• Do you require a unique modeling capability?
– User-defined functions (written in C) in FLUENT or User FORTRAN functions in CFX

• What degree of accuracy is required?

• How quickly do you need the results?

• Is CFD an appropriate tool?


ANSYS, Inc. Proprietary April 28, 2009
© 2009 ANSYS, Inc. All rights reserved. 2-5 Inventory #002600
Introduction to CFD
2. Identify the Domain You Will Model Training Manual

Problem Identification
1. Define goals
2. Identify domain

• How will you isolate a piece of the


complete physical system?

• Where will the computational


domain begin and end?
Domain of Interest
– Do you have boundary condition
as Part of a Larger
information at these boundaries? System (not modeled)
– Can the boundary condition types
accommodate that information?
– Can you extend the domain to a
point where reasonable data exists?
Domain of interest
isolated and meshed
for CFD simulation.
• Can it be simplified or approximated
as a 2D or axisymmetric problem?

ANSYS, Inc. Proprietary April 28, 2009


© 2009 ANSYS, Inc. All rights reserved. 2-6 Inventory #002600
Introduction to CFD
3. Create a Solid Model of the Domain Training Manual

Pre-Processing
3. Geometry
4. Mesh
5. Physics
6. Solver Settings

• How will you obtain a solid model of the


fluid region?
– Make use of existing CAD models?
• Extract the fluid region from a solid part?
– Create from scratch?
• Can you simplify the geometry?
– Remove unnecessary features that would
complicate meshing (fillets, bolts…)?
– Make use of symmetry or periodicity?
• Are both the solution and boundary conditions
symmetric / periodic?
• Do you need to split the model so that
boundary conditions or domains can be Solid model of a
created? Headlight Assembly
ANSYS, Inc. Proprietary April 28, 2009
© 2009 ANSYS, Inc. All rights reserved. 2-7 Inventory #002600
Introduction to CFD
4. Design and Create the Mesh Training Manual

Pre-Processing A mesh divides a geometry into


3. Geometry many elements. These are used by
4. Meshing the CFD solver to construct control
5. Physics volumes
6. Solver Settings
• What degree of mesh resolution is required in
each region of the domain?
– The mesh must resolve geometric features of
interest and capture gradients of concern, e.g.
velocity, pressure, temperature gradients
Triangle Quadrilateral – Can you predict regions of high gradients?
– Will you use adaption to add resolution?
• What type of mesh is most appropriate?
– How complex is the geometry?
– Can you use a quad/hex mesh or is a tri/tet or
Tetrahedron Hexahedron hybrid mesh suitable?
– Are non-conformal interfaces needed?
• Do you have sufficient computer resources?
– How many cells/nodes are required?
– How many physical models will be used?
Pyramid Prism/Wedge

ANSYS, Inc. Proprietary April 28, 2009


© 2009 ANSYS, Inc. All rights reserved. 2-8 Inventory #002600
Introduction to CFD
Tri/Tet vs. Quad/Hex Meshes Training Manual

• For flow-aligned geometries,


quad/hex meshes can provide
higher-quality solutions with fewer
cells/nodes than a comparable tri/tet
mesh
– Quad/Hex meshes show reduced
numerical diffusion when the mesh is
aligned with the flow.
– It does require more effort to
generate a quad/hex mesh

• Meshing tools designed for a


specific application can streamline
the process of creating a quad/hex
mesh for some geometries.

ANSYS, Inc. Proprietary April 28, 2009


© 2009 ANSYS, Inc. All rights reserved. 2-9 Inventory #002600
Introduction to CFD
Tri/Tet vs. Quad/Hex Meshes Training Manual

• For complex geometries, quad/hex meshes


show no numerical advantage, and you
can save meshing effort by using a tri/tet
mesh or hybrid mesh
– Quick to generate
– Flow is generally not aligned with the mesh

• Hybrid meshes typically combine tri/tet


elements with other elements in selected
regions
– For example, use wedge/
prism elements to resolve
boundary layers.
– More efficient and accurate
than tri/tet alone.
Wedge (prism) mesh
Tetrahedral mesh
ANSYS, Inc. Proprietary April 28, 2009
© 2009 ANSYS, Inc. All rights reserved. 2-10 Inventory #002600
Introduction to CFD
Multizone (or Hybrid) Meshes Training Manual

Model courtesy of ROI Engineering


• A multizone or hybrid mesh uses
different meshing methods in different
regions. For example,
– Hex mesh for fan and heat sink
– Tet/prism mesh elsewhere

• Multizone meshes yield a good


combination of accuracy, efficient
calculation time and meshing effort.

• When the nodes do not match across


the regions, a non-conformal interface
can be used.

ANSYS, Inc. Proprietary April 28, 2009


© 2009 ANSYS, Inc. All rights reserved. 2-11 Inventory #002600
Introduction to CFD
Non-Conformal Meshes Training Manual

• Non conformal meshes are useful Non-conformal


for meshing complex geometries interface
– Mesh each part then join together
• Non conformal interfaces are also
used in other situations
– Change in reference frames
– Moving mesh applications

3D Film Cooling
Coolant is injected into a duct from a
plenum. The plenum is meshed with
tetrahedral cells while the duct is
meshed with hexahedral cells
Compressor and Scroll
The compressor and scroll are joined through a
non conformal interface. This serves to connect
the hex and tet meshes and also allows a change
in reference frame
ANSYS, Inc. Proprietary April 28, 2009
© 2009 ANSYS, Inc. All rights reserved. 2-12 Inventory #002600
Introduction to CFD
Set Up the Physics and Solver Settings Training Manual

Pre-Processing • For a given problem, you will need to:


3. Geometry
– Define material properties
4. Mesh
5. Physics
• Fluid
6. Solver Settings • Solid
• Mixture
For complex problems
solving a simplified or 2D – Select appropriate physical models
problem will provide • Turbulence, combustion, multiphase, etc.
valuable experience with the – Prescribe operating conditions
models and solver settings
– Prescribe boundary conditions at all
for your problem in a short
amount of time. boundary zones
– Provide initial values or a previous solution
– Set up solver controls
– Set up convergence monitors

ANSYS, Inc. Proprietary April 28, 2009


© 2009 ANSYS, Inc. All rights reserved. 2-13 Inventory #002600
Introduction to CFD
Compute the Solution Training Manual

Solve • The discretized conservation equations are


7. Compute solution solved iteratively until convergence.

• Convergence is reached when:


– Changes in solution variables from one iteration
to the next are negligible.
• Residuals provide a mechanism to help
monitor this trend.
– Overall property conservation is achieved
• Imbalances measure global conservation
– Quantities of interest (e.g. drag, pressure drop)
have reach steady values.
• Monitor points track quantities of interest.

• The accuracy of a converged solution is


dependent upon:
– Appropriateness and accuracy of physical models.
A converged and mesh-
independent solution on a well- – Mesh resolution and independence
posed problem will provide useful – Numerical errors
engineering results!

ANSYS, Inc. Proprietary April 28, 2009


© 2009 ANSYS, Inc. All rights reserved. 2-14 Inventory #002600
Introduction to CFD
Examine the Results Training Manual

9. Update Model
• Examine the results to review solution
and extract useful data
Post Processing – Visualization Tools can be used to
8. Examine results answer such questions as:
• What is the overall flow pattern?
• Is there separation?
• Where do shocks, shear layers, etc. form?
• Are key flow features being resolved?

– Numerical Reporting Tools can be used


to calculate quantitative results:
• Forces and Moments
• Average heat transfer coefficients
• Surface and Volume integrated quantities
• Flux Balances

Examine results to ensure property conservation


and correct physical behavior. High residuals
may be caused by just a few poor quality cells.

ANSYS, Inc. Proprietary April 28, 2009


© 2009 ANSYS, Inc. All rights reserved. 2-15 Inventory #002600
Introduction to CFD
Consider Revisions to the Model Training Manual

9. Update Model
• Are the physical models appropriate?
– Is the flow turbulent?
Post Processing
– Is the flow unsteady?
8. Examine results
– Are there compressibility effects?
– Are there 3D effects?

• Are the boundary conditions correct?


– Is the computational domain large enough?
– Are boundary conditions appropriate?
– Are boundary values reasonable?

• Is the mesh adequate?


– Can the mesh be refined to improve results?
– Does the solution change significantly with a refined
mesh, or is the solution mesh independent?
– Does the mesh resolution of the geometry need to be
improved?

ANSYS, Inc. Proprietary April 28, 2009


© 2009 ANSYS, Inc. All rights reserved. 2-16 Inventory #002600
Introduction to CFD
Models Available in FLUENT 12 Training Manual

• Fluid flow and heat transfer


– Momentum, continuity, energy
equations
– Radiation
• Turbulence
– RANS-based models (Spalart-
Allmaras, k–ε, k–ω, Reynolds stress)
– Large-eddy simulation (LES) and
detached eddy simulation (DES)
• Species transport
Pressure Contours in Near-Ground Flight
• Volumetric reactions
– Arrhenius finite-rate chemistry
– Turbulent fast chemistry
• Eddy Dissipation, non-Premixed,
premixed, partially premixed
– Turbulent finite-rate chemistry
• EDC, laminar flamelet, composition PDF
transport
– Surface Reactions Temperature Contours for Kiln Burner Retrofit

ANSYS, Inc. Proprietary April 28, 2009


© 2009 ANSYS, Inc. All rights reserved. 2-17 Inventory #002600
Introduction to CFD
Models Available in FLUENT 12 Training Manual

• Multiphase flows Three-


Gas
Phase
– Discrete Phase Model (DPM) outlet
Inlet
– Volume of Fluid (VOF) model for
immiscible fluids
– Mixtures
– Eulerian-Eulerian and Eulerian-
granular
Water Oil
– Liquid/Solid and cavitation phase Contours of Oil Volume Fraction
outlet outlet
in a Three-Phase Separator
change

• Moving and deforming mesh


– Moving zones
• Single and multiple reference frames
(MRF)
• Mixing plane model
• Sliding mesh model
– Moving and deforming (dynamic)
mesh (MDM)

• User-defined scalar transport


equations Pressure Contours in a Squirrel Cage
Blower (Courtesy Ford Motor Co.)
ANSYS, Inc. Proprietary April 28, 2009
© 2009 ANSYS, Inc. All rights reserved. 2-18 Inventory #002600
Introduction to CFD
FLUENT CFD Workflow under Workbench 2 Training Manual

• Start ANSYS Workbench

• Drag the Fluid Flow (FLUENT)


system from Analysis Systems
group in the Toolbox onto
preview drop target shown in
the Project Schematic.

ANSYS, Inc. Proprietary April 28, 2009


© 2009 ANSYS, Inc. All rights reserved. 2-19 Inventory #002600
Introduction to CFD
Import the Geometry Training Manual

• Right-click on Geometry cell A2 and select Import Geometry

• Import the geometry file (CAD model or DesignModeler .agdb file)

• You can also link the FLUENT simulation to an existing


DesignModeler session.

ANSYS, Inc. Proprietary April 28, 2009


© 2009 ANSYS, Inc. All rights reserved. 2-20 Inventory #002600
Introduction to CFD
Generate a Mesh Training Manual

• Right-click on Mesh cell and select Edit.


– Meshing opens and loads geometry

• Select Mesh under Model in Outline


– Note that Preferences are automatically set
for FLUENT, because Meshing was opened
from a FLUENT system.

ANSYS, Inc. Proprietary April 28, 2009


© 2009 ANSYS, Inc. All rights reserved. 2-21 Inventory #002600
Introduction to CFD
Define Boundary and Cell Zones Training Manual

• Create boundary zones using Named


selections.
– Select the surface which will
represent the boundary you wish
to set.
– Right-click the selection and select
Create Named Selection.
– Name the selection and click OK.

velocit
• You will also need to define the y inlet
regions of the flow containing fluid
and solid (if any).
– Solids are required for conjugate
heat transfer calculations only.
– More details will be presented
later.

ANSYS, Inc. Proprietary April 28, 2009


© 2009 ANSYS, Inc. All rights reserved. 2-22 Inventory #002600
Introduction to CFD
Set Up and Run FLUENT Training Manual

• Edit the Setup cell to set up the model options


– Boundary conditions
– Solver settings
– Solution
– Post processing

• Once run, the solution can then be either post processed in FLUENT
or data exported to CFD-Post for post processing
– Contour and vector plots
– Profile plots
– Calculation of forces and moments
– Animation of unsteady flow results

ANSYS, Inc. Proprietary April 28, 2009


© 2009 ANSYS, Inc. All rights reserved. 2-23 Inventory #002600
Introduction to CFD
Demonstration of FLUENT Software Training Manual

• Start FLUENT (assume the mesh has


already been generated).
– Set up a simple problem.
– Solve the flow field.
– Postprocess the results.

• Online help and documentation is


available on each panel by pressing
the help button
– Requires that you have the
documentation installed and properly
connected to your web browser.

ANSYS, Inc. Proprietary April 28, 2009


© 2009 ANSYS, Inc. All rights reserved. 2-24 Inventory #002600
Introduction to CFD
Navigating the PC at Fluent Training Manual

• Log in to your workstation


– Login name: fluent
– Password: fluent

• Directories
– Tutorial mesh/case/data files can be found in
c:\Student Files\fluent\tut\
– We recommend that you save your work into a central working folder:
c:\users
– Working folder shown on the desktop is a shortcut to c:\users

• To start FLUENT and/or Workbench, use the desktop icons.

• Your support engineer will save your work at the end of the week.
• It is recommended that you restart FLUENT and/or Workbench for
each tutorial to avoid mixing solver settings from different
workshops.
ANSYS, Inc. Proprietary April 28, 2009
© 2009 ANSYS, Inc. All rights reserved. 2-25 Inventory #002600

Vous aimerez peut-être aussi