ebos: only write out temperature in thermal runs

This commit is contained in:
Andreas Lauser 2018-11-16 14:51:07 +01:00
parent af45c893cf
commit 6a29318adf
2 changed files with 5 additions and 2 deletions

View File

@ -91,6 +91,7 @@ class EclOutputBlackOilModule
enum { waterPhaseIdx = FluidSystem::waterPhaseIdx };
enum { gasCompIdx = FluidSystem::gasCompIdx };
enum { oilCompIdx = FluidSystem::oilCompIdx };
enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) };
typedef std::vector<Scalar> ScalarBuffer;
@ -732,7 +733,7 @@ public:
sol.insert("PRESSURE", Opm::UnitSystem::measure::pressure, std::move(oilPressure_), Opm::data::TargetType::RESTART_SOLUTION);
}
if (temperature_.size() > 0) {
if (enableEnergy) {
sol.insert("TEMP", Opm::UnitSystem::measure::temperature, std::move(temperature_), Opm::data::TargetType::RESTART_SOLUTION);
}

View File

@ -96,6 +96,8 @@ class EclWriter
typedef std::vector<Scalar> ScalarBuffer;
enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) };
public:
static void registerParameters()
{
@ -324,7 +326,7 @@ public:
{"PRESSURE" , Opm::UnitSystem::measure::pressure},
{"SWAT" , Opm::UnitSystem::measure::identity, static_cast<bool>(FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx))},
{"SGAS" , Opm::UnitSystem::measure::identity, static_cast<bool>(FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx))},
{"TEMP" , Opm::UnitSystem::measure::temperature}, // always required for now
{"TEMP" , Opm::UnitSystem::measure::temperature, enableEnergy},
{"RS" , Opm::UnitSystem::measure::gas_oil_ratio, FluidSystem::enableDissolvedGas()},
{"RV" , Opm::UnitSystem::measure::oil_gas_ratio, FluidSystem::enableVaporizedOil()},
{"SOMAX", Opm::UnitSystem::measure::identity, simulator_.problem().vapparsActive()},