Skip to content
Snippets Groups Projects
Commit 70b14323 authored by Dennis Gläser's avatar Dennis Gläser Committed by Timo Koch
Browse files

[brineco2] add missing gasIsIdeal() function

parent e50a4ae1
No related branches found
No related tags found
1 merge request!1153Feature/reuse brine in brine co2
......@@ -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.
......
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