Finite Volume Method
Finite Volume Method
2020.02.11
Kei
08/22/2023 1
Content
Transport equation
Mesh and element
Gauss theorem
Finite volume method
fvSchemes dict
Some comments
08/22/2023 3
Mesh and element
Mesh
-Let us divide the solution domain into a finite number of arbitrary
control volumes or cells, such as the one illustrated below.
-Inside each control volume the solution is sought
-The control volumes can be of any shape (e.g., tetrahedrons,
hexes, prisms, pyramids, dodecahedrons, and so on).
-The only requirement is that the elements need to be convex and
the faces that made up the control volume need to be planar .
08/22/2023 4
Mesh and element
Element (cell)
08/22/2023 5
Mesh and element
Element (cell)
-Assume that the values of all variables are computed and stored in
the centroid of the control volume VP and that they are represented by
a piecewise constant profile (the mean value)
08/22/2023 6
Gauss theorem
08/22/2023 7
Finite volume method
Flow chart
Apply Gauss theorem to
volume integral
Apply Temporal
discretization
08/22/2023 8
Finite volume method
08/22/2023 9
Finite volume method
08/22/2023 10
Finite volume method
08/22/2023 11
Finite volume method
-Convective flux:
-Diffusive flux:
08/22/2023 12
Finite volume method
Temporal discretization
-We calculate temporal derivative as follow:
-At this stage, we can use any time discretization scheme, e.g.,
Crank-Nicolson, Euler implicit, forward Euler…
08/22/2023 13
Finite volume method
08/22/2023 14
Interpolation schemes
08/22/2023 15
Interpolation schemes
08/22/2023 16
Interpolation schemes
08/22/2023 17
Interpolation schemes
08/22/2023 18
Interpolation schemes
08/22/2023 19
Interpolation schemes
08/22/2023 20
fvSchemes dict
fvSchemes in OpenFOAM
The fvSchemes dictionary contains the
information related to the discretization
schemes for the different terms appearing in
the governing equations.
Time discretization
08/22/2023 21
fvSchemes dict
08/22/2023 22
fvSchemes dict
Gradient scheme
-Keyword: gradSchemes
-Some common schemes:
Gauss linear: 2nd order.
leastSquares: 2nd order, more accurate than Gauss linear but also more
unstable.
-Gradient limiters:
Available limiters
08/22/2023 23
fvSchemes dict
08/22/2023 24
fvSchemes dict
-Some notifications:
First order methods are bounded and stable but diffusive.
Second order methods are accurate, but they might become oscillatory.
-If the case is too unstable, try to reduce the schemes of turbulence terms to 1 st
order.
08/22/2023 25
fvSchemes dict
08/22/2023 26
fvSchemes dict
08/22/2023 27
Some comments
-Check mesh again and again, only run case when you have a
mesh with acceptable qualities.
-Select a good initial conditions. A good initial condition can
improve the stability and convergence rate.
-Start the simulation by using a first order scheme and then switch
to a high order scheme.
-To accelerate the iterative convergence, you can change the
convergence criterion of the linear solvers on-the-fly.
-You can start using a not so tight convergence criterion with a
robust numerical scheme, and as the simulation runs you can tighten
the convergence criterion to increase the accuracy.
-Remember to always check the time step continuity errors. This
number should be small (negative or positive), if it increases in time
for sure something is wrong.
08/22/2023 28
Some comments
-Never get a final solution using first order schemes. They are too
diffusive, which means they will under predict the forces and smear
the gradients.
-You can start using a first order scheme, and then switch to a high
order scheme. Remember, you can change the parameters on the fly.
-This means, start robustly and end with accuracy.
08/22/2023 29