Open FOAM
Open FOAM
Open FOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
OpenFOAM
Experimental
approach
Numerical approach
(Computational
approach)
A comparison Dr. Anand Raj Hariharan
Why computational
method is special
Finite volume in a
domain
March 19, 2018
Governing
equations
Finite Control
Volume
conservative and
non-conservative
What are the approaches to solve the
problems????
OpenFOAM
Approach to the
problem
Theoretical approach The study of science can be carried out in three ways
(Analytical approach)
Experimental
approach
based on the approach. This is as follows:
Numerical approach
(Computational
approach)
1 Experimental approach
A comparison
Why computational
method is special
2 Theoretical approach (Analytical approach)
Types of 3 Numerical approach (Computational approach)
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Theoretical approach (Analytical approach)
OpenFOAM
In this approach we seek an exact solution (a closed
Dr. Anand Raj form mathematical function) which are applicable at
Hariharan
all the points within the domain.
Approach to the The solution is obtained by solving the governing
problem
Theoretical approach equation (single or system) which may a PDE or
(Analytical approach)
Experimental ODE.
approach
Numerical approach In many cases the assumptions are used to simplify
(Computational
approach) the solution procedure. However the assumptions
A comparison
Why computational should preserve the physics of the problem. Some
method is special
examples for the assumptions made are elastic
Types of
computational material, Newtonian Fluid, ideal gas and so on. In
methods
many problems the assumptions can be too simplistic
Finite volume in a forcing us to go for experimental approach.
domain
Some common examples are Bernoulli equation (This
Governing
equations is an exact solution for Navier-Stokes equations
Finite Control under some assumptions), Torsion equation, Bending
Volume
conservative and
moment equation and so on.
non-conservative
Experimental approach
OpenFOAM
Finite volume in a
disturbing the flowfield (non- intrusive methods) and
domain cost. In general the cost is becoming higher day by
Governing
equations
day with the advancement in the measuring
Finite Control techniques and sophistication.
Volume
conservative and
non-conservative
Numerical approach (Computational
approach)
OpenFOAM
Finite volume in a
The number of points can go from thousands or
domain
lahks (for academic works) to millions and crores
Governing
equations (for high quality research work done using
Finite Control supercomputers and workstations).
Volume
conservative and
non-conservative
A comparison between the three
approaches
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and Source: Tennehill and Anderson[4]
non-conservative
Why Computational approach is
special????
OpenFOAM
Approach to the
Computational approach can be preferred if
problem non-intrusive methods and high quality imaging
Theoretical approach
(Analytical approach)
Experimental
methods are not available or prohibitively expensive.
approach
Numerical approach
(Computational
Computational method can be preferred when the
approach)
A comparison flowfield is extremely hostile for instrumentation.
Why computational
method is special
Types of
There are occasions where only limited number of
computational
methods
prototypes can be made for testing in the wind
Finite volume in a tunnel. The computational method can reduce the
domain
time taken for testing such products.
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Trend of relative computational cost for a
given flow and algorithm
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
OpenFOAM
Approach to the
Based on approach the computational methods can be
problem
Theoretical approach
classified into the following types:
(Analytical approach)
Experimental
approach
1 Finite Difference Method (FDM)
Numerical approach
(Computational
approach)
2 Finite Volume Method (FVM)
A comparison
Why computational
method is special
3 Finite Element Method (FEM)
Types of 4 Spectral method
computational
methods
The present discussion is confined to the first two in the
Finite volume in a
domain above list.
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Finite volume in a domain
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
How CFD works ??????
OpenFOAM
OpenFOAM
OpenFOAM
Types of
non-conservative approach.
computational
methods The first approach is also known as strong conservative
Finite volume in a and the second one the weak conservative. Two
domain
Governing
approaches are equally important based on CFD
equations perspective.
Finite Control
Volume
conservative and
non-conservative
Conservative and non-conservative form
OpenFOAM
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
The continuity equation in cartesian coordinate is given
Experimental
approach by,
Numerical approach
(Computational
approach)
A comparison ∂ρ ∂ ∂ ∂
Why computational
method is special
+ (ρu) + (ρv ) + (ρw ) = 0 (2)
Types of
∂t ∂x ∂y ∂z
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Momentum equation - X direction
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Momentum equation - Y direction
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Momentum equation - Z direction
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
The generic form of governing equation
OpenFOAM
Approach to the
problem The governing equations can be written together in
Theoretical approach
(Analytical approach)
Experimental
generic form,
approach
Numerical approach
(Computational
approach) ∂U ∂F ∂G ∂H
A comparison + + + = |{z}J (3)
Why computational
method is special
∂t ∂x ∂y ∂z
|{z} | {z } Source−term
Types of Solution−Vector Flux−term
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Solution vector , U
OpenFOAM
Approach to the
problem
Theoretical approach
ρ
(Analytical approach)
Experimental
ρu
approach
Numerical approach
(Computational
U =
ρv .
approach)
A comparison
ρw
Why computational 2
method is special
ρ(e + V2 )
Types of
computational
methods The aim of any algorithm (particularly for unsteady
Finite volume in a problem) is to find the elements of solution vector U.
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Flux term F
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
ρu
2
Experimental
approach
ρu + p − τxx
Numerical approach
(Computational
approach)
F =
ρuv − τxy .
A comparison
Why computational
ρuw − τxz
method is special 2
Types of ρ(e + V2 )u + pu − k ∂T
∂x
− uτxx − v τxy − w τxz
computational
methods
Finite volume in a
This term is due to the component of flow in X-direction.
domain
The terms include only spatial derivatives.
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Flux term G
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
ρv
Experimental
approach
ρuv − τxy
ρv 2 + p − τyy
Numerical approach
(Computational
approach) G =
.
A comparison
Why computational
ρvw − τyz
method is special
V2
Types of
ρ(e + 2 )v + pv − k ∂T
∂y
− uτyx − v τyy − w τxz
computational
methods
Finite Control
Volume
conservative and
non-conservative
Flux term H
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
ρw
Experimental
approach
ρuw − τzx
Numerical approach
(Computational
approach)
H =
ρvw − τzy .
A comparison
Why computational
ρw 2 + p − τzz
method is special 2
Types of ρ(e + V2 )w + pw − k ∂T
∂w
− uτzx − v τzy − w τzz
computational
methods
Finite volume in a
This term is due to the component of flow in Z-direction.
domain
The terms include only spatial derivatives.
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Source term, J
OpenFOAM
Approach to the
problem 0
Theoretical approach
(Analytical approach)
ρfx
Experimental
approach
Numerical approach
J =
ρfy .
(Computational
approach)
A comparison
ρfz
Why computational
method is special
ρ(ufx + vfy + wfz ) + ρq̇
Types of
computational The first element is zero in the absence of chemical
methods
reactions. The other elements are zero if body forces as
Finite volume in a
domain well as volumetric heating are negligible.
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Solution procedure
OpenFOAM
OpenFOAM
Approach to the
problem In CFD, marching solutions are not limited to time
Theoretical approach
(Analytical approach) alone. We can also march wrt space. This is done
Experimental
approach
Numerical approach
for steady state problems where we perform
(Computational
approach) integrations from one end of the space to another.
A comparison
Why computational
method is special The choice of space or time marching depends on
Types of
computational
the mathematical nature of the governing equations.
methods
For a steady state solution, ∂U
∂t
= 0.
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Solution procedure
OpenFOAM
Finite Control
Volume
conservative and
non-conservative
Is the problem steady or unsteady??
OpenFOAM
If flow properties are not expected to change wrt
Dr. Anand Raj
Hariharan time it is steady.
Approach to the A problem can be steady in one frame of reference
problem
Theoretical approach
however can be unsteady in another.
(Analytical approach)
Experimental Unsteadiness in the problem can be due to time
approach
Numerical approach
(Computational
dependent BCs (for example, flapping of the wing of
approach)
A comparison the bird, pulsation of heart).
Why computational
method is special The BCs can be steady however problem can be still
Types of
computational
unsteady (for example, instabilities, flow during
methods
transition as well as turbulent, flow past bluff bodies
Finite volume in a
domain for certain range of Reynolds number).
Governing A problem can be steady however we have to proceed
equations
by assuming it to be unsteady (for example, blunt
Finite Control
Volume body problem and compressible flow through nozzle).
conservative and
non-conservative
Is the problem 2D or 3D ??
OpenFOAM
OpenFOAM
Approach to the
problem
Theoretical approach Once the governing equations are known the next
(Analytical approach)
Experimental
approach
step is to understand the mathematical nature of
Numerical approach
(Computational the governing equation (either single equation or
approach)
A comparison
Why computational
system of equation controlling the problem).
method is special
Types of
Once the mathematical nature is known we can
computational
methods
think of solution strategies.
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Classification of PDEs
OpenFOAM
The given PDE or family of PDEs are classified based on
Dr. Anand Raj
Hariharan the presence of characteristic lines or surfaces into the
Approach to the following:
problem
Theoretical approach
(Analytical approach)
Elliptic Differential equations: The characteristic lines or
Experimental
approach surfaces are imaginary or does not exist.
Numerical approach
(Computational
approach) Parabolic Differential equations: If there exist a single
A comparison
Why computational
method is special
characteristic line or a surface depending on
Types of whether the problem is 2D or 3D.
computational
methods Hyperbolic Differential equations: If there exist more
Finite volume in a
domain
than one characteristic lines or surfaces.
Governing
equations
The classification is reminiscent of different types of
Finite Control
conic sections. However one have to understand what is
Volume
conservative and
a characteristic line or a surface.
non-conservative
What is characteristic line???
OpenFOAM
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
The given system of PDEs can be classified by two
approach
Numerical approach
methods. This is as follows:
(Computational
1 Cramer’s rule
approach)
A comparison
Why computational
method is special
2 Eigen value method
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Consider the given system of PDEs
OpenFOAM
Types of
u and v .
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Consider the given system of PDEs
OpenFOAM
Types of
u and v . Most importantly u and v are continuous
computational
methods
functions of x and y. Accordingly,
Finite volume in a 1 At every specified point (x,y) within the domain u
domain
Governing
and v should have a unique value.
equations
2 All the derivatives should have a finite value at a
Finite Control
Volume specified point.
conservative and
non-conservative
Writing u and v using total differentials
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach) ∂u ∂u
Experimental du = dx + dy (8)
approach
Numerical approach ∂x ∂y
(Computational
approach)
A comparison ∂v ∂v
Why computational dv = dx + dy (9)
method is special
∂x ∂y
Types of
computational
methods
Now combing eqns. 1 to 4 and writing in matrix form,
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Matrix form
OpenFOAM
Finite volume in a
∂u |B|
domain = (10)
∂x |A|
Governing
equations
Finite Control
Volume
conservative and
non-conservative
How to define derivatives
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Condition for the existence of
characteristic lines
OpenFOAM
Approach to the
problem
The condition is that |A| = 0 which implies,
Theoretical approach
(Analytical approach)
Experimental a1 b1 c1 d1
approach
Numerical approach
(Computational
a2 b2 c2 d2
approach)
dx =0 (12)
A comparison
Why computational dy 0 0
method is special 0 0 dx dy
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Condition for the existence of
characteristic lines
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach) Upon expansion,
Experimental
approach
Numerical approach
(a1 c2 − a2 c1 )(dy )2 − (a1 d2 − a2 d1 + b1 c2 − b2 c1 )dx.dy
(Computational
approach) +(b1 d2 − b2 d1 )(dx)2 = 0
A comparison
Why computational
method is special
Now dividing through out by (dx)2 we get a quadratic
Types of equation.
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Condition for the existence of
characteristic lines
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach) √
Experimental
approach dy −b ± b 2 − 4ac
Numerical approach ∴ = (17)
(Computational
approach) dx 2a
A comparison
Why computational
method is special
Thus the existence of characteristic lines will depend on
Types of the discriminant.
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Condition for the existence of
characteristic lines
OpenFOAM
Finite Control
parabolic, elliptic or hyperbolic.
Volume
conservative and
non-conservative
Behavior of PDEs
OpenFOAM
Finite Control
Volume
conservative and
non-conservative
Behavior of Hyperbolic equations
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach) A hyperbolic equation in 2D will have two
Experimental
approach
Numerical approach
characteristic curves - left and right running
(Computational
approach) depending on the direction.
A comparison
Why computational
method is special For 3D the characteristics can form a surface known
Types of
computational
as characteristic surface.
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Behavior of Hyperbolic equations
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Behavior of Hyperbolic equations
OpenFOAM
Approach to the
In hyperbolic equations there is a region known as
problem
Theoretical approach
domain of independence confined by the
(Analytical approach)
Experimental characteristics. Any change in the property within
approach
Numerical approach
(Computational
this region will not be conveyed upstream. Hence
approach)
A comparison there is a specific direction known as “marching”
Why computational
method is special direction. The algorithm is designed to match in
Types of
computational this direction.
methods
Finite volume in a
The marching can be done with respect to time or
domain space.
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Behavior of Hyperbolic equations
OpenFOAM
Approach to the
In hyperbolic equations there is a region known as
problem
Theoretical approach
domain of independence confined by the
(Analytical approach)
Experimental characteristics. Any change in the property within
approach
Numerical approach
(Computational
this region will not be conveyed upstream. Hence
approach)
A comparison there is a specific direction known as “marching”
Why computational
method is special direction. The algorithm is designed to match in
Types of
computational this direction.
methods
Finite volume in a
The marching can be done with respect to time or
domain space.
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Some examples
OpenFOAM
Approach to the
In hyperbolic equations there is a region known as
problem
Theoretical approach
domain of independence confined by the
(Analytical approach)
Experimental characteristics. Any change in the property within
approach
Numerical approach
(Computational
this region will not be conveyed upstream. Hence
approach)
A comparison there is a specific direction known as “marching”
Why computational
method is special direction. The algorithm is designed to match in
Types of
computational this direction.
methods
Finite volume in a
The marching can be done with respect to time or
domain space.
Governing
equations
Finite Control
Volume
conservative and
non-conservative
3D Steady inviscid supersonic flow
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Unteady inviscid supersonic flow (2D)
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Unteady inviscid supersonic flow (3D)
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Behavior of Parabolic equations
OpenFOAM
Governing
In 2D there is a single characteristic curve where as
equations in 3D we have a single characteristic surface.
Finite Control
Volume
conservative and
non-conservative
Behavior of Parabolic equations
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Behavior of Parabolic equations
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Parabolized viscous flows
OpenFOAM
If the streamwise derivatives in the viscous term of
Dr. Anand Raj
Hariharan the Navier-Stokes equation is neglected, the
Approach to the
resulting differential equation is known as
problem
Theoretical approach
Parabolized Navier-Stokes equations (PNS). They
(Analytical approach)
Experimental are very to solve by simply marching in the
approach
Numerical approach
(Computational
streamwise direction.
approach)
A comparison However if there is a flow separation in streamwise
Why computational
method is special
direction (In this case the streamwise derivatives are
Types of
computational compared to the gradients normal to the wall).
methods
Finite volume in a
Indeed the Prandtl’s Boundary layer equations are
domain parabolic in nature by simply assuming that the
Governing
equations streamwise gradients are negligible compared to
Finite Control vertical gradients. The exact solution is well known
Volume
conservative and as Blasius exact solution.
non-conservative
Unsteady heat equation
OpenFOAM
Approach to the
problem
Theoretical approach
The unsteady heat equation is parabolic with respect to
(Analytical approach)
Experimental
approach
time. The equation is
Numerical approach
(Computational
approach) ∂T
A comparison
= α∇2 T . (18)
Why computational
method is special ∂t
Types of
computational
methods
The time marching is shown in the next slide.
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Unsteady heat equation - time marching
OpenFOAM
The evolution of the temperature distribution can be
Dr. Anand Raj
Hariharan
computed using time marching method.
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Elliptic equations
OpenFOAM
Approach to the
In elliptic differential equations the derivatives are
problem defined and continuous in all directions. This implies
Theoretical approach
(Analytical approach)
Experimental
the characteristic curves or surface does not exist.
approach
Numerical approach
(Computational
In the physical problems governed by hyperbolic and
approach)
A comparison parabolic equations nature allows discontinuities in
Why computational
method is special
some directions (we call the curves in those
Types of
computational directions as characteristics).
methods
Finite Control
Volume
conservative and
non-conservative
Elliptic equations - mathematical nature
OpenFOAM
Approach to the
problem Any change in the properties are either dissipated or
Theoretical approach
(Analytical approach) transmitted to all directions equally if it is elliptic.
Experimental
approach
Numerical approach
(Computational
In contrary to marching techniques the governing
approach)
A comparison
equations should be solved in all the points
Why computational
method is special simultaneously.
Types of
computational All the boundary conditions should be utilized to
methods
Finite volume in a
solve the problem.
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Elliptic equations - mathematical nature
OpenFOAM
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Elliptic equations - mathematical nature
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
Incompressible boundary layer analyzed using the
approach
Numerical approach
(Computational
full Navier-Stokes equation.
approach)
A comparison Steady heat equation
Why computational
method is special
Types of
Steady subsonic Euler (inviscid) equations.
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Governing equations with mixed nature
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach We will now look at two cases where the solution
(Computational
approach)
A comparison
strategy is not straight forward.
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Governing equations with mixed nature
OpenFOAM
Approach to the
problem
There are many problems in nature where equations of
Theoretical approach
(Analytical approach)
different mathematical nature governs different locations
Experimental
approach of the same domain. In this case we try to find the
Numerical approach
(Computational
approach)
solution at all the locations with a common solution
A comparison
Why computational strategy irrespective of the changes in governing
method is special
Types of
equations. The classic examples include Blunt body
computational
methods
problem, compressible flow through nozzle, compressible
Finite volume in a turbulent boundary layer over a body.
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Governing equations with mixed nature
OpenFOAM
Approach to the
problem
There are also problems in nature where the entire
Theoretical approach
(Analytical approach)
domain is governed by the single equation. However the
Experimental
approach governing equation exhibit a mixed mathematical nature.
Numerical approach
(Computational
approach)
In this case we have to find a solution strategy
A comparison
Why computational irrespective of mixed nature of the equation. The
method is special
Types of
example include full Navier-Stokes equation. Another
computational
methods
example is unsteady Navier-Stokes equation where
Finite volume in a pressure field is elliptic and velocity field can be parabolic.
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Governing equations with mixed nature
OpenFOAM
Finite Control
boundary layer over a body and so on are no longer
Volume a challenge.
conservative and
non-conservative
What are Well posed and ill-posed
problems????
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach Discretization: how to
(Computational
approach)
A comparison
Why computational
method is special
represent the derivatives????
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
What is discretization????
OpenFOAM
OpenFOAM
OpenFOAM
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Time marching strategy
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Use of Taylor series expansion
OpenFOAM
Approach to the
problem
In Finite Difference Methods (FDMs) we replace
Theoretical approach
(Analytical approach)
derivatives (partial or ordinary) with a suitable
Experimental
approach algebraic differences based on Taylor series.
Numerical approach
(Computational
approach) When a function is known at specified points
A comparison
Why computational
method is special
(x, y , z) and if all the derivatives exists (C n
Types of continuity) then it is possible to expand the function
computational
methods at the neighbourhood of the point as an infinite
Finite volume in a
domain
series.
Governing
equations
Finite Control
Volume
conservative and
non-conservative
What is Taylor series????
OpenFOAM
Types of
Now using Taylor series we find velocity at point
computational
methods (i + 1, j), ui+1,j based on ui,j if u is the component of
Finite volume in a velocity.
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Notation used in discretization
OpenFOAM
Finite Control
Volume
conservative and
non-conservative
velocity at point (i + 1, j), ui+1,j
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
ui+1,j =
(Computational 2 2 3 3
approach)
A comparison
ui,j + ( ∂u ) ∆x + ( ∂∂xu2 )i,j (∆x)
∂x i,j 1! 2!
+ ( ∂∂xu3 )i,j (∆x)
3!
+ ..........
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
How many number of terms to be used
from Taylor series????
OpenFOAM
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
How many number of terms to be used
from Taylor series????
OpenFOAM
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
How many number of terms to be used
from Taylor series????
OpenFOAM
Finite Control
Volume
conservative and
non-conservative
How many number of terms to be used
from Taylor series????
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative Source: John D. Anderson 3 .
Representation of first derivative ( ∂u
∂x )i,j
OpenFOAM
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Representation of first derivative ( ∂u
∂x )i,j
OpenFOAM
Finite Control
Volume
conservative and
non-conservative
Representation of first derivative ( ∂u
∂x )i,j
OpenFOAM
The approximate representation is as follows
Dr. Anand Raj
Hariharan ∂u ui+1,j − ui,j
( )i,j ≈ (20)
Approach to the ∂x | ∆x {z }
problem
Theoretical approach
FD
(Analytical approach)
Experimental
approach
Numerical approach
The above equation is approximately same as partial
(Computational
approach) differential equation. The difference being
A comparison
Why computational
method is special
truncation error.
Types of The error resulting from the truncation of terms in
computational
methods Taylor series is known as Truncation error.
Finite volume in a
domain
The truncation error is of the order of first power of
Governing
∆x. This is known as first order accurate scheme.
equations
When represented by above scheme it should be
Finite Control
Volume noted that the higher order derivatives are
conservative and
non-conservative
Representation of first derivative ( ∂u
∂x )i,j
OpenFOAM
First order forward difference scheme
Dr. Anand Raj
Hariharan
Approach to the
∂u ui+1,j − ui,j
problem ( )i,j = + O(∆x). (21)
Theoretical approach
∂x ∆x
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach) The above equation is first order accurate with
A comparison
Why computational respect to space.
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Representation of first derivative ( ∂u
∂x )i,j
OpenFOAM
First order forward difference scheme
Dr. Anand Raj
Hariharan
Approach to the
∂u ui+1,j − ui,j
problem ( )i,j = + O(∆x). (21)
Theoretical approach
∂x ∆x
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach) The above equation is first order accurate with
A comparison
Why computational respect to space.
method is special
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Representation of first derivative ( ∂u
∂x )i,j
OpenFOAM
First order forward difference scheme
Dr. Anand Raj
Hariharan
Approach to the
∂u ui+1,j − ui,j
problem ( )i,j = + O(∆x). (21)
Theoretical approach
∂x ∆x
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach) The above equation is first order accurate with
A comparison
Why computational respect to space.
method is special
Finite Control
Volume
conservative and
non-conservative
Representation of first derivative ( ∂u
∂x )i,j
OpenFOAM
First order forward difference scheme
Dr. Anand Raj
Hariharan
Approach to the
∂u ui+1,j − ui,j
problem ( )i,j = + O(∆x). (21)
Theoretical approach
∂x ∆x
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach) The above equation is first order accurate with
A comparison
Why computational respect to space.
method is special
Finite Control
Hence the difference scheme is forward difference
Volume and first order in accuracy with respect to space.
conservative and
non-conservative
Representation of first derivative ( ∂u
∂x )i,j
OpenFOAM
Consider the Taylor series expansion ui−1,j =
2 2 3 3
Dr. Anand Raj
Hariharan ui,j − ( ∂u ) ∆x + ( ∂∂xu2 )i,j (∆x)
∂x i,j 1! 2!
− ( ∂∂xu3 )i,j (∆x)
3!
+ ..........
Approach to the
Upon rearrangement and simplification,
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Representation of first derivative ( ∂u
∂x )i,j
OpenFOAM
Consider the Taylor series expansion ui−1,j =
2 2 3 3
Dr. Anand Raj
Hariharan ui,j − ( ∂u ) ∆x + ( ∂∂xu2 )i,j (∆x)
∂x i,j 1! 2!
− ( ∂∂xu3 )i,j (∆x)
3!
+ ..........
Approach to the
Upon rearrangement and simplification,
problem
Theoretical approach
(Analytical approach)
First order forward difference scheme
Experimental
approach
Numerical approach
(Computational ∂u ui,j − ui−1,j
approach)
A comparison
( )i,j = + O(∆x) (22)
Why computational ∂x ∆x
method is special
Types of
computational
methods The above equation is first order accurate with
Finite volume in a
domain
respect to space based on truncation error.
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Representation of first derivative ( ∂u
∂x )i,j
OpenFOAM
Consider the Taylor series expansion ui−1,j =
2 2 3 3
Dr. Anand Raj
Hariharan ui,j − ( ∂u ) ∆x + ( ∂∂xu2 )i,j (∆x)
∂x i,j 1! 2!
− ( ∂∂xu3 )i,j (∆x)
3!
+ ..........
Approach to the
Upon rearrangement and simplification,
problem
Theoretical approach
(Analytical approach)
First order forward difference scheme
Experimental
approach
Numerical approach
(Computational ∂u ui,j − ui−1,j
approach)
A comparison
( )i,j = + O(∆x) (22)
Why computational ∂x ∆x
method is special
Types of
computational
methods The above equation is first order accurate with
Finite volume in a
domain
respect to space based on truncation error.
Governing The scheme is backward differencing in space.
equations
Finite Control
Volume
conservative and
non-conservative
Representation of first derivative ( ∂u
∂x )i,j
OpenFOAM
Consider the Taylor series expansion ui−1,j =
2 2 3 3
Dr. Anand Raj
Hariharan ui,j − ( ∂u ) ∆x + ( ∂∂xu2 )i,j (∆x)
∂x i,j 1! 2!
− ( ∂∂xu3 )i,j (∆x)
3!
+ ..........
Approach to the
Upon rearrangement and simplification,
problem
Theoretical approach
(Analytical approach)
First order forward difference scheme
Experimental
approach
Numerical approach
(Computational ∂u ui,j − ui−1,j
approach)
A comparison
( )i,j = + O(∆x) (22)
Why computational ∂x ∆x
method is special
Types of
computational
methods The above equation is first order accurate with
Finite volume in a
domain
respect to space based on truncation error.
Governing The scheme is backward differencing in space.
equations
OpenFOAM
Consider the Taylor series expansion ui−1,j =
2 2 3 3
Dr. Anand Raj
Hariharan ui,j − ( ∂u ) ∆x + ( ∂∂xu2 )i,j (∆x)
∂x i,j 1! 2!
− ( ∂∂xu3 )i,j (∆x)
3!
+ ..........
Approach to the
Upon rearrangement and simplification,
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Representation of first derivative ( ∂u
∂x )i,j
OpenFOAM
Consider the Taylor series expansion ui−1,j =
2 2 3 3
Dr. Anand Raj
Hariharan ui,j − ( ∂u ) ∆x + ( ∂∂xu2 )i,j (∆x)
∂x i,j 1! 2!
− ( ∂∂xu3 )i,j (∆x)
3!
+ ..........
Approach to the
Upon rearrangement and simplification,
problem
Theoretical approach
(Analytical approach)
First order forward difference scheme
Experimental
approach
Numerical approach
(Computational ∂u ui,j − ui−1,j
approach)
A comparison
( )i,j = + O(∆x) (23)
Why computational ∂x ∆x
method is special
Types of
computational
methods The above equation is first order accurate with
Finite volume in a
domain
respect to space based on truncation error.
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Representation of first derivative ( ∂u
∂x )i,j
OpenFOAM
Consider the Taylor series expansion ui−1,j =
2 2 3 3
Dr. Anand Raj
Hariharan ui,j − ( ∂u ) ∆x + ( ∂∂xu2 )i,j (∆x)
∂x i,j 1! 2!
− ( ∂∂xu3 )i,j (∆x)
3!
+ ..........
Approach to the
Upon rearrangement and simplification,
problem
Theoretical approach
(Analytical approach)
First order forward difference scheme
Experimental
approach
Numerical approach
(Computational ∂u ui,j − ui−1,j
approach)
A comparison
( )i,j = + O(∆x) (23)
Why computational ∂x ∆x
method is special
Types of
computational
methods The above equation is first order accurate with
Finite volume in a
domain
respect to space based on truncation error.
Governing The scheme is backward differencing in space.
equations
Finite Control
Volume
conservative and
non-conservative
Representation of first derivative ( ∂u
∂x )i,j
OpenFOAM
Consider the Taylor series expansion ui−1,j =
2 2 3 3
Dr. Anand Raj
Hariharan ui,j − ( ∂u ) ∆x + ( ∂∂xu2 )i,j (∆x)
∂x i,j 1! 2!
− ( ∂∂xu3 )i,j (∆x)
3!
+ ..........
Approach to the
Upon rearrangement and simplification,
problem
Theoretical approach
(Analytical approach)
First order forward difference scheme
Experimental
approach
Numerical approach
(Computational ∂u ui,j − ui−1,j
approach)
A comparison
( )i,j = + O(∆x) (23)
Why computational ∂x ∆x
method is special
Types of
computational
methods The above equation is first order accurate with
Finite volume in a
domain
respect to space based on truncation error.
Governing The scheme is backward differencing in space.
equations
OpenFOAM
Consider the Taylor series expansion ui−1,j =
2 2 3 3
Dr. Anand Raj
Hariharan ui,j − ( ∂u ) ∆x + ( ∂∂xu2 )i,j (∆x)
∂x i,j 1! 2!
− ( ∂∂xu3 )i,j (∆x)
3!
+ ..........
Approach to the
Upon rearrangement and simplification,
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Representation of first derivative ( ∂u
∂x )i,j
OpenFOAM
Consider the Taylor series expansion ui−1,j =
2 2 3 3
Dr. Anand Raj
Hariharan ui,j − ( ∂u ) ∆x + ( ∂∂xu2 )i,j (∆x)
∂x i,j 1! 2!
− ( ∂∂xu3 )i,j (∆x)
3!
+ ..........
Approach to the
Upon rearrangement and simplification,
problem
Theoretical approach
(Analytical approach)
First order forward difference scheme
Experimental
approach
Numerical approach
(Computational ∂u ui,j − ui−1,j
approach)
A comparison
( )i,j = + O(∆x) (24)
Why computational ∂x ∆x
method is special
Types of
computational
methods The above equation is first order accurate with
Finite volume in a
domain
respect to space based on truncation error.
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Representation of first derivative ( ∂u
∂x )i,j
OpenFOAM
Consider the Taylor series expansion ui−1,j =
2 2 3 3
Dr. Anand Raj
Hariharan ui,j − ( ∂u ) ∆x + ( ∂∂xu2 )i,j (∆x)
∂x i,j 1! 2!
− ( ∂∂xu3 )i,j (∆x)
3!
+ ..........
Approach to the
Upon rearrangement and simplification,
problem
Theoretical approach
(Analytical approach)
First order forward difference scheme
Experimental
approach
Numerical approach
(Computational ∂u ui,j − ui−1,j
approach)
A comparison
( )i,j = + O(∆x) (24)
Why computational ∂x ∆x
method is special
Types of
computational
methods The above equation is first order accurate with
Finite volume in a
domain
respect to space based on truncation error.
Governing The scheme is backward differencing in space.
equations
Finite Control
Volume
conservative and
non-conservative
Representation of first derivative ( ∂u
∂x )i,j
OpenFOAM
Consider the Taylor series expansion ui−1,j =
2 2 3 3
Dr. Anand Raj
Hariharan ui,j − ( ∂u ) ∆x + ( ∂∂xu2 )i,j (∆x)
∂x i,j 1! 2!
− ( ∂∂xu3 )i,j (∆x)
3!
+ ..........
Approach to the
Upon rearrangement and simplification,
problem
Theoretical approach
(Analytical approach)
First order forward difference scheme
Experimental
approach
Numerical approach
(Computational ∂u ui,j − ui−1,j
approach)
A comparison
( )i,j = + O(∆x) (24)
Why computational ∂x ∆x
method is special
Types of
computational
methods The above equation is first order accurate with
Finite volume in a
domain
respect to space based on truncation error.
Governing The scheme is backward differencing in space.
equations
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Representation of first derivative ( ∂u
∂x )i,j -
central differencing scheme
OpenFOAM
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Representation of first derivative ( ∂u
∂x )i,j -
central differencing scheme
OpenFOAM
Types of
computational
First order Central difference scheme
methods
Finite Control
Volume
conservative and
non-conservative
Schemes for second derivatives
OpenFOAM
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Schemes for second derivatives
OpenFOAM
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Schemes for second derivatives
OpenFOAM
Finite Control
Volume
conservative and
non-conservative
Higher order accurate schemes
OpenFOAM
Finite Control
Volume
conservative and
non-conservative
General observations - forward, and
backward differencing schemes
OpenFOAM
Approach to the
problem
Theoretical approach The forward and backward schemes are also known
(Analytical approach)
Experimental
approach
as one-sided differencing schemes. An r th derivative
Numerical approach
(Computational
approach)
of mth order will have r + m number of points For
A comparison
Why computational
example for representing first derivative (r = 1) with
method is special
first order accuracy (m = 1) we have 2 terms (i + 1
Types of
computational
methods
and i, if forward. i − 1 and i, if backward).
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
General observations - central differencing
schemes
OpenFOAM
Approach to the
problem
Theoretical approach
An r th derivative of mth order will have r + m − 1
(Analytical approach)
Experimental
number of points (if r is even). If r is odd there will
approach
Numerical approach
(Computational
be r + m number of terms. For central differencing
approach)
A comparison schemes m is always even (2, 4 and so on with the
Why computational
method is special increase in accuracy). For example, r = 1 and
Types of
computational
m = 2 there is a need for 3 nodes or terms. When
methods
r = 2 and m = 2 we need 3 terms or nodes.
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
General observations - Differencing
schemes
OpenFOAM
Approach to the
problem
Theoretical approach Representation of an nth derivative will have (∆x)n
(Analytical approach)
Experimental
approach
in the denominator of the differencing scheme.
Numerical approach
(Computational
approach)
When a scheme is said to be second order accurate
A comparison
Why computational
the truncation error is of the order of (∆x)2 . In this
method is special
Types of
scheme we consider up to the three terms (including
computational
methods
f (x)) in the Taylor series. The rest is truncated.
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Need for higher order schemes
OpenFOAM
Finite Control
Volume
conservative and
non-conservative
Let us derive second order accurate
forward differencing scheme for
representing a first derivative
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Let us derive second order accurate
forward differencing scheme for
representing a first derivative
OpenFOAM
Approach to the
problem
Theoretical approach
Now m = 2 and r = 1. There will be 3 terms (since
(Analytical approach)
Experimental
approach
forward differencing, ui , ui+1 , ui+2 ).
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Let us derive second order accurate
forward differencing scheme for
representing a first derivative
OpenFOAM
Approach to the
problem
Theoretical approach
Now m = 2 and r = 1. There will be 3 terms (since
(Analytical approach)
Experimental
approach
forward differencing, ui , ui+1 , ui+2 ).
Numerical approach
(Computational
approach)
Let a,b and c be the coefficients of ui+2 , ui+1 and ui
A comparison
Why computational
respectively.
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Let us derive second order accurate
forward differencing scheme for
representing a first derivative
OpenFOAM
Approach to the
problem
Theoretical approach
Now m = 2 and r = 1. There will be 3 terms (since
(Analytical approach)
Experimental
approach
forward differencing, ui , ui+1 , ui+2 ).
Numerical approach
(Computational
approach)
Let a,b and c be the coefficients of ui+2 , ui+1 and ui
A comparison
Why computational
respectively.
method is special
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Let us derive second order accurate
forward differencing scheme for
representing a first derivative
OpenFOAM
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Let us derive second order accurate
forward differencing scheme for
representing a first derivative
OpenFOAM
Finite Control
Volume
conservative and
non-conservative
Let us derive second order accurate
forward differencing scheme for
representing a first derivative
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
1 1 1 a 0
Experimental
approach
2 1 0 b = 1
Numerical approach
(Computational
approach) 2 1/2 0 c 0
A comparison
Why computational
method is special Solving the above equation will yield a = −1/2, b = 4/2
Types of
computational
and c = −3/2.
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Let us derive second order accurate
forward differencing scheme for
representing a first derivative
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
1 1 1 a 0
Experimental
approach
2 1 0 b = 1
Numerical approach
(Computational
approach) 2 1/2 0 c 0
A comparison
Why computational
method is special Solving the above equation will yield a = −1/2, b = 4/2
Types of
computational
and c = −3/2. Now substituting the above values will
methods
yield,
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Second order accurate forward differencing
scheme for representing a first derivative
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach ∂u 4ui+1 − ui+2 − 3ui
(Computational
approach) ( ) = (29)
A comparison ∂x i 2.∆x
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Higher order accurate schemes
OpenFOAM
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Higher order accurate schemes
OpenFOAM
Governing
scheme is sufficient.
equations
Finite Control
Volume
conservative and
non-conservative
Concluding remarks - discretization
OpenFOAM
Finite Control
Volume
conservative and
non-conservative
Concluding remarks - discretization
OpenFOAM
Finite Control
Volume
conservative and
non-conservative
Solution Procedure
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Openfoam Units
OpenFOAM
Approach to the
OpenFOAM is SI by default.
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Finite volume in a domain
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Schemes in OpenFOAM
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach) In OpenFOAM one should understand what are the
Experimental
approach
Numerical approach
available schemes to represent different terms in the
(Computational
approach) governing equation. These terms can be Laplacian, time
A comparison
Why computational
method is special
derivative (first or second), Convective, divergence,
Types of gradient and so on.
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Schemes in OpenFOAM - summary
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
how to evaluate Laplacian term?
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Consider the Laplacian term
Experimental
approach
Numerical approach
(Computational ∇.(Γ∇φ) (31)
approach)
A comparison
Why computational
method is special In the above term Γ is a transport coefficient and φ is
Types of
computational the property whose Laplacian is to be evaluated.
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
how to evaluate Laplacian term?
OpenFOAM
The first step is to integrate the Laplacian term over
Dr. Anand Raj
Hariharan the finite volume considered.
Z
Approach to the
problem
∇.(Γ∇φ).dV (32)
Theoretical approach v
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
how to evaluate Laplacian term?
OpenFOAM
The first step is to integrate the Laplacian term over
Dr. Anand Raj
Hariharan the finite volume considered.
Z
Approach to the
problem
∇.(Γ∇φ).dV (32)
Theoretical approach v
(Analytical approach)
Experimental
approach
Numerical approach Now Volume integral is cponverted to surface
(Computational
approach)
A comparison
integral by using Gauss-Divergence theorem.
Why computational Z Z
method is special
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
how to evaluate Laplacian term?
OpenFOAM
The first step is to integrate the Laplacian term over
Dr. Anand Raj
Hariharan the finite volume considered.
Z
Approach to the
problem
∇.(Γ∇φ).dV (32)
Theoretical approach v
(Analytical approach)
Experimental
approach
Numerical approach Now Volume integral is cponverted to surface
(Computational
approach)
A comparison
integral by using Gauss-Divergence theorem.
Why computational Z Z
method is special
Finite volume in a
domain Now Surface integral is replaced by the summation
Governing of properties over the face areas.
equations Z X
Finite Control
Volume dS.(Γ∇φ) = Γf Sf .(∇φ)f (34)
conservative and S f
non-conservative
how to evaluate Laplacian term?
OpenFOAM
Approach to the
problem
Theoretical approach
The term Sf .(∇φ)f is evaluated as follows:
(Analytical approach)
Experimental
approach
φN − φP
Numerical approach
(Computational Γf Sf .(∇φ)f = |Sf | (35)
approach)
A comparison
|d|
Why computational
method is special
Governing
equations
Finite Control
Volume
conservative and
non-conservative
how to evaluate Convective term?
OpenFOAM
Finite Control
Volume
conservative and
non-conservative
how to evaluate Convective term?
OpenFOAM
OpenFOAM
Finite Control
Volume
conservative and
non-conservative
Upwinding scheme
OpenFOAM
Finite Control
Volume
conservative and
non-conservative
Evaluating the first derivative of time
OpenFOAM
Approach to the
problem
Theoretical approach Most of the unsteady problems in CFD is governed
(Analytical approach)
Experimental
approach
by equations which are first derivative of time.
Numerical approach
(Computational
approach)
The time derivatives can be evaluated with first and
A comparison
Why computational
second order accuracy.
method is special
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Evaluating the time derivatives
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Time marching
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental In time marching we progress forward by integrating
approach
Numerical approach
(Computational
with respect to time step by step.
approach)
A comparison
Why computational
It is possible to use schemes like Euler explicit, Euler
method is special
implicit and Crank-Nicolson method.
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Time marching - an example
OpenFOAM
Governing
These two terms are integrated separately.
equations
Finite Control
Volume
conservative and
non-conservative
Integration of first term
OpenFOAM
Approach to the
problem
Theoretical approach
The integration of first term is easy as we integrate the
(Analytical approach)
Experimental
approach
temporal derivative.
Numerical approach
(Computational
The integration is done as follows:
approach) R t+∆t ∂ R R t+∆t (ρp φp V )n −(ρp φp V )0
A comparison
Why computational t
[ ∂t V
ρφdV ]dt = t 4t
dt
method is special n 0
Types of
= (ρp φp V ) − (ρp φp V ) ∆t∆t
computational
methods
Now the second term has to be integrated.
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Integration of second term
OpenFOAM
Approach to the
problem The second term is integrated as follows:
Theoretical approach
(Analytical approach) Z t+∆t Z Z t+∆t
Experimental
A∗ φdt
approach
Numerical approach
(Computational
[ AφdV ]dt = (42)
approach) t V t
A comparison
Why computational
method is special
Where A∗ represents the spatial discretization of A. The
Types of
computational temporal integration is done by explicit, implicit or
methods
Finite volume in a
Crank-Nicolson method.
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Euler implicit scheme
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
It is done by taking the value of φ at next time step n.
Experimental
approach This is done as follows:
Numerical approach
(Computational Z t+∆t Z Z t+∆t
approach)
A∗ φn Vdt
A comparison
Why computational
method is special
AφdVdt = (43)
t V t
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Euler explicit scheme
OpenFOAM
Finite volume in a
The level of stability depends on Courant number which
domain
has to be less than or equal to one.
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Evaluating Divergence
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach) First Gauss-Divergence theorem is used to convert
Experimental
approach
Numerical approach
the volume integral to surface integral.
(Computational
approach)
A comparison
Now at each cell face the product is evaluated
Why computational
method is special between the required scalar and surface area of the
Types of
computational
face.
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Evaluating Divergence
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
OpenFOAM
OpenFOAM
Types of
continuum mechanics. Utility are functions which
computational
methods
are designed to perform data manipulation (like
Finite volume in a mesh generation post processing tools and so on)
domain
Governing
Let us first try to understand the file structures in
equations
OpenFOAM.
Finite Control
Volume
conservative and
non-conservative
OpenFOAM file structure
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach In OpenFOAM there is a file structure. The case to be
Numerical approach
(Computational
approach)
solved is saved as directories. Under Directories there are
A comparison
Why computational subdirectory.
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
OpenFOAM file structure
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
OpenFOAM file structure
OpenFOAM
A case file mainly contains the following three directories:
Dr. Anand Raj
Hariharan System It contains parameters which control the
Approach to the
solution procedure. It contains information
problem
Theoretical approach
like start and stop time, time step size,
(Analytical approach)
Experimental
algorithm, discretization schemes, tolerances
approach
Numerical approach
(Computational
and so on.
approach)
A comparison Constant It contains information regarding meshes
Why computational
method is special and mesh scheme used, physical and
Types of
computational transport properties.
methods
Finite volume in a
Time It contains information regarding initial and
domain boundary conditions for the properties. In
Governing
equations
addition to this it also stores the values of
Finite Control the field variables at every time steps
Volume
conservative and specified.
non-conservative
System Directory
OpenFOAM
Approach to the
problem
It specifies the solution procedure - the numerical
Theoretical approach
(Analytical approach) schemes, discretization schemes and parameters
Experimental
approach that control the simulations. It is divided into three
Numerical approach
(Computational
approach)
subdirectories.
A comparison
Why computational 1 ControlDict
method is special
Types of
2 fvSchemes
computational
methods
3 fvSolutions
Finite volume in a
4 blockMeshDict
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Discretization summary
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
ControlDict
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach The ControlDict file contains the list of information
Numerical approach
(Computational
approach)
necessary to create, write and perform integration with
A comparison
Why computational respect to time step.
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Entries in a ControlDict file- details
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Entries in a ControlDict file
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
fvSchemes
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach The fvSchemes file contains the list of information
Numerical approach
(Computational
approach)
necessary to represent each and every differential terms
A comparison
Why computational in the governing equations.
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Components of fvSchemes
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Structure of fvSchemes
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Keywords used in fvSchemes
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Entries in a fvSchemes file
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Evaluation of gradient in fvSchemes
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Time derivative schemes
OpenFOAM
Approach to the
problem The time derivatives are defined under ddt or d2dt2
Theoretical approach
(Analytical approach)
Experimental
sub-directories. The command is :
approach
Numerical approach ddt Schemes
(Computational
approach)
A comparison
{
Why computational
method is special default Euler;
Types of
computational
}
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Schemes available for time derivatives
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Entries of time derivative
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Keywords used in fvSchemes
OpenFOAM
Approach to the
problem fvSchemes contains schemes and fluxes.
Theoretical approach
(Analytical approach)
Experimental
Schemes: A scheme may be a Laplacian, gradient and
approach
Numerical approach so on. For example gradient of pressure p is
(Computational
approach)
A comparison
written as grad(p).
Why computational
method is special Fluxes: It gives the field variable like pressure p in
Types of
computational grad(p). The flux can be a scalar or a
methods
vector.
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Keywords used in fvSchemes
OpenFOAM
Approach to the
problem fvSchemes contains schemes and fluxes.
Theoretical approach
(Analytical approach)
Experimental
Schemes: A scheme may be a Laplacian, gradient and
approach
Numerical approach so on. For example gradient of pressure p is
(Computational
approach)
A comparison
written as grad(p).
Why computational
method is special Fluxes: It gives the field variable like pressure p in
Types of
computational grad(p). The flux can be a scalar or a
methods
vector.
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Keywords used in fvSchemes
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Entries in a fvSchemes file
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Entries in a fvSchemes file
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Interpolation Schemes
OpenFOAM
Approach to the
problem
Theoretical approach It contains the information how the cell centre value
(Analytical approach)
Experimental
approach
is interpolated to the centre of cell face.
Numerical approach
(Computational
approach)
It is specified as a general scheme (this appears
A comparison
Why computational under interpolationSchemes) as well as under
method is special
Types of
each sub-directories to find Laplacians, divergence,
computational
methods
gradients and so on.
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Interpolation Schemes - some examples
OpenFOAM
Approach to the
problem
default linear; Here the flux is linearly interpolated
Theoretical approach
(Analytical approach)
from the cell centre to cell face.
Experimental
approach default upwind phi; The flux at the centre of cell
Numerical approach
(Computational
approach)
face is calculated by upwinding scheme. The phi (φ) is a
A comparison
Why computational correction factor whose value has to be specified. The
method is special
Types of
higher value of phi (becomes closer and closer to one)
computational
methods
increases stability. However the lower value of phi
Finite volume in a improves accuracy.
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Gradient schemes
OpenFOAM
Dr. Anand Raj The required commands are given under gradSchemes
Hariharan
sub-directory. The discretization schemes are given as
Approach to the
problem follows:
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Gradient schemes
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Normal Surface gradients
OpenFOAM
Finite Control
Volume
conservative and
non-conservative
Normal Surface gradients - where it is
defined??
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Normal Surface gradients - how it is
defined??
OpenFOAM
Approach to the
problem
Theoretical approach If the normal surface gradient is readily available. Then
(Analytical approach)
Experimental
approach
we can use the command
Numerical approach
(Computational
approach)
default orthogonal;
A comparison
Why computational
In this case we have to ensure that the gradient at the
method is special
cell face is same as normal surface gradient. We will also
Types of
computational
methods
see other schemes available.
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Normal Surface gradients - Schemes
available
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Laplacian Schemes
OpenFOAM
Finite volume in a
The structure for the command is
domain Gauss <interpolationScheme>
Governing
equations
<snGradientScheme>
Finite Control
Volume
conservative and
non-conservative
Laplacian Schemes - an example
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
The interpolation scheme for most of the cases can
Numerical approach
(Computational
be linear. The entry for normal surface gradient
approach)
A comparison can be a choice from corrected, uncorrected,
Why computational
method is special
bounded, fourth to name a few.
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Laplacian Schemes - syntax and options
available
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Laplacian Schemes - syntax and options
available
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Divergence schemes
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Divergence schemes - Syntax and examples
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach) div(phi,U) Gauss upwind;
Experimental
approach
Numerical approach
div(phi,U) Gauss linear;
(Computational
approach) div(phi,U) skewLinear;
A comparison
Why computational
method is special
We will see what are the interpolation schemes available
Types of for the divergence scheme.
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Divergence schemes - interpolation
schemes available
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Time schemes - schemes to define
temporal derivatives
OpenFOAM
Dr. Anand Raj There are two types of time derivatives allowed in
Hariharan
OpenFOAM. The first and second derivatives.
Approach to the
problem First derivative: The first derivative of time is preferred if
Theoretical approach
(Analytical approach)
Experimental
the governing equation has a first derivative
approach
Numerical approach
of time. Most of the PDEs we deal in fluid
(Computational
approach)
A comparison
mechanics and thermodynamics involves
Why computational
method is special PDEs with first derivatives of time.
Types of
computational
Second derivative: This is preferred when the governing
methods
equation contains second derivative of time.
Finite volume in a
domain The second order wave equation is a classic
Governing
equations
example for such problems.
Finite Control Now we shall see them separately.
Volume
conservative and
non-conservative
First derivative of time
OpenFOAM
The first derivative of time is specified in
Dr. Anand Raj
Hariharan sub-directory named ddtSchemes.
Approach to the
It is also possible to chose a scheme under
problem
Theoretical approach
ddtSchemes sub-directory so as to run the problem
(Analytical approach)
Experimental as steady. If unsteady scheme is chosen the problem
approach
Numerical approach
(Computational
will be treated as unsteady and simulations will
approach)
A comparison perform time marching.
Why computational
method is special The choice of steady or unsteady should be
Types of
computational according to the solver (specified in controlDict).
methods
For example icoFoam is an unsteady laminar
Finite volume in a
domain incompressible flow solver. The choice of steady
Governing
equations
under the time derivative can make the simulations
Finite Control unstable. In this case changing the solver can be
Volume
conservative and
good strategy.
non-conservative
Time derivative sub-directory: where it
appears???
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Time derivative sub-directory: Schemes
available in detail
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Time derivative sub-directory: Schemes
available
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Time derivatives: how it is defined in
sub-directory
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach) default Euler;
Experimental
approach
Numerical approach
default localEuler;
(Computational
approach) default crankNicholson 0.5; 0.5 is the a correction
A comparison
Why computational
method is special
factor that blends Euler method (value is 0) and
Types of Crank-Nicholson (value is 1);
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Time derivatives - second
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental The second derivative is specified under the
approach
Numerical approach
(Computational
sub-directory d2dt2Schemes.
approach)
A comparison
Why computational
Only Euler scheme is available which is first order
method is special
accurate, bounded and implicit.
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Flux calculation
OpenFOAM
Approach to the
problem The flux of the property calculated during the
Theoretical approach
(Analytical approach) simulation is listed in the sub-directory named
Experimental
approach
Numerical approach
fluxRequired.
(Computational
approach)
A comparison
The specified flux value is returned in other
Why computational
method is special sub-directories.
Types of
computational The flux of the variable required is mentioned by
methods
Finite volume in a
identifier. For example, p is the pressure.
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Flux calculation - Where it is found???
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
fvSolution
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
fvSolution - a directory for solution and
algorithm control
OpenFOAM
Approach to the
problem
Theoretical approach fvSolution dictionary in system directory contains
(Analytical approach)
Experimental
approach
all the information regarding equation solvers,
Numerical approach
(Computational tolerances and algorithm.
approach)
A comparison
Why computational
It contains subdirectories containing solvers,
method is special
Types of
relaxation factors, tolerances (based on mass
computational
methods
balance), relative tolerance and so on.
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
fvSolution - Sample entries
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Solvers
OpenFOAM
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Error message due to improper solver
selection
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Solution Tolerances
OpenFOAM
Types of
tolerance value.
computational
methods During every iteration the residue is re-evaluated
Finite volume in a
domain
and compared with the specified value of tolerances.
Governing The tolerances should be specified for all solvers
equations
Finite Control
under the sub-directories tolerance and relTol.
Volume
conservative and
non-conservative
Solution Tolerances
OpenFOAM
Finite Control
Volume
conservative and
non-conservative
Preconditioned Conjugate Gradient Solvers
OpenFOAM
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Preconditioned Conjugate Gradient Solvers
OpenFOAM
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Preconditioned Conjugate Gradient Solvers
OpenFOAM
Finite volume in a
the solution is obtained with minimum number of
domain iterations. If the system of equations are “well
Governing
equations
behaved” the number of iterations taken for
Finite Control convergence will be same as the order of matrix.
Volume
conservative and
non-conservative
Preconditioned Conjugate Gradient Solvers
OpenFOAM
Approach to the
problem
It is specified under solver in solver dictionary.
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Smooth solvers
OpenFOAM
Approach to the
problem
Theoretical approach
It is specified under preconditioner in solver
(Analytical approach)
Experimental dictionary.
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Constant Directory
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Constant Directory
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
A constant directory contains information regarding
Experimental
approach parameters which are fairly constant during the
Numerical approach
(Computational
approach)
simulations. It contains two directories:
A comparison
Why computational 1 Properties
method is special
Types of 2 PolyMesh
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Properties
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
It includes the relevant information regarding the
approach
Numerical approach
following:
(Computational
1 Turbulence models
approach)
A comparison
Why computational
method is special
2 Thermophysical properties
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Turbulence models
OpenFOAM
Types of
RASModel solver uses Reynolds Averaged Navier-Stokes
computational
methods
equation to capture turbulence. In this case
Finite volume in a
the type of model used should be specified
domain
along with modelling constants.
Governing
equations LESModel uses Large Eddy Simulation
Finite Control
Volume
conservative and
non-conservative
Turbulence models for incompressible fluids
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Turbulence models for compressible fluids
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Turbulence models for compressible fluids
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
LES filters and deltas
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
LES models for incompressible flow
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
LES models for compressible flow
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
polyMesh Directory
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
polyMesh Directory
OpenFOAM
Approach to the
problem
Theoretical approach
The details of the mesh (points, faces, cells and so
(Analytical approach)
Experimental
approach
on) are defined in the directory named as polyMesh.
Numerical approach
(Computational
approach)
OpenFOAM is always 3D. For solving a 2D problem
A comparison
Why computational
one have specify the number of nodes as unity in
method is special
Types of
the direction normal to the plane of interest.
computational
methods A mesh consists of points, faces, cells and so on.
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
polyMesh Directory - points
OpenFOAM
Types of
same points with different names (named by
computational
methods
numbers).
Finite volume in a
domain
When a point is defined it should be part of at least
Governing
one face.
equations
Finite Control
Volume
conservative and
non-conservative
polyMesh Directory - faces
OpenFOAM
Finite Control
Volume
conservative and
non-conservative
Numbering of vertices in a face
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
OpenFOAM
Types of
Boundary faces: These are the faces coinciding the
computational
methods
boundary of the domain. The numbering of
Finite volume in a the faces should be done such that the unit
domain
normal is always pointing outside the
Governing
equations domain.
Finite Control
Volume
conservative and
non-conservative
Cells
OpenFOAM
Approach to the
problem
A cell is a collection of faces such that it forms a finite
Theoretical approach
(Analytical approach) volume. A cell should obey the following conditions:
Experimental
approach
Numerical approach
Contiguous: A cell should completely cover the
(Computational
approach)
A comparison
computational domain without overlapping
Why computational
method is special each other.
Types of
computational
Convex: Convexity ensures the cell centre should
methods
always inside the cell considered.
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Cells
OpenFOAM
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Cell shapes specification format
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Boundaries
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
These are the parameters specified at the ends of
Experimental
approach the computational domain.
Numerical approach
(Computational
approach)
A comparison
Even though the boundary is specified as an entity it
Why computational
method is special
should be part of solution, numerics and geometries.
Types of
computational
A boundary is divided into sets known as patches.
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Boundaries
OpenFOAM
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Boundaries
OpenFOAM
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Boundaries
OpenFOAM
OpenFOAM
empty: When a boundary is specified by this
Dr. Anand Raj
Hariharan keyword the solution is not attempted in
Approach to the normal direction. For example OpenFOAM
problem
Theoretical approach
is always 3D. However for 2D we can specify
(Analytical approach)
Experimental
approach
the boundary normal to the third dimension
Numerical approach
(Computational as empty where solution is not required.
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Boundaries
OpenFOAM
empty: When a boundary is specified by this
Dr. Anand Raj
Hariharan keyword the solution is not attempted in
Approach to the normal direction. For example OpenFOAM
problem
Theoretical approach
is always 3D. However for 2D we can specify
(Analytical approach)
Experimental
approach
the boundary normal to the third dimension
Numerical approach
(Computational as empty where solution is not required.
approach)
A comparison
Why computational
wedge: A 2D axi-symmetric cases, like cylinder can
method is special
Types of
be specified using this keyword.
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Boundaries
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
cyclic: The cyclic is the keyword used to connect
Experimental
approach
the boundaries which are repeated and
Numerical approach
(Computational
approach)
connected. This can be used for problems
A comparison
Why computational
with repeated geometries. The connecting
method is special
Types of
faces must have the one to one
computational
methods
correspondence.
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
boundary data required
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
boundary data required
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
boundary data required
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
boundary data required
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
How to write mesh file????
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach) The details of the mesh (vertices, faces, boundaries,
Experimental
approach
Numerical approach
mesh type and so on) are specified in the directory
(Computational
approach) known as blockMeshDict.
A comparison
Why computational
method is special The structure of blockMeshDict file is discussed
Types of
computational
next.
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Consider the domain
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Structure of blockMeshDict file (1)
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
unit conversion
approach
Numerical approach
(Computational
convertsToMeters 0.001;
approach)
A comparison
Why computational
method is special
This means all the coordinate values are multiplied with
Types of 0.001, the scaling factor.
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Structure of blockMeshDict file (2)
OpenFOAM
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Structure of blockMeshDict file (3)
OpenFOAM
Types of
computational
methods
Finite volume in a
domain In this section we have to specify all possible edges in the
Governing domain.
equations
Finite Control
Volume
conservative and
non-conservative
Structure of blockMeshDict file (4)
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach The computational domain is divided into blocks. In this
Numerical approach
(Computational
approach)
section we have to specify the vertices of blocks, number
A comparison
Why computational of cells in each direction and discretization schemes.
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Structure of blockMeshDict file (4)
OpenFOAM
Approach to the
structure of block
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Meshing schemes
OpenFOAM
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Meshing schemes - further insights
OpenFOAM
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Meshing schemes - further insights
OpenFOAM
OpenFOAM
structure of boundary
Dr. Anand Raj
Hariharan
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Solvers - Basic CFD codes
OpenFOAM
Finite Control
Volume
conservative and
non-conservative
Solvers - Basic CFD codes
OpenFOAM
Finite Control
Volume
conservative and
non-conservative
Solvers - incompressible flow
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Solvers - compressible flow
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Setting up a case in OpenFOAM
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach A problem can be set up in OpenFOAM in 6 steps as
(Computational
approach)
A comparison
discussed in the next slide
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Setting up a case in OpenFOAM
OpenFOAM
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Setting up a case in OpenFOAM
OpenFOAM
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Setting up a case in OpenFOAM
OpenFOAM
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Setting up a case in OpenFOAM
OpenFOAM
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Setting up a case in OpenFOAM
OpenFOAM
Finite volume in a 5 Edit 0 directory and initialize the BCs like p, U and
domain
so on.
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Setting up a case in OpenFOAM
OpenFOAM
Finite volume in a 5 Edit 0 directory and initialize the BCs like p, U and
domain
so on.
Governing
equations 6 Set the controls like solvers, tolerances, time step
Finite Control
Volume sizes and so on.
conservative and
non-conservative
Geometry creation
OpenFOAM
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations The domain has 18 vertices (starting from 0) and 4
Finite Control blocks. The conversion factor is 0.1.
Volume
conservative and
non-conservative
Geometry creation - commands
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Geometry creation - commands
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Deciding the blocks, mesh
OpenFOAM
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Deciding the boundaries and types
OpenFOAM
Finite volume in a
There are 2 surfaces (on the front and back of the
domain domain) composed of 8 faces. We name the
Governing
equations
surfaces as frontAndBack. We use the entity
Finite Control empty to represent them.
Volume
conservative and
non-conservative
Boundaries and their entities - summary
OpenFOAM
Name of Entity Vertices
Dr. Anand Raj Boundary (type)
Hariharan
movingWall wall (6 15 16 7)
Approach to the (7 16 17 8)
problem (3 12 15 6)
Theoretical approach
(Analytical approach) (0 9 12 3)
Experimental (0 1 10 9)
approach
Numerical approach fixedWalls wall (1 2 11 10)
(Computational
approach) (2 5 14 11)
A comparison
Why computational
(5 8 17 14)
method is special (0 3 4 1)
Types of (1 4 5 2)
computational
methods
(3 6 7 4)
(0 3 4 1)
Finite volume in a
domain
frontAndBack empty (4 7 8 5)
(9 10 13 12)
Governing
equations
(10 11 14 13)
(12 13 16 15)
Finite Control
Volume
(13 14 17 16)
conservative and
non-conservative
Boundaries and their entities - summary -
commands
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
approach
Numerical approach
(Computational
approach)
A comparison
Why computational
method is special
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
How to check and create mesh
OpenFOAM
Approach to the
Creating Mesh: Once the blockMeshDict directory is
problem ready we have to type blockMesh to
Theoretical approach
(Analytical approach)
Experimental
generate mesh. If everything is perfect the
approach
Numerical approach
(Computational
mesh will be generated.
approach)
A comparison Viewing the mesh: The generated mesh can be viewed
Why computational
method is special
using paraFOAM or paraview.
Types of
computational
methods
Mesh quality: The mesh quality is evaluated by
Finite volume in a command checkMesh >&log. The mesh
domain
quality data will be written in log file.
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Attaching BCs
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental
Each properties should be given as a separate directories
approach
Numerical approach
like p, U, k, omega and so on.
(Computational
1 The dimensions of each property should be known.
approach)
A comparison
Why computational
method is special
2 Now identify the boundary conditions required.
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Attaching BCs - information
OpenFOAM
Approach to the
problem
Boundary Property Fixed Gradient
Theoretical approach
(Analytical approach)
value
Experimental
approach movingWall velocity 10,0,0 –
Numerical approach
(Computational
approach)
pressure – –
A comparison
Why computational fixedWall velocity 0 –
method is special
Types of
pressure – 0
computational
methods frontAndBack velocity – –
Finite volume in a pressure – –
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Attaching BCs - information
OpenFOAM
Approach to the
problem The BCs are either fixed value or gradient type.
Theoretical approach
(Analytical approach)
Experimental
In movingWall BC the velocity is known as 10 m/s
approach
Numerical approach and for fixedWall it is zero.
(Computational
approach)
A comparison We need not solve the equations for the
Why computational
method is special frontAndBack as they are defined as empty.
Types of
computational Some BCs requires calculated values (for example,
methods
Finite volume in a
k, ).
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Attaching BCs - information
OpenFOAM
Approach to the
problem
Theoretical approach
(Analytical approach)
Experimental BC type Additional Data Example
approach
Numerical approach
(Computational
fixedValue value U = (10, 0, 0)
approach) ∂T
A comparison fixedGradient gradient ∂n
= 2.5
Why computational ∂T
method is special zeroGradient – ∂n
=0
Types of
computational
methods
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
BC for turbulent flow
OpenFOAM
Governing
equations
Finite Control
Volume
conservative and
non-conservative
BC for turbulent flow
OpenFOAM
Approach to the
problem The dissipation rate () is given by,
Theoretical approach
(Analytical approach)
Experimental
approach Cµ k 1 .5
Numerical approach = (49)
(Computational
approach) l
A comparison
Why computational
method is special The term Cµ is a modelling constant and is equal to
Types of
computational 0.09. The l length scale can be taken as 20 % of the
methods
reference length.
Finite volume in a
domain
Governing
equations
Finite Control
Volume
conservative and
non-conservative
Time step size
OpenFOAM
Types of
domain. The time step size for a problem should be
computational
methods
chosen based on smallest mesh size and largest possible
Finite volume in a velocity. If the problem is unsteady the time step size
domain
should be minimum of residence time and stability
Governing
equations criteria.
Finite Control
Volume
conservative and
non-conservative
References
OpenFOAM
ANSYS 18.1: theory and User Guide.
Dr. Anand Raj
Hariharan OpenFOAM User and Programming Guide.
Approach to the
John D Anderson, Jr., Computational Fluid
problem
Theoretical approach
Dynamics: The basics with applications., Tata
(Analytical approach)
Experimental
McGraw-Hill Edition., 2012.
approach
Numerical approach
(Computational
John C Tannehill, Dale A Anderson, Richard H
approach)
A comparison Pletcher., Computational Fluid Mechanics and Heat
Why computational
method is special transfer., Taylor and Francis., Second Edition.
Types of
computational
Chapman D. R., Computational Aerodynamics
methods
Development and Outlook., AIAAJ., Vol. 17., pp.
Finite volume in a
domain 1293 - 1313.
Governing Kutlet P., Steger J. L., Baily F. R., Status of
equations
Finite Control
Computational Fluid Dynamics in United States.,
Volume
conservative and
AIAA-87-1135-CP.
non-conservative
Acknowlegements
OpenFOAM