Basic stream
-
class CBaseStream
Basic class for material flow description.
This is a base class from which CStream and CHoldup are derived.
Subclassed by CHoldup, CStream
Public Functions
-
std::string GetName() const
Returns the name of the stream.
- Returns
Name of the stream.
-
void SetName(const std::string &_name)
Sets new name of the stream.
- Parameters
_name – Name of the stream.
-
std::string GetKey() const
Returns unique key of the stream.
- Returns
Unique key of the stream.
-
void SetKey(const std::string &_key)
Sets new unique key of the stream.
- Parameters
_key – Unique key of the stream.
-
void AddTimePoint(double _time)
Adds a new time point.
All data to the new time point are copied from the previous existing time point. If no other time points exist, all data are set to zero. If this time point already exists, nothing is done.
- Parameters
_time – New time point.
-
void CopyTimePoint(double _timeDst, double _timeSrc)
Copies all data from one time point to another one.
If the destination time point does not yet exist, it is added.
- Parameters
_timeDst – Target time point.
_timeSrc – Source time point.
-
void RemoveTimePoint(double _time)
Removes the specified time point if it already exists.
- Parameters
_time – Time point.
-
void RemoveTimePoints(double _timeBeg, double _timeEnd, bool _inclusive = true)
Removes all existing time points in the specified interval.
The boundaries of the interval can be included or excluded from the list of deleted time points.
- Parameters
_timeBeg – Begin of the time interval.
_timeEnd – End of the time interval.
_inclusive – Whether to include boundaries of the interval.
-
void RemoveTimePointsAfter(double _time, bool _inclusive = false)
Removes all existing time points after the specified one.
The time point itself can be included or excluded from the list of deleted time points.
- Parameters
_time – Begin of the time interval.
_inclusive – Whether to include boundary time point.
-
void RemoveAllTimePoints()
Removes all existing time points.
-
void ReduceTimePoints(double _timeBeg, double _timeEnd, double _step)
Removes time points within the specified interval that are closer together than a specified step.
- Parameters
_timeBeg – Begin of the time interval.
_timeEnd – End of the time interval.
_step – Step between time points to be kept.
-
std::vector<double> GetAllTimePoints() const
Returns all defined time points.
- Returns
All time points which are defined in the stream.
-
std::vector<double> GetTimePoints(double _timeBeg, double _timeEnd) const
Returns all defined time points in the specified time interval.
- Parameters
_timeBeg – Begin of the time interval.
_timeEnd – End of the time interval.
- Returns
All time points which are defined in the stream within the time interval.
-
std::vector<double> GetTimePointsClosed(double _timeBeg, double _timeEnd) const
Returns all defined time points in the specified closed time interval.
Boundaries are unconditionally included into result.
- Parameters
_timeBeg – Begin of the time interval.
_timeEnd – End of the time interval.
- Returns
All time points which are defined in the stream within the time interval.
-
double GetLastTimePoint() const
Returns the last (largest) defined time point.
Returns zero if no time points have been defined in the stream.
- Returns
Last defined time point in the stream.
-
double GetPreviousTimePoint(double _time) const
Returns the nearest time point before the given one.
Returns zero if such time point does not exist.
- Parameters
_time – Target time point.
- Returns
Previous time point.
-
double GetOverallProperty(double _time, EOverall _property) const
Returns a value of the specified overall property at the given time point.
Returns default value if such overall property has not been defined.
- Parameters
_time – Target time point.
_property – Identifier of time-dependent overall property.
- Returns
Value of the specified overall property at the given time point.
-
double GetMass(double _time) const
Returns a value of the overall mass in [kg] at the given time point.
If such time point has not been defined, interpolation of data is done.
- Parameters
_time – Target time point.
- Returns
Value of the overall mass at the given time point.
-
double GetTemperature(double _time) const
Returns a value of the overall temperature in [K] at the given time point.
Returns standard condition temperature if temperature overall property has not been defined.
- Parameters
_time – Target time point.
- Returns
Value of the overall temperature at the given time point.
-
double GetPressure(double _time) const
Returns a value of the overall pressure in [Pa] at the given time point.
Returns standard condition pressure if pressure overall property has not been defined.
- Parameters
_time – Target time point.
- Returns
Value of the overall pressure at the given time point.
-
void SetOverallProperty(double _time, EOverall _property, double _value)
Sets a value of the specified overall property at the given time point.
If the specified time point does not exist, it is added to the stream. If this property does not exist, nothing is done.
- Parameters
_time – Target time point.
_property – Identifier of the time-dependent overall property.
_value – Value of the specified overall property.
-
void SetMass(double _time, double _value)
Sets a value of the overall mass in [kg] at the given time point.
If the specified time point does not exist, it is added to the stream. If this property does not exist, nothing is done.
- Parameters
_time – Target time point.
_value – Value of the overall mass.
-
void SetTemperature(double _time, double _value)
Sets a value of the overall temperature in [K] at the given time point.
If the specified time point does not exist, it is added to the stream. If this property does not exist, nothing is done.
- Parameters
_time – Target time point.
_value – Value of the overall temperature.
-
void SetPressure(double _time, double _value)
Sets a value of the overall pressure in [Pa] at the given time point.
If the specified time point does not exist, it is added to the stream. If this property does not exist, nothing is done.
- Parameters
_time – Target time point.
_value – Value of the overall pressure.
-
double GetMol(double _time) const
Returns a value of the overall amount of substance in [mol] at the given time point.
with overall mass of the stream, mass fraction of phase , mass fraction of compound in phase , molar mass of compound .
- Parameters
_time – Target time point.
- Returns
Value of the overall amount of substance.
-
void SetMol(double _time, double _value)
Sets a value of the overall amount of substance in [mol] at the given time point.
If the specified time point does not exist, it is added to the stream. The overall amount of substance
_value
is converted to mass as with overall mass of the stream, overall amount of substance in [mol] as returned by CBaseStream::GetMol(double) const.- Parameters
_time – Target time point.
_value – Value of the overall amount of substance.
-
std::vector<std::string> GetAllCompounds() const
Returns unique keys of all defined compounds.
- Returns
List of all defined compounds.
-
double GetCompoundFraction(double _time, const std::string &_compoundKey) const
Returns the mass fraction of the compound in the total mixture at the given time point.
with mass fraction of compound , mass fraction of phase , mass fraction of compound in phase .
- Parameters
_time – Target time point.
_compoundKey – Unique key of the compound.
- Returns
Mass fraction of the compound.
-
double GetCompoundFraction(double _time, const std::string &_compoundKey, EPhase _phase) const
Returns the mass fraction of the compound in the specified phase at the given time point.
- Parameters
_time – Target time point.
_compoundKey – Unique key of the compound.
_phase – Phase type identifier.
- Returns
Mass fraction of the compound.
-
double GetCompoundMass(double _time, const std::string &_compoundKey) const
Returns the mass of the compound in the total mixture at the given time point.
with mass of compound , overall mass of the stream, mass fraction of compound .
- Parameters
_time – Target time point.
_compoundKey – Unique key of the compound.
- Returns
Mass of the compound.
-
double GetCompoundMass(double _time, const std::string &_compoundKey, EPhase _phase) const
Returns the mass of the compound in the specified phase at the given time point.
with mass of compound in phase , overall mass of the stream, mass fraction of phase , mass fraction of compound in phase .
- Parameters
_time – Target time point.
_compoundKey – Unique key of the compound.
_phase – Phase type identifier.
- Returns
Mass of the compound.
-
std::vector<double> GetCompoundsFractions(double _time) const
Returns mass fraction of all defined compounds at the given time point.
- Parameters
_time – Target time point.
- Returns
Mass fraction of all defined compounds.
-
std::vector<double> GetCompoundsFractions(double _time, EPhase _phase) const
Returns mass fraction of all defined compounds in the specified phase at the given time point.
- Parameters
_time – Target time point.
_phase – Phase type identifier.
- Returns
Mass fraction of all defined compounds.
-
std::vector<double> GetCompoundsMasses(double _time) const
Returns masses of all defined compounds at the given time point.
- Parameters
_time – Target time point.
- Returns
Masses of all defined compounds.
-
std::vector<double> GetCompoundsMasses(double _time, EPhase _phase) const
Returns masses of all defined compounds in the specified phase at the given time point.
- Parameters
_time – Target time point.
_phase – Phase type identifier.
- Returns
Masses of all defined compounds.
-
void SetCompoundFraction(double _time, const std::string &_compoundKey, EPhase _phase, double _value)
Sets mass fraction of the compound in the specified phase at the given time point.
If the specified time point does not exist, it is added to the stream.
- Parameters
_time – Target time point.
_compoundKey – Unique key of the compound.
_phase – Phase type identifier.
_value – Value of the mass fraction of the compound.
-
void SetCompoundsFractions(double _time, const std::vector<double> &_value)
Sets mass fraction of all defined compounds in all defined phases at the given time point.
If the specified time point does not exist, it is added to the stream.
- Parameters
_time – Target time point.
_value – List of mass fractions of all defined compounds.
-
void SetCompoundsFractions(double _time, EPhase _phase, const std::vector<double> &_value)
Sets mass fraction of all defined compounds in the specified phase at the given time point.
If the specified time point does not exist, it is added to the stream.
- Parameters
_time – Target time point.
_phase – Phase type identifier.
_value – List of mass fractions of all defined compounds.
-
void SetCompoundMass(double _time, const std::string &_compoundKey, EPhase _phase, double _value)
Sets the mass of the specified compound in the specified phase at the given time point.
Total mass of the stream is correspondingly adjusted, masses of other compounds and phases remain the same.
- Parameters
_time – Target time point.
_compoundKey – Unique key of the compound.
_phase – Phase type identifier.
_value – Mass of the compound.
-
double GetCompoundMolFraction(double _time, const std::string &_compoundKey, EPhase _phase) const
Returns the molar fraction of the compound in the specified phase at the given time point.
with mole fraction of compound in phase , mass fraction of compound in phase , molar mass of phase , molar mass of compound .
- Parameters
_time – Target time point.
_compoundKey – Unique key of the compound.
_phase – Phase type identifier.
- Returns
Molar fraction of the compound.
-
double GetCompoundMol(double _time, const std::string &_compoundKey, EPhase _phase) const
Returns the amount of substance of the compound in the specified phase at the given time point.
with amount of substance of compound in phase , overall mass of the stream, mass fraction of phase , mass fraction of compound in phase , molar mass of compound .
- Parameters
_time – Target time point.
_compoundKey – Unique key of the compound.
_phase – Phase type identifier.
- Returns
Amount of substance of the compound.
-
void SetCompoundMolFraction(double _time, const std::string &_compoundKey, EPhase _phase, double _value)
Sets the molar fraction of the compound in the specified phase at the given time point.
If the specified time point does not exist, it is added to the stream. The molar fraction of the compound
_value
is converted to a mass fraction as_value
with mass fraction of compound in phase , molar mass of compound .- Parameters
_time – Target time point.
_compoundKey – Unique key of the compound.
_phase – Phase type identifier.
_value – Molar fraction of the compound.
-
double GetPhaseFraction(double _time, EPhase _phase) const
Returns the mass fraction of the specified phase at the given time point.
- Parameters
_time – Target time point.
_phase – Phase type identifier.
- Returns
Mass fraction of the specified phase.
-
double GetPhaseMass(double _time, EPhase _phase) const
Returns the mass of the specified phase at the given time point.
with mass of phase , overall mass of the stream, mass fraction of phase .
- Parameters
_time – Target time point.
_phase – Phase type identifier.
- Returns
Mass of the specified phase.
-
double GetPhaseProperty(double _time, EPhase _phase, EOverall _property) const
Returns the value of the overall property of the specified phase at the given time point.
- Parameters
_time – Target time point.
_phase – Phase type identifier.
_property – Identifier of time-dependent overall property.
- Returns
Value of the overall property.
-
double GetPhaseProperty(double _time, EPhase _phase, ECompoundConstProperties _property) const
Returns the value of the constant physical property of the specified phase at the given time point.
For MOLAR_MASS: with molar mass of phase , molar mass of compound , mass fraction of compound in phase .
For other const material properties: with const physical property of phase , value of the specified const
_property
of compound , mass fraction of compound in phase .
See also: Constant parameters
- Parameters
_time – Target time point.
_phase – Phase type identifier.
_property – Identifier of a constant material property.
- Returns
Value of the constant physical property.
-
double GetPhaseProperty(double _time, EPhase _phase, ECompoundTPProperties _property) const
Returns the value of the temperature/pressure-dependent physical property of the specified phase at the given time point.
Available properties are:
For solid phase with porosity distribution: with porosity in interval , mass fraction of compound with porosity .
For solid and liquid phase: with mass fraction of compound in
_phase
.For vapor phase: with as the mole fraction of component in
_phase
.
HEAT_CAPACITY_CP: with heat capacity of compound , mass fraction of compound in
_phase
.VAPOR_PRESSURE: with vapor pressure of compound .
For solid phase: with viscosity of compound , mass fraction of compound .
For liquid phase: with viscosity of compound , mass fraction of compound in
_phase
.For vapor phase: with viscosity of compound , mass fraction of compound in
_phase
, the mole fraction of compound in_phase
.
For solid phase: with thermal conductivity of compound .
For liquid phase: with thermal conductivity of compound .
For vapor phase: , with the molar mass of compound .
PERMITTIVITY: with permittivity of compound , mass fraction of compound in
_phase
.ENTHALPY: with enthalpy of compound , mass fraction of compound in
_phase
.EQUILIBRIUM_MOISTURE_CONTENT: with equilibrium moisture content of compound , mass fraction of compound in
_phase
.MASS_DIFFUSION_COEFFICIENT: with mass diffusion coefficient of compound , mass fraction of compound in
_phase
.TP_PROP_USER_DEFINED_01 - TP_PROP_USER_DEFINED_20: with property value of compound , mass fraction of compound in
_phase
.
See also: Dependent parameters
- Parameters
_time – Target time point.
_phase – Phase type identifier.
_property – Identifier of temperature/pressure-dependent property.
- Returns
Value of the temperature/pressure-dependent physical property.
-
void SetPhaseFraction(double _time, EPhase _phase, double _value)
Sets the mass fraction of the specified phase at the given time point.
If the specified time point does not exist, it is added to the stream. If there is no specified phase in the stream, nothing is done.
- Parameters
_time – Target time point.
_phase – Phase type identifier.
_value – Phase mass fraction.
-
void SetPhaseMass(double _time, EPhase _phase, double _value)
Sets the mass of the specified phase at the given time point.
If the specified time point does not exist, it is added to the stream. Total mass of the stream is correspondingly adjusted, masses of other phases remain the same. If there is no specified phase in the stream, nothing is done. Input parameter
_value
is the mass of the defined phase:_value
and . The total mass changes due to assignment of :_value
. mass of phase , mass fraction of phase , overall mass of the stream.- Parameters
_time – Target time point.
_phase – Phase type identifier.
_value – Phase mass.
-
double GetPhaseMolFraction(double _time, EPhase _phase) const
Returns the molar fraction of the specified phase at the given time point.
, molar fraction of phase , amount of substance of phase , value of the overall amount of substance.
- Parameters
_time – Target time point.
_phase – Phase type identifier.
- Returns
Molar fraction of the specified phase.
-
double GetPhaseMol(double _time, EPhase _phase) const
Returns the amount of substance of the specified phase at the given time point.
, amount of substance of phase , amount of substance of compound in phase .
- Parameters
_time – Target time point.
_phase – Phase type identifier.
- Returns
Amount of substance of the specified phase.
-
void SetPhaseMolFraction(double _time, EPhase _phase, double _value)
Sets the molar fraction of the specified phase at the given time point.
If the specified time point does not exist, it is added to the stream. Input parameter
_value
is the molar fraction of the defined phase:_value
with mass fraction of phase , molar fraction of phase .- Parameters
_time – Target time point.
_phase – Phase type identifier.
_value – Molar fraction of the specified phase.
-
void SetPhaseMol(double _time, EPhase _phase, double _value)
Sets the amount of substance of the specified phase at the given time point.
If the specified time point does not exist, it is added to the stream. Total mass of the stream is correspondingly adjusted, masses of other phases remain the same. Input parameter
_value
is the amount of substance of one defined phase:_value
with mass of phase , amount of substance of phase .- Parameters
_time – Target time point.
_phase – Phase type identifier.
_value – Amount of substance of the specified phase.
-
double GetMixtureProperty(double _time, EOverall _property) const
Returns the value of the property of the total mixture in the stream at the given time point.
Refer to function CBaseStream::GetOverallProperty(double, EOverall) const.
- Parameters
_time – Target time point.
_property – Identifier of time-dependent overall property.
- Returns
Value of the property of the total mixture.
-
double GetMixtureProperty(double _time, ECompoundConstProperties _property) const
Returns the value of the constant physical property of the total mixture in the stream at the given time point.
with value of the const physical property of the total mixture, value of the const physical property of phase , mass fraction of phase .
- Parameters
_time – Target time point.
_property – Identifier of constant material property.
- Returns
Value of the constant physical property of the total mixture.
-
double GetMixtureProperty(double _time, ECompoundTPProperties _property) const
Returns the value of the temperature/pressure-dependent physical property of the total mixture in the stream at the given time point.
with value of the temperature/pressure-dependent physical property of the total mixture, value of the temperature/pressure-dependent physical property of phase , mass fraction of phase .
- Parameters
_time – Target time point.
_property – Identifier of temperature/pressure-dependent property.
- Returns
Value of the temperature/pressure-dependent physical property of the total mixture.
-
void SetMixtureProperty(double _time, EOverall _property, double _value)
Sets the value of the property of the total mixture in the stream at the given time point.
If the specified time point does not exist, it is added to the stream. Refer to function CBaseStream::SetOverallProperty(double, EOverall, double).
- Parameters
_time – Target time point.
_property – Identifier of time-dependent overall property.
_value – Value of the property of the total mixture.
-
double GetCompoundProperty(const std::string &_compoundKey, ECompoundConstProperties _property) const
Returns the value of the constant physical property of the specified compound.
See also: Constant parameters
- Parameters
_compoundKey – Unique key of the compound.
_property – Identifier of constant material property.
- Returns
Value of the constant physical property of the specified compound.
-
double GetCompoundProperty(const std::string &_compoundKey, ECompoundTPProperties _property, double _temperature, double _pressure) const
Returns the value of the temperature/pressure-dependent physical property of the specified compound with the given temperature [K] and pressure [Pa].
See also: Dependent parameters
- Parameters
_compoundKey – Unique key of the compound.
_property – Identifier of temperature/pressure-dependent property.
_temperature – Value of temperature in [K].
_pressure – Value of pressure in [Pa].
- Returns
Value of the temperature/pressure-dependent physical property of the specified compound.
-
double GetCompoundProperty(double _time, const std::string &_compoundKey, ECompoundTPProperties _property) const
Returns the value of the temperature/pressure-dependent physical property of the specified compound at temperature and pressure at the given time point.
Refer to function CBaseStream::GetCompoundProperty(const std::string&, ECompoundTPProperties, double, double) const. See also: Dependent parameters
- Parameters
_time – Target time point.
_compoundKey – Unique key of the compound.
_property – Identifier of temperature/pressure-dependent property.
- Returns
Value of the temperature/pressure-dependent physical property of the specified compound.
-
double GetCompoundProperty(const std::string &_compoundKey1, const std::string &_compoundKey2, EInteractionProperties _property, double _temperature, double _pressure) const
Returns the value of the interaction physical property between the specified compounds with the given specified temperature [K] and pressure [Pa].
See also: Interaction properties
- Parameters
_compoundKey1 – Unique key of the first compound.
_compoundKey2 – Unique key of the second compound.
_property – Identifier of property, defined for interaction of two compounds.
_temperature – Value of temperature in [K].
_pressure – Value of pressure in [Pa].
- Returns
Value of the interaction physical property between the specified compounds.
-
double GetCompoundProperty(double _time, const std::string &_compoundKey1, const std::string &_compoundKey2, EInteractionProperties _property) const
Returns the value of the interaction physical property between the specified compounds at temperature and pressure at the given time point.
Refer to function CBaseStream::GetCompoundProperty(const std::string&, const std::string&, EInteractionProperties, double, double) const. See also: Interaction properties
- Parameters
_time – Target time point.
_compoundKey1 – Unique key of the first compound.
_compoundKey2 – Unique key of the second compound.
_property – Identifier of property, defined for interaction of two compounds.
- Returns
Value of the interaction physical property between the specified compounds.
-
double GetFraction(double _time, const std::vector<size_t> &_coords) const
Returns mass fraction of the solid material at the specified multidimensional coordinates given for all defined dimensions.
- Parameters
_time – Target time point.
_coords – Multidimensional coordinates.
- Returns
Mass fraction of the solid material.
-
void SetFraction(double _time, const std::vector<size_t> &_coords, double _value)
Sets mass fraction of the solid material at the specified multidimensional coordinates given for all defined dimensions.
If the specified time point does not exist, it is added to the stream.
- Parameters
_time – Target time point.
_coords – Multidimensional coordinates.
_value – Mass fraction of the solid material.
-
std::vector<double> GetDistribution(double _time, EDistrTypes _distribution) const
Returns one-dimensional distribution of the solid material over the specified parameter at the given time point.
- Parameters
_time – Target time point.
_distribution – Type of distributed parameter of the solid phase.
- Returns
One-dimensional distribution of the solid material.
-
CMatrix2D GetDistribution(double _time, EDistrTypes _distribution1, EDistrTypes _distribution2) const
Returns two-dimensional distribution of the solid material over the specified parameters at the given time point.
- Parameters
_time – Target time point.
_distribution1 – First distributed parameter type of the solid phase.
_distribution2 – Second distributed parameter type of the solid phase.
- Returns
Two-dimensional distribution of the solid material.
-
CDenseMDMatrix GetDistribution(double _time, const std::vector<EDistrTypes> &_distributions) const
Returns multi-dimensional distribution of the solid material over the specified parameters at the given time point.
- Parameters
_time – Target time point.
_distributions – List of distributed parameter types of the solid phase.
- Returns
Multi-dimensional distribution of the solid material.
-
std::vector<double> GetDistribution(double _time, EDistrTypes _distribution, const std::string &_compoundKey) const
Returns one-dimensional distribution of the solid material over the specified parameter for the given compound and time point.
Input dimensions should not include distribution by compounds (DISTR_COMPOUNDS). If the specified compound has not been defined in the stream, empty vector is returned.
- Parameters
_time – Target time point.
_distribution – Type of distributed parameter of the solid phase.
_compoundKey – Unique key of the compound.
- Returns
One-dimensional distribution of the solid material.
-
CMatrix2D GetDistribution(double _time, EDistrTypes _distribution1, EDistrTypes _distribution2, const std::string &_compoundKey) const
Returns two-dimensional distribution of the solid material over the specified parameters for the given compound and time point.
Input dimensions should not include distribution by compounds (DISTR_COMPOUNDS). If the specified compound has not been defined in the stream, empty matrix is returned.
- Parameters
_time – Target time point.
_distribution1 – First distributed parameter type of the solid phase.
_distribution2 – Second distributed parameter type of the solid phase.
_compoundKey – Unique key of the compound.
- Returns
Two-dimensional distribution of the solid material.
-
CDenseMDMatrix GetDistribution(double _time, const std::vector<EDistrTypes> &_distributions, const std::string &_compoundKey) const
Returns multi-dimensional distribution of the solid material over the specified parameters for the given compound and time point.
Input dimensions should not include distribution by compounds (DISTR_COMPOUNDS). If specified compound has not been defined in the stream, empty matrix is returned.
- Parameters
_time – Target time point.
_distributions – List of distributed parameter types of the solid phase.
_compoundKey – Unique key of the compound.
- Returns
Multi-dimensional distribution of the solid material.
-
void SetDistribution(double _time, EDistrTypes _distribution, const std::vector<double> &_value)
Sets one-dimensional distribution of the solid material over the specified parameter at the given time point.
If such dimension does not exist, nothing is done. If the specified time point does not exist, it is added to the stream.
- Parameters
_time – Target time point.
_distribution – Type of distributed parameter of the solid phase.
_value – One-dimensional distribution of the solid material.
-
void SetDistribution(double _time, EDistrTypes _distribution1, EDistrTypes _distribution2, const CMatrix2D &_value)
Sets two-dimensional distribution of the solid material over the specified parameter at the given time point.
If such dimensions do not exist, nothing is done. If the specified time point does not exist, it is added to the stream.
- Parameters
_time – Target time point.
_distribution1 – First distributed parameter type of the solid phase.
_distribution2 – Second distributed parameter type of the solid phase.
_value – Two-dimensional distribution of the solid material.
-
void SetDistribution(double _time, const CDenseMDMatrix &_value)
Sets multi-dimensional distribution of the solid material over the specified parameter at the given time point.
If such dimensions do not exist, nothing is done. If the specified time point does not exist, it is added to the stream.
- Parameters
_time – Target time point.
_value – Multi-dimensional distribution of the solid material.
-
void SetDistribution(double _time, EDistrTypes _distribution, const std::string &_compoundKey, const std::vector<double> &_value)
Sets one-dimensional distribution of the solid material over the specified parameter for the given compound and time point.
If such compound or dimension does not exist, nothing is done. Input dimensions should not include distribution by compounds (DISTR_COMPOUNDS). If the specified time point does not exist, it is added to the stream.
- Parameters
_time – Target time point.
_distribution – Type of distributed parameter of the solid phase.
_compoundKey – Unique key of the compound.
_value – One-dimensional distribution of the solid material.
-
void SetDistribution(double _time, EDistrTypes _distribution1, EDistrTypes _distribution2, const std::string &_compoundKey, const CMatrix2D &_value)
Sets two-dimensional distribution of the solid material over the specified parameters for the given compound and time point.
If such time point, compound or dimensions do not exist, nothing is done. Input dimensions should not include distribution by compounds (DISTR_COMPOUNDS). If the specified time point does not exist, it is added to the stream.
- Parameters
_time – Target time point.
_distribution1 – First distributed parameter type of the solid phase.
_distribution2 – Second distributed parameter type of the solid phase.
_compoundKey – Unique key of the compound.
_value – Two-dimensional distribution of the solid material.
-
void SetDistribution(double _time, const std::string &_compoundKey, const CDenseMDMatrix &_value)
Sets multi-dimensional distribution of the solid material over the specified parameters for the given compound and time point.
If such compound or dimensions do not exist, nothing is done. Input dimensions should not include distribution by compounds (DISTR_COMPOUNDS). If the specified time point does not exist, it is added to the stream.
- Parameters
_time – Target time point.
_compoundKey – Unique key of the compound.
_value – Multi-dimensional distribution of the solid material.
-
void ApplyTM(double _time, const CTransformMatrix &_matrix)
Applies the transformation matrix to transform the multidimensional distributed parameters of the solid material at the given time point.
- Parameters
_time – Target time point.
_matrix – Transformation matrix.
-
void ApplyTM(double _time, const std::string &_compoundKey, const CTransformMatrix &_matrix)
Applies the transformation matrix to transform the multidimensional distributed parameters of the solid material for the given compound and time point.
Dimensions of transformation matrix should not include distribution by compounds (DISTR_COMPOUNDS).
- Parameters
_time – Target time point.
_compoundKey – Unique key of the compound.
_matrix – Transformation matrix.
-
void Normalize(double _time)
Normalizes data in the solids distribution matrix for the given time point.
If time has not been defined, nothing is done.
- Parameters
_time – Target time point.
-
void Normalize(double _timeBeg, double _timeEnd)
Normalizes data in the solids distribution matrix for the given time interval.
- Parameters
_timeBeg – Begin of the time interval.
_timeEnd – End of the time interval.
-
void Normalize()
Normalizes data in the solids distribution matrix for all time points.
-
std::vector<double> GetPSD(double _time, EPSDTypes _type, EPSDGridType _grid = EPSDGridType::DIAMETER) const
Returns the specified type of the PSD of the total mixture of all solid materials at the given time point.
Refer to function CBaseStream::GetPSD(double, EPSDTypes, const std::vector<std::string>&, EPSDGridType) const.
- Parameters
_time – Target time point.
_type – Identifier of the PSD type.
_grid – Identifier of grid units type.
- Returns
Particle size distribution.
-
std::vector<double> GetPSD(double _time, EPSDTypes _type, const std::string &_compoundKey, EPSDGridType _grid = EPSDGridType::DIAMETER) const
Returns the specified type of the PSD of the selected compound at the given time point.
Refer to function CBaseStream::GetPSD(double, EPSDTypes, const std::vector<std::string>&, EPSDGridType) const.
- Parameters
_time – Target time point.
_type – Identifier of the PSD type.
_compoundKey – Unique key of the compound.
_grid – Identifier of grid units type.
- Returns
Particle size distribution.
-
std::vector<double> GetPSD(double _time, EPSDTypes _type, const std::vector<std::string> &_compoundKeys, EPSDGridType _grid = EPSDGridType::DIAMETER) const
Returns the specified type of the PSD of the mixture of selected compounds at the given time point.
If the list of compounds is empty, the whole mixture is considered.
- Parameters
_time – Target time point.
_type – Identifier of the PSD type.
_compoundKeys – Unique keys of the compounds.
_grid – Identifier of grid units type.
- Returns
Particle size distribution.
-
void SetPSD(double _time, EPSDTypes _type, const std::vector<double> &_value, EPSDGridType _grid = EPSDGridType::DIAMETER)
Sets the specified type of the PSD of the total mixture of all solid materials at the given time point.
For number-related PSD, the distribution is normalized and the total particle mass remains unchanged. If the specified time point does not exist, it is added to the stream. Refer to function CBaseStream::SetPSD(double, EPSDTypes, const std::string&, const std::vector<double>&, EPSDGridType).
- Parameters
_time – Target time point.
_type – Identifier of PSD type.
_value – Particle size distribution.
_grid – Identifier of grid units type.
-
void SetPSD(double _time, EPSDTypes _type, const std::string &_compoundKey, const std::vector<double> &_value, EPSDGridType _grid = EPSDGridType::DIAMETER)
Sets the specified type of the PSD of the selected compound at the given time point.
For number-related PSD, the distribution is normalized and the total particle mass remains unchanged. If the compound key if empty, the whole mixture is considered. If the specified time point does not exist, it is added to the stream. As mass fractions are used to store data, PSD is converted using functions Convertq0ToMassFractions(), ConvertQ0ToMassFractions(), Convertq2ToMassFractions(), ConvertQ2ToMassFractions(), Convertq3ToMassFractions(), ConvertQ3ToMassFractions(), ConvertNumbersToMassFractions().
- Parameters
_time – Target time point.
_type – Identifier of PSD type.
_compoundKey – Unique key of the compound.
_value – Particle size distribution.
_grid – Identifier of grid units type.
-
void Copy(double _time, const CBaseStream &_source)
Copies all stream data at the given time point.
All data after the time point are removed from the destination stream.
- Parameters
_time – Time point to copy.
_source – Source stream.
-
void Copy(double _timeBeg, double _timeEnd, const CBaseStream &_source)
Copies all stream data at the given time interval.
All data after the end time point are removed from the destination stream.
- Parameters
_timeBeg – Begin of the time interval to copy.
_timeEnd – End of the time interval to copy.
_source – Source stream.
-
void Copy(double _timeDst, const CBaseStream &_source, double _timeSrc)
Copies all stream data to the given time point from another time point of the source stream.
All data after the time point are removed from the destination stream.
- Parameters
_timeDst – Time point of the destination stream to copy to.
_source – Source stream.
_timeSrc – Time point of the source stream to copy.
-
void Add(double _time, const CBaseStream &_source)
Mixes the specified stream with the current stream at the given time point.
Can be applied only for streams with the same structure (MD dimensions, phases, materials, etc.).
- Parameters
_time – Time point to copy.
_source – Source stream.
-
void Add(double _timeBeg, double _timeEnd, const CBaseStream &_source)
Mixes the specified stream with the current stream at the given time interval.
Can be applied only for streams with the same structure (MD dimensions, phases, materials, etc.). The stream will contain the union of time points from both streams.
- Parameters
_timeBeg – Begin of the time interval to copy.
_timeEnd – End of the time interval to copy.
_source – Source stream.
-
double CalculateEnthalpyFromTemperature(double _time) const
Calculates enthalpy of the stream mixture for the temperature at the given time point using a lookup table.
See also: Thermodynamics
- Parameters
_time – Target time point.
- Returns
Calculated value of enthalpy.
-
double CalculateTemperatureFromEnthalpy(double _time) const
Calculates temperature of the stream mixture for the enthalpy at the given time point using a lookup table.
See also: Thermodynamics
- Parameters
_time – Target time point.
- Returns
Calculated value of temperature.
-
std::string GetName() const