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.

m_i = m w_i with m_i mass of phase i, m overall mass of the stream, w_i mass fraction of phase i.

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: m_i = _value and w_i = m_i / m. The total mass m changes due to assignment of m_i: m = m_{old} + ( _value - m_{i,old}). m_i mass of phase i, w_i mass fraction of phase i, m 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.

m_j = m f_j with m_j mass of compound j, m overall mass of the stream, f_j mass fraction of compound j.

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.

m_{i,j} = m w_i f_{i,j} with m_{i,j} mass of compound j in phase i, m overall mass of the stream, w_i mass fraction of phase i, f_{i,j} mass fraction of compound j in phase i.

Parameters
  • _time – Target time point.

  • _compoundKey – Unique key of the compound.

  • _phase – Phase type identifier.

Returns

Mass of the compound.