mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #5331 from totto82/fix_restart_co2
Bugfix: initialize the input temperature in restart run without temperature in the restart file
This commit is contained in:
commit
f01635dcf2
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user