version 3.11-dev
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
Dumux::CompositionFromFugacities< Scalar, FluidSystem > Class Template Reference

Calculates the chemical equilibrium from the component fugacities fκ in the phase α. More...

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

Description

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

This constraint solver takes the component fugacity fκ of of component κ, the temperature Tα, the pressure pα and the composition xαλ of a phase α as input and calculates the mole fraction of component κ in that fluid phase xακ. This means that the thermodynamic constraints used by this solver are

fκ=Φακ({xαλ},Tα,pα)pαxακ,

where fκ, Tα and pα 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
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
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: