Determines the phase compositions, pressures and saturations given the total mass of all components for the chiwoms problem.
More...
#include <PTFlash.hpp>
|
template<class FluidState > |
static void | solve (FluidState &fluid_state, const Dune::FieldVector< typename FluidState::Scalar, numComponents > &z, int spatialIdx, std::string twoPhaseMethod, Scalar tolerance=-1., int verbosity=0) |
| Calculates the fluid state from the global mole fractions of the components and the phase pressures. More...
|
|
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. More...
|
|
|
template<class FlashFluidState > |
static FlashFluidState::Scalar | wilsonK_ (const FlashFluidState &fluid_state, int compIdx) |
|
template<class Vector , class FlashFluidState > |
static Vector::field_type | li_single_phase_label_ (const FlashFluidState &fluid_state, const Vector &z, int verbosity) |
|
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 Vector > |
static Vector::field_type | solveRachfordRice_g_ (const Vector &K, const Vector &z, int verbosity) |
|
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 FlashFluidState , class ComponentVector > |
static void | phaseStabilityTest_ (bool &isStable, ComponentVector &K, FlashFluidState &fluid_state, const ComponentVector &z, int verbosity) |
|
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, 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, int verbosity=0) |
|
template<class FlashFluidState , class ComponentVector > |
static void | newtonComposition_ (ComponentVector &K, typename FlashFluidState::Scalar &L, FlashFluidState &fluid_state, const ComponentVector &z, 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 FlashFluidState , typename ComponentVector , size_t num_primary, size_t num_equation> |
static void | assembleNewtonSingle_ (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 , typename ComponentVector > |
static void | updateDerivatives_ (const FlashFluidStateScalar &fluid_state_scalar, const ComponentVector &z, FluidState &fluid_state, bool is_single_phase) |
|
template<typename FlashFluidStateScalar , typename FluidState , typename ComponentVector > |
static void | updateDerivativesTwoPhase_ (const FlashFluidStateScalar &fluid_state_scalar, const ComponentVector &z, FluidState &fluid_state) |
|
template<typename FlashFluidStateScalar , typename FluidState , typename ComponentVector > |
static void | updateDerivativesSinglePhase_ (const FlashFluidStateScalar &fluid_state_scalar, const ComponentVector &z, FluidState &fluid_state) |
|
template<class FlashFluidState , class ComponentVector > |
static void | successiveSubstitutionComposition_ (ComponentVector &K, typename ComponentVector::field_type &L, FlashFluidState &fluid_state, const ComponentVector &z, const bool newton_afterwards, const int verbosity) |
|
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.
◆ assembleNewton_()
template<class Scalar , class FluidSystem >
template<typename FlashFluidState , typename ComponentVector , size_t num_primary, size_t num_equation>
static void Opm::PTFlash< Scalar, FluidSystem >::assembleNewton_ |
( |
const FlashFluidState & |
fluid_state, |
|
|
const ComponentVector & |
global_composition, |
|
|
Dune::FieldMatrix< double, num_equation, num_primary > & |
jac, |
|
|
Dune::FieldVector< double, num_equation > & |
res |
|
) |
| |
|
inlinestaticprotected |
◆ assembleNewtonSingle_()
template<class Scalar , class FluidSystem >
template<typename FlashFluidState , typename ComponentVector , size_t num_primary, size_t num_equation>
static void Opm::PTFlash< Scalar, FluidSystem >::assembleNewtonSingle_ |
( |
const FlashFluidState & |
fluid_state, |
|
|
const ComponentVector & |
global_composition, |
|
|
Dune::FieldMatrix< double, num_equation, num_primary > & |
jac, |
|
|
Dune::FieldVector< double, num_equation > & |
res |
|
) |
| |
|
inlinestaticprotected |
◆ bisection_g_()
template<class Scalar , class FluidSystem >
template<class Vector >
static Vector::field_type Opm::PTFlash< Scalar, FluidSystem >::bisection_g_ |
( |
const Vector & |
K, |
|
|
typename Vector::field_type |
Lmin, |
|
|
typename Vector::field_type |
Lmax, |
|
|
const Vector & |
z, |
|
|
int |
verbosity |
|
) |
| |
|
inlinestaticprotected |
◆ checkStability_()
template<class Scalar , class FluidSystem >
template<class FlashFluidState , class ComponentVector >
static void Opm::PTFlash< Scalar, FluidSystem >::checkStability_ |
( |
const FlashFluidState & |
fluid_state, |
|
|
bool & |
isTrivial, |
|
|
ComponentVector & |
K, |
|
|
ComponentVector & |
xy_loc, |
|
|
typename FlashFluidState::Scalar & |
S_loc, |
|
|
const ComponentVector & |
z, |
|
|
bool |
isGas, |
|
|
int |
verbosity |
|
) |
| |
|
inlinestaticprotected |
◆ computeLiquidVapor_()
template<class Scalar , class FluidSystem >
template<class FlashFluidState , class ComponentVector >
static void Opm::PTFlash< Scalar, FluidSystem >::computeLiquidVapor_ |
( |
FlashFluidState & |
fluid_state, |
|
|
typename FlashFluidState::Scalar & |
L, |
|
|
ComponentVector & |
K, |
|
|
const ComponentVector & |
z |
|
) |
| |
|
inlinestaticprotected |
◆ flash_2ph()
template<class Scalar , class FluidSystem >
template<class FluidState , class ComponentVector >
static void Opm::PTFlash< Scalar, FluidSystem >::flash_2ph |
( |
const ComponentVector & |
z_scalar, |
|
|
const std::string & |
flash_2p_method, |
|
|
ComponentVector & |
K_scalar, |
|
|
typename FluidState::Scalar & |
L_scalar, |
|
|
FluidState & |
fluid_state_scalar, |
|
|
int |
verbosity = 0 |
|
) |
| |
|
inlinestaticprotected |
◆ li_single_phase_label_()
template<class Scalar , class FluidSystem >
template<class Vector , class FlashFluidState >
static Vector::field_type Opm::PTFlash< Scalar, FluidSystem >::li_single_phase_label_ |
( |
const FlashFluidState & |
fluid_state, |
|
|
const Vector & |
z, |
|
|
int |
verbosity |
|
) |
| |
|
inlinestaticprotected |
◆ newtonComposition_()
template<class Scalar , class FluidSystem >
template<class FlashFluidState , class ComponentVector >
static void Opm::PTFlash< Scalar, FluidSystem >::newtonComposition_ |
( |
ComponentVector & |
K, |
|
|
typename FlashFluidState::Scalar & |
L, |
|
|
FlashFluidState & |
fluid_state, |
|
|
const ComponentVector & |
z, |
|
|
int |
verbosity |
|
) |
| |
|
inlinestaticprotected |
◆ phaseStabilityTest_()
template<class Scalar , class FluidSystem >
template<class FlashFluidState , class ComponentVector >
static void Opm::PTFlash< Scalar, FluidSystem >::phaseStabilityTest_ |
( |
bool & |
isStable, |
|
|
ComponentVector & |
K, |
|
|
FlashFluidState & |
fluid_state, |
|
|
const ComponentVector & |
z, |
|
|
int |
verbosity |
|
) |
| |
|
inlinestaticprotected |
◆ rachfordRice_dg_dL_()
template<class Scalar , class FluidSystem >
template<class Vector >
static Vector::field_type Opm::PTFlash< Scalar, FluidSystem >::rachfordRice_dg_dL_ |
( |
const Vector & |
K, |
|
|
const typename Vector::field_type |
L, |
|
|
const Vector & |
z |
|
) |
| |
|
inlinestaticprotected |
◆ rachfordRice_g_()
template<class Scalar , class FluidSystem >
template<class Vector >
static Vector::field_type Opm::PTFlash< Scalar, FluidSystem >::rachfordRice_g_ |
( |
const Vector & |
K, |
|
|
typename Vector::field_type |
L, |
|
|
const Vector & |
z |
|
) |
| |
|
inlinestaticprotected |
◆ solve() [1/2]
template<class Scalar , class FluidSystem >
template<class FluidState , class ComponentVector >
static 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...
◆ solve() [2/2]
template<class Scalar , class FluidSystem >
template<class FluidState >
static void Opm::PTFlash< Scalar, FluidSystem >::solve |
( |
FluidState & |
fluid_state, |
|
|
const Dune::FieldVector< typename FluidState::Scalar, numComponents > & |
z, |
|
|
int |
spatialIdx, |
|
|
std::string |
twoPhaseMethod, |
|
|
Scalar |
tolerance = -1. , |
|
|
int |
verbosity = 0 |
|
) |
| |
|
inlinestatic |
Calculates the fluid state from the global mole fractions of the components and the phase pressures.
References Opm::PTFlash< Scalar, FluidSystem >::flash_2ph(), Opm::getValue(), Opm::PTFlash< Scalar, FluidSystem >::li_single_phase_label_(), Opm::PTFlash< Scalar, FluidSystem >::phaseStabilityTest_(), Opm::PTFlash< Scalar, FluidSystem >::solveRachfordRice_g_(), and Opm::PTFlash< Scalar, FluidSystem >::updateDerivatives_().
◆ solveRachfordRice_g_()
template<class Scalar , class FluidSystem >
template<class Vector >
static Vector::field_type Opm::PTFlash< Scalar, FluidSystem >::solveRachfordRice_g_ |
( |
const Vector & |
K, |
|
|
const Vector & |
z, |
|
|
int |
verbosity |
|
) |
| |
|
inlinestaticprotected |
References Opm::abs(), Opm::PTFlash< Scalar, FluidSystem >::bisection_g_(), Opm::max(), Opm::min(), Opm::PTFlash< Scalar, FluidSystem >::rachfordRice_dg_dL_(), and Opm::PTFlash< Scalar, FluidSystem >::rachfordRice_g_().
Referenced by Opm::PTFlash< Scalar, FluidSystem >::solve(), and Opm::PTFlash< Scalar, FluidSystem >::successiveSubstitutionComposition_().
◆ successiveSubstitutionComposition_()
template<class Scalar , class FluidSystem >
template<class FlashFluidState , class ComponentVector >
static void Opm::PTFlash< Scalar, FluidSystem >::successiveSubstitutionComposition_ |
( |
ComponentVector & |
K, |
|
|
typename ComponentVector::field_type & |
L, |
|
|
FlashFluidState & |
fluid_state, |
|
|
const ComponentVector & |
z, |
|
|
const bool |
newton_afterwards, |
|
|
const int |
verbosity |
|
) |
| |
|
inlinestaticprotected |
◆ updateDerivatives_()
template<class Scalar , class FluidSystem >
template<typename FlashFluidStateScalar , typename FluidState , typename ComponentVector >
static void Opm::PTFlash< Scalar, FluidSystem >::updateDerivatives_ |
( |
const FlashFluidStateScalar & |
fluid_state_scalar, |
|
|
const ComponentVector & |
z, |
|
|
FluidState & |
fluid_state, |
|
|
bool |
is_single_phase |
|
) |
| |
|
inlinestaticprotected |
◆ updateDerivativesSinglePhase_()
template<class Scalar , class FluidSystem >
template<typename FlashFluidStateScalar , typename FluidState , typename ComponentVector >
static void Opm::PTFlash< Scalar, FluidSystem >::updateDerivativesSinglePhase_ |
( |
const FlashFluidStateScalar & |
fluid_state_scalar, |
|
|
const ComponentVector & |
z, |
|
|
FluidState & |
fluid_state |
|
) |
| |
|
inlinestaticprotected |
◆ updateDerivativesTwoPhase_()
template<class Scalar , class FluidSystem >
template<typename FlashFluidStateScalar , typename FluidState , typename ComponentVector >
static void Opm::PTFlash< Scalar, FluidSystem >::updateDerivativesTwoPhase_ |
( |
const FlashFluidStateScalar & |
fluid_state_scalar, |
|
|
const ComponentVector & |
z, |
|
|
FluidState & |
fluid_state |
|
) |
| |
|
inlinestaticprotected |
◆ wilsonK_()
template<class Scalar , class FluidSystem >
template<class FlashFluidState >
static FlashFluidState::Scalar Opm::PTFlash< Scalar, FluidSystem >::wilsonK_ |
( |
const FlashFluidState & |
fluid_state, |
|
|
int |
compIdx |
|
) |
| |
|
inlinestaticprotected |
The documentation for this class was generated from the following file:
|