© Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

28
© Fluent Inc. 06/13/22 L1 Fluids Review TRN-98-004 Solution Methods

Transcript of © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

Page 1: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L1

Fluids Review TRN-98-004

Solution Methods

Page 2: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L2

Fluids Review TRN-98-004

Overview

Properties of Numerical Solution Methods

FVM and FEM solution methods

Characteristics of solution algorithms

Equations solvers

Underrelaxation

Convergence

Page 3: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L3

Fluids Review TRN-98-004

Numerical Solution Methods (1)

The important components of a numerical solution method are:

1. Mathematical model of flow e.g. equations of motion- unsteady and steady, compressible and

incompressible, 2D and 3D, turbulence, etc.

2. Discretization Method Approximation of the differential equations by a system of algebraic

equations Finite Difference Method (FDM) Finite Volume Method (FVM) Finite Element Method (FEM)

3. Coordinate system cartesian or cylindrical, curvilinear orthogonal and non-orthogonal

coordinate systems

Page 4: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L4

Fluids Review TRN-98-004

Numerical Solution Methods (2)4. Numerical Grid

The solution domain is subdivided by the grid. The algebraic conservation equations for the variables are computed on a finite number of control volumes or elements in the domain.

Types of Grids Structured grids Multi-block-structured grids Unstructured grids

5. Finite Approximations Discretizing the solution domain gives rise to errors from the approximation of

the continuous differential functions FDM - approximate the derivatives through the Taylor series expansion FVM - approximate the surface and volume integrals FEM - choose weighting functions

Unstructured surface grid for vehicle aerodynamic analysis.

Page 5: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L5

Fluids Review TRN-98-004

Numerical Solution Methods (3)

6. Solution Criteria and Convergence Criteria

This is the topic of this lecture

Methods of solving the system of algebraic equations

The nonlinear nature of the governing equations requires an iterative

solution method. Convergence criteria determine when to terminate the

iterative process. Accuracy and efficiency are considered.

Page 6: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L6

Fluids Review TRN-98-004

Properties of Solution Methods

Consistency

Stability

Convergence

Conservation

Boundedness

Realizability

Accuracy

Page 7: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L7

Fluids Review TRN-98-004

FVM - Solution Algorithms

The discretized form of the governing conservation equations can be written as:

where nb denotes the cell neighbors of cell P

In a 2D structured grid, the face P has fourneighbors (E,W,N,S). In a 3D grid, a cell hassix neighbors.

In an unstructured grid, the number of neighbors depends on the cell shape and mesh topology.

The above algebraic equation is written for each transport variable, that is, velocity, temperature, species concentration and turbulence quantities.

nb nbnbPP baa

nP EW

N

Sj

i

es

w

Page 8: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L8

Fluids Review TRN-98-004

FVM - Solution Algorithms

The solution of the Navier-Stokes equations is complicated by the lack of an independent equation for pressure. Pressure is linked to all three momentum equations

The pressure-velocity coupling algorithm SIMPLE (Semi-Implicit Pressure Linked Equations), and it’s variants, are used.

Concept:

the momentum equations are used to compute velocity a pressure equation is derived from the continuity equation a discrete pressure correction equation is derived from the discrete forms

of the pressure and momentum equations the pressure correction equation is updated with pressure and a mass flux

balance through a mass correction

Page 9: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L9

Fluids Review TRN-98-004

Finite Volume Solution Methods

The Finite Volume Solution method can either use a “segregated” or a “coupled” solution procedure.

The solution procedure of each method is the same.

Page 10: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L10

Fluids Review TRN-98-004

Segregated Solution Procedure

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

Page 11: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L11

Fluids Review TRN-98-004

Coupled Solution Procedure

Solve continuity, momentum, energy, and species equations simultaneously.

Converged?

StopNo Yes

Solve turbulence and other scalar equations.

Update properties.

Page 12: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L12

Fluids Review TRN-98-004

Unsteady Solution Procedure

Same procedure for segregated and 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

Page 13: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L13

Fluids Review TRN-98-004

FVM - Linear Equation Solvers Consider the system of algebraic equations for variable

The above system of equations is arranged in a matrix and solved iteratively. For a structured grid, the coefficient matrix is banded. Special line-by-line

iterative techniques such as the Line Gauss-Seidel (LGS) method may be used.

LGS method involves solving the equations in a “line” simultaneously. The equations are set-up in a tri-diagonal matrix solved via Gaussian

elimination For an unstructured grid, no line structure exists. Point-iterative methods are used,

e.g., the Point Gauss-Seidel (PGS) technique.

LGS/PGS locally reduce errors but can miss long-wavelength errors. Multigrid acceleration will speed up the LGS/PGS convergence.

nb nbnbPP baa

Page 14: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L14

Fluids Review TRN-98-004

FVM - Line Gauss-Seidel (LGS) Method

The LGS method is used on structured grids and involves the following steps:

simultaneously solve the equations in the sweep direction march to next row or column

Line to be solved

Values fromprevious sweep

Values fromprevious iteration

Flow

Marching directionsweeping direction

Page 15: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L15

Fluids Review TRN-98-004

FVM - The Multigrid Solver

The LGS and PGS solvers both transmit the influence of near-neighbors effectively and are less effective at transmitting the influence of far away grid points and boundaries, thereby, slowing convergence.

“Multigrid” solver accelerates convergence for:

Large number of cells Large cell aspect ratios

x/y > 20 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.

Page 16: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L16

Fluids Review TRN-98-004

The Multigrid Concept (1) Multigrid solver uses a sequence of grids going from fine to coarse.

Influence of boundaries and far-away points more easily transmitted to interior on coarse meshes than on fine meshes.

In coarse meshes, grid points are closer together in the computational space and have fewer computational cells between any two spatial locations.

Fine meshes give more accurate solutions.

original grid coarse grid level 2

coarse grid level 1

Page 17: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L17

Fluids Review TRN-98-004

The Multigrid Concept (2) The solutions on the coarser meshes is used as a starting point for solutions on

the 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 original (fine) mesh.

Coarse mesh calculations: only accelerates convergence do not change final answer

fine mesh

corrections

summed equations (or volume-averaged solution)

coarse mesh

Page 18: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L18

Fluids Review TRN-98-004

For stability the change in a variable p value from iteration to iteration is reduced by an “under-relaxation” factor, :

For example, an under-relaxation of 0.2 restricts the change in P to 20% of the computed change of for one iteration.

FVM - Under-relaxation Equation set being solved is non-linear.

Equation for one variable may depend on other variables, e.g.,

Temperature Mass fraction

PPP

old,

Page 19: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L19

Fluids Review TRN-98-004

Residual at point P is defined as:

An overall measure of the residual in the domain is:

Residuals can be scaled relative to the starting residual

FVM - Residuals and Convergence At convergence:

All discrete conservation equations (momentum, energy, etc.) are obeyed in all cells to a specified tolerance.

The solution no longer changes with additional iterations. Mass, momentum, energy and scalar balances are obtained.

“Residuals” measure imbalance (or error) in conservation equations.

1 nb nbnbPPP aaR

P PRR

Page 20: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L20

Fluids Review TRN-98-004

Finite Element Solution Methods

We seek a solution to the equation of the form: K(u) u = F

A solution method is made up of two parts

Algorithm: solution organization scheme Equation solver: solves linear system of equations

We shall consider two algorithms and two equation solvers

Page 21: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L21

Fluids Review TRN-98-004

FEM Algorithms and Equation Solvers

Algorithms:

fully-coupled segregated

Equation solvers:

Gaussian elimination Iterative methods:

non-symmetric equation systems symmetric equation systems (pressure eqns.)

Page 22: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L22

Fluids Review TRN-98-004

Fully-Coupled Algorithm (1)

The most common solution scheme is the so-called Newton-Raphson iteration, or Newton’s method for short

First, re-write the equation as: R(u) = K(u) u - F

Using a Taylor series expansion and some further manipulations, we arrive at:

)u(R)u(Juu 11 iiii

Page 23: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L23

Fluids Review TRN-98-004

Fully-Coupled Algorithm (2)

Advantages:

converges very rapidly Disadvantages:

requires good initial guess calculation of J-1(ui) is expensive

Alternatives:

Modified Newton-Raphson: evaluate J-1(ui) only once

Quasi-Newton: update J-1(ui) in a simple manner

graphic representation of Newton’s method

Page 24: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L24

Fluids Review TRN-98-004

Segregated Algorithm (1)

K(u) u = F is never formed

Rather, it is decomposed into a set of decoupled equations:

Kuu - Cxp = fu u momentum equation

Kvv - Cyp = fv v momentum equation

CxTu + Cy

Tv = 0 continuity equation

KTT = fT energy (scalar) equation

No explicit equation for pressure!

Replace continuity equation with Poisson-type pressure matrix equation (derived from manipulating discretized momentum and continuity eqn’s)

The pressure can be calculation in a number of ways

Page 25: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L25

Fluids Review TRN-98-004

Segregated Algorithm (2)

Pressure projection method

given the current values of u, v and T, obtain an approximate pressure bo solving a discrete pressure equation

relax the pressure, i.e.:

using pnew, solve the momentum equations and energy equation using the newly computed velocities, solve for the pressure correction, p adjust the velocity field (so that it obeys the incompressibility constraint)

using p Advantage: less memory use

Disadvantage: more iterations

Each equation set can be solved iteratively (inner iteration) or simulaneously (Gaussian elimination)

approxoldnew ppp )1(

uvpT

outer iteration

Page 26: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L26

Fluids Review TRN-98-004

Equation Solvers

Iterative

Non-symmetric equation systems: Conjugate gradient squared GMRES

Symmetric equation systems (pressure): Conjugate gradient Conjugate residual

Gaussian elimination

Page 27: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L27

Fluids Review TRN-98-004

Underrelaxation

Two forms are used

explicit (similar to FVM approach) carries some “history” forward used with fully-coupled method also used for pressure in segregated method

implicit alters the weighting term for matrix diagonal used for other equations (not pressure) with segregated method

Page 28: © Fluent Inc. 9/5/2015L1 Fluids Review TRN-98-004 Solution Methods.

© Fluent Inc. 04/19/23L28

Fluids Review TRN-98-004

Convergence

Various quantities can be used to judge convergence of an FEM solution

The more commonly used are:

Relative change in solution between iterations

||Ui - Ui-1|| / ||Ui|| < tolerance

Relative numerical accuracy (R is residual vector)

||Ri|| / ||R0|| < tolerance