Distributions functions
Several global functions are defined to work with particle size distributions. These functions can be called from any place of the code.
All functions receive grid as the input parameter. The grid can be previously obtained with the help of the function CBaseUnit::GetNumericGrid(EDistrTypes) const.
Note
- diameter of particle in class
- size of the class
- -th moment
- density distribution
- number related density distribution
- number related cumulative distribution
- surface-area-related density distribution
- surface-area-related cumulative distribution
- mass-related density distribution
- mass-related cumulative distribution
- mass fraction of particles of class
- number of particles of class
- total number of particles
Functions
-
inline double GetMMoment(int _moment, const std::vector<double> &_grid, const std::vector<double> &_q)
Calculates moment of the density distribution.
.
- Parameters
_moment – Value of moment.
_grid – Distribution grid.
_q – Input distribution.
- Returns
Value of the density distribution moment.
-
inline double GetQ(const std::vector<double> &_QiDistr, const std::vector<double> &_grid, double _size)
Calculates Q.
- Parameters
_QiDistr – Input distribution.
_grid – Distribution grid.
_size – Value of size.
- Returns
Calculated Q.
-
inline std::vector<double> Q2q(const std::vector<double> &_grid, const std::vector<double> &_Q)
Performs conversion from cumulative to density distributions.
and .
- Parameters
_grid – Distribution grid.
_Q – Input distribution.
- Returns
Density distribution.
-
inline std::vector<double> q2Q(const std::vector<double> &_grid, const std::vector<double> &_q)
Performs conversion from density to cumulative distributions.
.
- Parameters
_grid – Distribution grid.
_q – Input distribution.
- Returns
Cumulative distribution.
-
inline std::vector<double> qx2qy(const std::vector<double> &_grid, const std::vector<double> &_qx, int _x, int _y)
Performs conversion from one density distribution to another.
.
- Parameters
_grid – Distribution grid.
_qx – Input distribution.
_x – Input density distribution.
_y – Output density distribution.
- Returns
Density distribution.
-
inline std::vector<double> ConvertQ0Toq0(const std::vector<double> &_grid, const std::vector<double> &_Q0)
Performs conversion from Q0 to q0 distributions.
Using information about the size grid: and . Refer to function Q2q(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_Q0 – Input distribution.
- Returns
Converted q0 distribution.
-
inline std::vector<double> Convertq0ToQ0(const std::vector<double> &_grid, const std::vector<double> &_q0)
Performs conversion from q0 to Q0 distributions.
Using information about the size grid: . Refer to function q2Q(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_q0 – Input distribution.
- Returns
Converted Q0 distribution.
-
inline std::vector<double> ConvertQ2Toq2(const std::vector<double> &_grid, const std::vector<double> &_Q2)
Performs conversion from Q2 to q2 distributions.
Using information about the size grid: and . Refer to function Q2q(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_Q2 – Input distribution.
- Returns
Converted q2 distribution.
-
inline std::vector<double> Convertq2ToQ2(const std::vector<double> &_grid, const std::vector<double> &_q2)
Performs conversion from q2 to Q2 distributions.
Using information about the size grid: . Refer to function q2Q(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_q2 – Input distribution.
- Returns
Converted Q2 distribution.
-
inline std::vector<double> ConvertQ3Toq3(const std::vector<double> &_grid, const std::vector<double> &_Q3)
Performs conversion from Q3 to q3 distributions.
Using information about the size grid: and . Refer to function Q2q(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_Q3 – Input distribution.
- Returns
Converted q3 distribution.
-
inline std::vector<double> Convertq3ToQ3(const std::vector<double> &_grid, const std::vector<double> &_q3)
Performs conversion from q3 to Q3 distributions.
Using information about the size grid: . Refer to function q2Q(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_q3 – Input distribution.
- Returns
Converted Q3 distribution.
-
inline std::vector<double> Convertq0Toq2(const std::vector<double> &_grid, const std::vector<double> &_q0)
Performs conversion from q0 to q2 distributions.
Using information about the size grid by . Refer to function qx2qy(const std::vector<double>&, const std::vector<double>&, int, int).
- Parameters
_grid – Distribution grid.
_q0 – Input distribution.
- Returns
Converted q2 distribution.
-
inline std::vector<double> Convertq0Toq3(const std::vector<double> &_grid, const std::vector<double> &_q0)
Performs conversion from q0 to q3 distributions.
Using information about the size grid by . Refer to function qx2qy(const std::vector<double>&, const std::vector<double>&, int, int).
- Parameters
_grid – Distribution grid.
_q0 – Input distribution.
- Returns
Converted q3 distribution.
-
inline std::vector<double> Convertq2Toq0(const std::vector<double> &_grid, const std::vector<double> &_q2)
Performs conversion from q2 to q0 distributions.
Using information about the size grid by . Refer to function qx2qy(const std::vector<double>&, const std::vector<double>&, int, int).
- Parameters
_grid – Distribution grid.
_q2 – Input distribution.
- Returns
Converted q0 distribution.
-
inline std::vector<double> Convertq2Toq3(const std::vector<double> &_grid, const std::vector<double> &_q2)
Performs conversion from q2 to q3 distributions.
Using information about the size grid by . Refer to function qx2qy(const std::vector<double>&, const std::vector<double>&, int, int).
- Parameters
_grid – Distribution grid.
_q2 – Input distribution.
- Returns
Converted q3 distribution.
-
inline std::vector<double> Convertq3Toq0(const std::vector<double> &_grid, const std::vector<double> &_q3)
Performs conversion from q3 to q0 distributions.
Using information about the size grid by . Refer to function qx2qy(const std::vector<double>&, const std::vector<double>&, int, int).
- Parameters
_grid – Distribution grid.
_q3 – Input distribution.
- Returns
Converted q0 distribution.
-
inline std::vector<double> Convertq3Toq2(const std::vector<double> &_grid, const std::vector<double> &_q3)
Performs conversion from q3 to q2 distributions.
Using information about the size grid by . Refer to function qx2qy(const std::vector<double>&, const std::vector<double>&, int, int).
- Parameters
_grid – Distribution grid.
_q3 – Input distribution.
- Returns
Converted q2 distribution.
-
inline std::vector<double> ConvertMassFractionsToq3(const std::vector<double> &_grid, const std::vector<double> &_massFrac)
Calculates q3 distribution.
Using the size grid and the distribution of mass fractions by .
- Parameters
_grid – Distribution grid.
_massFrac – Input distribution.
- Returns
Calculated q3 distribution.
-
inline std::vector<double> ConvertMassFractionsToQ3(const std::vector<double> &_massFrac)
Calculates Q3 distribution.
Using the distribution of mass fractions: and .
- Parameters
_massFrac – Input distribution.
- Returns
Calculated Q3 distribution.
-
inline std::vector<double> ConvertMassFractionsToq2(const std::vector<double> &_grid, const std::vector<double> &_massFrac)
Calculates q2 distribution.
Refer to the functions ConvertMassFractionsToq3(const std::vector<double>&, const std::vector<double>&) and Convertq3Toq2(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_massFrac – Input distribution.
- Returns
Calculated q2 distribution.
-
inline std::vector<double> ConvertMassFractionsToQ2(const std::vector<double> &_grid, const std::vector<double> &_massFrac)
Calculates Q2 distribution.
Refer to the functions ConvertMassFractionsToq2(const std::vector<double>&, const std::vector<double>&) and Convertq2ToQ2(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_massFrac – Input distribution.
- Returns
Calculated Q2 distribution.
-
inline std::vector<double> ConvertMassFractionsToq0(const std::vector<double> &_grid, const std::vector<double> &_massFrac)
Calculates q0 distribution.
Refer to the functions ConvertMassFractionsToq3(const std::vector<double>&, const std::vector<double>&) and Convertq3Toq0(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_massFrac – Input distribution.
- Returns
Calculated q0 distribution.
-
inline std::vector<double> ConvertMassFractionsToQ0(const std::vector<double> &_grid, const std::vector<double> &_massFrac)
Calculates Q0 distribution.
Refer to the functions ConvertMassFractionsToq0(const std::vector<double>&, const std::vector<double>&) and Convertq0ToQ0(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_massFrac – Input distribution.
- Returns
Calculated q0 distribution.
-
inline std::vector<double> Convertq3ToMassFractions(const std::vector<double> &_grid, const std::vector<double> &_q3)
Calculates mass fractions from q3.
Using the size grid by .
- Parameters
_grid – Distribution grid.
_q3 – Input distribution.
- Returns
Calculated mass fractions.
-
inline std::vector<double> ConvertQ3ToMassFractions(const std::vector<double> &_Q3)
Calculates mass fractions from Q3 distribution.
Using the size grid: and .
- Parameters
_Q3 – Input distribution.
- Returns
Calculated mass fractions.
-
inline std::vector<double> Convertq2ToMassFractions(const std::vector<double> &_grid, const std::vector<double> &_q2)
Calculates mass fractions from q2 distribution.
Refer to the functions Convertq2Toq3(const std::vector<double>&, const std::vector<double>&) and Convertq3ToMassFractions(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_q2 – Input distribution.
- Returns
Calculated mass fractions.
-
inline std::vector<double> ConvertQ2ToMassFractions(const std::vector<double> &_grid, const std::vector<double> &_Q2)
Calculates mass fractions from Q2 distribution.
Refer to the functions ConvertQ2Toq2(const std::vector<double>&, const std::vector<double>&) and Convertq2ToMassFractions(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_Q2 – Input distribution.
- Returns
Calculated mass fractions.
-
inline std::vector<double> Convertq0ToMassFractions(const std::vector<double> &_grid, const std::vector<double> &_q0)
Calculates mass fractions from q0 distribution.
Refer to the functions Convertq0Toq3(const std::vector<double>&, const std::vector<double>&) and Convertq3ToMassFractions(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_q0 – Input distribution.
- Returns
Calculated mass fractions.
-
inline std::vector<double> ConvertQ0ToMassFractions(const std::vector<double> &_grid, const std::vector<double> &_Q0)
Calculates mass fractions from Q0 distribution.
Refer to the functions ConvertQ0Toq0(const std::vector<double>&, const std::vector<double>&) and Convertq0ToMassFractions(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_Q0 – Input distribution.
- Returns
Calculated mass fractions.
-
inline std::vector<double> ConvertNumbersToq0(const std::vector<double> &_grid, const std::vector<double> &_number)
Calculates q0 distribution using the number distribution and the size grid.
.
- Parameters
_grid – Distribution grid.
_number – Number distribution.
- Returns
Calculated q0 distribution.
-
inline std::vector<double> ConvertNumbersToQ0(const std::vector<double> &_grid, const std::vector<double> &_number)
Calculates Q0 distribution using the number distribution.
Refer to the functions ConvertNumbersToq0(const std::vector<double>&, const std::vector<double>&) and Convertq0ToQ0(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_number – Number distribution.
- Returns
Calculated Q0 distribution.
-
inline std::vector<double> ConvertNumbersToQ2(const std::vector<double> &_grid, const std::vector<double> &_number)
Calculates Q2 distribution using the number distribution and the size grid.
.
- Parameters
_grid – Distribution grid.
_number – Number distribution.
- Returns
Calculated Q2 distribution.
-
inline std::vector<double> ConvertNumbersToq2(const std::vector<double> &_grid, const std::vector<double> &_number)
Calculates q2 distribution using the number distribution.
Refer to the functions ConvertNumbersToQ2(const std::vector<double>&, const std::vector<double>&) and ConvertQ2Toq2(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_number – Number distribution.
- Returns
Calculated q2 distribution.
-
inline std::vector<double> ConvertNumbersToq3(const std::vector<double> &_grid, const std::vector<double> &_number)
Calculates q3 distribution using the number distribution.
Refer to the functions ConvertNumbersToq0(const std::vector<double>&, const std::vector<double>&) and Convertq0Toq3(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_number – Number distribution.
- Returns
Calculated q3 distribution.
-
inline std::vector<double> ConvertNumbersToQ3(const std::vector<double> &_grid, const std::vector<double> &_number)
Calculates Q3 distribution using the number distribution.
Refer to the functions ConvertNumbersToq3(const std::vector<double>&, const std::vector<double>&) and Convertq3ToQ3(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_number – Number distribution.
- Returns
Calculated Q3 distribution.
-
inline std::vector<double> ConvertNumbersToMassFractions(const std::vector<double> &_grid, const std::vector<double> &_number)
Calculates mass fractions from the number distribution.
Refer to the functions ConvertNumbersToq0(const std::vector<double>&, const std::vector<double>&) and Convertq0ToMassFractions(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_number – Number distribution.
- Returns
Calculated mass fractions.
-
inline std::vector<double> Convertq0ToQ2(const std::vector<double> &_grid, const std::vector<double> &_q0)
Calculates Q2 distribution.
Refer to the functions Convertq0Toq2(const std::vector<double>&, const std::vector<double>&) and Convertq2ToQ2(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_q0 – Input distribution.
- Returns
Calculated Q2 distribution.
-
inline std::vector<double> Convertq0ToQ3(const std::vector<double> &_grid, const std::vector<double> &_q0)
Calculates Q3 distribution.
Refer to the functions Convertq0Toq3(const std::vector<double>&, const std::vector<double>&) and Convertq3ToQ3(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_q0 – Input distribution.
- Returns
Calculated Q3 distribution.
-
inline std::vector<double> Convertq2ToQ0(const std::vector<double> &_grid, const std::vector<double> &_q2)
Calculates Q0 distribution.
Refer to the functions Convertq2Toq0(const std::vector<double>&, const std::vector<double>&) and Convertq0ToQ0(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_q2 – Input distribution.
- Returns
Calculated Q0 distribution.
-
inline std::vector<double> Convertq2ToQ3(const std::vector<double> &_grid, const std::vector<double> &_q2)
Calculates Q3 distribution.
Refer to the functions Convertq2Toq3(const std::vector<double>&, const std::vector<double>&) and Convertq3ToQ3(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_q2 – Input distribution.
- Returns
Calculated Q3 distribution.
-
inline std::vector<double> Convertq3ToQ0(const std::vector<double> &_grid, const std::vector<double> &_q3)
Calculates Q0 distribution.
Refer to the functions Convertq3Toq0(const std::vector<double>&, const std::vector<double>&) and Convertq0ToQ0(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_q3 – Input distribution.
- Returns
Calculated Q0 distribution.
-
inline std::vector<double> Convertq3ToQ2(const std::vector<double> &_grid, const std::vector<double> &_q3)
Calculates Q2 distribution.
Refer to the functions Convertq3Toq2(const std::vector<double>&, const std::vector<double>&) and Convertq2ToQ2(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_q3 – Input distribution.
- Returns
Calculated Q2 distribution.
-
inline std::vector<double> ConvertQ0Toq2(const std::vector<double> &_grid, const std::vector<double> &_Q0)
Calculates q2 distribution.
Refer to the functions ConvertQ0Toq0(const std::vector<double>&, const std::vector<double>&) and Convertq0Toq2(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_Q0 – Input distribution.
- Returns
Calculated q2 distribution.
-
inline std::vector<double> ConvertQ0Toq3(const std::vector<double> &_grid, const std::vector<double> &_Q0)
Calculates q3 distribution.
Refer to the functions ConvertQ0Toq0(const std::vector<double>&, const std::vector<double>&) and Convertq0Toq3(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_Q0 – Input distribution.
- Returns
Calculated q3 distribution.
-
inline std::vector<double> ConvertQ2Toq0(const std::vector<double> &_grid, const std::vector<double> &_Q2)
Calculates q0 distribution.
Refer to the functions ConvertQ2Toq2(const std::vector<double>&, const std::vector<double>&) and Convertq2Toq0(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_Q2 – Input distribution.
- Returns
Calculated q0 distribution.
-
inline std::vector<double> ConvertQ2Toq3(const std::vector<double> &_grid, const std::vector<double> &_Q2)
Calculates q3 distribution.
Refer to the functions ConvertQ2Toq2(const std::vector<double>&, const std::vector<double>&) and Convertq2Toq3(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_Q2 – Input distribution.
- Returns
Calculated q3 distribution.
-
inline std::vector<double> ConvertQ3Toq0(const std::vector<double> &_grid, const std::vector<double> &_Q3)
Calculates q0 distribution.
Refer to the functions ConvertQ3Toq3(const std::vector<double>&, const std::vector<double>&) and Convertq3Toq0(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_Q3 – Input distribution.
- Returns
Calculated q0 distribution.
-
inline std::vector<double> ConvertQ3Toq2(const std::vector<double> &_grid, const std::vector<double> &_Q3)
Calculates q2 distribution.
Refer to the functions ConvertQ3Toq3(const std::vector<double>&, const std::vector<double>&) and Convertq3Toq2(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_Q3 – Input distribution.
- Returns
Calculated q2 distribution.
-
inline std::vector<double> ConvertQ0ToQ2(const std::vector<double> &_grid, const std::vector<double> &_Q0)
Calculates Q2 distribution.
Refer to the functions ConvertQ0ToMassFractions(const std::vector<double>&, const std::vector<double>&) and ConvertMassFractionsToQ2(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_Q0 – Input distribution.
- Returns
Calculated Q2 distribution.
-
inline std::vector<double> ConvertQ0ToQ3(const std::vector<double> &_grid, const std::vector<double> &_Q0)
Calculates Q3 distribution.
Refer to the functions ConvertQ0ToMassFractions(const std::vector<double>&, const std::vector<double>&) and ConvertMassFractionsToQ3(const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_Q0 – Input distribution.
- Returns
Calculated Q3 distribution.
-
inline std::vector<double> ConvertQ2ToQ0(const std::vector<double> &_grid, const std::vector<double> &_Q2)
Calculates Q0 distribution.
Refer to the functions ConvertQ2ToMassFractions(const std::vector<double>&, const std::vector<double>&) and ConvertMassFractionsToQ0(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_Q2 – Input distribution.
- Returns
Calculated Q0 distribution.
-
inline std::vector<double> ConvertQ2ToQ3(const std::vector<double> &_grid, const std::vector<double> &_Q2)
Calculates Q3 distribution.
Refer to the functions ConvertQ2ToMassFractions(const std::vector<double>&, const std::vector<double>&) and ConvertMassFractionsToQ3(const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_Q2 – Input distribution.
- Returns
Calculated Q3 distribution.
-
inline std::vector<double> ConvertQ3ToQ0(const std::vector<double> &_grid, const std::vector<double> &_Q0)
Calculates Q0 distribution.
Refer to the functions ConvertQ0ToMassFractions(const std::vector<double>&, const std::vector<double>&) and ConvertMassFractionsToQ0(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_Q0 – Input distribution.
- Returns
Calculated Q0 distribution.
-
inline std::vector<double> ConvertQ3ToQ2(const std::vector<double> &_grid, const std::vector<double> &_Q3)
Calculates Q2 distribution.
Refer to the functions ConvertQ3ToMassFractions(const std::vector<double>&) and ConvertMassFractionsToQ2(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_Q3 – Input distribution.
- Returns
Calculated Q2 distribution.
-
inline std::vector<double> ConvertMassFractionsToNumbers(const std::vector<double> &_grid, const std::vector<double> &_massFrac)
Assumes unity density and unity total mass.
.
- Parameters
_grid – Distribution grid.
_massFrac – Input distribution.
- Returns
Number distribution.
-
inline std::vector<double> Convertq0ToNumbers(const std::vector<double> &_grid, const std::vector<double> &_q0)
Assumes unity density and unity total mass.
Refer to the functions Convertq0ToMassFractions(const std::vector<double>&, const std::vector<double>&) and ConvertMassFractionsToNumbers(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_q0 – Input distribution.
- Returns
Number distribution.
-
inline std::vector<double> Convertq2ToNumbers(const std::vector<double> &_grid, const std::vector<double> &_q2)
Assumes unity density and unity total mass.
Refer to the functions Convertq2ToMassFractions(const std::vector<double>&, const std::vector<double>&) and ConvertMassFractionsToNumbers(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_q2 – Input distribution.
- Returns
Number distribution.
-
inline std::vector<double> Convertq3ToNumbers(const std::vector<double> &_grid, const std::vector<double> &_q3)
Assumes unity density and unity total mass.
Refer to the functions Convertq3ToMassFractions(const std::vector<double>&, const std::vector<double>&) and ConvertMassFractionsToNumbers(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_q3 – Input distribution.
- Returns
Number distribution.
-
inline std::vector<double> ConvertQ0ToNumbers(const std::vector<double> &_grid, const std::vector<double> &_Q0)
Assumes unity density and unity total mass.
Refer to the functions ConvertQ0ToMassFractions(const std::vector<double>&, const std::vector<double>&) and ConvertMassFractionsToNumbers(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_Q0 – Input distribution.
- Returns
Number distribution.
-
inline std::vector<double> ConvertQ2ToNumbers(const std::vector<double> &_grid, const std::vector<double> &_Q2)
Assumes unity density and unity total mass.
Refer to the functions ConvertQ2ToMassFractions(const std::vector<double>&, const std::vector<double>&) and ConvertMassFractionsToNumbers(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_Q2 – Input distribution.
- Returns
Number distribution.
-
inline std::vector<double> ConvertQ3ToNumbers(const std::vector<double> &_grid, const std::vector<double> &_Q3)
Assumes unity density and unity total mass.
Refer to the functions ConvertQ3ToMassFractions(const std::vector<double>&) and ConvertMassFractionsToNumbers(const std::vector<double>&, const std::vector<double>&).
- Parameters
_grid – Distribution grid.
_Q3 – Input distribution.
- Returns
Number distribution.
-
inline std::vector<double> ConvertOnNewGrid(const std::vector<std::string> &_grid, const std::vector<double> &_w, const std::vector<std::string> &_gridNew)
Converts the mass fraction distribution defined on the numeric grid to the new grid.
- Parameters
_grid – Old mass fraction distribution.
_w – Old symbolic distribution grid.
_gridNew – New distribution grid.
- Returns
Converted distribution on the modified size grid.
-
inline std::vector<double> ConvertOnNewGrid(const std::vector<double> &_grid, const std::vector<double> &_w, const std::vector<double> &_gridNew)
Converts the mass fraction distribution defined on the numeric grid to the new grid.
- Parameters
_grid – Old mass fraction distribution.
_w – Old numeric distribution grid.
_gridNew – New distribution grid.
- Returns
Converted distribution on the modified size grid.
-
inline std::vector<double> ConvertqOnNewGrid(const std::vector<double> &_grid, const std::vector<double> &_q, const std::vector<double> &_gridNew)
Converts density distribution defined on the numeric grid to the new grid.
- Parameters
_grid – Old numeric distribution grid.
_q – Old density distribution.
_gridNew – New distribution grid.
- Returns
Converted distribution on the modified size grid.
-
inline std::vector<double> Convertq0Toq0(const std::vector<double> &_gridOld, const std::vector<double> &_q0Old, std::vector<double> &_gridNew)
Converts q0 distribution to the same distribution on the modified size grid.
Refer to function ConvertqOnNewGrid(const std::vector<double>&, const std::vector<double>&, const std::vector<double>&).
- Parameters
_gridOld – Old distribution grid.
_q0Old – Old distribution.
_gridNew – New distribution grid.
- Returns
Converted q0 distribution on the modified size grid.
-
inline std::vector<double> Convertq2Toq2(const std::vector<double> &_gridOld, const std::vector<double> &_q2Old, std::vector<double> &_gridNew)
Converts q2 distribution to the same distribution on the modified size grid.
Refer to function ConvertqOnNewGrid(const std::vector<double>&, const std::vector<double>&, const std::vector<double>&).
- Parameters
_gridOld – Old distribution grid.
_q2Old – Old distribution.
_gridNew – New distribution grid.
- Returns
Converted q2 distribution on the modified size grid.
-
inline std::vector<double> Convertq3Toq3(const std::vector<double> &_gridOld, const std::vector<double> &_q3Old, std::vector<double> &_gridNew)
Converts q3 distribution to the same distribution on the modified size grid.
Refer to function ConvertqOnNewGrid(const std::vector<double>&, const std::vector<double>&, const std::vector<double>&).
- Parameters
_gridOld – Old distribution grid.
_q3Old – Old distribution.
_gridNew – New distribution grid.
- Returns
Converted q3 distribution on the modified size grid.
-
inline void NormalizeDensityDistribution(const std::vector<double> &_grid, std::vector<double> &_qiDistr)
Normalizes density distribution q0 or q3.
.
- Parameters
_grid – Distribution grid.
_qiDistr – Input distribution.
-
inline double GetDistributionValue(const std::vector<double> &_grid, const std::vector<double> &_QiDistr, double _val)
Returns value of the grid in the measurement units of the grid, which corresponds to a specified value of cumulative distribution Q0 or Q3.
For PSD, returns particle diameter in [m]. Input value should range between 0 and 1.
- Parameters
_grid – Distribution grid.
_QiDistr – Input distribution.
_val – Value in range between 0 and 1.
- Returns
Distribution value.
-
inline double GetDistributionMedian(const std::vector<double> &_grid, const std::vector<double> &_QiDistr)
Returns median in the measurement units of the grid of Q0 or Q3 distribution. Median is a value of the grid, which corresponds to a value of distribution equal to 0.5.
For PSD, returns particle diameter in [m]. Refer to function GetDistributionValue(const std::vector<double>&, const std::vector<double>&, double).
- Parameters
_grid – Distribution grid.
_QiDistr – Input distribution.
- Returns
Median of distribution.
-
inline double GetDistributionMode(const std::vector<double> &_grid, const std::vector<double> &_qiDistr)
Returns value of the grid in the measurement units of the grid, which corresponds to a maximum value of density distribution.
For PSD, returns particle diameter in [m].
- Parameters
_grid – Distribution grid.
_qiDistr – Input distribution.
- Returns
Mode of distribution.
-
inline double GetDistributionMean(const std::vector<double> &_grid, const std::vector<double> &_qiDistr)
Returns value of the grid in the measurement units of the grid, which corresponds to a mean value of density distribution.
For PSD, returns particle diameter in [m]. Calculated as with mean value of the distribution, value of the distribution at class , mean value of the class .
- Parameters
_grid – Distribution grid.
_qiDistr – Input density distribution.
- Returns
Mean of distribution.
-
inline double GetDistributionVariance(const std::vector<double> &_grid, const std::vector<double> &_qiDistr)
Returns variance of the density distribution around its mean value in the measurement units of the grid.
For PSD, calculates in the terms of particle diameter in [m]. Calculated as with variance of the distribution, value of the distribution at class , mean value of the class , mean value of the distribution (Refer to function GetDistributionMean(const std::vector<double>&, const std::vector<double>&)).
- Parameters
_grid – Distribution grid.
_qiDistr – Input density distribution.
- Returns
Variance of distribution.
-
inline double GetDistributionStdDev(const std::vector<double> &_grid, const std::vector<double> &_qiDistr)
Returns standard deviation of the density distribution around its mean value in the measurement units of the grid.
For PSD, calculates in the terms of particle diameter in [m]. Calculated as with standard deviation of the distribution, value of the distribution at class , mean value of the class , mean value of the distribution (Refer to function GetDistributionMean(const std::vector<double>&, const std::vector<double>&)).
- Parameters
_grid – Distribution grid.
_qiDistr – Input density distribution.
- Returns
Standard deviation of distribution.
-
inline double GetAverageDiameter(const std::vector<double> &_grid, const std::vector<double> &_qiDistr)
Returns average diameter in [m] of the distribution q0 or q3.
- Parameters
_grid – Distribution grid.
_qiDistr – Input distribution.
- Returns
Average diameter of distribution.
-
inline double GetSpecificSurface(const std::vector<double> &_grid, const std::vector<double> &_q3)
Calculates specific surface of q3 distribution in [m2].
- Parameters
_grid – Distribution grid.
_q3 – Input distribution.
- Returns
Specific surface of distribution.
-
inline double GetSauterDiameter(const std::vector<double> &_grid, const std::vector<double> &_q3)
Calculates Sauter diameter (d32) of q3 distribution in [m].
- Parameters
_grid – Distribution grid.
_q3 – Input distribution.
- Returns
Sauter diameter of distribution.