Calculates the chemical equilibrium from the component fugacities \( f^\kappa \) in the phase \( \alpha \). More...
#include <dumux/material/constraintsolvers/compositionfromfugacities.hh>
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 ¶mCache, 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 ¶mCache, 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 ¶mCache, 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 ¶mCache, int phaseIdx, const ComponentVector &targetFug) |
template<class FluidState > | |
static Scalar | update_ (FluidState &fluidState, ParameterCache ¶mCache, 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 ¶ms, int phaseIdx, const ComponentVector &targetFug) |
using Dumux::CompositionFromFugacities< Scalar, FluidSystem >::ComponentVector = Dune::FieldVector<Scalar, numComponents> |
|
inlinestaticprotected |
|
inlinestatic |
Guess an initial value for the composition of the phase.
fluidState | Thermodynamic state of the fluids |
paramCache | Container for cache parameters |
phaseIdx | The phase index |
fugVec | fugacity vector of the component |
|
inlinestaticprotected |
|
inlinestatic |
Calculates the chemical equilibrium from the component fugacities in a phase.
fluidState | Thermodynamic state of the fluids |
paramCache | Container for cache parameters |
phaseIdx | The phase index |
targetFug | target fugacity |
The phase's fugacities must already be set.
|
inlinestaticprotected |
|
inlinestaticprotected |