Opm::NcpFlash< Scalar, FluidSystem > Class Template Reference

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

#include <NcpFlash.hpp>

List of all members.

Static Public Member Functions

template<class FluidState , class Evaluation = typename FluidState::Scalar>
static void guessInitial (FluidState &fluidState, const Dune::FieldVector< Evaluation, numComponents > &globalMolarities)
 Guess initial values for all quantities.
template<class MaterialLaw , class FluidState >
static void 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.0)
 Calculates the chemical equilibrium from the component fugacities in a phase.
template<class FluidState , class ComponentVector >
static void solve (FluidState &fluidState, const ComponentVector &globalMolarities, Scalar tolerance=0.0)
 Calculates the chemical equilibrium from the component fugacities in a phase.

Static Protected Member Functions

template<class FluidState >
static void printFluidState_ (const FluidState &fluidState)
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 FlashFluidState , class FlashDefectVector , class FlashComponentVector >
static void evalDefect_ (FlashDefectVector &b, const FlashFluidState &fluidState, const FlashComponentVector &globalMolarities)
template<class MaterialLaw , class FlashFluidState , class EvalVector >
static Scalar update_ (FlashFluidState &fluidState, const typename MaterialLaw::Params &matParams, typename FluidSystem::template ParameterCache< typename FlashFluidState::Scalar > &paramCache, const EvalVector &deltaX)
template<class MaterialLaw , class FlashFluidState >
static void completeFluidState_ (FlashFluidState &flashFluidState, typename FluidSystem::template ParameterCache< typename FlashFluidState::Scalar > &paramCache, const typename MaterialLaw::Params &matParams)
static bool isPressureIdx_ (unsigned pvIdx)
static bool isSaturationIdx_ (unsigned pvIdx)
static bool isMoleFracIdx_ (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)

Detailed Description

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

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

In a M-phase, N-component context, we have the following unknowns:

This sums up to M*(N + 2). On the equations side of things, we have:

this also sums up to M*(N + 2).

We use the following catches: Capillary pressures are taken into account explicitly, so that only the pressure of the first phase is solved implicitly, also the closure condition for the saturations is taken into account explicitly, which means that we don't need to implicitly solve for the last saturation. These two measures reduce the number of unknowns to M*(N + 1), namely:


Member Function Documentation

template<class Scalar , class FluidSystem >
template<class FluidState , class ComponentVector >
static void Opm::NcpFlash< Scalar, FluidSystem >::solve ( FluidState &  fluidState,
const ComponentVector &  globalMolarities,
Scalar  tolerance = 0.0 
) [inline, static]

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

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

template<class Scalar , class FluidSystem >
template<class MaterialLaw , class FluidState >
static void Opm::NcpFlash< 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.0 
) [inline, static]

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

The phase's fugacities must already be set.


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

Generated on 25 Mar 2018 by  doxygen 1.6.1