template<typename VelocityField_T, typename Filter_T = DefaultEvaluationFilter>
class walberla::field::VolumetricFlowRateEvaluation< VelocityField_T, Filter_T >
Class for evaluating the volumetric flow rate of a simulation.
Volumetric Flow Rate Evaluation
Class for evaluating the volumetric flow rate of a simulation. The flow rate can either just be evaluated or it can be compared with an exact solution in case an exact solution exists and the exact solution is provided via a callback function.
Do not create objects of class VolumetricFlowRateEvaluation directly, better use one of the various 'makeVolumetricFlowRateEvaluation' functions below!
Template parameters:
- VelocityField_T: the field storing the simulation velocities (must be a field that stores Vector3 values)
- Filter_T: the type of the evaluation filter (see Evaluation Filter in 'EvaluationFilter.h')
Parameters for setting up and controlling flow rate evaluation:
- blocks: the block storage
- fieldId: block data ID of the velocity field
- 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.
- solution: the solution callback function - must return the exact solution for the flow rate
- velocity solution: the velocity solution callback function - must return the exact solution for the velocity when called with a position inside the domain
- filename: the name of the file that stores the data for plotting
- normalization factor: an optional factor the simulation values and the solution values are multiplied with
- domain normalization: By default, the surface area required for the calculation of the volumetric flow rate is calculated using the size of the domain as returned by blocks->getDomain(). However, you can overwrite the size of the domain via the domain normalization parameter: This parameter specifies a new, different size for the domain.
- axis: boolean Vector3 where only one component must be true -> the flow rate through a surface perpendicular to this axis will be calculated
- surface point: a point that specifies the position of the surface - this point is always relative to the entire domain with [<0,0,0>,<1,1,1>], i.e., all coordinates of this point (x, y, and z) must be in [0;1]
- 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 'makeVolumetricFlowRateEvaluation' 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 'makeVolumetricFlowRateEvaluation' functions that take configuration file data as an additional parameter in order to parse the configuration file for setting up and controlling flow rate evaluation. The configuration file block looks like as follows:
{
plotFrequency [unsigned integer];
logFrequency [unsigned integer];
filename [string];
normalization [floating point value];
domainNormalization [Vector3: <real,real,real>];
axis [Vector3: <bool,bool,bool>];
point [Vector3: <real,real,real>];
}
Example:
{
plotFrequency 10;
logFrequency 1000;
filename FlowRate.txt;
axis <true,false,false>;
point <0.5,0.5,0.5>;
}
Note that the shared pointer returned by all 'makeVolumetricFlowRateEvaluation' functions can be captured by a SharedFunctor for immediate registration at a time loop (see field::makeSharedFunctor).