Skip to content
Snippets Groups Projects
Commit 10fa193c authored by Katharina Heck's avatar Katharina Heck
Browse files

[cleanup] deprecate fluidsystemconstraintsolver and unused stuff in h2o2kineticfluidsystem

parent a9dcc207
No related branches found
No related tags found
1 merge request!780Cleanup/nonequilibrium constraintsolver
......@@ -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
......@@ -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)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment