diff --git a/opm/core/simulator/initState_impl.hpp b/opm/core/simulator/initState_impl.hpp index 734abc3f3..a0b47bbfd 100644 --- a/opm/core/simulator/initState_impl.hpp +++ b/opm/core/simulator/initState_impl.hpp @@ -616,6 +616,10 @@ namespace Opm const BlackoilPropertiesInterface& props, State& state) { + if (props.numPhases() != 3) { + OPM_THROW(std::runtime_error, "initBlackoilSurfvol() can for now only be used with 3 phases."); + } + const std::vector& rs = state.gasoilratio(); //make input for computation of the A matrix