diff --git a/dumux/porousmediumflow/2pnc/implicit/properties.hh b/dumux/porousmediumflow/2pnc/implicit/properties.hh index 24f1041f5db39be2faa67c9d5efa4e5cfbab4e07..582bceeb02410d6872db5cbc864a3b5771235653 100644 --- a/dumux/porousmediumflow/2pnc/implicit/properties.hh +++ b/dumux/porousmediumflow/2pnc/implicit/properties.hh @@ -75,6 +75,7 @@ NEW_PROP_TAG(EffectiveDiffusivityModel); //!< The employed model for the computa NEW_PROP_TAG(ReplaceCompEqIdx); //!< The index of the total mass balance equation, if one component balance is replaced (ReplaceCompEqIdx < NumComponents) NEW_PROP_TAG(ProblemEnableGravity); //!< Returns whether gravity is considered in the problem NEW_PROP_TAG(BaseFluxVariables); //! The base flux variables +NEW_PROP_TAG(UseMoles); //!< Defines whether mole (true) or mass (false) fractions are used } } diff --git a/dumux/porousmediumflow/2pnc/implicit/propertydefaults.hh b/dumux/porousmediumflow/2pnc/implicit/propertydefaults.hh index 2a4529a1f77030ad9bbe63291812dc8b7452cc3e..cccc00aa193349f372875a26780beec5849d327a 100644 --- a/dumux/porousmediumflow/2pnc/implicit/propertydefaults.hh +++ b/dumux/porousmediumflow/2pnc/implicit/propertydefaults.hh @@ -181,6 +181,9 @@ SET_TYPE_PROP(TwoPNC, EffectiveDiffusivityModel, DiffusivityMillingtonQuirk<type //! Enable gravity by default SET_BOOL_PROP(TwoPNC, ProblemEnableGravity, true); +//! Use mole fractions in the balance equations by default +SET_BOOL_PROP(TwoPNC, UseMoles, true); + //! Disable velocity output by default //! Somerton is used as default model to compute the effective thermal heat conductivity diff --git a/dumux/porousmediumflow/2pnc/implicit/volumevariables.hh b/dumux/porousmediumflow/2pnc/implicit/volumevariables.hh index 84ff5891ccd752ccea4134169e16ecd1f4ed1b1c..ba0e0b965c70406058f4a5cc99a9a09040e92567 100644 --- a/dumux/porousmediumflow/2pnc/implicit/volumevariables.hh +++ b/dumux/porousmediumflow/2pnc/implicit/volumevariables.hh @@ -468,7 +468,7 @@ public: else if (compIdx > phaseIdx) return diffCoefficient_[phaseIdx][compIdx-1]; else - DUNE_THROW(Dune::InvalidStateException, "Diffusion coeffiecient called for phaseIdx = compIdx"); + return diffCoefficient_[phaseIdx][compIdx]; } /*! @@ -513,7 +513,7 @@ private: else if (compIdx > phaseIdx) diffCoefficient_[phaseIdx][compIdx-1] = std::move(d); else - DUNE_THROW(Dune::InvalidStateException, "Diffusion coeffiecient for phaseIdx = compIdx doesn't exist"); + diffCoefficient_[phaseIdx][compIdx] = 0; } std::array<std::array<Scalar, numComponents-1>, numPhases> diffCoefficient_;