Fluent User Services Center www.fluentusers.com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Introduction to CFD Analysis

2-1

© Fluent Inc. 12/26/2001

Fluent User Services Center

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

www.fluentusers.com

What is CFD? ‹

Computational Fluid Dynamics (CFD) is the science of predicting fluid flow, heat transfer, mass transfer, chemical reactions, and related phenomena by solving mathematical equations that represent physical laws, using a numerical process. z

‹

z z z z

‹

Conservation of mass, momentum, energy, species, ...

The result of CFD analyses is relevant engineering data: conceptual studies of new designs detailed product development troubleshooting redesign

CFD analysis complements testing and experimentation. z

Reduces the total effort required in the laboratory.

2-2

© Fluent Inc. 12/26/2001

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Fluent User Services Center www.fluentusers.com

How does CFD work? ‹

FLUENT solvers are based on the

Fluid region of pipe flow discretized into finite set of control volumes (mesh).

finite volume method. z

z

Domain is discretized into a control volume finite set of control volumes or cells. General conservation (transport) equation for mass, momentum, energy, etc., Eqn. continuity x-mom. y-mom. energy

∂ ρφdV + ∫ ρφV ⋅ dA = ∫ Γ∇φ ⋅ dA + ∫ Sφ dV ∂t V∫ A A V unsteady

convection

diffusion

generation

are discretized into algebraic equations. z

φ 1 u v h

All equations are solved to render flow field. 2-3

© Fluent Inc. 12/26/2001

Fluent User Services Center

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

www.fluentusers.com

CFD Modeling Overview Solver Equations solved on mesh

Pre-Processing ‹ ‹

Solid Modeler

‹

Mesh Generator

Transport Equations z

mass „ „

z z

‹ ‹

Solver Settings

‹

Post-Processing

momentum energy

Equation of State Supporting Physical Models

‹

Physical Models z z z z z z z

‹

‹

species mass fraction phasic volume fraction

‹ ‹

Turbulence Combustion Radiation Multiphase Phase Change Moving Zones Moving Mesh

Material Properties Boundary Conditions Initial Conditions

2-4

© Fluent Inc. 12/26/2001

Fluent User Services Center www.fluentusers.com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

CFD Analysis: Basic Steps ‹

‹

‹

Problem Identification and Pre-Processing 1. Define your modeling goals. 2. Identify the domain you will model. 3. Design and create the grid. Solver Execution 4. Set up the numerical model. 5. Compute and monitor the solution. Post-Processing 6. Examine the results. 7. Consider revisions to the model.

2-5

© Fluent Inc. 12/26/2001

Fluent User Services Center

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

www.fluentusers.com

Define Your Modeling Goals ‹

Problem Identification and Pre-Processing 1. Define your modeling goals. 2. Identify the domain you will model. 3. Design and create the grid.

‹

What results are you looking for, and how will they be used? z

What are your modeling options? „ „ „ „

What physical models will need to be included in your analysis? What simplifying assumptions do you have to make? What simplifying assumptions can you make? Do you require a unique modeling capability? V V

‹ ‹

User-defined functions (written in C) in FLUENT 6 User-defined subroutines (written in FORTRAN) in FLUENT 4.5

What degree of accuracy is required? How quickly do you need the results? 2-6

© Fluent Inc. 12/26/2001

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Fluent User Services Center www.fluentusers.com

Identify the Domain You Will Model ‹

‹

‹

Cyclone Riser

How will you isolate a piece of the complete physical system? Where will the computational domain begin and end? z

z

z

‹

Gas

Problem Identification and Pre-Processing 1. Define your modeling goals. 2. Identify the domain you will model. 3. Design and create the grid

Do you have boundary condition information at these boundaries? Can the boundary condition types accommodate that information? Can you extend the domain to a point where reasonable data exists?

L-valve Gas

Example: Cyclone Separator

Can the problem be simplified to 2D? 2-7

© Fluent Inc. 12/26/2001

Fluent User Services Center

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

www.fluentusers.com

Design and Create the Grid ‹

Problem Identification and Pre-Processing 1. Define your modeling goals. 2. Identify the domain you will model. 3. Design and create the grid.

‹ ‹

Can you benefit from Mixsim, Icepak, or Airpak? Can you use a quad/hex grid or should you use a tri/tet grid or hybrid grid? z z

triangle

quadrilateral

‹

What degree of grid resolution is required in each region of the domain? z z

tetrahedron

hexahedron

z

‹

Is the resolution sufficient for the geometry? Can you predict regions with high gradients? Will you use adaption to add resolution?

Do you have sufficient computer memory? z z

pyramid

How complex is the geometry and flow? Will you need a non-conformal interface?

How many cells are required? How many models will be used?

prism/wedge 2-8

© Fluent Inc. 12/26/2001

Fluent User Services Center www.fluentusers.com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Tri/Tet vs. Quad/Hex Meshes ‹

For simple geometries, quad/hex meshes can provide high-quality solutions with fewer cells than a comparable tri/tet mesh. z

‹

Align the gridlines with the flow.

For complex geometries, quad/hex meshes show no numerical advantage, and you can save meshing effort by using a tri/tet mesh.

2-9

© Fluent Inc. 12/26/2001

Fluent User Services Center

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

www.fluentusers.com

Hybrid Mesh Example ‹

Valve port grid z

z

z

tet mesh

Specific regions can be meshed with different cell types. Both efficiency and accuracy are enhanced relative to a hexahedral or tetrahedral mesh alone. Tools for hybrid mesh generation are available in Gambit and TGrid.

hex mesh

wedge mesh Hybrid mesh for an IC engine valve port 2-10

© Fluent Inc. 12/26/2001

Fluent User Services Center www.fluentusers.com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Non-Conformal Mesh Example ‹

Nonconformal mesh: mesh in which grid nodes do not match up along an interface. z z

‹

Useful for ‘parts-swapping’ for design study, etc. Helpful for meshing complex geometries.

Example: z

3D Film Cooling Problem „

Coolant is injected into a duct from a plenum V

V

Plenum is meshed with tetrahedral cells. Duct is meshed with hexahedral cells.

Plenum part can be replaced with new geometry with reduced meshing effort. 2-11

© Fluent Inc. 12/26/2001

Fluent User Services Center

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

www.fluentusers.com

Set Up the Numerical Model ‹

Solver Execution 4. Set up the numerical model. 5. Compute and monitor the solution.

‹

For a given problem, you will need to: z

Select appropriate physical models.

z

Define material properties.

„

„ „ „

Solving initially in 2D will provide valuable experience with the models and solver settings for your problem in a short amount of time.

z z

z z z

Turbulence, combustion, multiphase, etc. Fluid Solid Mixture

Prescribe operating conditions. Prescribe boundary conditions at all boundary zones. Provide an initial solution. Set up solver controls. Set up convergence monitors. 2-12

© Fluent Inc. 12/26/2001

Fluent User Services Center www.fluentusers.com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Compute the Solution ‹

Solver Execution 4. Set up the numerical model. 5. Compute and monitor the solution.

‹

The discretized conservation equations are solved iteratively. z

‹

A number of iterations are usually required to reach a converged solution.

Convergence is reached when: z

Changes in solution variables from one iteration to the next are negligible. „

A converged and gridindependent solution on a well-posed problem will provide useful engineering results!

z

‹

Residuals provide a mechanism to help monitor this trend.

Overall property conservation is achieved.

The accuracy of a converged solution is dependent upon: z z z

Appropriateness and accuracy of physical models. Grid resolution and independence Problem setup 2-13

© Fluent Inc. 12/26/2001

Fluent User Services Center

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

www.fluentusers.com

Examine the Results ‹

Post-Processing 6. Examine the results. 7. Consider revisions to the model.

‹

Examine the results to review solution and extract useful data. z

Visualization Tools can be used to answer such questions as: „ „ „

Examine results to ensure property conservation and correct physical behavior. High residuals may be attributable to only a few cells of poor quality.

„

z

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: „ „ „ „

2-14

Forces and Moments Average heat transfer coefficients Surface and Volume integrated quantities Flux Balances © Fluent Inc. 12/26/2001

Fluent User Services Center www.fluentusers.com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Consider Revisions to the Model ‹

Post-Processing 6. Examine the results. 7. Consider revisions to the model.

‹

Are physical models appropriate? z z z z

‹

Are boundary conditions correct? z z z

‹

Is flow turbulent? Is flow unsteady? Are there compressibility effects? Are there 3D effects? Is the computational domain large enough? Are boundary conditions appropriate? Are boundary values reasonable?

Is grid adequate? z z

z

Can grid be adapted to improve results? Does solution change significantly with adaption, or is the solution grid independent? Does boundary resolution need to be improved? 2-15

© Fluent Inc. 12/26/2001

Fluent User Services Center

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

www.fluentusers.com

FLUENT DEMO ‹

Startup Gambit (Pre-processing) z z z

‹

Startup Fluent (Solver Execution) z z z

‹ ‹

load database define boundary zones export mesh GUI Problem Setup Solve

Post-Processing Online Documentation

2-16

© Fluent Inc. 12/26/2001

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Solver Basics

3-1

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Solver Execution u

Solver Execution: l

l

Menu is laid out such that order of operation is generally left to right. n Import and scale mesh file. n Select physical models. n Define material properties. n Prescribe operating conditions. n Prescribe boundary conditions. n Provide an initial solution. n Set solver controls. n Set up convergence monitors. n Compute and monitor solution. Post-Processing n Feedback into Solver n Engineering Analysis

3-2

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Mouse Functionality u

Mouse button functionality depends on solver and can be configured in the solver. Display → Mouse Buttons...

u

Default Settings: l

l

2D Solver n Left button translates (dolly) n Middle button zooms n Right button selects/probes 3D Solver n Left button rotates about 2-axes n Middle button zooms s n

u

Middle click on point in screen centers point in window

Right button selects/probes

Retrieve detailed flow field information at point with Probe enabled. l

Right click on grid display. 3-4

© Fluent Inc. 1/29/02

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Fluent User Services Center www.fluentusers .com

Reading Mesh: Mesh Components u

Components are defined in preprocessor l

l l l l

node

cell center

Cell = control volume into which domain is broken up n computational domain is defined by mesh that represents the fluid and solid regions of interest. Face = boundary of a cell Edge = boundary of a face Node = grid point Zone = grouping of nodes, faces, and/or cells n Boundary data assigned to face zones. n Material data and source terms assigned to cell zones. 3-5

face cell Simple 2D mesh

node edge face

cell

Simple 3D mesh © Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Scaling Mesh and Units u

All physical dimensions initially assumed to be in meters. l

u

Scale grid accordingly.

Other quantities can also be scaled independent of other units used. l

Fluent defaults to SI units.

3-7

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Models in Fluent 6 (1) u

Fluid Flow and Heat Transfer l l

u

Turbulence l

l

u

Momentum, Continuity, and Energy Equations Radiation Models RANS based models including k-ε, k-ω, and RSM. LES

Species Transport l l

l

l

Pressure contours in near ground flight

Arrhenius Rate Chemistry Turbulent Fast Chemistry n Eddy Dissipation, Non-Premixed, Premixed, Partially premixed Turbulent Finite Rate Chemistry n EDC, laminar flamelet Surface Reactions

Temperature contours for kiln burner retrofitting. 3-8

© Fluent Inc. 1/29/02

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Fluent User Services Center www.fluentusers .com

Models in Fluent 6 (2) Gas outlet

Inlet u

Multiple Phase Flows l l l l

l

u

Water outlet

Oil outlet

Flows involving Moving Parts l

l

u

Discrete Phase Model VOF modeling of immiscible fluids Mixture Model Contours of oil volume fraction Eulerian-Eulerian and Eulerianin three phase separator. Granular (heat transfer in Fluent 4.5 only) Liquid/Solid and Cavitation Phase Change Models Moving zones n Rotating/Multiple Reference Frame n Mixing Plane n Sliding Mesh Model Deforming Mesh (limited capability) n Special license needed, exception: Fluent 4.5

Pressure contours for squirrel cage blower.

User-Defined Scalar Transport 3-9

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Material Types and Property Definition u

u

Physical models may require inclusion of additional materials and dictates which properties need to be defined. Material properties defined in Materials Panel. l Single-Phase, Single Species Flows n Define fluid/solid properties n Real gas model (NIST’s REFPROP) l Multiple Species (Single Phase) Flows n Mixture Material concept employed s

s

n

PDF Mixture Material concept s

s

l

Mixture properties (composition dependent) defined separately from constituent’s properties. Constituent properties must be defined. PDF lookup table used for mixture properties. – Transport properties for mixture defined separately. Constituent properties extracted from database.

Multiple Phase Flows (Single Species) n Define properties for all fluids and solids. 3-10

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Fluid Density u

For ρ = constant , incompressible flow: l

u

For incompressible flow: l

u

u

ρ = poperating/RT n Use incompressible-ideal-gas n Set poperating close to mean pressure in problem.

For compressible flow use ideal-gas : l

u

Select constant in Define → Materials...

ρ = pabsolute /RT n For low Mach number flows, set poperating close to mean pressure in problem to avoid round-off errors. n Use Floating Operating Pressure for unsteady flows with large, gradual changes in absolute pressure (seg. only).

Density can also be defined as a function of Temperature l

polynomial or piecewise-polynomial

l

boussinesq model discussed in heat transfer lecture.

Density can also be defined using UDF- not to be function of pressure! 3-11

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Solver Execution: Other Lectures...

u

Physical models discussed on Day 2. 3-13

© Fluent Inc. 1/29/02

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Fluent User Services Center www.fluentusers .com

Post-Processing u u

Many post-processing tools are available. Post-Processing functions typically operate on surfaces. l l

Surfaces are automatically created from zones. Additional surfaces can be created.

u

3-14

Example: an Iso-Surface of constant grid coordinate can be created for viewing data within a plane.

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Post-Processing: Node Values u

u

Fluent calculates field variable data at cell centers. Node values of the grid are either: l

l

u

u

Node values on surfaces are interpolated from grid node data. data files store: l l

u

calculated as the average of neighboring cell data, or, defined explicitly (when available) with boundary condition data.

data at cell centers node value data for primitive variables at boundary nodes.

Enable Node Values to interpolate field data to nodes. 3-15

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Reports u

