version 3.10-dev
Dumux::CompositionalFlash< Scalar, FluidSystem > Class Template Reference

Flash calculation routines for compositional sequential models. More...

#include <dumux/material/constraintsolvers/compositionalflash.hh>

Description

template<class Scalar, class FluidSystem>
class Dumux::CompositionalFlash< Scalar, FluidSystem >

Routines for isothermal and isobaric 2p2c and 1p2c flash, assuming an ideal mixture. The flash assumes that the fugacities of a component \( \kappa \) in each phase are the same. The fugacity is defined as:

\( f^\kappa = \Phi^\kappa_\alpha(T_\alpha, p_\alpha) p_\alpha x^\kappa_\alpha\; \),

where \( Phi^\kappa_\alpha \) is a fixed fugacity coefficient independent of the phase's composition (ideal mixture), \( T_\alpha \) is a fixed temperature, and \( p_\alpha \) a fixed phase pressure. From the equality of fugacities, the mole (and mass) fractions \( x^\kappa_\alpha \) in equilibrium are calculated.

Public Types

using ComponentVector = Dune::FieldVector< Scalar, numComponents >
 
using PhaseVector = Dune::FieldVector< Scalar, numPhases >
 

Static Public Member Functions

Concentration flash for a given feed fraction

2p2c Flash for constant p & T if concentration (feed mass fraction) is given.

This flash uses the Rachford-Rice equation: Rachford Jr, H. H., & Rice, J. D. (1952). Procedure for use of electronic digital computers in calculating flash vaporization hydrocarbon equilibrium. Journal of Petroleum Technology, 4(10), 19-3.

Routine goes as follows:

  • determination of the equilibrium constants from the fluid system
  • determination of maximum solubilities (mole fractions) according to phase pressures
  • comparison with phase mass fraction Nu (from Rachford-Rice equation) to determine phase presence => actual mole and mass fractions
  • complete fluid state
    Parameters
    fluidStateThe sequential fluid State
    Z0Feed mass fraction: Mass of first component per total mass \(\mathrm{[-]}\)
    phasePressureVector holding the pressure \(\mathrm{[Pa]}\)
    temperatureTemperature \(\mathrm{[K]}\)
template<class FluidState >
static void concentrationFlash2p2c (FluidState &fluidState, const Scalar Z0, const PhaseVector &phasePressure, const Scalar temperature)
 
static void concentrationFlash1p2c (FluidState1p2c &fluidState, const Scalar &Z0, const Dune::FieldVector< Scalar, numPhases > phasePressure, const int presentPhaseIdx, const Scalar &temperature)
 The simplest possible update routine for 1p2c "flash" calculations. More...
 
Saturation flash for a given saturation (e.g. at boundary)

2p2c flash for constant p & T if the saturation instead of concentration (feed mass fraction) is known.

Routine goes as follows:

  • determination of the equilibrium constants from the fluid system
  • determination of maximum solubilities (mole fractions) according to phase pressures
  • complete fluid state
    Parameters
    fluidStateThe sequential fluid state
    saturationSaturation of phase 1 \(\mathrm{[-]}\)
    phasePressureVector holding the pressure \(\mathrm{[Pa]}\)
    temperatureTemperature \(\mathrm{[K]}\)
template<class FluidState >
static void saturationFlash2p2c (FluidState &fluidState, const Scalar saturation, const PhaseVector &phasePressure, const Scalar temperature)
 

Member Typedef Documentation

◆ ComponentVector

template<class Scalar , class FluidSystem >
using Dumux::CompositionalFlash< Scalar, FluidSystem >::ComponentVector = Dune::FieldVector<Scalar, numComponents>

◆ PhaseVector

template<class Scalar , class FluidSystem >
using Dumux::CompositionalFlash< Scalar, FluidSystem >::PhaseVector = Dune::FieldVector<Scalar, numPhases>

Member Function Documentation

◆ concentrationFlash1p2c()

template<class Scalar , class FluidSystem >
static void Dumux::CompositionalFlash< Scalar, FluidSystem >::concentrationFlash1p2c ( FluidState1p2c fluidState,
const Scalar &  Z0,
const Dune::FieldVector< Scalar, numPhases >  phasePressure,
const int  presentPhaseIdx,
const Scalar &  temperature 
)
inlinestatic

Routine goes as follows:

  • check if we are in single phase condition
  • assign total concentration to the present phase
  • complete fluid state
Parameters
fluidStateThe sequential fluid state
Z0Feed mass fraction: Mass of first component per total mass \(\mathrm{[-]}\)
phasePressureVector holding the pressure \(\mathrm{[Pa]}\)
presentPhaseIdxSubdomain Index = Indication which phase is present
temperatureTemperature \(\mathrm{[K]}\)

◆ concentrationFlash2p2c()

template<class Scalar , class FluidSystem >
template<class FluidState >
static void Dumux::CompositionalFlash< Scalar, FluidSystem >::concentrationFlash2p2c ( FluidState &  fluidState,
const Scalar  Z0,
const PhaseVector phasePressure,
const Scalar  temperature 
)
inlinestatic

◆ saturationFlash2p2c()

template<class Scalar , class FluidSystem >
template<class FluidState >
static void Dumux::CompositionalFlash< Scalar, FluidSystem >::saturationFlash2p2c ( FluidState &  fluidState,
const Scalar  saturation,
const PhaseVector phasePressure,
const Scalar  temperature 
)
inlinestatic

The documentation for this class was generated from the following file: