Holdup
-
class CHoldup : public CBaseStream
Class describes the holdup material.
Public Functions
-
void CopyFromHoldup(double _time, const CHoldup *_source)
Copies all data at the given time point from another holdup.
All data after the time point are removed from this holdup. Uses function CBaseStream::Copy(double, const CBaseStream&).
- Parameters
_time – Time point to copy.
_source – Source holdup.
-
void CopyFromHoldup(double _timeBeg, double _timeEnd, const CHoldup *_source)
Copies all data at the given time interval from another holdup.
All data after the end time point are removed from this holdup. Uses function CBaseStream::Copy(double, double, const CBaseStream&).
- Parameters
_timeBeg – Begin of the time interval to copy.
_timeEnd – End of the time interval to copy.
_source – Source holdup.
-
void CopyFromHoldup(double _timeDst, const CHoldup *_source, double _timeSrc)
Copies all data from the given time point of another holdup to another time point of this holdup.
All data after the time point are removed from this holdup. Uses function CBaseStream::Copy(double, const CBaseStream&, double).
- Parameters
_timeDst – Time point of the destination holdup to copy.
_source – Source holdup.
_timeSrc – Time point of the source holdup to copy.
-
void AddStream(double _timeBeg, double _timeEnd, const CStream *_source)
Mixes the content of the specified material stream at the given time interval with the holdup.
Before mixing, all data after the end time point are removed. Takes into account only two given time points, regardless of whether they were defined in the material stream. All possible time points within the interval are discarded.
- Parameters
_timeBeg – Begin of the time interval.
_timeEnd – End of the time interval.
_source – Source material stream.
-
void AddHoldup(double _time, const CHoldup *_source)
Mixes the specified holdup with the current holdup at the given time point.
Uses function CBaseStream::Add(double, const CBaseStream&).
- Parameters
_time – Target time point.
_source – Source holdup.
-
void AddHoldup(double _timeBeg, double _timeEnd, const CHoldup *_source)
Mixes the specified holdup with the current holdup for each time point from the given time interval.
Uses function CBaseStream::Add(double, double, const CBaseStream&).
- Parameters
_timeBeg – Begin of the time interval.
_timeEnd – End of the time interval.
_source – Source holdup.
-
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.
-
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.
-
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.
-
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 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.
-
void CopyFromHoldup(double _time, const CHoldup *_source)