diff --git a/dumux/material/fluidsystems/brineco2.hh b/dumux/material/fluidsystems/brineco2.hh index 42662e751257e17d93b490ec7e2d6c56473a0341..423d8cab7790e2a64f66440f01e5af411b258f7b 100644 --- a/dumux/material/fluidsystems/brineco2.hh +++ b/dumux/material/fluidsystems/brineco2.hh @@ -218,6 +218,21 @@ public: return phaseIdx == gasPhaseIdx; } + /*! + * \brief Returns true if and only if a fluid phase is assumed to + * be an ideal gas. + * \param phaseIdx The index of the fluid phase to consider + */ + static constexpr bool isIdealGas(int phaseIdx) + { + assert(0 <= phaseIdx && phaseIdx < numPhases); + // let the fluids decide + if (phaseIdx == gasPhaseIdx) + return useConstantSalinity ? (ConstantSalinityBrine::gasIsIdeal() && CO2::gasIsIdeal()) + : (H2O::gasIsIdeal() && CO2::gasIsIdeal()); + return false; // not a gas + } + /*! * \brief Returns true if and only if a fluid phase is assumed to * be an ideal mixture.