diff --git a/dumux/material/constraintsolvers/fluidsystemconstraintsolver.hh b/dumux/material/constraintsolvers/fluidsystemconstraintsolver.hh index f69967655601e21d4f60184250dfcab126c7116e..29e5375275fcb9ff116b5db6b916f8551b25efdb 100644 --- a/dumux/material/constraintsolvers/fluidsystemconstraintsolver.hh +++ b/dumux/material/constraintsolvers/fluidsystemconstraintsolver.hh @@ -32,6 +32,7 @@ #include <dumux/common/exceptions.hh> #include <dumux/common/valgrind.hh> +#include <dumux/material/constraintsolvers/misciblemultiphasecomposition.hh> namespace Dumux { /*! @@ -58,49 +59,7 @@ namespace Dumux { * - if the setEnthalpy parameter is true, also specific enthalpies of *all* phases */ template <class Scalar, class FluidSystem> -class FluidSystemConstraintSolver -{ - static constexpr int numPhases = FluidSystem::numPhases; - -public: - /*! - * \brief @copybrief Dumux::FluidSystemConstraintSolver - * - * \param fluidState A container with the current (physical) state of the fluid - * \param paramCache A container for iterative calculation of fluid composition - * \param setViscosity Should the viscosity be set in the fluidstate? - * \param setEnthalpy Should the enthalpy be set in the fluidstate? - */ - template <class FluidState, class ParameterCache> - static void solve(FluidState & fluidState, - ParameterCache & paramCache, - const bool setViscosity, - const bool setEnthalpy) - { - - // In this function the actual work is done. - // Either tables for solubility or functional relations are used therein. - // One way or the other, this function needs to set all the mole fractions - // in the fluidstate. - FluidSystem::calculateEquilibriumMoleFractions(fluidState, paramCache); - - for (int phaseIdx=0; phaseIdx<numPhases; phaseIdx++){ - Scalar value = FluidSystem::density(fluidState, paramCache, phaseIdx); - fluidState.setDensity(phaseIdx, value); - - if (setViscosity) { - value = FluidSystem::viscosity(fluidState, paramCache, phaseIdx); - fluidState.setViscosity(phaseIdx, value); - } - - if (setEnthalpy) { - value = FluidSystem::enthalpy(fluidState, paramCache, phaseIdx); - fluidState.setEnthalpy(phaseIdx, value); - } - } - } -}; - +using FluidSystemConstraintSolver DUNE_DEPRECATED_MSG("Use MiscibleMultiPhaseComposition from dumux/material/constraintsolvers/misciblemultiphasecomposition.hh") += MiscibleMultiPhaseComposition<Scalar, FluidSystem>; } // end namespace Dumux - #endif diff --git a/dumux/material/fluidsystems/h2on2kinetic.hh b/dumux/material/fluidsystems/h2on2kinetic.hh index 20f84ce8fa420807fa4d5f3686db613c22f05726..a84dd2100a5679db0b5ed0c2baa0d3582258ffd1 100644 --- a/dumux/material/fluidsystems/h2on2kinetic.hh +++ b/dumux/material/fluidsystems/h2on2kinetic.hh @@ -129,7 +129,9 @@ public: * \param calcCompIdx The component for which the composition in the other phase is to be * calculated. */ + template <class FluidState> + DUNE_DEPRECATED_MSG("FluidSystems should not compute equilibrium mole fractionos. Please use a constraintsolver e.g. the MiscibleMultiPhaseComposition instead") static void calculateEquilibriumMoleFractionOtherPhase(FluidState & fluidState, const ParameterCache & paramCache, const unsigned int referencePhaseIdx, @@ -259,6 +261,7 @@ public: * \param paramCache A container for iterative calculation of fluid composition */ template <class FluidState> + DUNE_DEPRECATED_MSG("FluidSystems should not compute equilibrium mole fractionos. Please use a constraintsolver e.g. the MiscibleMultiPhaseComposition instead") static void calculateEquilibriumMoleFractions(FluidState & fluidState, const ParameterCache & paramCache) {