From ac32b6302e9b9248c69b88c25f4d2ecf6c32620a Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Tue, 22 Sep 2015 15:42:19 +0200 Subject: [PATCH] Use correct units for the accumulated output Avoid division on time in the total output of rates. --- opm/core/io/eclipse/EclipseWriter.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/opm/core/io/eclipse/EclipseWriter.cpp b/opm/core/io/eclipse/EclipseWriter.cpp index 8ed47864..914c1376 100644 --- a/opm/core/io/eclipse/EclipseWriter.cpp +++ b/opm/core/io/eclipse/EclipseWriter.cpp @@ -891,24 +891,24 @@ private: using namespace Opm::unit; if (phase == BlackoilPhases::Liquid || phase == BlackoilPhases::Aqua) { if (unitType == UnitSystem::UNIT_TYPE_FIELD) { - unitName_ = "STB/DAY"; - targetRateToSiConversionFactor_ = stb/day; // m^3/s -> STB/day + unitName_ = "STB"; + targetRateToSiConversionFactor_ = stb; // m^3 -> STB } else if (unitType == UnitSystem::UNIT_TYPE_METRIC) { - unitName_ = "SM3/DAY"; - targetRateToSiConversionFactor_ = cubic(meter)/day; // m^3/s -> m^3/day + unitName_ = "SM3"; + targetRateToSiConversionFactor_ = cubic(meter); // m^3 -> m^3 } else OPM_THROW(std::logic_error, "Deck uses unexpected unit system"); } else if (phase == BlackoilPhases::Vapour) { if (unitType == UnitSystem::UNIT_TYPE_FIELD) { - unitName_ = "MSCF/DAY"; - targetRateToSiConversionFactor_ = 1000*cubic(feet)/day; // m^3/s -> MSCF^3/day + unitName_ = "MSCF"; + targetRateToSiConversionFactor_ = 1000*cubic(feet); // m^3 -> MSCF^3 } else if (unitType == UnitSystem::UNIT_TYPE_METRIC) { - unitName_ = "SM3/DAY"; - targetRateToSiConversionFactor_ = cubic(meter)/day; // m^3/s -> m^3/day + unitName_ = "SM3"; + targetRateToSiConversionFactor_ = cubic(meter); // m^3 -> m^3 } else OPM_THROW(std::logic_error, "Deck uses unexpected unit system");