Flux Reports l l

u

Surface Integrals l

u

Net flux is calculated. Total Heat Transfer Rate includes radiation. slightly less accurate on user-generated surfaces due to interpolation error.

Volume Integrals

Examples:

3-16

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Solver Enhancements: Grid Adaption u

u

Grid adaption adds more cells where needed to resolve the flow field without pre-processor. Fluent adapts on cells listed in register. l

l

Registers can be defined based on: n Gradients of flow or user-defined variables n Iso-values of flow or user-defined variables n All cells on a boundary n All cells in a region n Cell volumes or volume changes + n y in cells adjacent to walls To assist adaption process, you can: n Combine adaption registers n Draw contours of adaption function n Display cells marked for adaption n Limit adaption based on cell size and number of cells: 3-17

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Adaption Example: 2D Planar Shell u

Adapt grid in regions of high pressure gradient to better resolve pressure jump across the shock.

2D planar shell - initial grid

2D planar shell - contours of pressure initial grid 3-18

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Adaption Example: Final Grid and Solution

2D planar shell - final grid

2D planar shell - contours of pressure final grid

3-19

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Boundary Conditions

4-1

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Defining Boundary Conditions u

To define a problem that results in a unique solution, you must specify information on the dependent (flow) variables at the domain boundaries. l

u

Defining boundary conditions involves: l l

u

u

Specifying fluxes of mass, momentum, energy, etc. into domain. identifying the location of the boundaries (e.g., inlets, walls, symmetry) supplying information at the boundaries

The data required at a boundary depends upon the boundary condition type and the physical models employed. You must be aware of the information that is required of the boundary condition and locate the boundaries where the information on the flow variables are known or can be reasonably approximated. l

Poorly defined boundary conditions can have a significant impact on your solution. 4-2

© Fluent Inc. 1/29/02

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Fluent User Services Center www.fluentusers .com

Locating Boundaries: Example u

Air

Three possible approaches in locating inlet boundaries: l

l

l

1. Upstream of manifold n Can use uniform profile n Properly accounts for mixing n Non-premixed reaction models n Requires more cells 2. Nozzle inlet plane n Non-premixed reaction models n Requires accurate profile data 1 3. Nozzle outlet plane n Premixed reaction model n Requires accurate profile

Combustor Wall

1 2

3

Nozzle

Fuel

4-3

Manifold box

© Fluent Inc. 1/29/02

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Fluent User Services Center www.fluentusers .com

General Guidelines u

Upper pressure boundary modified to ensure that flow always enters domain.

General guidelines: l

l

l

If possible, select boundary location and shape such that flow either goes in or out. n Not necessary, but will typically observe better convergence. Should not observe large gradients in direction normal to boundary. n Indicates incorrect set-up. Minimize grid skewness near boundary. n Introduces error early in calculation.

1

4-4

2

© Fluent Inc. 1/29/02

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Fluent User Services Center www.fluentusers .com

Available Boundary Condition Types u

Boundary Condition Types of External Faces l l l

l

l

u

Boundary Condition Types of Cell ‘Boundaries’ l

u

General: Pressure inlet, Pressure outlet Incompressible: Velocity inlet, Outflow Compressible flows: Mass flow inlet, Pressure far-field Special: Inlet vent, outlet vent, intake fan, exhaust fan Other: Wall, Symmetry, Periodic, Axis

outlet inlet wall

Fluid and Solid

Boundary Condition Types of Double-Sided Face ‘Boundaries’ l

interior

Fan, Interior, Porous Jump, Radiator, Walls 4-5

Orifice_plate and orifice_plateshadow

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Changing Boundary Condition Types u

u

Zones and zone types are initially defined in pre-processor. To change zone type for a particular zone: Define → Boundary Conditions... l

l

Choose the zone in Zone list. n Can also select boundary zone using right mouse button in Display Grid window. Select new zone type in Type list.

4-6

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Setting Boundary Condition Data u

Explicitly assign data in BC panels. l

l

u

Boundary condition data can be stored and retrieved from file. l

u

u

To set boundary conditions for particular zone: n Choose the zone in Zone list. n Click Set ... button Boundary condition data can be copied from one zone to another.

file → write-bc and file → read-bc

Boundary conditions can also be defined by UDFs and Profiles. Profiles can be generated by: l l

Writing a profile from another CFD simulation Creating an appropriately formatted text file with boundary condition data. 4-7

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Velocity Inlet u

Specify Velocity by: l l l

u u

Velocity profile is uniform by default Intended for incompressible flows. l

l l

u

Magnitude, Normal to Boundary Components Magnitude and Direction

Static pressure adjusts to accommodate prescribed velocity distribution. Total (stagnation) properties of flow also varies. Using in compressible flows can lead to non-physical results.

Can be used as an outlet by specifying negative velocity. l

You must ensure that mass conservation is satisfied if multiple inlets are used.

