Quadrature approximation


The selection of the quadrature approximation, for solvers which allow it to be selected by the user, is done in the quadratureProperties dictionary, contained in the constant directory of the corresponding case.

Naming convention

It is possible to have different instances of a quadrature approximation in the same solver, for example when solving a mixing and population balance problem. In order to allow difference settings to be specified for each quadrature approximation, the following naming convention is adopted:

quadratureProperties.<modelName>

For example:

  • quadratureProperties.populationBalance
  • quadratureProperties.mixing

Basic and extended moment inversion for univariate number density functions

OpenQBMM allows the user to choose between a basic moment inversion and an extended moment inversion for the solution of problems involving univariate NDFs. This is achieved by means of the keyword fieldMomentInversion

The syntax:

fieldMomentInversion basicFieldMomentInversion;

selects the basic quadrature method of moments, in which the PDF is approximated as a weighted summation if Dirac delta distributions. The syntax

fieldMomentInversion extendedFieldMomentInversion;

selects the extended quadrature method of moments, which uses non-negative kernel density functions to reconstruct the NDF. Each selection requires other options to be specified, as illustrated in the following sections.

Settings for the basic moment inversion

The selection of the basicFieldMomentInversion option requires the dictionary basicMomentInversion to be present. In this dictionary, the user can specify what quadrature formula should be used, selecting among

  1. Gauss
    • Standard N-node Gauss quadrature formula of order 2N + 1.
    • 2N moments are required to use this quadrature formula.
  2. Gauss-Radau
    • N + 1 quadrature formula of Gauss-Radau, with one fixed point at the boundary of the support of the NDF.
    • 2N + 1 moments are required to use this quadrature formula.
  3. Gauss-Lobatto
    • N + 2 quadrature formula of Gauss-Lobatto, with two fixed points at the boundary of the support of the NDF.
    • 2N + 2 moments are required to use this quadrature formula.

Independently from the selection, the OpenQBMM quadrature algorithm will attempt to preserve the maximum number of moments possible. For example, if 2N+1 moments are provided to the Gauss-Radau formula, but only 2N are realizable, the implementation will detect the incident, and automatically adopt the Gauss formula, to preserve the 2N realizable moments, instead than using 2N – 1 moments, which would be required to use Gauss-Radau with lower order.

The basicMomentInversion dictionary reads:

basicMomentInversion
{
    univariateMomentInversion Gauss;
}

for Gauss quadrature, while for the Gauss-Radau and Gauss-Lobatto quadrature, additional options are provided for convenience, but are typically not required if the provided models are used, since automatic selection of the appropriate values is performed inside the code.

For the Gauss-Radau quadrature, the minimum known abscissa can be specified:

basicMomentInversion
{
    univariateMomentInversion GaussRadau;

    minKnownAbscissa  0;   // Optional. Defaults to 0
}

For the Gauss-Lobatto quadrature, the minimum and the maximum known abscissae can be specified:

basicMomentInversion
{
    univariateMomentInversion GaussLobatto;

    minKnownAbscissa  0;   // Optional. Defaults to 0

     minKnownAbscissa  1;   // Optional. Defaults to 1  
}

Settings for extended moment inversion

The adoption of the extended moment inversion requires the functional form of the kernel density functions used to do the reconstruction of the NDF to be chosen. The following options are provided:

Kernel density function Support Keyword
Beta [0, 1] beta
Gamma R+ gamma
Lognormal R+ lognormal

The selection is performed by specifying the value of the keyword extendedMomentInversion in the extendedMomentInversion sub-dictionary:

extendedMomentInversion
{
    extendedMomentInversion gamma;

    maxSigmaIter 1000;
    momentsTol 1.0e-6;
    sigmaTol 1.0e-8;
    targetFunctionTol 1.0e-8;

    basicQuadrature
    {
        univariateMomentInversion Gauss;
    }
}

Parameter Description
maxSigmaIter Maximum number of iterations to solve for the parameter σ
momentsTol Tolerance allowed on moment conservation
sigmaTol Tolerance for the solution of the σ parameter
targetFunctionTol Tolerance for the value of the polynomial function P(σ) used to determine the value of the σ parameter

The basicQuadrature subdictionary is required to specify what base moment inversion algorithm is used when using the extended moment inversion. Only one option, Gauss, is allowed, as shown in the example above.

Specification of the moment set

OpenQBMM implements the generic moment of multivariate moment. The set of moments needs to be specified in the quadratureProperties dictionary, inside the moments sub-dictionary.

In the case of univariate moment sets, the list of orders need to be provided. For example, if 5 moments are considered, the following syntax will be used, since moment orders start from zero:

moments
(
    (0)
    (1)
    (2)
    (3)
    (4)
);

In case of multivariate moments, each moment will have a set of indexes. For example, m000, m100, m010, m001 will be represented as

moments
(
    (0 0 0)
    (1 0 0)
    (0 1 0)
    (0 0 1)
);

Note that the current implementation is able to manage integer moments only. As a consequence, the indexes must be integer and positive. Fields corresponding to the moments will be saved with the following naming convention:

moment.<orders>.<modelName>

For example:

moment.0.populationBalance

moment.100.kineticEquation

Specification of quadrature nodes

The nodes used in the quadrature approximation (primary nodes if using the extended quadrature method of moments) are specified within the nodes dictionary:

nodes
(
    (0)
    (1)
); 

The elements of the list are the indexes of the nodes used when the field names (file names where the field is stored match the field name) are generated.

The number of secondary quadrature nodes used in the extended quadrature method of moments is set, by default to the number of moments + 1, and can be modified using the keyword:

nSecondaryNodes     10;

in the quadratureProperties dictionary.