mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Optional passing of the temperature vector to the restart machinary
If enableTemperature and --enable-opm-restart-file=true the temperature is passed to or read from the restart file
This commit is contained in:
@@ -98,6 +98,7 @@ class EclWriter : public EclGenericWriter<GetPropType<TypeTag, Properties::Grid>
|
||||
using BaseType = EclGenericWriter<Grid,EquilGrid,GridView,ElementMapper,Scalar>;
|
||||
|
||||
enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
|
||||
enum { enableTemperature = getPropValue<TypeTag, Properties::EnableTemperature>() };
|
||||
enum { enableSolvent = getPropValue<TypeTag, Properties::EnableSolvent>() };
|
||||
|
||||
public:
|
||||
@@ -272,11 +273,13 @@ public:
|
||||
{
|
||||
bool enableHysteresis = simulator_.problem().materialLawManager()->enableHysteresis();
|
||||
bool enableSwatinit = simulator_.vanguard().eclState().fieldProps().has_double("SWATINIT");
|
||||
bool opm_rst_file = EWOMS_GET_PARAM(TypeTag, bool, EnableOpmRstFile);
|
||||
bool read_temp = enableEnergy || (opm_rst_file && enableTemperature);
|
||||
std::vector<RestartKey> solutionKeys{
|
||||
{"PRESSURE", UnitSystem::measure::pressure},
|
||||
{"SWAT", UnitSystem::measure::identity, static_cast<bool>(FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx))},
|
||||
{"SGAS", UnitSystem::measure::identity, static_cast<bool>(FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx))},
|
||||
{"TEMP" , UnitSystem::measure::temperature, enableEnergy},
|
||||
{"TEMP" , UnitSystem::measure::temperature, read_temp},
|
||||
{"SSOLVENT" , UnitSystem::measure::identity, enableSolvent},
|
||||
{"RS", UnitSystem::measure::gas_oil_ratio, FluidSystem::enableDissolvedGas()},
|
||||
{"RV", UnitSystem::measure::oil_gas_ratio, FluidSystem::enableVaporizedOil()},
|
||||
|
||||
Reference in New Issue
Block a user