4-8

© Fluent Inc. 1/29/02

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Fluent User Services Center www.fluentusers .com

Pressure Inlet (1) u

Specify: l

Total Gauge Pressure n Defines energy to drive flow. n Doubles as back pressure (static gauge) for cases where back flow occurs. s

l

l

l

Direction of back flow determined from interior solution.

Static Gauge Pressure n Static pressure where flow is locally supersonic; ignored if subsonic n Will be used if flow field is initialized from this boundary. Total Temperature n Used as static temperature for incompressible flow. Inlet Flow Direction 4-9

Compressible flows:

ptotal , abs = pstatic , abs (1 + Ttotal = Tstatic (1 +

k − 1 2 k /(k −1) M ) 2

k −1 2 M ) 2

Incompressible flows: ptotal = pstatic +

1 2 ρv 2

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Pressure Inlet (2) u

Note: Gauge pressure inputs are required. l l

u

Operating pressure input is set under: Define → Operating Conditions

Suitable for compressible and incompressible flows. l

l l

u

p absolute = p gauge + p operating

Pressure inlet boundary is treated as loss-free transition from stagnation to inlet conditions. Fluent calculates static pressure and velocity at inlet Mass flux through boundary varies depending on interior solution and specified flow direction.

Can be used as a “free” boundary in an external or unconfined flow.

4-10

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Pressure Outlet u

Specify static gauge pressure l

l

l

u

Backflow l l l l

u

Can occur at pressure outlet during iterations or as part of final solution. Backflow direction is assumed to be normal to the boundary. Backflow boundary data must be set for all transport variables. Convergence difficulties minimized by realistic values for backflow quantities.

Suitable for compressible and incompressible flows l

u

Interpreted as static pressure of environment into which flow exhausts. Radial equilibrium pressure distribution option available. Doubles as inlet pressure (total gauge) for cases where backflow occurs.

Pressure is ignored if flow is locally supersonic.

Can be used as a “free” boundary in an external or unconfined flow. 4-12

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Outflow u

No pressure or velocity information is required. l l

u

Flow exiting Outflow boundary exhibits zero normal diffusive flux for all flow variables. l

u

Appropriate where exit flow is close to fully developed condition.

Intended for incompressible flows. l

l

u

Data at exit plane is extrapolated from interior. Mass balance correction is applied at boundary.

Cannot be used with a Pressure Inlet; must use velocity inlet. n Combination does not uniquely set pressure gradient over whole domain. Cannot be used for unsteady flows with variable density.

Poor rate of convergence when back flow occurs during iteration. l

Cannot be used if back flow is expected in final solution.

4-13

© Fluent Inc. 1/29/02

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Fluent User Services Center www.fluentusers .com

Modeling Multiple Exits u

Flows with multiple exits can be modeled using Pressure Outlet or Outflow boundaries. l

Pressure Outlets pressure-outlet (ps)1

velocity-inlet (v,T0) or pressure-inlet (p0,T0)

l

pressure-outlet (ps)2

Outflow: n Mass flow rate fraction determined from Flow Rate Weighting by: s mi=FRW i/ΣFRW i where 0 < FRW < 1. s FRW set to 1 by default FRW1 implying equal flow rates velocity n static pressure varies among inlet exits to accommodate flow FRW2 distribution. 4-14

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Wall Boundaries u u

Used to bound fluid and solid regions. In viscous flows, no-slip condition enforced at walls: l

l l

u

Thermal boundary conditions: l l

u

several types available Wall material and thickness can be defined for 1-D or shell conduction heat transfer calculations.

Wall roughness can be defined for turbulent flows. l

u

Tangential fluid velocity equal to wall velocity. Normal velocity component = 0 Shear stress can also be specified.

Wall shear stress and heat transfer based on local flow field.

Translational or rotational velocity can be assigned to wall. 4-16

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Cell Zones: Fluid u

u

Fluid zone = group of cells for which all active equations are solved. Fluid material input required. l

u

Optional inputs allow setting of source terms: l

u

u u u

Single species, phase.

mass, momentum, energy, etc.

Define fluid zone as laminar flow region if modeling transitional flow. Can define zone as porous media. Define axis of rotation for rotationally periodic flows. Can define motion for fluid zone.

4-19

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Cell Zones: Solid u

“Solid” zone = group of cells for which only heat conduction problem solved. l l

u

Only required input is material type l

u

u

u

No flow equations solved Material being treated as solid may actually be fluid, but it is assumed that no convection takes place. So appropriate material properties used.

Optional inputs allow you to set volumetric heat generation rate (heat source). Need to specify rotation axis if rotationally periodic boundaries adjacent to solid zone. Can define motion for solid zone

4-21

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Internal Face Boundaries u

Defined on cell faces l l

u

Do not have finite thickness Provide means of introducing step change in flow properties.

Used to implement physical models representing: l l l

l

Fans Radiators Porous jump n Preferable over porous media- exhibits better convergence behavior. Interior wall

4-22

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Summary u u

u u u u

Zones are used to assign boundary conditions. Wide range of boundary conditions permit flow to enter and exit solution domain. Wall boundary conditions used to bound fluid and solid regions. Repeating boundaries used to reduce computational effort. Internal cell zones used to specify fluid, solid, and porous regions. Internal face boundaries provide way to introduce step change in flow properties.

4-23

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Solver Settings

5-1

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Outline u

Using the Solver l l

l

u

Setting Solver Parameters Convergence n Definition n Monitoring n Stability n Accelerating Convergence Accuracy n Grid Independence n Adaption

Appendix: Background l l l l

Finite Volume Method Explicit vs. Implicit Segregated vs. Coupled Transient Solutions 5-2

© Fluent Inc. 1/29/02

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Fluent User Services Center www.fluentusers .com

Solution Procedure Overview u

Solution Parameters l l

u u

Choosing the Solver Discretization Schemes

Initialize the solution

Initialization Convergence l l

l

u

Set the solution parameters

Monitoring Convergence Stability n Setting Under-relaxation n Setting Courant number Accelerating Convergence

Enable the solution monitors of interest

Calculate a solution

Check for convergence No

Yes

Accuracy l l

Grid Independence Adaption

Modify solution parameters or grid

Check for accuracy No

Yes Stop

5-3

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Choosing a Solver u u

Choices are Coupled-Implicit, Coupled-Explicit, or Segregated (Implicit) The Coupled solvers are recommended if a strong inter-dependence exists between density, energy, momentum, and/or species. l l

e.g., high speed compressible flow or finite-rate reaction modeled flows. In general, the Coupled-Implicit solver is recommended over the coupled-explicit solver. n n

l

The Coupled-Explicit solver should only be used for unsteady flows when the characteristic time scale of problem is on same order as that of the acoustics. n

u

Time required: Implicit solver runs roughly twice as fast. Memory required: Implicit solver requires roughly twice as much memory as coupledexplicit or segregated-implicit solvers!

e.g., tracking transient shock wave

The Segregated (implicit) solver is preferred in all other cases. l l

Lower memory requirements than coupled-implicit solver. Segregated approach provides flexibility in solution procedure. 5-4

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Initialization u

Iterative procedure requires that all solution variables be initialized before calculating a solution. Solve → Initialize → Initialize... l l

u

Realistic ‘guesses’ improves solution stability and accelerates convergence. In some cases, correct initial guess is required: n Example: high temperature region to initiate chemical reaction.

“Patch” values for individual variables in certain regions. Solve → Initialize → Patch... l

l

Free jet flows (patch high velocity for jet) Combustion problems (patch high temperature for ignition) 5-8

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Convergence u

At convergence: l

l l

u

Monitoring convergence with residuals: l

l l

u

All discrete conservation equations (momentum, energy, etc.) are obeyed in all cells to a specified tolerance. Solution no longer changes with more iterations. Overall mass, momentum, energy, and scalar balances are obtained. Generally, a decrease in residuals by 3 orders of magnitude indicates at least qualitative convergence. n Major flow features established. Scaled energy residual must decrease to 10-6 for segregated solver. Scaled species residual may need to decrease to 10-5 to achieve species balance.

Monitoring quantitative convergence: l l

Monitor other variables for changes. Ensure that property conservation is satisfied. 5-10

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Convergence Monitors: Residuals u

Residual plots show when the residual values have reached the specified tolerance. Solve → Monitors → Residual...

All equations converged.

10-3 10-6

5-11

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Convergence Monitors: Forces/Surfaces u

In addition to residuals, you can also monitor: l

l

Lift, drag, or moment Solve → Monitors → Force... Variables or functions (e.g., surface integrals) at a boundary or any defined surface: Solve → Monitors → Surface...

5-12

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Checking for Property Conservation u

In addition to monitoring residual and variable histories, you should also check for overall heat and mass balances. l

At a minimum, the net imbalance should be less than 1% of smallest flux through domain boundary. Report → Fluxes...

5-13

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Decreasing the Convergence Tolerance u

If your monitors indicate that the solution is converged, but the solution is still changing or has a large mass/heat imbalance: l

l

Reduce Convergence Criterion or disable Check Convergence. Then calculate until solution converges to the new tolerance.

5-14

© Fluent Inc. 1/29/02

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Fluent User Services Center www.fluentusers .com

Convergence Difficulties u

Numerical instabilities can arise with an ill-posed problem, poor quality mesh, and/or inappropriate solver settings. l l l

u

Exhibited as increasing (diverging) or “stuck” residuals. Diverging residuals imply increasing imbalance in conservation equations. Unconverged results can be misleading!

Troubleshooting: l l

l

l l

