Professional Documents
Culture Documents
Outline
Using the Solver
z Setting Solver Parameters
z Convergence
Definition
Monitoring
Stability
Accelerating Convergence
z Accuracy
Grid Independence
Grid Adaption
z Summary
z Appendix
© 2006 ANSYS, Inc. All rights reserved. 5-2 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
Outline
Using the Solver (solution procedure overview)
z Setting Solver Parameters
z Convergence
Definition
Monitoring
Stability
Accelerating Convergence
z Accuracy
Grid Independence
Grid Adaption
z Summary
z Appendix
© 2006 ANSYS, Inc. All rights reserved. 5-3 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
z Discretization schemes
Initialization Enable the solution monitors of interest
z Stability
Check for convergence
Setting Under-relaxation
Setting Courant number Yes No
z Accelerating convergence
Accuracy
Check for accuracy No
z Grid Independence
z Adaption Yes
Stop
© 2006 ANSYS, Inc. All rights reserved. 5-4 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
Available Solvers
Segregated PBCS DBCS
There are two kinds of solvers available in
FLUENT. Solve U-Momentum
z Pressure-based solver
z Density-based coupled solver (DBCS) Solve V-Momentum Solve Mass,
Solve Mass Momentum,
The pressure-based solvers take momentum Solve W-Momentum & Momentum Energy,
and pressure (or pressure correction) as the Species
primary variables. Solve Mass
Continuity;
Pressure-velocity coupling algorithms are Update Velocity
derived by reformatting the continuity
equation
Two algorithms are available with the Solve Energy
pressure-based solvers:
z Segregated solver – Solves for pressure Solve Species
correction and momentum sequentially.
z Coupled Solver (PBCS) – Solves pressure and Solve Turbulence Equation(s)
momentum simultaneously.
Solve Other Transport Equations as required
© 2006 ANSYS, Inc. All rights reserved. 5-5 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
Available Solvers
Density-Based Coupled Solver –
equations for continuity, momentum,
energy, and species, if required, are
solved in vector form. Pressure is
obtained through the equation of state.
Additional scalar equations are solved
in a segregated fashion.
The density-based solver can use
either an implicit or explicit solution
approach:
z Implicit – Uses a point-implicit Gauss-
Seidel / symmetric block Gauss-Seidel
/ ILU method to solve for variables.
z Explicit: uses a multi-step Runge-
Kutta explicit time integration method
Note: the pressure-based solvers are
implicit
© 2006 ANSYS, Inc. All rights reserved. 5-6 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
Choosing a Solver
The pressure-based solver is applicable for a wide range of flow regimes from
low speed incompressible flow to high-speed compressible flow.
z Requires less memory (storage).
z Allows flexibility in the solution procedure.
The pressure-based coupled solver (PBCS) is applicable for most single phase
flows, and yields superior performance to the pressure-based (segregated)
solver.
z Not available for multiphase (Eulerian), periodic mass-flow and NITA cases.
z Requires 1.5–2 times more memory than the segregated solver.
The density-based coupled solver (DBCS) is applicable when there is a strong
coupling, or interdependence, between density, energy, momentum, and/or
species.
z Examples: High speed compressible flow with combustion, hypersonic flows,
shock interactions.
The Implicit solution approach is generally preferred to the explicit approach,
which has a very strict limit on time step size
The explicit approach is used for cases where the characteristic time scale of
the flow is on the same order as the acoustic time scale. (e.g.: propagation of
high-Ma shock waves).
© 2006 ANSYS, Inc. All rights reserved. 5-7 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
∂(ρφ)
Nfaces Nfaces
∂t
V+ ∑ρf
f Vf φ f ⋅ A f = ∑Γ ∇φ ⋅ A
f
φ f f + Sφ V
© 2006 ANSYS, Inc. All rights reserved. 5-8 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
∂t
V+ ∑ρf
f Vf φ f ⋅ A f = ∑Γ ∇φ ⋅ A
f
φ f f + Sφ V
© 2006 ANSYS, Inc. All rights reserved. 5-9 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
© 2006 ANSYS, Inc. All rights reserved. 5-10 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
Pressure-Velocity Coupling
Pressure-velocity coupling refers to the numerical algorithm which
uses a combination of continuity and momentum equations to derive
an equation for pressure (or pressure correction) when using the
pressure-based solver.
Four algorithms are available in FLUENT.
z Semi-Implicit Method for Pressure-Linked Equations (SIMPLE)
The default scheme, robust
z SIMPLE-Consistent (SIMPLEC)
Allows faster convergence for simple problems (e.g., laminar flows with
no physical models employed).
z Pressure-Implicit with Splitting of Operators (PISO)
Useful for unsteady flow problems or for meshes containing cells with
higher than average skewness
z Fractional Step Method (FSM) for unsteady flows.
Used with the NITA scheme; similar characteristics as PISO.
© 2006 ANSYS, Inc. All rights reserved. 5-11 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
Initialization
Iterative procedure requires that all
solution variables be initialized before
calculating a solution
Solve Initialize Initialize…
z Realistic guesses improves solution
stability and accelerates convergence
z In some cases, a good initial guess is
required.
Example: high temperature region to
initiate chemical reaction.
© 2006 ANSYS, Inc. All rights reserved. 5-12 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
FMG Initialization
Full Multigrid (FMG) Initialization can be used to create a better initialization
of the flow field:
z TUI command: /solve/init/fmg-initialization
It can be used with both pressure and density based solvers, but only in steady
state.
FMG uses the Full Approximation Storage (FAS) multigrid method to solve
the flow problem on a sequence of coarser meshes, before transferring the
solution onto the actual mesh.
z Settings can be accessed by the TUI command:
/solve/init/set-fmg-initialization
© 2006 ANSYS, Inc. All rights reserved. 5-13 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
Case Check
Case Check is a utility in FLUENT which looks for common setup errors and
provides guidance in selecting case parameters and models.
z Uses rules and best practices
Case check will look for compliance in:
z Grid
Solve Case Check…
z Model Selection
z Boundary Conditions
z Material Properties
z Solver Settings
Tabbed sections contain
recommendations
Automatic recommendations:
the utility will make the changes
Manual recommendations: the
user has to make the changes
© 2006 ANSYS, Inc. All rights reserved. 5-14 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
Outline
Using the Solver
z Setting Solver Parameters
z Convergence
Definition
Monitoring
Stability
Accelerating Convergence
z Accuracy
Grid Independence
Grid Adaption
z Summary
z Appendix
© 2006 ANSYS, Inc. All rights reserved. 5-15 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
Convergence
At convergence, the following should be satisfied:
z All discrete conservation equations (momentum, energy, etc.) are obeyed in all
cells to a specified tolerance OR the solution no longer changes with subsequent
iterations.
z Overall mass, momentum, energy, and scalar balances are achieved.
Monitoring convergence using residual history:
z Generally, a decrease in residuals by three orders of magnitude indicates at least
qualitative convergence. At this point, the major flow features should be
established.
z Scaled energy residual must decrease to 10-6 (for the pressure-based solver).
z Scaled species residual may need to decrease to 10-5 to achieve species balance.
Monitoring quantitative convergence:
z Monitor other relevant key variables/physical quantities for a confirmation.
z Ensure that overall mass/heat/species conservation is satisfied.
© 2006 ANSYS, Inc. All rights reserved. 5-16 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
10-3
10-6
© 2006 ANSYS, Inc. All rights reserved. 5-17 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
© 2006 ANSYS, Inc. All rights reserved. 5-18 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
© 2006 ANSYS, Inc. All rights reserved. 5-19 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
© 2006 ANSYS, Inc. All rights reserved. 5-20 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
Convergence Difficulties
Numerical instabilities can arise with an ill-posed problem, poor quality mesh,
and/or inappropriate solver settings.
z Exhibited as increasing (diverging) or “stuck” residuals.
z Diverging residuals imply increasing imbalance in conservation equations.
z Unconverged results are very misleading!
Troubleshooting
Continuity equation convergence
z Ensure that the problem is well- trouble affects convergence of
posed.
all equations.
z Compute an initial solution using a
first-order discretization scheme.
z Decrease under-relaxation factors for
equations having convergence
problems (pressure-based solver).
z Decrease the Courant number
(density-based solver)
z Remesh or refine cells which have
large aspect ratio or large skewness.
© 2006 ANSYS, Inc. All rights reserved. 5-21 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
© 2006 ANSYS, Inc. All rights reserved. 5-22 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
© 2006 ANSYS, Inc. All rights reserved. 5-23 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
Accelerating Convergence
Convergence can be accelerated by:
z Supplying better initial conditions
Starting from a previous solution (using file/interpolation when necessary)
z Gradually increasing under-relaxation factors or Courant number
Excessively high values can lead to instabilities or convergence problems
Recommend saving case and data files before continuing iterations
z Controlling multigrid solver settings (but default settings provide a robust
Multigrid setup and typically do not need to be changed). See the
Appendix for details on the Multigrid settings.
© 2006 ANSYS, Inc. All rights reserved. 5-24 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
© 2006 ANSYS, Inc. All rights reserved. 5-25 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
Outline
Setting Solver Parameters
Convergence
z Definition
z Monitoring
z Stability
z Accelerating Convergence
Accuracy
z Grid Independence
z Grid Adaption
Summary
Appendix
© 2006 ANSYS, Inc. All rights reserved. 5-26 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
Solution Accuracy
A converged solution is not necessarily a correct one!
z Always inspect and evaluate the solution by using available data, physical
principles and so on.
z Use the second-order upwind discretization scheme for final results.
z Ensure that solution is grid-independent:
Use adaption to modify the grid or create additional meshes for the grid-
independence study
If flow features do not seem reasonable:
z Reconsider physical models and boundary conditions
z Examine mesh quality and possibly remesh the problem
z Reconsider the choice of the boundaries’ location (or the domain):
inadequate choice of domain (especially the outlet boundary) can
significantly impact solution accuracy
© 2006 ANSYS, Inc. All rights reserved. 5-27 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
© 2006 ANSYS, Inc. All rights reserved. 5-28 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
© 2006 ANSYS, Inc. All rights reserved. 5-29 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
Outline
Using the Solver
z Setting Solver Parameters
z Convergence
Definition
Monitoring
Stability
Accelerating Convergence
z Accuracy
Grid Independence
Grid Adaption
z Summary
z Appendix
© 2006 ANSYS, Inc. All rights reserved. 5-30 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
© 2006 ANSYS, Inc. All rights reserved. 5-31 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
© 2006 ANSYS, Inc. All rights reserved. 5-32 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
Summary
Solution procedure for both the pressure-based and density-based
solvers is identical.
z Calculate until you get a converged solution
z Obtain a second-order solution (recommended)
z Refine the mesh and recalculate until a grid-independent solution is
obtained.
All solvers provide tools for judging and improving convergence and
ensuring stability.
© 2006 ANSYS, Inc. All rights reserved. 5-33 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
Appendix
Background
z Finite Volume Method
z Explicit vs. Implicit
z Segregated vs. Coupled
z Transient Solutions
z Flow Diagrams of NITA and ITA Schemes
© 2006 ANSYS, Inc. All rights reserved. 5-34 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
© 2006 ANSYS, Inc. All rights reserved. 5-35 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
∑ρ ∑ Γ (∇φ)
p face f
∆V + f φ f V f Af = f ⊥, f A f + S φ ∆V cell p
∆t faces faces
adjacent cells, nb
Discretized equations require information at both cell centers and
faces.
z Field data (material properties, velocities, etc.) are stored at cell centers.
z Face values are interpolated in terms of local and adjacent cell values.
z Discretization accuracy depends on the “stencil” size.
The discretized equation can be expressed simply as
ap φp + ∑a
nb
nb φ nb = b p
© 2006 ANSYS, Inc. All rights reserved. 5-36 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
Linearization
Equation sets are solved iteratively.
z Coefficients ap and anb are typically functions of solution a p φ p +
variables (nonlinear and coupled).
∑a
nb
nb φ nb = b p
© 2006 ANSYS, Inc. All rights reserved. 5-37 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
© 2006 ANSYS, Inc. All rights reserved. 5-38 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
z In this case, the coefficients ap and anb are scalar values. a φ +
Density-based solver
p p ∑ anb φ nb = b p
nb
z If more than one variable is unknown in each equation, and each variable
is defined by its own transport equation, then the equation set is coupled
together.
z In this case, the coefficients ap and anb are Neq × Neq matrices.
z φ is a vector of the dependent variables, {p, u, v, w, T, Y}T
© 2006 ANSYS, Inc. All rights reserved. 5-39 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
Pressure-Based Solver
In the pressure-based solver, each Update properties
equation is solved separately.
The continuity equation takes the Solve momentum equations (u, v, w velocity)
© 2006 ANSYS, Inc. All rights reserved. 5-40 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
Density-Based Solver
Continuity, momentum, energy, and Update properties
species are solved simultaneously in the
density-based solver.
Solve continuity, momentum, energy
Equations are modified to resolve both and species equations simultaneously
compressible and incompressible flow.
Transient term is always included. Solve turbulence and other scalar equations
z Steady-state solution is formed as time
increases and transients tend to zero.
For steady-state problem, the “time step” No Converged? Yes
∆t =
(CFL) ∆x CFL = Courant-Friedrichs-Lewy-number
u = appropriate velocity scale
U ∆x = grid spacing
© 2006 ANSYS, Inc. All rights reserved. 5-41 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
Multigrid Solver
The Multigrid solver accelerates convergence by solving
the discretized equations on multiple levels of mesh
density so that the “low-frequency” errors of the
approximate solution can be efficiently eliminated Fine (original) mesh
z Influence of boundaries and far-away points are more easily
transmitted to interior of coarse mesh than on fine mesh.
z Coarse mesh defined from original mesh
Multiple coarse mesh ‘levels’ can be created.
Algebraic Multigrid (AMG) – coarse mesh emulated “Solution
algebraically Transfer”
Full Approximate Storage Multigrid (FAS) – ‘cell
coalescing’ defines new grid.
– An option in the density-based explicit solver.
Final solution is for original mesh
z Multigrid solver operates automatically in the background
Consult the FLUENT User’s Guide for additional options coarse mesh
and technical details
© 2006 ANSYS, Inc. All rights reserved. 5-42 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
© 2006 ANSYS, Inc. All rights reserved. 5-43 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
Yes
Solve pressure
Solve pressure
correction
correction
No
Converged?
Correct velocity,
Correct velocity,
pressure, fluxes Yes
pressure, fluxes
Solve scalars
(T, k, ε, etc.)
No
Solve k and ε Converged?
No
Converged? Yes
Solve other scalars
Yes
Advance to Advance to
next time step next time step
© 2006 ANSYS, Inc. All rights reserved. 5-45 ANSYS, Inc. Proprietary
Introductory FLUENT Notes Fluent User Services Center
FLUENT v6.3 December 2006 www.fluentusers.com
© 2006 ANSYS, Inc. All rights reserved. 5-46 ANSYS, Inc. Proprietary