Determines the pressures and saturations of all fluid phases given the total mass of all components.
More...
#include <ImmiscibleFlash.hpp>
|
template<class FluidState , class Evaluation = typename FluidState::Scalar> |
static void | guessInitial (FluidState &fluidState, const Dune::FieldVector< Evaluation, numComponents > &) |
| Guess initial values for all quantities. More...
|
|
template<class MaterialLaw , class FluidState > |
static void | solve (FluidState &fluidState, const typename MaterialLaw::Params &matParams, typename FluidSystem::template ParameterCache< typename FluidState::Scalar > ¶mCache, const Dune::FieldVector< typename FluidState::Scalar, numComponents > &globalMolarities, Scalar tolerance=-1) |
| Calculates the chemical equilibrium from the component fugacities in a phase. More...
|
|
|
template<class FluidState > |
static void | printFluidState_ (const FluidState &fs) |
|
template<class MaterialLaw , class InputFluidState , class FlashFluidState > |
static void | assignFlashFluidState_ (const InputFluidState &inputFluidState, FlashFluidState &flashFluidState, const typename MaterialLaw::Params &matParams, typename FluidSystem::template ParameterCache< typename FlashFluidState::Scalar > &flashParamCache) |
|
template<class FlashFluidState , class OutputFluidState > |
static void | assignOutputFluidState_ (const FlashFluidState &flashFluidState, OutputFluidState &outputFluidState) |
|
template<class FluidState > |
static void | solveAllIncompressible_ (FluidState &fluidState, typename FluidSystem::template ParameterCache< typename FluidState::Scalar > ¶mCache, const Dune::FieldVector< typename FluidState::Scalar, numComponents > &globalMolarities) |
|
template<class FluidState , class FlashDefectVector , class FlashComponentVector > |
static void | evalDefect_ (FlashDefectVector &b, const FluidState &fluidState, const FlashComponentVector &globalMolarities) |
|
template<class MaterialLaw , class FlashFluidState , class EvalVector > |
static Scalar | update_ (FlashFluidState &fluidState, typename FluidSystem::template ParameterCache< typename FlashFluidState::Scalar > ¶mCache, const typename MaterialLaw::Params &matParams, const EvalVector &deltaX) |
|
template<class MaterialLaw , class FlashFluidState > |
static void | completeFluidState_ (FlashFluidState &flashFluidState, typename FluidSystem::template ParameterCache< typename FlashFluidState::Scalar > ¶mCache, const typename MaterialLaw::Params &matParams) |
|
static bool | isPressureIdx_ (unsigned pvIdx) |
|
static bool | isSaturationIdx_ (unsigned pvIdx) |
|
template<class FluidState > |
static const FluidState::Scalar & | getQuantity_ (const FluidState &fluidState, unsigned pvIdx) |
|
template<class FluidState > |
static void | setQuantity_ (FluidState &fluidState, unsigned pvIdx, const typename FluidState::Scalar &value) |
|
template<class FluidState > |
static Scalar | quantityWeight_ (const FluidState &, unsigned pvIdx) |
|
template<class Scalar, class FluidSystem>
class Opm::ImmiscibleFlash< Scalar, FluidSystem > Determines the pressures and saturations of all fluid phases given the total mass of all components.
In a N-phase, N-component context, we have the following unknowns if assuming immiscibility:
- N pressures
- N saturations
This sums up to 2*N unknowns. On the equations side of things, we have:
- N total component molarities
- 1 The sum of all saturations is 1
- N-1 Relations from capillary pressure
this also sums up to 2*N. We include the capillary pressures and the sum of the saturations explicitly. This means that we only solve for the first pressure and N-1 saturations.
If a fluid phase is incompressible, the pressure cannot determined by this, though. In this case the original pressure is kept, and the saturation of the phase is calculated by dividing the global molarity of the component by the phase density.
◆ assignFlashFluidState_()
template<class Scalar , class FluidSystem >
template<class MaterialLaw , class InputFluidState , class FlashFluidState >
static void Opm::ImmiscibleFlash< Scalar, FluidSystem >::assignFlashFluidState_ |
( |
const InputFluidState & |
inputFluidState, |
|
|
FlashFluidState & |
flashFluidState, |
|
|
const typename MaterialLaw::Params & |
matParams, |
|
|
typename FluidSystem::template ParameterCache< typename FlashFluidState::Scalar > & |
flashParamCache |
|
) |
| |
|
inlinestaticprotected |
◆ assignOutputFluidState_()
template<class Scalar , class FluidSystem >
template<class FlashFluidState , class OutputFluidState >
static void Opm::ImmiscibleFlash< Scalar, FluidSystem >::assignOutputFluidState_ |
( |
const FlashFluidState & |
flashFluidState, |
|
|
OutputFluidState & |
outputFluidState |
|
) |
| |
|
inlinestaticprotected |
◆ completeFluidState_()
template<class Scalar , class FluidSystem >
template<class MaterialLaw , class FlashFluidState >
static void Opm::ImmiscibleFlash< Scalar, FluidSystem >::completeFluidState_ |
( |
FlashFluidState & |
flashFluidState, |
|
|
typename FluidSystem::template ParameterCache< typename FlashFluidState::Scalar > & |
paramCache, |
|
|
const typename MaterialLaw::Params & |
matParams |
|
) |
| |
|
inlinestaticprotected |
◆ evalDefect_()
template<class Scalar , class FluidSystem >
template<class FluidState , class FlashDefectVector , class FlashComponentVector >
static void Opm::ImmiscibleFlash< Scalar, FluidSystem >::evalDefect_ |
( |
FlashDefectVector & |
b, |
|
|
const FluidState & |
fluidState, |
|
|
const FlashComponentVector & |
globalMolarities |
|
) |
| |
|
inlinestaticprotected |
◆ getQuantity_()
template<class Scalar , class FluidSystem >
template<class FluidState >
static const FluidState::Scalar & Opm::ImmiscibleFlash< Scalar, FluidSystem >::getQuantity_ |
( |
const FluidState & |
fluidState, |
|
|
unsigned |
pvIdx |
|
) |
| |
|
inlinestaticprotected |
◆ guessInitial()
template<class Scalar , class FluidSystem >
template<class FluidState , class Evaluation = typename FluidState::Scalar>
static void Opm::ImmiscibleFlash< Scalar, FluidSystem >::guessInitial |
( |
FluidState & |
fluidState, |
|
|
const Dune::FieldVector< Evaluation, numComponents > & |
|
|
) |
| |
|
inlinestatic |
Guess initial values for all quantities.
◆ isPressureIdx_()
template<class Scalar , class FluidSystem >
◆ isSaturationIdx_()
template<class Scalar , class FluidSystem >
◆ printFluidState_()
template<class Scalar , class FluidSystem >
template<class FluidState >
◆ quantityWeight_()
template<class Scalar , class FluidSystem >
template<class FluidState >
static Scalar Opm::ImmiscibleFlash< Scalar, FluidSystem >::quantityWeight_ |
( |
const FluidState & |
, |
|
|
unsigned |
pvIdx |
|
) |
| |
|
inlinestaticprotected |
◆ setQuantity_()
template<class Scalar , class FluidSystem >
template<class FluidState >
static void Opm::ImmiscibleFlash< Scalar, FluidSystem >::setQuantity_ |
( |
FluidState & |
fluidState, |
|
|
unsigned |
pvIdx, |
|
|
const typename FluidState::Scalar & |
value |
|
) |
| |
|
inlinestaticprotected |
◆ solve()
template<class Scalar , class FluidSystem >
template<class MaterialLaw , class FluidState >
static void Opm::ImmiscibleFlash< Scalar, FluidSystem >::solve |
( |
FluidState & |
fluidState, |
|
|
const typename MaterialLaw::Params & |
matParams, |
|
|
typename FluidSystem::template ParameterCache< typename FluidState::Scalar > & |
paramCache, |
|
|
const Dune::FieldVector< typename FluidState::Scalar, numComponents > & |
globalMolarities, |
|
|
Scalar |
tolerance = -1 |
|
) |
| |
|
inlinestatic |
◆ solveAllIncompressible_()
template<class Scalar , class FluidSystem >
template<class FluidState >
static void Opm::ImmiscibleFlash< Scalar, FluidSystem >::solveAllIncompressible_ |
( |
FluidState & |
fluidState, |
|
|
typename FluidSystem::template ParameterCache< typename FluidState::Scalar > & |
paramCache, |
|
|
const Dune::FieldVector< typename FluidState::Scalar, numComponents > & |
globalMolarities |
|
) |
| |
|
inlinestaticprotected |
◆ update_()
template<class Scalar , class FluidSystem >
template<class MaterialLaw , class FlashFluidState , class EvalVector >
static Scalar Opm::ImmiscibleFlash< Scalar, FluidSystem >::update_ |
( |
FlashFluidState & |
fluidState, |
|
|
typename FluidSystem::template ParameterCache< typename FlashFluidState::Scalar > & |
paramCache, |
|
|
const typename MaterialLaw::Params & |
matParams, |
|
|
const EvalVector & |
deltaX |
|
) |
| |
|
inlinestaticprotected |
References Opm::abs(), Opm::ImmiscibleFlash< Scalar, FluidSystem >::getQuantity_(), Opm::isfinite(), Opm::ImmiscibleFlash< Scalar, FluidSystem >::isPressureIdx_(), Opm::ImmiscibleFlash< Scalar, FluidSystem >::isSaturationIdx_(), Opm::max(), Opm::min(), Opm::ImmiscibleFlash< Scalar, FluidSystem >::quantityWeight_(), Opm::scalarValue(), and Opm::ImmiscibleFlash< Scalar, FluidSystem >::setQuantity_().
The documentation for this class was generated from the following file:
|