From 70b14323ba249ae7dfaa135048359be35555f59c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20Gl=C3=A4ser?= <dennis.glaeser@iws.uni-stuttgart.de> Date: Tue, 7 Aug 2018 16:48:46 +0200 Subject: [PATCH] [brineco2] add missing gasIsIdeal() function --- dumux/material/fluidsystems/brineco2.hh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dumux/material/fluidsystems/brineco2.hh b/dumux/material/fluidsystems/brineco2.hh index 42662e7512..423d8cab77 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. -- GitLab