Files
OpenFOAM-12/etc/caseDicts/postProcessing/fields/moleFractions
Will Bainbridge 1b80fd35e4 functionObjects: Simplification of moleFractions, and new massFractions function
The moleFractions function has been simplified and generalised. It no
longer needs to execute on construction, as function objects now have
the ability to execute at the start of a simulation. It can also now
construct a thermo model if none exists, simplifying its use as a post
processing operation. A packaged function has been provided, so that all
that is needed to execute the function is the following setting in the
functions section of the system/controlDict:

    #includeFunc moleFractions

Alternatively, it can be executed on the command line as follows:

    foamPostProcess -func moleFractions

A new massFractions function has also been added which converts mole
fraction fields (e.g., X_CH4, X_O2, etc...), or moles fields (n_CH4,
n_O2, etc...) to the corresponding mass fraction fields. This function,
by contrast to the moleFractions function described above, should not be
used at run-time. It should only be used to initialise a simulation in
which molar data is known and needs converting to mass-fractions. If at
the point of execution a thermo model exists, or mass-fraction fields
are found on disk, then this function will exit with an error rather
than invalidating the existing mass-fraction data. Packaging is provided
that allows the function to be executed to initialise a case as follows:

    foamPostProcess -func massFractions
2023-01-31 15:09:18 +00:00

21 lines
814 B
C++

/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
-------------------------------------------------------------------------------
Description
Calculates mole-fraction fields from the mass-fraction fields of a
multicomponent thermo.
\*---------------------------------------------------------------------------*/
type moleFractions;
libs ("libmulticomponentThermophysicalModels.so");
executeControl writeTime;
writeControl writeTime;
// ************************************************************************* //