Finite Volume Method in CFD Software Packages

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

Finite Volume Method in CFD software packages

About 80% of commercial CFD packages utilize FVM Example: Steady-state specie convection:

Mass balance over the control volume contains values at the faces. These values have to be determined from interpolation of the values in the cell centers:

LTNT - ETH Zurich

Example- continued (discretization)


Interpolation assumption: the value at the face is equal to the value in the center of the cell upstream of the face: Upwind scheme .

Notation: Face areas: Concentration at the centers: Components of 2D velocity at the centers: Source at the center:
LTNT - ETH Zurich

Diffusion:
2

Example- continued (algebraic equations)


Re-arrangement:

Simplified notation (index nb refers to the neighboring centers) :

or How many members in the sum if mesh is tetrahedral ?

The concentration is calculated by recalculating cP from the equation iteratively for all cells in the domain.
LTNT - ETH Zurich 3

Residuals and convergence


Depending of the interpolation scheme the coefficients in final equation may depend on the unknown function so equation:

becomes non-linear

The equation is solved by an iterative process. Absolute residuals measure imbalance in conservation equations at every iteration:

Scaled residual in single cell

Scaled residual of a mesh


Can quality of mesh affect convergence ?
LTNT - ETH Zurich 4

Residuals and convergence


The residuals show how fast the solution (of discretized algebraic system) converge Small values of the residuals are necessary but not sufficient conditions to stop the iterations Solutions of CFD problems are considered to converge when the flow field and scalar fields are no longer changing. Common practice is to monitor residuals and averaged flow parameters:

LTNT - ETH Zurich

Finite Volume Method: pros and contras


First well-documented use was by Evans and Harlow (1957) at Los Alamos and Gentry, Martin and Daley (1966): efficient, iterative solvers are well developed. Stable: even if variable fields are not smooth across shocks and other discontinuities, mass, momentum and energy are always conserved. FVM has an advantage in memory use and speed for very large problems, higher speed flows, turbulent flows, and source term dominated flows (like combustion). Basic FV control volume balance does not limit cell shape; mass, momentum, energy conserved even on coarse grids; Disadvantages: false diffusion, i.e. initial sharp distribution of variables are smeared out during the solution
LTNT - ETH Zurich 6

Example: artificial diffusion of temperature in 1D velocity field


www.bakker.org

If the thermal diffusivity coefficient is set to zero, the temperature will be exactly 100 C everywhere above the diagonal and exactly 0 C everywhere below the diagonal.

Artificial diffusion is caused by numerical rounding during the iterations

LTNT - ETH Zurich

Example: artificial diffusion: temperature contour plot

Grid refinement coupled with a higher-order interpolation scheme will minimize the false diffusion.
LTNT - ETH Zurich 8

First-order upwind scheme


The value at the face is the same as the cell centered value in the cell upstream of the face. The main advantages are that it is easy to implement and that it results in very stable calculations, but it also very diffusive. Gradients in the flow field tend to be smeared out This is often the best scheme to start calculations with.

LTNT - ETH Zurich

Central Differencing Scheme


The value of unknown function is determined at the face by linear interpolation between the cell centered values. The scheme often leads to oscillations in the solution or divergence if advection dominates diffusive transport: Switching to first order upwind in cells where >2 is called a hybrid scheme.

LTNT - ETH Zurich

10

Second-order upwind scheme


The value of the function is interpolated from the cell values in the two cells upstream of the face. In regions with strong gradients it can result in face values that are outside of the range of cell values. It is then necessary to apply limiters to the predicted face values. Second-order upwind with limiters is one of the most popular numerical schemes because of its combination of accuracy and stability.

LTNT - ETH Zurich

11

Other schemes and solution tactic (ANSYS FLUENT)


QUICK: A quadratic curve is fitted through two upstream nodes and one downstream node. Power Law Scheme: The face value is determined from an exponential profile through the cell values. Different pressure-velocity (SIMPLE, SIMPLEC, PISO) coupling algorithms are used to derive equations for the pressure from the momentum equations and the continuity equation. It is recommended to start calculations with first-order upwind and after about 100 iterations to switch over to second-order upwind. Other schemes may speed up convergence but instability is possible

LTNT - ETH Zurich

12

Suppression of oscillation in numerical solution with high-order schemes


At each iteration, at each cell, a new value for unknown variable in cell P can then be calculated from equation:

U is so-called underrelaxation parameter. It is usually set form 0 to 1 Underrelaxation factors that are too small will significantly slow down convergence, sometimes to the extent that the user thinks the solution is converged when it really is not. The recommendation is to always use underrelaxation factors that are as high as possible, without resulting in oscillations or divergence. When the solution is converged but the pressure residual is still relatively high, the factors for pressure and momentum can be lowered to further refine the solution.
LTNT - ETH Zurich 13

Solution methods for algebraic system generated in FVM


The finite volume solution method can either use a segregated or a coupled solution procedure. With segregated methods an equation for a certain variable is solved for all cells, then the equation for the next variable is solved for all cells, etc. With coupled methods, for a given cell equations for all variables are solved, and that process is then repeated for all cells. The segregated solution method is the default method in most commercial finite volume codes. It is best suited for incompressible flows or compressible flows at low Mach number. Compressible flows at high Mach number, especially when they involve shock waves, are best solved with the coupled solver.
LTNT - ETH Zurich 14

Unsteady solution procedure

LTNT - ETH Zurich

15

Boundary conditions
Dirichlet boundary conditions: value of unknown function is specified, e.g. velocity is zero at boundary Neumann boundary conditions: gradient of unknown function is specified, e.g. temperature gradient is zero

Mixed boundary condition: linear combination of Dirichlet and Neumann is set At a given boundary, different types of boundary conditions can be used for different variables
Adiabatic BC is Dirichlet or Neumann or mixed ?
LTNT - ETH Zurich 16

Restriction on outflow boundary conditions


Outflow boundaries cannot be used: With compressible flows. With the pressure inlet boundary condition (use velocity inlet instead) because the combination does not uniquely set a pressure gradient over the whole domain. In unsteady flows with variable density. Do not use outflow boundaries where: Flow enters domain or when backflow occurs (in that case use pressure b.c.). Gradients in flow direction are significant. Conditions downstream of exit plane impact flow in domain.

Can converged simulation with backflow represent a real flow ?


LTNT - ETH Zurich 17

Pressure boundary conditions


Backflow can occur at pressure outlet boundaries: During solution process or as part of solution. Backflow is assumed to be normal to the boundary. Convergence difficulties minimized by realistic values for backflow quantities. Value specified for static pressure used as total pressure wherever backflow occurs. Pressure outlet must always be used when model is set up with a pressure inlet. Incompressible flow Compressible flow

LTNT - ETH Zurich

18

Symmetry boundaries
Used to reduce computational effort in problem. Flow field and geometry must be symmetric: Zero normal velocity at symmetry plane. Zero normal gradients of all variables at symmetry plane. Also used to model slip walls in viscous flow.

Periodic boundaries
Used when physical geometry of interest and expected flow pattern and the thermal solution are of a periodically repeating nature. Is it possible to have periodic boundaries while modeling a heat transfer problem ?
LTNT - ETH Zurich 19

Axis boundary conditions

Used at the centerline (y=0 in Fluent) of a 2-D axisymmetric grid. CFX requires 3D mesh even for axisymmetric flow

Axisymmetric BC is Dirichlet or Neumann or mixed ?


LTNT - ETH Zurich 20

CFX tutorial: Flow in a Catalytic Converter

Modeling the pressure drop through a car catalytic converter when air enters the inlet at 25 m/s, and exits the outlet at a static pressure of 1 atm. Assume that the catalytic converter contains isothermal air at a temperature of 600 K.

Quiz questions 1) where did you set under relaxation factor in this simulation? 2)

LTNT - ETH Zurich

21

You might also like