|
Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website |
Default units of a YAML file (its units: map; Cantera's defaults otherwise) and conversion of values to Mallard's units: SI with quantities in kmol, as Cantera uses internally.
More...
#include <units.h>
Public Member Functions | |
| UnitSystem ()=default | |
| UnitSystem (const YAML::Node &units) | |
Defaults from a units: map; keys not given keep Cantera's defaults. | |
| double | convert (const YAML::Node &value, const Dimension &dimension, const std::string &what) const |
| Value of a node in SI (kmol) units. | |
| double | convert_activation_energy (const YAML::Node &value, const std::string &what) const |
| Activation energy divided by the gas constant, in K: a temperature, a molar energy or an energy per molecule. | |
Default units of a YAML file (its units: map; Cantera's defaults otherwise) and conversion of values to Mallard's units: SI with quantities in kmol, as Cantera uses internally.
A value is a number in the default units or a string "<number> <units>", with units a product of known units and their SI prefixes, each optionally raised to a power, joined by '*' and '/' (e.g. "cm^3/mol/s", "kJ/mol").
|
default |
|
explicit |
Defaults from a units: map; keys not given keep Cantera's defaults.
| double chemistry::UnitSystem::convert | ( | const YAML::Node & | value, |
| const Dimension & | dimension, | ||
| const std::string & | what | ||
| ) | const |
Value of a node in SI (kmol) units.
| value | Number or "<number> <units>" string. |
| dimension | Dimension of the value, for numbers in default units and to check the units of strings. |
| what | Description of the value for error messages. |
| double chemistry::UnitSystem::convert_activation_energy | ( | const YAML::Node & | value, |
| const std::string & | what | ||
| ) | const |
Activation energy divided by the gas constant, in K: a temperature, a molar energy or an energy per molecule.