Skip to main content
#include <rocky_fluid_scalars.hpp> Inherits ScalarsModel< rocky20::FluidScalarsController >.

Public Types

Public Member Functions

Detailed Description

An IRockyFluidScalarsModel allows users to add new fluid scalars, or find fluid scalars created in other modules, all during the setup phase of a module. Fluid scalars are special variables attached to CFD cell elements that store per-cell values preserved between simulation time iterations.

Member Enumeration Documentation

SpeciesVariableType

Enumerate with the types of species variables

Member Function Documentation

add()

This method creates a new scalar variable of type double for storing custom values during a simulation, preserving them between time iterations. Parameters Returns The index that will uniquely identify the scalar variable during the execution of the simulation.

enable_storage_cell_volume()

This method enables the fluid cell volume scalar.

find()

This method searches for a scalar variable already created by other modules, in order to allow access to its values, or store new values on it, during the execution of the simulation. Parameters Returns The index that uniquely identifies the wanted scalar if it was actually found. It returns -1 otherwise.

find_species_scalar()

This method searches for a species scalar variable already created by the CFD module, in order to allow access to its values, or store new values on it, during the execution of the simulation. Parameters Returns The index that uniquely identifies the wanted scalar if it was actually found. It returns -1 otherwise.

get_scalar_name()

This method returns the scalar name if it exists. Parameters Returns the scalar name if the index is valid. Throws an error otherwise.

get_scalar_unit()

This method returns the scalar unit if it exists. Parameters Returns the scalar unit if the index is valid. Throws an error otherwise..

reset()

This method resets to zero all values stored in a scalar variable. Parameters

set_dimension()

The purpose of this method is to associate a dimensional factor to a scalar variable. This factor will be used to nondimensionalize their values. For instance, if the scalar represents a force, a force dimensional factor must be associated through this method. Dimensional factors for the fundamental magnitudes are provided by functions of a IRockyModel object. Parameters