opm-common
Loading...
Searching...
No Matches
Opm::PTFlash< Scalar, FluidSystem > Class Template Reference

Determines the phase compositions, pressures and saturations given the total mass of all components for the chiwoms problem. More...

#include <PTFlash.hpp>

Static Public Member Functions

template<class FluidState>
static bool solve (FluidState &fluid_state, const std::string &twoPhaseMethod, Scalar flash_tolerance, const EOSType &eos_type, int verbosity=0)
 Calculates the fluid state from the global mole fractions of the components and the phase pressures.
template<class FluidState, class ComponentVector>
static void solve (FluidState &fluid_state, const ComponentVector &globalMolarities, Scalar tolerance=0.0)
 Calculates the chemical equilibrium from the component fugacities in a phase.
template<class Vector>
static Vector::field_type solveRachfordRice_g_ (const Vector &K, const Vector &z, int verbosity)
template<typename FluidState>
static bool flash_solve_scalar_ (FluidState &fluid_state, const std::string &twoPhaseMethod, const Scalar flash_tolerance, const EOSType &eos_type, const int verbosity=0)
template<class Vector>
static Vector::field_type bisection_g_ (const Vector &K, typename Vector::field_type Lmin, typename Vector::field_type Lmax, const Vector &z, int verbosity)
template<class Vector, class FlashFluidState>
static Vector::field_type li_single_phase_label_ (const FlashFluidState &fluid_state, const Vector &z, int verbosity)
template<class FlashFluidState, class ComponentVector>
static void phaseStabilityTest_ (bool &isStable, ComponentVector &K, FlashFluidState &fluid_state, const ComponentVector &z, const EOSType &eos_type, int verbosity)

Static Protected Member Functions

template<class FlashFluidState>
static FlashFluidState::Scalar wilsonK_ (const FlashFluidState &fluid_state, int compIdx)
template<class Vector>
static Vector::field_type rachfordRice_g_ (const Vector &K, typename Vector::field_type L, const Vector &z)
template<class Vector>
static Vector::field_type rachfordRice_dg_dL_ (const Vector &K, const typename Vector::field_type L, const Vector &z)
template<class FlashFluidState, class ComponentVector>
static void checkStability_ (const FlashFluidState &fluid_state, bool &isTrivial, ComponentVector &K, ComponentVector &xy_loc, typename FlashFluidState::Scalar &S_loc, const ComponentVector &z, bool isGas, const EOSType &eos_type, int verbosity)
template<class FlashFluidState, class ComponentVector>
static void computeLiquidVapor_ (FlashFluidState &fluid_state, typename FlashFluidState::Scalar &L, ComponentVector &K, const ComponentVector &z)
template<class FluidState, class ComponentVector>
static void flash_2ph (const ComponentVector &z_scalar, const std::string &flash_2p_method, ComponentVector &K_scalar, typename FluidState::Scalar &L_scalar, FluidState &fluid_state_scalar, const Scalar flash_tolerance, const EOSType &eos_type, int verbosity=0)
template<class FlashFluidState, class ComponentVector>
static bool newtonComposition_ (ComponentVector &K, typename FlashFluidState::Scalar &L, FlashFluidState &fluid_state, const ComponentVector &z, const Scalar tolerance, const EOSType &eos_type, int verbosity)
template<typename FlashFluidState, typename ComponentVector, size_t num_primary, size_t num_equation>
static void assembleNewton_ (const FlashFluidState &fluid_state, const ComponentVector &global_composition, Dune::FieldMatrix< double, num_equation, num_primary > &jac, Dune::FieldVector< double, num_equation > &res)
template<typename FlashFluidStateScalar, typename FluidState>
static void updateDerivatives_ (const FlashFluidStateScalar &fluid_state_scalar, FluidState &fluid_state, const EOSType &eos_type, bool is_single_phase)
template<typename FlashFluidStateScalar, typename FluidState>
static void updateDerivativesTwoPhase_ (const FlashFluidStateScalar &fluid_state_scalar, FluidState &fluid_state, const EOSType &eos_type)
template<typename FlashFluidStateScalar, typename FluidState>
static void updateDerivativesSinglePhase_ (const FlashFluidStateScalar &fluid_state_scalar, FluidState &fluid_state)
template<class FlashFluidState, class ComponentVector>
static bool successiveSubstitutionComposition_ (ComponentVector &K, typename ComponentVector::field_type &L, FlashFluidState &fluid_state, const ComponentVector &z, const bool newton_afterwards, const Scalar flash_tolerance, const EOSType &eos_type, const int verbosity)

Detailed Description

template<class Scalar, class FluidSystem>
class Opm::PTFlash< Scalar, FluidSystem >

Determines the phase compositions, pressures and saturations given the total mass of all components for the chiwoms problem.

Member Function Documentation

◆ solve()

template<class Scalar, class FluidSystem>
template<class FluidState, class ComponentVector>
void Opm::PTFlash< Scalar, FluidSystem >::solve ( FluidState & fluid_state,
const ComponentVector & globalMolarities,
Scalar tolerance = 0.0 )
inlinestatic

Calculates the chemical equilibrium from the component fugacities in a phase.

This is a convenience method which assumes that the capillary pressure is zero...


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