3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Types | Static Public Member Functions | Static Protected Member Functions | List of all members
Dumux::CompositionFromFugacities< Scalar, FluidSystem > Class Template Reference

Calculates the chemical equilibrium from the component fugacities \( f^\kappa \) in the phase \( \alpha \). More...

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

Description

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

Calculates the chemical equilibrium from the component fugacities \( f^\kappa \) in the phase \( \alpha \).

This constraint solver takes the component fugacity \(f^\kappa\) of of component \(\kappa\), the temperature \( T_\alpha \), the pressure \(p_\alpha\) and the composition \(x^\lambda_\alpha\) of a phase \(\alpha\) as input and calculates the mole fraction of component \(\kappa\) in that fluid phase \(x^\kappa_\alpha\). This means that the thermodynamic constraints used by this solver are

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

where \({f^\kappa}\), \( T_\alpha \) and \( p_\alpha \) are fixed values.

Public Types

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

Static Public Member Functions

template<class FluidState >
static void guessInitial (FluidState &fluidState, ParameterCache &paramCache, int phaseIdx, const ComponentVector &fugVec)
 Guess an initial value for the composition of the phase. More...
 
template<class FluidState >
static void solve (FluidState &fluidState, ParameterCache &paramCache, int phaseIdx, const ComponentVector &targetFug)
 Calculates the chemical equilibrium from the component fugacities in a phase. More...
 

Static Protected Member Functions

template<class FluidState >
static void solveIdealMix_ (FluidState &fluidState, ParameterCache &paramCache, int phaseIdx, const ComponentVector &fugacities)
 
template<class FluidState >
static void linearize_ (Dune::FieldMatrix< Scalar, numComponents, numComponents > &J, Dune::FieldVector< Scalar, numComponents > &defect, FluidState &fluidState, ParameterCache &paramCache, int phaseIdx, const ComponentVector &targetFug)
 
template<class FluidState >
static Scalar update_ (FluidState &fluidState, ParameterCache &paramCache, Dune::FieldVector< Scalar, numComponents > &x, Dune::FieldVector< Scalar, numComponents > &b, int phaseIdx, const Dune::FieldVector< Scalar, numComponents > &targetFug)
 
template<class FluidState >
static Scalar calculateDefect_ (const FluidState &params, int phaseIdx, const ComponentVector &targetFug)
 

Member Typedef Documentation

◆ ComponentVector

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

Member Function Documentation

◆ calculateDefect_()

template<class Scalar , class FluidSystem >
template<class FluidState >
static Scalar Dumux::CompositionFromFugacities< Scalar, FluidSystem >::calculateDefect_ ( const FluidState &  params,
int  phaseIdx,
const ComponentVector targetFug 
)
inlinestaticprotected

◆ guessInitial()

template<class Scalar , class FluidSystem >
template<class FluidState >
static void Dumux::CompositionFromFugacities< Scalar, FluidSystem >::guessInitial ( FluidState &  fluidState,
ParameterCache &  paramCache,
int  phaseIdx,
const ComponentVector fugVec 
)
inlinestatic

Guess an initial value for the composition of the phase.

Parameters
fluidStateThermodynamic state of the fluids
paramCacheContainer for cache parameters
phaseIdxThe phase index
fugVecfugacity vector of the component

◆ linearize_()

template<class Scalar , class FluidSystem >
template<class FluidState >
static void Dumux::CompositionFromFugacities< Scalar, FluidSystem >::linearize_ ( Dune::FieldMatrix< Scalar, numComponents, numComponents > &  J,
Dune::FieldVector< Scalar, numComponents > &  defect,
FluidState &  fluidState,
ParameterCache &  paramCache,
int  phaseIdx,
const ComponentVector targetFug 
)
inlinestaticprotected

◆ solve()

template<class Scalar , class FluidSystem >
template<class FluidState >
static void Dumux::CompositionFromFugacities< Scalar, FluidSystem >::solve ( FluidState &  fluidState,
ParameterCache &  paramCache,
int  phaseIdx,
const ComponentVector targetFug 
)
inlinestatic

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

Parameters
fluidStateThermodynamic state of the fluids
paramCacheContainer for cache parameters
phaseIdxThe phase index
targetFugtarget fugacity

The phase's fugacities must already be set.

◆ solveIdealMix_()

template<class Scalar , class FluidSystem >
template<class FluidState >
static void Dumux::CompositionFromFugacities< Scalar, FluidSystem >::solveIdealMix_ ( FluidState &  fluidState,
ParameterCache &  paramCache,
int  phaseIdx,
const ComponentVector fugacities 
)
inlinestaticprotected

◆ update_()

template<class Scalar , class FluidSystem >
template<class FluidState >
static Scalar Dumux::CompositionFromFugacities< Scalar, FluidSystem >::update_ ( FluidState &  fluidState,
ParameterCache &  paramCache,
Dune::FieldVector< Scalar, numComponents > &  x,
Dune::FieldVector< Scalar, numComponents > &  b,
int  phaseIdx,
const Dune::FieldVector< Scalar, numComponents > &  targetFug 
)
inlinestaticprotected

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