More user-friendly way of specifying initial conditions for mpnc
Since mpnc uses fugacities, users have to use a constraint solver to compute them from whatever initial conditions they want to have in terms of saturations, mole fractions, etc...
If one wants single-phasic initial conditions (without dissolved components), and one does for instance:
GetPropType<TypeTag, Properties::FluidState> fs;
// ... set stuff in fluid state -> I want single-phasic state
// use constraint solver to compute fugacities
using MiscibleMultiPhaseComposition = Dumux::MiscibleMultiPhaseComposition<Scalar, FluidSystem>;
typename FluidSystem::ParameterCache paramCache;
MiscibleMultiPhaseComposition::solve(fs, paramCache);
one gets already nonzero mole fractions of the non-present phases in the initially present phase, because MiscibleMultiPhaseComposition
seems to assume that all phases are present. One therefore has to use ComputeFromReferencePhase
in this case, which to me does not seem obvious.
We should maybe either rethink our assumptions in MiscibleMultiPhaseComposition
, or give the user some hints/warnings/info... This could be achieved by adding an "impl" layer which we use internally, while MiscibleMultiPhaseComposition
, etc. forward to the impl but give some descriptive information message. For instance:
"This uses the assumption that all phases are present. For single-phase situations, use ..."