diff --git a/dumux/boxmodels/MpNc/MpNcindices.hh b/dumux/boxmodels/MpNc/MpNcindices.hh index 799761d10331882fa1495a13bb541c8c54767801..4b44aee6933ac3ac1facaab6911c22de59adce54 100644 --- a/dumux/boxmodels/MpNc/MpNcindices.hh +++ b/dumux/boxmodels/MpNc/MpNcindices.hh @@ -65,7 +65,7 @@ public: numPhases; /*! - * \brief The number of primary variables / equations of the erngy module. + * \brief The number of primary variables / equations of the energy module. */ static const int NumPrimaryEnergyVars = EnergyIndices::NumPrimaryVars ; diff --git a/dumux/boxmodels/MpNc/MpNclocalresidual.hh b/dumux/boxmodels/MpNc/MpNclocalresidual.hh index 1c3152994de253b92a2180bc9a4113dbf2d554fe..47e42f1797322e78bc48fbd679ceb1c2e4318eaf 100644 --- a/dumux/boxmodels/MpNc/MpNclocalresidual.hh +++ b/dumux/boxmodels/MpNc/MpNclocalresidual.hh @@ -186,11 +186,17 @@ public: PrimaryVariables tmp(0); MassResid::computeSource(tmp, volVars); source += tmp; - - tmp = 0.; - EnergyResid::computeSource(tmp, volVars); - source += tmp; Valgrind::CheckDefined(source); + + /* + * EnergyResid also called in the MassResid + * 1) Makes some sense because energy is also carried by mass + * 2) The mass transfer between the phases is needed. + */ +// tmp = 0.; +// EnergyResid::computeSource(tmp, volVars); +// source += tmp; +// Valgrind::CheckDefined(source); }; diff --git a/dumux/boxmodels/MpNc/MpNcvolumevariablesia.hh b/dumux/boxmodels/MpNc/MpNcvolumevariablesia.hh index ba3e6e737b363ea8cbcbcdfaba8b411644deaaa3..23764d1a10bdda3b77795a63e1621a24bf30ec59 100644 --- a/dumux/boxmodels/MpNc/MpNcvolumevariablesia.hh +++ b/dumux/boxmodels/MpNc/MpNcvolumevariablesia.hh @@ -42,7 +42,7 @@ namespace Dumux template <class TypeTag, bool enableKinetic /* = false */, bool enableKineticEnergy /* = false */> class MPNCVolumeVariablesIA { - static_assert(!enableKinetic && !enableKineticEnergy, + static_assert(not enableKinetic and not enableKineticEnergy, "The kinetic energy modules need specific interfacial area " "but no suitable specialization of the IA volume variables module " "has been included."); diff --git a/dumux/boxmodels/MpNc/mass/MpNclocalresidualmass.hh b/dumux/boxmodels/MpNc/mass/MpNclocalresidualmass.hh index 1bd60e7f165857ca37ec71bb4e74c920d5d442cd..251d5c9467918e0bf15866b227a6bc1468e3fd14 100644 --- a/dumux/boxmodels/MpNc/mass/MpNclocalresidualmass.hh +++ b/dumux/boxmodels/MpNc/mass/MpNclocalresidualmass.hh @@ -335,9 +335,23 @@ public: static void computeSource(PrimaryVariables &source, const VolumeVariables &volVars) { + static_assert(not enableKineticEnergy, + "In the case of kinetic energy transfer the advective energy transport between the phases has to be considered. " + "It is hard (technically) to say how much mass got transfered in the case of chemical equilibrium. " + "Therefore, kineticEnergy and no kinetic mass does not fit (yet)."); + // mass transfer is not considered in this mass module for (int compIdx = 0; compIdx < numComponents; ++compIdx) source[conti0EqIdx + compIdx] = 0.0; + + + PrimaryVariables tmp(0); + // Similar to the compute Flux, the energy residual needs to be called from the + // mass residual. + EnergyResid::computeSource(tmp, + volVars); + source += tmp; + Valgrind::CheckDefined(source); }; };