The PISO Algorithm-1
The PISO Algorithm-1
In strictly incompressible ow the coupling between density and pressure is removed, as well as
the coupling between the energy equation and the rest of the system.
The incompressible continuity and momentum equations are given by:
The non-linearity in the convection term is handled using an iterative solution technique, where
Where uo is the currently available solution and un is the new solution. The algorithm cycles until
uo = un.
There is no pressure equation, but the continuity equation imposes a scalar constraint on the
momentum equation (since . u is a scalar).
The idea of the present algorithm is as follows:
Pressure-velocity systems contain two complex coupling terms:
Non-linear convection term, containing u-u coupling.
Linear pressure-velocity coupling.
Derivation of the pressure Equation:
As before stated, there is no pressure equation for incompressible ow, so we employ the
continuity and momentum equations to obtain a pressure equation. Start by discretizing the
momentum equation, keeping the pressure gradient in its original form:
So that:
Substitute this in the incompressible continuity equation (.u = 0) to get a pressure equation for
incompressible ow.
fvVectorMatrixUEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvm::laplacian(nu, U)
);
Solve the momentum equations using the pressure from the previous time step.
solve(UEqn == -fvc::grad(p));
This is the momentum predictor step.
We will re-use UEqn later, which is the reason not to do both these steps as a single operation
solve(fvm::ddt(U)+fvm::div(phi, U)-fvm::laplacian(nu, U)==-fvc::grad(p));
The rst term on the R.H.S. appears during the discretization of the pressure Laplacian
where |d| is the distance between the owner and neighbour cell centers.
is the off-diagonal matrix coefcient in the pressure Laplacian. For the uxes to be fully
conservative, theymust be completely consistent with the assembly of the pressure equation
(i.e. non-orthogonal correction). is the off-diagonal matrix coefcient in the pressure Laplacian.
For the uxes to be fully
conservative, theymust be completely consistent with the assembly of the pressure equation
(i.e. non-orthogonal correction).
In the explicit source term fvc::div (phi) of the pressure equation, phi does not include
any effect of the pressure.
rAU does not include any effect of pressure when solving the pressure equation and
nally correcting the velocity.
The Laplacian term, fvm::laplacian(rAU, p), of the pressure equation uses the value of
the gradient of p on the cell faces. The gradient is calculated using neighbouring cells,
and not neighbouring faces.
fvc::grad(p) is calculated from the cell face values of the pressure.
fvm::operation (coefficient,U)
This means that the solver is to solve for U. coefficient can vary in space, or be a constant.
Operations like this one will be used many times throughout the section, and it is important to
understand the nomenclature. Rhie and Chow is most often seen as a correction proportional to
the difference between the pressure gradient at the face and the interpolated pressure gradient at
the face. For example from Ferziger & Peric [1], for a cell face, the velocity is corrected by:
where the overbar indicates interpolation, and is related to the mesh size. If we take a simple
incompressible flow as an example, in vector form the equations would be:
If we consider the UEqn.H in icoFoam (change name), the convection term is slightly different.
fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
fvm::laplacian(nu, U)
);
Equation 4 has no right hand side, and there is a field named phi () instead of the UT-term. is
(for incompressible flows) the volume velocity flux defined on the faces of each cell, and it is
used because pressure based solver can utilize the Gauss theorem, which is frequently used in
applied mathematics, and defines the transform of a volume integral into a surface integral.
5
Where
is the velocity that will be held constant when the equation for pressure is solved, while U is
the vector velocity that will be solved for. It is important to note the difference in the subscript
when the surface integral is introduced; subscript f indicates that the term should be evaluated on
the face. is defined as the scalar product of the cell face velocity and the cell face normal (Eq.
6). The magnitude of the cell face normal is the cell face area.
It is important to note which part of the left hand side is turned into phi and which is solved for.
In this case we solve for U, and is related to phi via equation 6. There is also a difference in
that is a field evaluated in the cell centers, while phi is defined on the surfaces. We are now
ready to return to equation 4. It does not include the pressure gradient, which is a part of the
separation of pressure and velocity. The code adds the influence of p to U in another way, which
is described below. Recalling from [1], the discretized momentum equation would be this matrix
system:
A [U] = H [p]
A and H are discretisation operators, decomposed from the momentum equation. They are
created by issuing the commands UEqn.A() and UEqn.H(), respectively. [.] denotes the
numerical approximation of the corresponding variable. This system is solved by dividing by A,
which results in:
[U] =
H 1
A A
[p]
Equation 9 cannot be solved at this stage, since we have not updated the pressure yet. If the
problem of interest includes transport of a scalar property, such as enthalpy or the mass fraction
of a chemical compound, we need a predictor for U, which is the predictor is calculated from the
old pressure:
10
This is called a momentum predictor of U. So far only the momentum equation has been used,
but we also have the continuity equation, which is used to create an equation for pressure. The
first term on the right hand side (equation 10 ) is needed for the pressure equation, and given a
special notation:
U* = UEqn.H() / UEqn.A();
11
The velocity from 11 does not satisfy continuity, and is lacking influence of pressure. To create
the equation for pressure, we take the divergence of equation 9:
The left hand side is zero for incompressible flows, since it represents the correct velocity, 12 is
then:
The left hand side will be treated explicitly, since we now need to find the pressure, and thus
keep the velocity constant. In the present solver, this is done by utilizing fvc instead of fvm. The
velocity U* is replaced by the velocity flux, since the face velocities will be used to evaluate the
term. The resulting equation is then:
surfaceScalarField phi =
fvc::interpolate (U) & mesh.Sf()
(14)
(15)
fvScalarMatrix pEqn
(
fvm::laplacian(rUA, p) == fvc::div(phi)
);
(16)
What cannot be seen in this formulation is that OpenFOAM again uses the Gauss theorem. Thus,
it is not necessary to calculate a second derivative of p, but only a first derivative. This derivative
is needed on the cell faces, and it is evaluated by using the cell centre values of the pressure.