diff --git a/opm/material/fluidsystems/BrineCO2FluidSystem.hpp b/opm/material/fluidsystems/BrineCO2FluidSystem.hpp index 1d6c640a7..849e1fda1 100644 --- a/opm/material/fluidsystems/BrineCO2FluidSystem.hpp +++ b/opm/material/fluidsystems/BrineCO2FluidSystem.hpp @@ -45,8 +45,6 @@ #include #include -#include - namespace Opm { /*! @@ -485,17 +483,28 @@ private: Valgrind::CheckDefined(xlH2O); Valgrind::CheckDefined(xlCO2); + auto tostring = [](const auto& val) -> std::string + { + if constexpr (DenseAd::is_evaluation::value) { + return std::to_string(getValue(val.value())); + } else { + return std::to_string(val); + } + }; + if(T < 273.15) { - std::ostringstream oss; - oss << "Liquid density for Brine and CO2 is only " - "defined above 273.15K (is "<= 2.5e8) { - std::ostringstream oss; - oss << "Liquid density for Brine and CO2 is only " - "defined below 250MPa (is "<