Commit 4cadea65 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

[material][fluidsystems] specialize getMainComponent for H2OHeavyOil

The base-class default simply returns the phase index. Specialize and
return a valid component index also for the gas phase.
parent 85152e23
......@@ -109,6 +109,22 @@ public:
}
}
/*!
* \brief Get the main component of a given phase
* \param phaseIdx The index of the fluid phase to consider
*/
static constexpr int getMainComponent(int phaseIdx)
{
// For the gas phase, choosing a main component appears to be
// rather arbitrary. Motivated by the fact that the thermal conductivity
// of the gas phase is set to the thermal conductivity of pure water,
// water is chosen for now.
if (phaseIdx == nPhaseIdx)
return nCompIdx;
else
return wCompIdx;
}
/*!
* \brief Returns whether the fluids are miscible
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment