The proper initialization of moments in each of the solvers part of OpenQBMM is critical to the success of the simulation. Moments of a distribution are related by non-linear relationships, which must be satisfied to ensure the realizability of the initial moment vector. To facilitate the initialization of the moments in a simulation, and to speed up the generation of the moment fields, OpenQBMM provides the generateMoments
utility.
This utility can:
- generate the initial fields for the moment vector using the settings specified in a single dictionary, the
momentGenerationDict
in thesystem
folder of the case - consistently set up the boundary conditions for the moments, without manually editing each of the moment fields in the
0
folder - set initial conditions for the moments for each field
The user provides the name of the phase for which the moments need to be set in the phases
sub-dictionary:
phases
(
particles
);
The type of each boundary conditions is set in the boundaries dictionary, using the standard OpenFOAM syntax, as it would be done in the initial moment field:
boundaries
{
inlet1
{
type fixedValue;
value uniform 0;
}
outlet
{
type zeroGradient;
}
}
The boundaries dictionary should contain the specification of all the boundary conditions defined in the mesh used for the simulation. These boundaries are listed in the constant/polyMesh/boundary
dictionary of the case.
For each phase, a sub-dictionary named as the phase must be specified. An example is shown below, where quadrature weights and abscissae are used to initialize the moments. In this case, the dimensional unit of the weight must be specified with the entry weightDimension
. Similarly, abscissaDimension0
specifies the dimensional units for the size abscissa, and abscissaDimension
specifies the dimensional unit for the velocity abscissa. Only the boundaries where a different value from the one specified in the boundaries dictionary must be defined in this dictionary. In this case, only inlet1
and inlet2
are redefined for the phase particles
.
particles
{
type weightsAndAbscissae;
weightDimension [0 0 0 0 0 0 0];
abscissaDimension0 [0 1 0 0 0 0 0];
abscissaDimension [0 1 -1 0 0 0 0];
default
{}
inlet1
{
node0
{
weight uniform 0.001;
abscissae (100.0e-6 1.0 0.5);
}
}
inlet2
{
node1
{
weight uniform 0.001;
abscissae (300.0e-6 -1.0 0.5);
}
}
}
The choice of type
of initialization depends on the solver that will be used to perform the simulation. The following types are available:
alphaAndDiameter
to be used when the volume fraction of the phase, its density and size are used to perform the initialization. An example use can be found here.alphaAndDiameterVelocity
to be used when phase volume fraction, density, bubble diameter, and velocity are used to initialize the moment fields.gaussianMoments
which initializes moments from mean velocity and velocity covariance tensor.velocity
which sets moments from volume fraction and velocity.weightsAndAbscissae
to be used to initialize moments from quadrature weights and abscissae.
The dimensional units for the quantities provided by the user to perform the initialization are used to determine the dimensional units of each moment.
The execution of the generateMoments
utility only requires to invoke it in the case directory before executing the actual solver to perform the simulation.
The example shown in this document is from the validation/vdfTransportFoam/jetSizeCrossing case.