template<typename DensityField_T, typename Filter_T = DefaultEvaluationFilter, bool Pseudo2D = false>
class walberla::field::MassEvaluation< DensityField_T, Filter_T, Pseudo2D >
Class for evaluating the evolution of the mass of a simulation.
Mass Evaluation
Do not create objects of class MassEvaluation directly, better use one of the various 'makeMassEvaluation' functions below!
Template parameters:
- DensityField_T: a scalar field that stores the density. If the density is not explicitly stored in a field but can be calculated from the data stored in another field, you do not have to create a density field but you can use a field adaptor.
- Filter_T: the type of the evaluation filter (see Evaluation Filter in 'EvaluationFilter.h')
Parameters for setting up and controlling mass evaluation:
- blocks: the block storage
- fieldId: block data ID of the density field (might be a field adaptor)
- filter: the evaluation filter that indicates which cells are processed
- plot frequency: the plotting interval - used for saving the data to file. If set to '0', no plotting data is created.
- log frequency: the logging interval - used for logging the data via the Logging singleton. If set to '0', no logging is performed.
- filename: the name of the file that stores the data for plotting
- domain normalization: In order to evaluate the mass, the density of a cell is multiplied with the volume of the cell. By default, the volume of a cell corresponds the the simulation space as given by the domain bounding box (blocks->getDomain()). However, you can overwrite the size of the domain via the domain normalization parameter. If you do so, the volume of each cell will correspond to this 'normalized' domain.
- required and incompatible selectors
You do not have to specify an evaluation filter! If you do not specify any filter, all cells are processed and no cell is excluded.
If you want to use a flag field as evaluation filter, fitting 'makeMassEvaluation' functions already exist. These functions need an additional template parameter FlagField_T and you have to provide the block data ID of the flag field together with a set of flag UIDs that specify which cells need to be processed.
There also exist 'makeMassEvaluation' functions that take configuration file data as an additional parameter in order to parse the configuration file for setting up and controlling mass evaluation. The configuration file block looks like as follows:
{
plotFrequency [unsigned integer];
logFrequency [unsigned integer];
filename [string];
domain [Vector3: <real,real,real>];
}
Example:
{
plotFrequency 10;
logFrequency 1000;
filename Mass.txt;
domain <1,1,1>;
}
Note that the shared pointer returned by all 'makeMassEvaluation' functions can be captured by a SharedFunctor for immediate registration at a time loop (see field::makeSharedFunctor).