Introduction
cfd.xml is the main preset to be loaded in order to perform Fluid Dynamics simulations.
Governing equations
The following governing equations are approximately solved with this preset (called conservation of mass equation, momentum equation, and equation of state):
where
and
are the density and the velocity respectively,
is an external volumetric force field,
is the pressure, and
is the stress tensor for a Newtonian fluid:
with
and
the viscous coefficients and
the rate of strain tensor:
As it has been stated in the 3rd governing equation (formerly Equation Of State, or EOS), we need to stablish a relation between the density and the pressure:
where
is the sound speed (at least 10 times the maximum speed expected during the simulation),
the density of reference of the fluid, and
an incompressibility factor (1 is recommended, but it can be increased to get better incompressibility properties).
Numerical modelling
Conservation of mass equation
As usual in SPH the fluid domain is discretized in a set of particles, such that the aproximate solution of the conservation of mass equation can be written as:
where
and
are particle indexes,
and
their positions,
the mass of the particle
,
and
the outward normal and the surface of the boundary element
, and
a renormalization factor:
Momentum equation
The momentum equation aproximation can be separated in 2 differential operators aproximation:
such that:
where the constant
for 1D, 2D and 3D respectively.
Time integration
A pseudo second-order time integration scheme is used in AQUAgpusph, composed by a predictor and a corrector stage.
The predictor, executed at the start of the time step, can be written as follows:
Regarding the corrector stage, computed after the derivatives evaluation described before, can be written as:
Both, predictor and corrector are just applied to the fluid particles.
Usage
To use it just use the following include tag:
<Include file="/usr/share/aquagpusph/resources/Presets/cfd.xml" />
Where /usr/share/aquagpusph/ should be conveniently modified. For backguard compatibility you can include /usr/share/aquagpusph/resources/OpenCLMain.xml instead, which is just redirecting to cfd.xml.
Remember that this preset should be the first included.
Variables defined