Date post: | 14-Dec-2015 |
Category: |
Documents |
Upload: | elwin-lynch |
View: | 232 times |
Download: | 5 times |
© Fluent Inc. 04/18/23E1
Fluent Software TrainingTRN-98-006
Using the Segregated and Coupled Solvers
© Fluent Inc. 04/18/23E2
Fluent Software TrainingTRN-98-006
Outline Introduction Solution procedure Terminology Convergence
What is convergence? Judging and monitoring convergence Accelerating convergence
Stability Accuracy
Discretization schemes Grid adaption Grid independence
© Fluent Inc. 04/18/23E3
Fluent Software TrainingTRN-98-006
FLUENT 5 provides two classes of numerical methods Segregated solver (FLUENT/UNS, FLUENT 4.5) Coupled solver
Explicit (RAMPANT) Implicit
Can switch “on-the-fly” between these methods Solution procedure that you follow is basically the same for all
solvers. Both classes of methods employ similar discretization schemes (finite-
volume) but different linearization and solution methods
Introduction
© Fluent Inc. 04/18/23E4
Fluent Software TrainingTRN-98-006
Linearization: Implicit vs. Explicit
Discrete nonlinear governing equations need to be linearized so that system of equations can be solved for dependent variables in the cells
Implicit linearization - unknown value in each cell uses existing and unknown values from neighboring cells
System of equations obtained which must be solved simultaneously In segregated approach, each variable equation linearized implicitly with
respect to itself; variable field solved over all cells In coupled approach, each equation in coupled set linearized implicitly
with respect to all dependent variables; block coupled equations solved Explicit linearization - unknown value in each cell computed from
relations that include only existing values Each equation in coupled set linearized explicitly Multi-stage (Runge-Kutta) solver can be used
© Fluent Inc. 04/18/23E5
Fluent Software TrainingTRN-98-006
Solution Procedure: What You Do
Modify solution parameters or grid
NoYes
NoYes
Set the solution parameters
Initialize the solution
Enable the solution monitors of interest
Calculate a solution
Check for convergence
Check for accuracy
Stop
© Fluent Inc. 04/18/23E6
Fluent Software TrainingTRN-98-006
Segregated Solution Procedure: What the Solver Does
Update properties.
Solve momentum equations (u, v, w velocity).
Solve pressure-correction (continuity) equation. Update pressure, face mass flow rate.
Solve energy, species, turbulence, and other scalar equations.
Converged?
StopNo Yes
© Fluent Inc. 04/18/23E7
Fluent Software TrainingTRN-98-006
Coupled Solution Procedure:What the Solver Does
Update properties.
Solve continuity, momentum, energy, and species equations simultaneously.
Converged?
StopNo Yes
Solve turbulence and other scalar equations.
© Fluent Inc. 04/18/23E8
Fluent Software TrainingTRN-98-006
Unsteady Solution Procedure Same procedure for segregated and time-implicit coupled solvers:
Execute segregated or coupled procedure, iterating to convergence
Take a time step
Requested time steps completed?
No Yes Stop
Update solution values with converged values at current time
Time-explicit coupled solver explicitly solves for all variables one cell at a time at each time step (Runge-Kutta).
© Fluent Inc. 04/18/23E9
Fluent Software TrainingTRN-98-006
What is Convergence? At convergence:
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.
“Residuals” measure imbalance (or error) in conservation equations. The governing transport equations are solved iteratively. Final solution (ideal): Iteration i:
Opposite of convergence is divergence. Imbalance grows larger with more iterations.
Note: Convergence is not the same as accuracy!
baanb
nbnbpp Rbaanb
nbnbpp
© Fluent Inc. 04/18/23E10
Fluent Software TrainingTRN-98-006
Judging Qualitative Convergence
Generally, a decrease in residuals by 3 orders of magnitude (tolerance=110-3 ) indicates at least qualitative convergence.
Major flow features established Exceptions:
In segregated solver scaled energy residual must decrease to 110-6. Scaled species residual may need to decrease to 110-5 to achieve species
balance. Monitor other variables and balances to ensure quantitative
convergence.
Beware: Unconverged results can be misleading!
© Fluent Inc. 04/18/23E11
Fluent Software TrainingTRN-98-006
Residual Plots
Residual plots show: When the residual values have reached the specified tolerance Which equations are having convergence trouble
all equations converged
continuity equation convergencetrouble affects convergence ofall equations
© Fluent Inc. 04/18/23E12
Fluent Software TrainingTRN-98-006
Monitoring Quantitative Convergence
In addition to residuals, you can also monitor:
Lift, drag, or moment
Solve Monitors Force... Value of a variable or function:
At a boundary On a defined surface At a point
Solve Monitors Surface...
When the monitored value stops changing, the solution is converged.
Monitoring average static temperature over a surface
© Fluent Inc. 04/18/23E13
Fluent Software TrainingTRN-98-006
Convergence Monitor Plots
When lift value levels off, solution is converged.
© Fluent Inc. 04/18/23E14
Fluent Software TrainingTRN-98-006
Checking Balances
In addition to monitoring residual and variable histories, you should also check for overall heat and mass balances.
Net imbalance should be less than 0.1% of net flux through domain.
Report Fluxes...
© Fluent Inc. 04/18/23E15
Fluent Software TrainingTRN-98-006
Decreasing the Convergence Tolerance
Recall: at convergence, all discrete conservation equations are obeyed in all cells to a specified tolerance.
If your residuals indicate that the solution is converged, but the solution is still changing or has a large mass/heat imbalance:
Try reducing the convergence tolerance.
Solve Monitors Residual... Then calculate until solution converges to the new tolerance.
© Fluent Inc. 04/18/23E16
Fluent Software TrainingTRN-98-006
Accelerating Convergence
Convergence can be accelerated by: Supplying good initial conditions Modifying under-relaxation parameters or changing the Courant number
(coupled solver) Controlling multigrid solver settings
© Fluent Inc. 04/18/23E17
Fluent Software TrainingTRN-98-006
Supplying Initial Conditions
Initialize all solution variables before calculating a solution.
Solve Initialize Initialize... Also improves solution stability In some cases, correct initial guess is required:
Example: nozzle will not attain supersonic flow unless initial flow condition is supersonic.
“Patch” values for individual variables in certain regions.
Solve Initialize Patch... Free jet flows (patch high velocity for jet) Combustion problems (patch high temperature for ignition)
Start from a previous solution. Often used in conjunction with patching.
© Fluent Inc. 04/18/23E18
Fluent Software TrainingTRN-98-006
Starting from a Previous Solution
Previous solution can be used as an initial condition when changes are made to problem definition.
© Fluent Inc. 04/18/23E19
Fluent Software TrainingTRN-98-006
What is Under-relaxation? Equation set being solved is non-linear. Equation for one variable may depend on other variables, e.g.,
Temperature Mass fraction
For solver stability, the change in a variable’s value between iterations is reduced by an “under-relaxation” factor, :
e.g., under-relaxation of 0.2 limits the change in P to 20% of the computed change of for one iteration.
Under-relaxation factors for equations outside coupled set (for coupled solver) are set just as in segregated solver
P P P ,old
© Fluent Inc. 04/18/23E20
Fluent Software TrainingTRN-98-006
Modifying Under-relaxation Factors
Use default under-relaxation parameters to start a calculation.
To accelerate convergence, increase under-relaxation factor for an equation if its residual is either:
Monotonically decreasing Oscillating very slightly, but decreasing
Solve Controls Solution...
Increasing under-relaxation factors can also create instability! Leads to divergence! Good idea to save intermediate data before increasing under-relaxation.
© Fluent Inc. 04/18/23E21
Fluent Software TrainingTRN-98-006
Residual plot showing good convergence behavior accelerated by an increase in under-relaxation:
Example: Accelerating Convergence
Under-relaxation increased here
© Fluent Inc. 04/18/23E22
Fluent Software TrainingTRN-98-006
The Multigrid Solver
“Multigrid” solver accelerates convergence for: Large number of cells Large cell aspect ratios
x/y > 20 or so, for example Large differences in thermal conductivity
Such as in conjugate heat transfer General concept of multigrid is the same for structured and
unstructured grids, although the implementation is different.
© Fluent Inc. 04/18/23E23
Fluent Software TrainingTRN-98-006
The Multigrid Concept (1) Multigrid solver uses sequence of grids going from fine to coarse.
You choose the number of coarse grid levels. Solver creates them automatically.
Influence of boundaries and far-away points more easily transmitted to interior on coarse meshes than on fine meshes.
In coarse meshes, grid points closer together in computational space. Fewer computational cells between any two spatial locations.
However, fine meshes give more accurate solutions.
original grid coarse grid level 2
coarse grid level 1
© Fluent Inc. 04/18/23E24
Fluent Software TrainingTRN-98-006
The Multigrid Concept (2) Use solution on coarse meshes as starting point for solution on finer meshes.
Coarse-mesh solution contains influence of boundaries and far neighbors. These effects felt more easily on coarse mesh.
Accelerates convergence on fine mesh
Final solution obtained for mesh you created. Coarse mesh calculations:
Only speed up convergence Do not change final answer
fine mesh
corrections
summed equations (or volume-averaged solution)
coarse mesh
© Fluent Inc. 04/18/23E25
Fluent Software TrainingTRN-98-006
Courant Number for Coupled Solver
Time step t computed from CFL (Courant-Friedrichs-Lewy) condition:
In general, for coupled/explicit solver: Courant number cannot be > 2.0 from stability constraints; default = 1.0. May have to be set lower for problems with complex physics (e.g., high
Mach number). Defines time step t for time-explicit unsteady solver.
For coupled/implicit solver: Courant number can be set to 10, 100, or even higher Multigrid solver can reduce CFL if divergence is detected
u
xt
)CFL( CFL = Courant numberwhere u = appropriate velocity scalex = grid spacing
© Fluent Inc. 04/18/23E26
Fluent Software TrainingTRN-98-006
Increasing the Courant Number
To accelerate convergence, increase the Courant number if all residuals are either:
Monotonically decreasing Oscillating very slightly, but
decreasing
Solve Controls Solution...
© Fluent Inc. 04/18/23E27
Fluent Software TrainingTRN-98-006
Stability
If residuals are increasing or “stuck,” less aggressive solver settings are needed.
Try one or more of these changes: Decrease under-relaxation for equation(s) having convergence trouble.
(segregated solvers) Reduce Courant number (coupled solver). Adjust multigrid parameters. Try to compute an initial solution with a first-order discretization scheme.
© Fluent Inc. 04/18/23E28
Fluent Software TrainingTRN-98-006
Residual plot showing poor convergence behavior improved by a decrease in under-relaxation:
Example: Improving Stability
Under-relaxation decreased here
© Fluent Inc. 04/18/23E29
Fluent Software TrainingTRN-98-006
Accuracy
Once you have a converged solution, need to be sure it is accurate.
Compute converged solution.
Increase to second-order discretization scheme (if not already), and recalculate a converged solution.
Examine results for significant flow features or variables.
Refine grid and recalculate a converged solution.
Compare results w/results for last grid.
Solution different?Yes No
Solution isgrid-independent!
© Fluent Inc. 04/18/23E30
Fluent Software TrainingTRN-98-006
Choosing the Discretization Scheme
First-order: computes values at faces using values at adjacent cells. Faster convergence; less accurate
Second-order: computes face values using values at adjacent cells and their neighbors.
Slower convergence; more accurate Provides more accurate results, especially for tri/tet meshes. When flow is not aligned with the grid, first-order scheme increases
discretization error. In general, you should try to obtain a second-order solution.
face
adjacent cells
© Fluent Inc. 04/18/23E31
Fluent Software TrainingTRN-98-006
Grid Adaption
In general, finer grid = more accurate solution. Grid adaption allows you to add more cells where they are needed to
resolve the flow field. Example: regions of rapidly-changing velocity or pressure
If converged solution is not accurate enough: Adapt grid in appropriate region(s). Then continue calculation to convergence.
Use solution on original grid as initial solution. Data from original grid is automatically interpolated to finer grid.
Repeat adaption/calculation procedure if necessary. When solution no longer changes with further grid adaption, you have
a “grid-independent” solution.
© Fluent Inc. 04/18/23E32
Fluent Software TrainingTRN-98-006
Example: Supersonic Flow Over a Cylinder
Adapt grid in regions of high pressure gradient because there is a jump in pressure across the shock.
Adapt Gradient...
Original mesh Mesh after pressure gradient adaption
© Fluent Inc. 04/18/23E33
Fluent Software TrainingTRN-98-006
Example: Impinging Jet
Adapt grid in regions of high x velocity.
Adapt Iso-Value...
Original mesh shown withcontours of x velocity
Mesh after x-velocity isovalue adaption
© Fluent Inc. 04/18/23E34
Fluent Software TrainingTRN-98-006
Adaption Guidelines
In general, avoid large volume variations in regions with large gradients.
If you know where gradients are expected (e.g., shock, boundary layer), concentrate the original grid in that region.
If you need to adapt in a region with a large gradient, try to adapt uniformly.
© Fluent Inc. 04/18/23E35
Fluent Software TrainingTRN-98-006
Determining Grid Independence
Compare results obtained w/different grids to determine grid independence:
Overall pressure drop (Report Surface Integrals...) Overall heat transfer coefficient (Report Surface Integrals...) Lift, drag, and moment coefficients (Report Forces...) Average value of a variable at a point or on a surface (Report Surface
Integrals...) Average exit pressure, temperature at a significant location, etc.
Variation of a variable value along a line (Plot XY Plot...) Flow behaving “as expected” (use numerical and graphical reports)
© Fluent Inc. 04/18/23E36
Fluent Software TrainingTRN-98-006
Summary
Solution procedure for the segregated and coupled solvers is the same: 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.