Ensure problem is well posed. Compute an initial solution with a first-order discretization scheme. Decrease under-relaxation for equations having convergence trouble (segregated). Reduce Courant number (coupled). Re-mesh or refine grid with high aspect ratio or highly skewed cells. 5-15

Continuity equation convergence trouble affects convergence of all equations.

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Modifying Under-relaxation Factors u

u

φ p = φ p ,old + α∆φ p

Under-relaxation factor, α, is included to stabilize the iterative process for the segregated solver. Use default under-relaxation factors to start a calculation. Solve → Controls → Solution...

u

Decreasing under-relaxation for momentum often aids convergence. l

l

u

Default settings are aggressive but suitable for wide range of problems. ‘Appropriate’ settings best learned from experience.

For coupled solvers, under-relaxation factors for equations outside coupled set are modified as in segregated solver. 5-16

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Modifying the Courant Number u

Courant number defines a ‘time step’ size for steady-state problems. l

u

A transient term is included in the coupled solver even for steady state problems.

For coupled-explicit solver: l

Stability constraints impose a maximum limit on Courant number. n Cannot be greater than 2. s n

u

Default value is 1.

Reduce Courant number when having difficulty converging.

∆t =

For coupled-implicit solver: l

(CFL )∆x u

Courant number is not limited by stability constraints. n Default is set to 5. 5-17

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Accelerating Convergence u

Convergence can be accelerated by: l

l

l

Supplying good initial conditions n Starting from a previous solution. Increasing under-relaxation factors or Courant number n Excessively high values can lead to instabilities. n Recommend saving case and data files before continuing iterations. Controlling multigrid solver settings. n Default settings define robust Multigrid solver and typically do not need to be changed.

5-18

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Accuracy u

A converged solution is not necessarily an accurate one. l l

u

Solve using 2nd order discretization. Ensure that solution is grid-independent. n Use adaption to modify grid.

If flow features do not seem reasonable: l l

Reconsider physical models and boundary conditions. Examine grid and re-mesh.

5-21

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Mesh Quality and Solution Accuracy u

u

Numerical errors are associated with calculation of cell gradients and cell face interpolations. These errors can be contained: l l l

Use higher order discretization schemes. Attempt to align grid with flow. Refine the mesh. n Sufficient mesh density is necessary to resolve salient features of flow. s n

Minimize variations in cell size. s s

n

Interpolation errors decrease with decreasing cell size. Truncation error is minimized in a uniform mesh. Fluent provides capability to adapt mesh based on cell size variation.

Minimize cell skewness and aspect ratio. s s s

In general, avoid aspect ratios higher than 5:1 (higher ratios allowed in b.l.). Optimal quad/hex cells have bounded angles of 90 degrees Optimal tri/tet cells are equilateral. 5-22

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Determining Grid Independence u

u

When solution no longer changes with further grid refinement, you have a “grid-independent” solution. Procedure: l

Obtain new grid: n

Adapt s

s

l l l

Save original mesh before adapting. – If you know where large gradients are expected, concentrate the original grid in that region, e.g., boundary layer. Adapt grid. – Data from original grid is automatically interpolated to finer grid.

n

file → write-bc and file → read-bc facilitates set up of new problem

n

file → reread-grid and File → Interpolate...

Continue calculation to convergence. Compare results obtained w/different grids. Repeat procedure if necessary. 5-23

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Unsteady Flow Problems u

Transient solutions are possible with both segregated and coupled solvers. l

l

u

Solver iterates to convergence at each time level, then advances automatically. Solution Initialization defines initial condition and must be realistic.

For segregated solver: l

l

l l

Time step size, ∆t, is input in Iterate panel. n ∆t must be small enough to resolve time dependent features and to ensure convergence within 20 iterations. n May need to start solution with small ∆t. Number of time steps, N, is also required. n N*∆t = total simulated time. To iterate without advancing time step, use ‘0’ time steps. PISO may aid in accelerating convergence for each time step. 5-24

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Summary u

Solution procedure for the segregated and coupled solvers is the same: l l l

u

u u

Calculate until you get a converged solution. Obtain second-order solution (recommended). Refine grid and recalculate until grid-independent solution is obtained.

All solvers provide tools for judging and improving convergence and ensuring stability. All solvers provide tools for checking and improving accuracy. Solution accuracy will depend on the appropriateness of the physical models that you choose and the boundary conditions that you specify.

5-26

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Modeling Turbulent Flows

6-1

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

What is Turbulence? u

Unsteady, irregular (aperiodic) motion in which transported quantities (mass, momentum, scalar species) fluctuate in time and space l l

u

Fluid properties exhibit random variations l

l

u

Identifiable swirling patterns characterizes turbulent eddies. Enhanced mixing (matter, momentum, energy, etc.) results Statistical averaging results in accountable, turbulence related transport mechanisms. This characteristic allows for Turbulence Modeling.

Wide range in size of turbulent eddies (scales spectrum). l

Size/velocity of large eddies on order of mean flow. n derive energy from mean flow

6-2

© Fluent Inc. 1/29/02

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Fluent User Services Center www.fluentusers .com

Is the Flow Turbulent? External Flows where

Rex ≥ 5×10 5

along a surface

ReL ≡

ρUL µ

L = x, D, Dh, etc.

ReD ≥ 20,000

around an obstacle Other factors such as free-stream turbulence, surface conditions, and disturbances may cause earlier transition to turbulent flow.

Internal Flows ReDh ≥ 2,300

Natural Convection Ra ≥ 108 − 1010

where

6-3

gβ∆TL3 ρ Ra ≡ µα

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Choices to be Made Flow Physics

Computational Resources

Turbulence Model & Near-Wall Treatment

Accuracy Required

Computational Grid

Turnaround Time Constraints

6-4

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Modeling Turbulence u

Direct numerical simulation (DNS) is the solution of the timedependent Navier-Stokes equations without recourse to modeling. l

l l

u

The need to resolve the full spectrum of scales is not necessary for most engineering applications. l l

u

Mesh must be fine enough to resolve smallest eddies, yet sufficiently large to encompass complete model. Solution is inherently unsteady to capture convecting eddies. DNS is only practical for simple low-Re flows.

Mean flow properties are generally sufficient. Most turbulence models resolve the mean flow.

Many different turbulence models are available and used. l

l

There is no single, universally reliable engineering turbulence model for wide class of flows. Certain models contain more physics that may be better capable of predicting more complex flows including separation, swirl, etc. 6-5

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Modeling Approaches u u

‘Mean’ flow can be determined by solving a set of modified equations. Two modeling approaches: l

l

u

(1) Governing equations are ensemble or time averaged (RANS-based models). n Transport equations for mean flow quantities are solved. n All scales of turbulence are modeled. n If mean flow is unsteady, ∆t is set by global unsteadiness. (2) Governing equations are spatially averaged (LES). n Transport equations for ‘resolvable scales.’ n Resolves larger eddies; models smaller ones. n Inherently unsteady, ∆t set by small eddies. n Resulting models requires more CPU time/memory and is not practical for the majority of engineering applications.

Both approaches requires modeling of the scales that are averaged out. 6-6

© Fluent Inc. 1/29/02

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Fluent User Services Center www.fluentusers .com

RANS Modeling - Ensemble Averaging u

Imagine how velocity, temperature, pressure, etc. might vary in a turbulent flow field downstream of a valve that has been slightly perturbed: U n identifies the ‘sample’ ID

u

Ensemble averaging may be used to extract the mean flow properties from the instantaneous properties. u

r 1 U i ( x , t ) = lim N →∞ N

N

∑u n =1

(n ) i

r (x , t )

u'i

r r r ui (x , t ) = U i ( x , t ) + ui′( x , t )

Ui

ui

t 6-7

© Fluent Inc. 1/29/02

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Fluent User Services Center www.fluentusers .com

Turbulence Models in Fluent RANS-based models

Zero-Equation Models One-Equation Models Spalart-Allmaras

Two-Equation Models Standard k-ε RNG k-ε Realizable k-ε Standard k-ω SST k-ω

Available in FLUENT 6

Increase Computational Cost Per Iteration

Reynolds-Stress Model Large-Eddy Simulation Direct Numerical Simulation 6-13

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Large Eddy Simulation (LES) u

Motivation: l

l

u

Approach: l l

u

Large eddies: n Mainly responsible for transport of momentum, energy, and other scalars, directly affecting the mean fields. n Anisotropic, subjected to history effects, and flow-dependent, i.e., strongly dependent on flow configuration, boundary conditions, and flow parameters. Small eddies tend to be more isotropic, less flow-dependent, and hence more amenable to modeling. LES resolves large eddies and models only small eddies. Equations are similar in form to RANS equations n Dependent variables are now spatially averaged instead of time averaged.

Large computational effort l l

Number of grid points, N LES ∝ Re2uτ Unsteady calculation 6-16

© Fluent Inc. 1/29/02

Fluent User Services Center www.fluentusers .com

Introductory FLUENT Notes FLUENT v6.0 Jan 2002

Summary: Turbulence Modeling Guidelines u

Successful turbulence modeling requires engineering judgement of: l l l

l

u

Flow physics Computer resources available Project requirements n Accuracy n Turnaround time Turbulence models & near-wall treatments that are available

Modeling Procedure l l l

l l

Calculate characteristic Re and determine if Turbulence needs modeling. Estimate wall-adjacent cell centroid y+ first before generating mesh. Begin with SKE (standard k-ε) and change to RNG, RKE, SKO, or SST if needed. Use RSM for highly swirling flows. Use wall functions unless low-Re flow and/or complex near-wall physics are present. 6-29

© Fluent Inc. 1/29/02