initialize the input temperature in restart run without temperature in the restart file

This commit is contained in:
Tor Harald Sandve 2024-05-03 12:32:13 +02:00
parent da5f20a0d9
commit c6c447dc94

View File

@ -2221,6 +2221,14 @@ protected:
}
}
// For CO2STORE and H2STORE we need to set the initial temperature for isothermal simulations
bool isThermal = eclState.getSimulationConfig().isThermal();
bool needTemperature = (eclState.runspec().co2Storage() || eclState.runspec().h2Storage());
if (!isThermal && needTemperature) {
const auto& fp = simulator.vanguard().eclState().fieldProps();
elemFluidState.setTemperature(fp.get_double("TEMPI")[elemIdx]);
}
this->mixControls_.updateLastValues(elemIdx, elemFluidState.Rs(), elemFluidState.Rv());
if constexpr (enablePolymer)