diff --git a/lib/eclipse/EclipseState/Eclipse3DProperties.cpp b/lib/eclipse/EclipseState/Eclipse3DProperties.cpp
index 54b5e5e48..0e73a4858 100644
--- a/lib/eclipse/EclipseState/Eclipse3DProperties.cpp
+++ b/lib/eclipse/EclipseState/Eclipse3DProperties.cpp
@@ -387,6 +387,10 @@ namespace Opm {
// pore volume multipliers
supportedDoubleKeywords.emplace_back( "MULTPV", 1.0, "1" );
+ /* rock heat capacity, E300 only */
+ supportedDoubleKeywords.emplace_back("HEATCR", nan, distributeTopLayer, "Energy/AbsoluteTemperature*Length*Length*Length" );
+ supportedDoubleKeywords.emplace_back("HEATCRT", 0.0, distributeTopLayer, "Energy/AbsoluteTemperature*AbsoluteTemperature*Length*Length*Length" );
+
// the permeability keywords
for( const auto& kw : { "PERMR", "PERMTHT", "PERMX", "PERMY", "PERMZ", } )
supportedDoubleKeywords.emplace_back( kw, nan, distributeTopLayer, "Permeability" );
@@ -415,7 +419,10 @@ namespace Opm {
// initialisation
supportedDoubleKeywords.emplace_back( "SWATINIT", 0.0, "1");
- supportedDoubleKeywords.emplace_back( "THCONR", 0.0, "1");
+ supportedDoubleKeywords.emplace_back( "THCONR", 0.0, "Energy/AbsoluteTemperature*Length*Time");
+
+ // saturation dependence of thermal conductivity, E300 only
+ supportedDoubleKeywords.emplace_back( "THCONSF", 0.0, "1");
return supportedDoubleKeywords;
}
diff --git a/lib/eclipse/EclipseState/Runspec.cpp b/lib/eclipse/EclipseState/Runspec.cpp
index c40217ff3..8deebdd03 100644
--- a/lib/eclipse/EclipseState/Runspec.cpp
+++ b/lib/eclipse/EclipseState/Runspec.cpp
@@ -33,6 +33,7 @@ Phase get_phase( const std::string& str ) {
if( str == "WATER" ) return Phase::WATER;
if( str == "SOLVENT" ) return Phase::SOLVENT;
if( str == "POLYMER" ) return Phase::POLYMER;
+ if( str == "ENERGY" ) return Phase::ENERGY;
throw std::invalid_argument( "Unknown phase '" + str + "'" );
}
@@ -44,6 +45,7 @@ std::ostream& operator<<( std::ostream& stream, const Phase& p ) {
case Phase::WATER: return stream << "WATER";
case Phase::SOLVENT: return stream << "SOLVENT";
case Phase::POLYMER: return stream << "POLYMER";
+ case Phase::ENERGY: return stream << "ENERGY";
}
@@ -52,12 +54,13 @@ std::ostream& operator<<( std::ostream& stream, const Phase& p ) {
using un = std::underlying_type< Phase >::type;
-Phases::Phases( bool oil, bool gas, bool wat, bool sol, bool pol ) noexcept :
+Phases::Phases( bool oil, bool gas, bool wat, bool sol, bool pol, bool energy ) noexcept :
bits( (oil ? (1 << static_cast< un >( Phase::OIL ) ) : 0) |
(gas ? (1 << static_cast< un >( Phase::GAS ) ) : 0) |
(wat ? (1 << static_cast< un >( Phase::WATER ) ) : 0) |
(sol ? (1 << static_cast< un >( Phase::SOLVENT ) ) : 0) |
- (pol ? (1 << static_cast< un >( Phase::POLYMER ) ) : 0) )
+ (pol ? (1 << static_cast< un >( Phase::POLYMER ) ) : 0) |
+ (energy ? (1 << static_cast< un >( Phase::ENERGY ) ) : 0) )
{}
@@ -70,12 +73,12 @@ size_t Phases::size() const noexcept {
}
Runspec::Runspec( const Deck& deck ) :
- active_phases( Phases{ deck.hasKeyword( "OIL" ),
+ active_phases( Phases( deck.hasKeyword( "OIL" ),
deck.hasKeyword( "GAS" ),
deck.hasKeyword( "WATER" ),
deck.hasKeyword( "SOLVENT" ),
- deck.hasKeyword( "POLYMER" )
- } ),
+ deck.hasKeyword( "POLYMER" ),
+ deck.hasKeyword( "THERMAL" ) ) ),
m_tabdims( deck ),
endscale( deck )
{}
diff --git a/lib/eclipse/EclipseState/Schedule/Schedule.cpp b/lib/eclipse/EclipseState/Schedule/Schedule.cpp
index e776b8ff0..6c5e25282 100644
--- a/lib/eclipse/EclipseState/Schedule/Schedule.cpp
+++ b/lib/eclipse/EclipseState/Schedule/Schedule.cpp
@@ -167,6 +167,9 @@ namespace Opm {
else if (keyword.name() == "WSOLVENT")
handleWSOLVENT(keyword, currentStep);
+ else if (keyword.name() == "WTEMP")
+ handleWTEMP(keyword, currentStep);
+
else if (keyword.name() == "WCONINJH")
handleWCONINJH(section, keyword, currentStep);
@@ -714,6 +717,26 @@ namespace Opm {
}
}
+ void Schedule::handleWTEMP( const DeckKeyword& keyword, size_t currentStep) {
+ for( const auto& record : keyword ) {
+ const std::string& wellNamePattern = record.getItem("WELL").getTrimmedString(0);
+
+ for (auto* well : getWells(wellNamePattern)) {
+ // TODO: Can this be done like this? Setting the temperature only has an
+ // effect on injectors, but specifying this for producers won't hurt and
+ // wells can also switch their injector/producer status. Note that
+ // modifying the injector properties for producer wells currently leads
+ // to a very weird segmentation fault downstream. For now, let's take the
+ // water route.
+ if (well->isInjector(currentStep)) {
+ WellInjectionProperties injectionProperties = well->getInjectionProperties(currentStep);
+ injectionProperties.temperature = record.getItem("TEMP").getSIDouble(0);
+ well->setInjectionProperties(currentStep, injectionProperties);
+ }
+ }
+ }
+ }
+
void Schedule::handleWCONINJH( const SCHEDULESection& section, const DeckKeyword& keyword, size_t currentStep) {
for( const auto& record : keyword ) {
const std::string& wellName = record.getItem("WELL").getTrimmedString(0);
diff --git a/lib/eclipse/EclipseState/Schedule/Well.cpp b/lib/eclipse/EclipseState/Schedule/Well.cpp
index b7bc4fc46..0d357d3d8 100644
--- a/lib/eclipse/EclipseState/Schedule/Well.cpp
+++ b/lib/eclipse/EclipseState/Schedule/Well.cpp
@@ -116,6 +116,8 @@ namespace Opm {
throw std::invalid_argument( "Production of 'SOLVENT' requested." );
case Phase::POLYMER:
throw std::invalid_argument( "Production of 'POLYMER' requested." );
+ case Phase::ENERGY:
+ throw std::invalid_argument( "Production of 'ENERGY' requested." );
}
throw std::logic_error( "Unreachable state. Invalid Phase value. "
diff --git a/lib/eclipse/EclipseState/Schedule/WellInjectionProperties.cpp b/lib/eclipse/EclipseState/Schedule/WellInjectionProperties.cpp
index e069979e5..2fa18a883 100644
--- a/lib/eclipse/EclipseState/Schedule/WellInjectionProperties.cpp
+++ b/lib/eclipse/EclipseState/Schedule/WellInjectionProperties.cpp
@@ -16,6 +16,8 @@
You should have received a copy of the GNU General Public License
along with OPM. If not, see .
*/
+#include
+#include
#include
#include
@@ -27,6 +29,9 @@ namespace Opm {
WellInjectionProperties::WellInjectionProperties() {
surfaceInjectionRate=0.0;
reservoirInjectionRate=0.0;
+ temperature=
+ Metric::TemperatureOffset
+ + ParserKeywords::STCOND::TEMPERATURE::defaultValue;
BHPLimit=0.0;
THPLimit=0.0;
VFPTableNumber=0;
@@ -40,6 +45,7 @@ namespace Opm {
bool WellInjectionProperties::operator==(const WellInjectionProperties& other) const {
if ((surfaceInjectionRate == other.surfaceInjectionRate) &&
(reservoirInjectionRate == other.reservoirInjectionRate) &&
+ (temperature == other.temperature) &&
(BHPLimit == other.BHPLimit) &&
(THPLimit == other.THPLimit) &&
(VFPTableNumber == other.VFPTableNumber) &&
@@ -62,6 +68,7 @@ namespace Opm {
<< "WellInjectionProperties { "
<< "surfacerate: " << wp.surfaceInjectionRate << ", "
<< "reservoir rate " << wp.reservoirInjectionRate << ", "
+ << "temperature: " << wp.temperature << ", "
<< "BHP limit: " << wp.BHPLimit << ", "
<< "THP limit: " << wp.THPLimit << ", "
<< "VFP table: " << wp.VFPTableNumber << ", "
diff --git a/lib/eclipse/EclipseState/Tables/TableManager.cpp b/lib/eclipse/EclipseState/Tables/TableManager.cpp
index 0527806bc..e249a9c22 100644
--- a/lib/eclipse/EclipseState/Tables/TableManager.cpp
+++ b/lib/eclipse/EclipseState/Tables/TableManager.cpp
@@ -61,6 +61,8 @@
#include
#include
#include
+#include
+#include
#include
#include
#include
@@ -73,6 +75,8 @@
#include
#include
+#include
+
namespace Opm {
TableManager::TableManager( const Deck& deck )
@@ -81,9 +85,12 @@ namespace Opm {
hasImptvd (deck.hasKeyword("IMPTVD")),
hasEnptvd (deck.hasKeyword("ENPTVD")),
hasEqlnum (deck.hasKeyword("EQLNUM")),
- m_jfunc( deck ),
- m_rtemp( ParserKeywords::RTEMP::TEMP::defaultValue )
+ m_jfunc( deck )
{
+ // determine the default resevoir temperature in Kelvin
+ m_rtemp = ParserKeywords::RTEMP::TEMP::defaultValue;
+ m_rtemp += Metric::TemperatureOffset; // <- default values always use METRIC as the unit system!
+
initDims( deck );
initSimpleTables( deck );
initFullTables(deck, "PVTG", m_pvtgTables);
@@ -204,6 +211,9 @@ namespace Opm {
addTables( "PVDO", m_tabdims.getNumPVTTables());
addTables( "PVDS", m_tabdims.getNumPVTTables());
+ addTables( "SPECHEAT", m_tabdims.getNumPVTTables());
+ addTables( "SPECROCK", m_tabdims.getNumSatTables());
+
addTables( "OILVISCT", m_tabdims.getNumPVTTables());
addTables( "WATVISCT", m_tabdims.getNumPVTTables());
addTables( "GASVISCT", m_tabdims.getNumPVTTables());
@@ -301,6 +311,8 @@ namespace Opm {
initSimpleTableContainer(deck, "PVDG", m_tabdims.getNumPVTTables());
initSimpleTableContainer(deck, "PVDO", m_tabdims.getNumPVTTables());
initSimpleTableContainer(deck, "PVDS", m_tabdims.getNumPVTTables());
+ initSimpleTableContainer(deck, "SPECHEAT", m_tabdims.getNumPVTTables());
+ initSimpleTableContainer(deck, "SPECROCK", m_tabdims.getNumSatTables());
initSimpleTableContainer(deck, "OILVISCT", m_tabdims.getNumPVTTables());
initSimpleTableContainer(deck, "WATVISCT", m_tabdims.getNumPVTTables());
@@ -618,6 +630,14 @@ namespace Opm {
return getTables("PVDS");
}
+ const TableContainer& TableManager::getSpecheatTables() const {
+ return getTables("SPECHEAT");
+ }
+
+ const TableContainer& TableManager::getSpecrockTables() const {
+ return getTables("SPECROCK");
+ }
+
const TableContainer& TableManager::getOilvisctTables() const {
return getTables("OILVISCT");
}
diff --git a/lib/eclipse/EclipseState/Tables/Tables.cpp b/lib/eclipse/EclipseState/Tables/Tables.cpp
index fb6550055..5f198832b 100644
--- a/lib/eclipse/EclipseState/Tables/Tables.cpp
+++ b/lib/eclipse/EclipseState/Tables/Tables.cpp
@@ -63,6 +63,8 @@
#include
#include
#include
+#include
+#include
#include
#include
#include
@@ -100,6 +102,42 @@ PvtoTable::PvtoTable( const DeckKeyword& keyword, size_t tableIdx) :
PvtxTable::init(keyword , tableIdx);
}
+SpecheatTable::SpecheatTable(const DeckItem& item)
+{
+ m_schema.addColumn(ColumnSchema("TEMPERATURE", Table::STRICTLY_INCREASING, Table::DEFAULT_NONE));
+ m_schema.addColumn(ColumnSchema("CP_OIL", Table::RANDOM, Table::DEFAULT_LINEAR));
+ m_schema.addColumn(ColumnSchema("CP_WATER", Table::RANDOM, Table::DEFAULT_LINEAR));
+ m_schema.addColumn(ColumnSchema("CP_GAS", Table::RANDOM, Table::DEFAULT_LINEAR));
+
+ SimpleTable::init(item);
+}
+
+const TableColumn& SpecheatTable::getTemperatureColumn() const
+{ return SimpleTable::getColumn(0); }
+
+const TableColumn& SpecheatTable::getCpOilColumn() const
+{ return SimpleTable::getColumn(1); }
+
+const TableColumn& SpecheatTable::getCpWaterColumn() const
+{ return SimpleTable::getColumn(2); }
+
+const TableColumn& SpecheatTable::getCpGasColumn() const
+{ return SimpleTable::getColumn(3); }
+
+SpecrockTable::SpecrockTable(const DeckItem& item)
+{
+ m_schema.addColumn(ColumnSchema("TEMPERATURE", Table::STRICTLY_INCREASING, Table::DEFAULT_NONE));
+ m_schema.addColumn(ColumnSchema("CP_ROCK", Table::RANDOM, Table::DEFAULT_LINEAR));
+
+ SimpleTable::init(item);
+}
+
+const TableColumn& SpecrockTable::getTemperatureColumn() const
+{ return SimpleTable::getColumn(0); }
+
+const TableColumn& SpecrockTable::getCpRockColumn() const
+{ return SimpleTable::getColumn(1); }
+
SwofTable::SwofTable( const DeckItem& item , const bool jfunc) {
m_schema.addColumn( ColumnSchema( "SW" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE) );
diff --git a/lib/eclipse/Units/UnitSystem.cpp b/lib/eclipse/Units/UnitSystem.cpp
index 2d7ee872d..4ae2f997d 100644
--- a/lib/eclipse/Units/UnitSystem.cpp
+++ b/lib/eclipse/Units/UnitSystem.cpp
@@ -66,6 +66,7 @@ namespace {
1, /* gas inverse formation volume factor */
1, /* oil inverse formation volume factor */
1, /* water inverse formation volume factor */
+ 1 / Metric::Energy
};
static const double from_metric[] = {
@@ -95,6 +96,7 @@ namespace {
1, /* gas inverse formation volume factor */
1, /* oil inverse formation volume factor */
1, /* water inverse formation volume factor */
+ Metric::Energy
};
static constexpr const char* metric_names[] = {
@@ -124,6 +126,7 @@ namespace {
"SM3/RM3", /* gas inverse formation volume factor */
"SM3/RM3", /* oil inverse formation volume factor */
"SM3/RM3", /* water inverse formation volume factor */
+ "KJ", /* energy */
};
static const double to_field[] = {
@@ -153,6 +156,7 @@ namespace {
1 / (Field::GasSurfaceVolume / Field::ReservoirVolume), /* gas inverse formation volume factor */
1, /* oil inverse formation volume factor */
1, /* water inverse formation volume factor */
+ 1 / Field::Energy
};
static const double from_field[] = {
@@ -182,6 +186,7 @@ namespace {
Field::GasSurfaceVolume / Field::ReservoirVolume, /* gas inverse formation volume factor */
1, /* oil inverse formation volume factor */
1, /* water inverse formation volume factor */
+ Field::Energy
};
static constexpr const char* field_names[] = {
@@ -211,6 +216,7 @@ namespace {
"MSCF/RB", /* gas inverse formation volume factor */
"STB/RB", /* oil inverse formation volume factor */
"STB/RB", /* water inverse formation volume factor */
+ "BTU", /* energy */
};
static const double to_lab[] = {
@@ -240,6 +246,7 @@ namespace {
1, /* gas inverse formation volume factor */
1, /* oil inverse formation volume factor */
1, /* water inverse formation volume factor */
+ 1 / Lab::Energy
};
static const double from_lab[] = {
@@ -269,6 +276,7 @@ namespace {
1, /* gas inverse formation volume factor */
1, /* oil inverse formation volume factor */
1, /* water inverse formation volume factor */
+ Lab::Energy
};
static constexpr const char* lab_names[] = {
@@ -298,6 +306,7 @@ namespace {
"SCC/RCC", /* gas formation volume factor */
"SCC/RCC", /* oil inverse formation volume factor */
"SCC/RCC", /* water inverse formation volume factor */
+ "J", /* energy */
};
static const double to_pvt_m[] = {
@@ -327,6 +336,7 @@ namespace {
1 / (PVT_M::GasSurfaceVolume / PVT_M::ReservoirVolume), /* 1/Bg */
1 / (PVT_M::LiquidSurfaceVolume / PVT_M::ReservoirVolume), /* 1/Bo */
1 / (PVT_M::LiquidSurfaceVolume / PVT_M::ReservoirVolume), /* 1/Bw */
+ 1 / PVT_M::Energy
};
static const double from_pvt_m[] = {
@@ -356,6 +366,7 @@ namespace {
PVT_M::GasSurfaceVolume / PVT_M::ReservoirVolume, /* 1/Bg */
PVT_M::LiquidSurfaceVolume / PVT_M::ReservoirVolume, /* 1/Bo */
PVT_M::LiquidSurfaceVolume / PVT_M::ReservoirVolume, /* 1/Bw */
+ PVT_M::Energy
};
static constexpr const char* pvt_m_names[] = {
@@ -385,6 +396,7 @@ namespace {
"SM3/RM3", /* gas inverse formation volume factor */
"SM3/RM3", /* oil inverse formation volume factor */
"SM3/RM3", /* water inverse formation volume factor */
+ "KJ" /* energy */
};
}
@@ -601,6 +613,7 @@ namespace {
system.addDimension("Viscosity" , Metric::Viscosity);
system.addDimension("Timestep" , Metric::Timestep);
system.addDimension("SurfaceTension" , Metric::SurfaceTension);
+ system.addDimension("Energy", Metric::Energy);
system.addDimension("ContextDependent", std::numeric_limits::quiet_NaN());
return system;
}
@@ -630,6 +643,7 @@ namespace {
system.addDimension("Viscosity", Field::Viscosity);
system.addDimension("Timestep", Field::Timestep);
system.addDimension("SurfaceTension" , Field::SurfaceTension);
+ system.addDimension("Energy", Field::Energy);
system.addDimension("ContextDependent", std::numeric_limits::quiet_NaN());
return system;
}
@@ -659,6 +673,7 @@ namespace {
system.addDimension("Viscosity", Lab::Viscosity);
system.addDimension("Timestep", Lab::Timestep);
system.addDimension("SurfaceTension" , Lab::SurfaceTension);
+ system.addDimension("Energy", Lab::Energy);
system.addDimension("ContextDependent", std::numeric_limits::quiet_NaN());
return system;
}
@@ -687,6 +702,7 @@ namespace {
system.addDimension("Viscosity" , PVT_M::Viscosity);
system.addDimension("Timestep" , PVT_M::Timestep);
system.addDimension("SurfaceTension" , PVT_M::SurfaceTension);
+ system.addDimension("Energy", PVT_M::Energy);
system.addDimension("ContextDependent", std::numeric_limits::quiet_NaN());
return system;
}
diff --git a/lib/eclipse/include/opm/parser/eclipse/EclipseState/Runspec.hpp b/lib/eclipse/include/opm/parser/eclipse/EclipseState/Runspec.hpp
index 1b686f4ee..1d5cd45dc 100644
--- a/lib/eclipse/include/opm/parser/eclipse/EclipseState/Runspec.hpp
+++ b/lib/eclipse/include/opm/parser/eclipse/EclipseState/Runspec.hpp
@@ -35,6 +35,7 @@ enum class Phase {
WATER = 2,
SOLVENT = 3,
POLYMER = 4,
+ ENERGY = 5,
};
Phase get_phase( const std::string& );
@@ -43,12 +44,12 @@ std::ostream& operator<<( std::ostream&, const Phase& );
class Phases {
public:
Phases() noexcept = default;
- Phases( bool oil, bool gas, bool wat, bool solvent = false, bool polymer = false ) noexcept;
+ Phases( bool oil, bool gas, bool wat, bool solvent = false, bool polymer = false, bool energy = false ) noexcept;
bool active( Phase ) const noexcept;
size_t size() const noexcept;
private:
- std::bitset< 5 > bits;
+ std::bitset< 6 > bits;
};
diff --git a/lib/eclipse/include/opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp b/lib/eclipse/include/opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp
index 770defa03..1ee94a7e9 100644
--- a/lib/eclipse/include/opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp
+++ b/lib/eclipse/include/opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp
@@ -143,6 +143,7 @@ namespace Opm
void handleWCONINJE( const SCHEDULESection&, const DeckKeyword& keyword, size_t currentStep);
void handleWPOLYMER( const DeckKeyword& keyword, size_t currentStep);
void handleWSOLVENT( const DeckKeyword& keyword, size_t currentStep);
+ void handleWTEMP( const DeckKeyword& keyword, size_t currentStep);
void handleWCONINJH( const SCHEDULESection&, const DeckKeyword& keyword, size_t currentStep);
void handleWELOPEN( const DeckKeyword& keyword, size_t currentStep );
void handleWELTARG( const SCHEDULESection&, const DeckKeyword& keyword, size_t currentStep);
diff --git a/lib/eclipse/include/opm/parser/eclipse/EclipseState/Schedule/WellInjectionProperties.hpp b/lib/eclipse/include/opm/parser/eclipse/EclipseState/Schedule/WellInjectionProperties.hpp
index a263befbd..1b2bbc892 100644
--- a/lib/eclipse/include/opm/parser/eclipse/EclipseState/Schedule/WellInjectionProperties.hpp
+++ b/lib/eclipse/include/opm/parser/eclipse/EclipseState/Schedule/WellInjectionProperties.hpp
@@ -29,6 +29,7 @@ namespace Opm {
struct WellInjectionProperties {
double surfaceInjectionRate;
double reservoirInjectionRate;
+ double temperature;
double BHPLimit;
double THPLimit;
int VFPTableNumber;
diff --git a/lib/eclipse/include/opm/parser/eclipse/EclipseState/Tables/SpecheatTable.hpp b/lib/eclipse/include/opm/parser/eclipse/EclipseState/Tables/SpecheatTable.hpp
new file mode 100644
index 000000000..5b19b2173
--- /dev/null
+++ b/lib/eclipse/include/opm/parser/eclipse/EclipseState/Tables/SpecheatTable.hpp
@@ -0,0 +1,41 @@
+/*
+ This file is part of the Open Porous Media project (OPM).
+
+ OPM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OPM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OPM. If not, see .
+ */
+#ifndef OPM_PARSER_SPECHEAT_TABLE_HPP
+#define OPM_PARSER_SPECHEAT_TABLE_HPP
+
+#include "SimpleTable.hpp"
+
+namespace Opm {
+
+ class DeckItem;
+
+ // this table specifies the specific heat capacity of the black oil fluids. In this
+ // context, be aware that the keyword "SPECHEAT" stands for "SPECific HEAT capacity"
+ // not for a way to cheat on the SPE test cases ;)
+ class SpecheatTable : public SimpleTable {
+ public:
+ SpecheatTable(const DeckItem& item);
+
+ const TableColumn& getTemperatureColumn() const;
+ const TableColumn& getCpOilColumn() const;
+ const TableColumn& getCpWaterColumn() const;
+ const TableColumn& getCpGasColumn() const;
+ };
+}
+
+#endif
+
diff --git a/lib/eclipse/include/opm/parser/eclipse/EclipseState/Tables/SpecrockTable.hpp b/lib/eclipse/include/opm/parser/eclipse/EclipseState/Tables/SpecrockTable.hpp
new file mode 100644
index 000000000..bd51e65a1
--- /dev/null
+++ b/lib/eclipse/include/opm/parser/eclipse/EclipseState/Tables/SpecrockTable.hpp
@@ -0,0 +1,38 @@
+/*
+ This file is part of the Open Porous Media project (OPM).
+
+ OPM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OPM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OPM. If not, see .
+ */
+#ifndef OPM_PARSER_SPECROCK_TABLE_HPP
+#define OPM_PARSER_SPECROCK_TABLE_HPP
+
+#include "SimpleTable.hpp"
+
+namespace Opm {
+
+ class DeckItem;
+
+ // this table specifies the volumetric heat capacity of the rock not including the
+ // pore space.
+ class SpecrockTable : public SimpleTable {
+ public:
+ SpecrockTable(const DeckItem& item);
+
+ const TableColumn& getTemperatureColumn() const;
+ const TableColumn& getCpRockColumn() const;
+ };
+}
+
+#endif
+
diff --git a/lib/eclipse/include/opm/parser/eclipse/EclipseState/Tables/TableManager.hpp b/lib/eclipse/include/opm/parser/eclipse/EclipseState/Tables/TableManager.hpp
index d587e25b2..ec1e16f2b 100644
--- a/lib/eclipse/include/opm/parser/eclipse/EclipseState/Tables/TableManager.hpp
+++ b/lib/eclipse/include/opm/parser/eclipse/EclipseState/Tables/TableManager.hpp
@@ -86,6 +86,8 @@ namespace Opm {
const TableContainer& getPvdgTables() const;
const TableContainer& getPvdoTables() const;
const TableContainer& getPvdsTables() const;
+ const TableContainer& getSpecheatTables() const;
+ const TableContainer& getSpecrockTables() const;
const TableContainer& getWatvisctTables() const;
const TableContainer& getOilvisctTables() const;
const TableContainer& getGasvisctTables() const;
diff --git a/lib/eclipse/include/opm/parser/eclipse/Units/Units.hpp b/lib/eclipse/include/opm/parser/eclipse/Units/Units.hpp
index a097a1935..e4f27d581 100644
--- a/lib/eclipse/include/opm/parser/eclipse/Units/Units.hpp
+++ b/lib/eclipse/include/opm/parser/eclipse/Units/Units.hpp
@@ -123,6 +123,12 @@ namespace Opm {
constexpr const double pound = 0.45359237 * kilogram;
/// @}
+ /// \name Energy
+ /// @{
+ constexpr const double joule = 1;
+ constexpr const double btu = 1054.3503*joule; // "british thermal units"
+ /// @}
+
// --------------------------------------------------------------
// Standardised constants
// --------------------------------------------------------------
@@ -267,6 +273,7 @@ namespace Opm {
constexpr const double Viscosity = centi*Poise;
constexpr const double Timestep = day;
constexpr const double SurfaceTension = dyne/(centi*meter);
+ constexpr const double Energy = kilo*joule;
}
@@ -293,6 +300,7 @@ namespace Opm {
constexpr const double Viscosity = centi*Poise;
constexpr const double Timestep = day;
constexpr const double SurfaceTension = dyne/(centi*meter);
+ constexpr const double Energy = btu;
}
@@ -319,6 +327,7 @@ namespace Opm {
constexpr const double Viscosity = centi*Poise;
constexpr const double Timestep = hour;
constexpr const double SurfaceTension = dyne/(centi*meter);
+ constexpr const double Energy = joule;
}
@@ -345,6 +354,7 @@ namespace Opm {
constexpr const double Viscosity = centi*Poise;
constexpr const double Timestep = day;
constexpr const double SurfaceTension = dyne/(centi*meter);
+ constexpr const double Energy = kilo*joule;
}
}
diff --git a/lib/eclipse/share/keywords/000_Eclipse100/B/BLACKOIL b/lib/eclipse/share/keywords/000_Eclipse100/B/BLACKOIL
new file mode 100644
index 000000000..3bd9a9927
--- /dev/null
+++ b/lib/eclipse/share/keywords/000_Eclipse100/B/BLACKOIL
@@ -0,0 +1 @@
+{"name" : "BLACKOIL", "sections" : ["RUNSPEC"]}
diff --git a/lib/eclipse/share/keywords/000_Eclipse100/S/SPECHEAT b/lib/eclipse/share/keywords/000_Eclipse100/S/SPECHEAT
index b78ab52dd..eed3620e0 100644
--- a/lib/eclipse/share/keywords/000_Eclipse100/S/SPECHEAT
+++ b/lib/eclipse/share/keywords/000_Eclipse100/S/SPECHEAT
@@ -1,3 +1,11 @@
-{"name" : "SPECHEAT" , "sections" : ["PROPS"], "size" : {"keyword":"TABDIMS" , "item":"NTPVT"},
- "items" :
- [{"name" : "DATA" , "value_type" : "DOUBLE" , "size_type" : "ALL"}]}
+{
+ "name": "SPECHEAT",
+ "sections": ["PROPS"],
+ "size": {
+ "keyword": "TABDIMS",
+ "item": "NTPVT"
+ },
+ "items": [
+ { "name": "DATA", "value_type": "DOUBLE", "size_type": "ALL", "dimension": ["Temperature", "Energy/Mass*AbsoluteTemperature", "Energy/Mass*AbsoluteTemperature", "Energy/Mass*AbsoluteTemperature"]}
+ ]
+}
diff --git a/lib/eclipse/share/keywords/000_Eclipse100/S/SPECROCK b/lib/eclipse/share/keywords/000_Eclipse100/S/SPECROCK
index f0e246699..54eb53485 100644
--- a/lib/eclipse/share/keywords/000_Eclipse100/S/SPECROCK
+++ b/lib/eclipse/share/keywords/000_Eclipse100/S/SPECROCK
@@ -1,3 +1,13 @@
-{"name" : "SPECROCK" , "sections" : ["PROPS"], "size" : {"keyword":"TABDIMS" , "item":"NTSFUN"},
- "items" :
- [{"name" : "DATA" , "value_type" : "DOUBLE" , "size_type" : "ALL"}]}
+{
+ "name": "SPECROCK",
+ "sections": ["PROPS"],
+ "size": {
+ "keyword": "TABDIMS",
+ "item": "NTSFUN"
+ },
+ "items": [
+ { "name":"DATA", "value_type":"DOUBLE", "size_type": "ALL", "dimension": ["Temperature", "Energy/Length*Length*Length*AbsoluteTemperature"] }
+ ]
+}
+
+
diff --git a/lib/eclipse/share/keywords/000_Eclipse100/T/THCONR b/lib/eclipse/share/keywords/000_Eclipse100/T/THCONR
index 398946003..a45618aa4 100644
--- a/lib/eclipse/share/keywords/000_Eclipse100/T/THCONR
+++ b/lib/eclipse/share/keywords/000_Eclipse100/T/THCONR
@@ -1 +1,8 @@
-{"name" : "THCONR" , "sections" : ["GRID"], "data" : {"value_type" : "DOUBLE"}}
\ No newline at end of file
+{
+ "name": "THCONR",
+ "sections": ["GRID"],
+ "data": {
+ "value_type": "DOUBLE",
+ "dimension": "Energy/AbsoluteTemperature*Length*Time"
+ }
+}
diff --git a/lib/eclipse/share/keywords/001_Eclipse300/D/DEADOIL b/lib/eclipse/share/keywords/001_Eclipse300/D/DEADOIL
new file mode 100644
index 000000000..c4b5b2d87
--- /dev/null
+++ b/lib/eclipse/share/keywords/001_Eclipse300/D/DEADOIL
@@ -0,0 +1 @@
+{"name" : "DEADOIL", "sections" : ["RUNSPEC"]}
diff --git a/lib/eclipse/share/keywords/001_Eclipse300/H/HEATCR b/lib/eclipse/share/keywords/001_Eclipse300/H/HEATCR
new file mode 100644
index 000000000..4e9007048
--- /dev/null
+++ b/lib/eclipse/share/keywords/001_Eclipse300/H/HEATCR
@@ -0,0 +1,8 @@
+{
+ "name" : "HEATCR",
+ "sections" : ["GRID"],
+ "data" : {
+ "value_type": "DOUBLE",
+ "dimension" : "Energy/Length*Length*Length*AbsoluteTemperature"
+ }
+}
diff --git a/lib/eclipse/share/keywords/001_Eclipse300/H/HEATCRT b/lib/eclipse/share/keywords/001_Eclipse300/H/HEATCRT
new file mode 100644
index 000000000..72bf8ea1f
--- /dev/null
+++ b/lib/eclipse/share/keywords/001_Eclipse300/H/HEATCRT
@@ -0,0 +1,8 @@
+{
+ "name" : "HEATCRT",
+ "sections" : ["GRID"],
+ "data" : {
+ "value_type": "DOUBLE",
+ "dimension" : "Energy/Length*Length*Length*AbsoluteTemperature*AbsoluteTemperature"
+ }
+}
diff --git a/lib/eclipse/share/keywords/001_Eclipse300/L/LIVEOIL b/lib/eclipse/share/keywords/001_Eclipse300/L/LIVEOIL
new file mode 100644
index 000000000..f87f84725
--- /dev/null
+++ b/lib/eclipse/share/keywords/001_Eclipse300/L/LIVEOIL
@@ -0,0 +1 @@
+{"name" : "LIVEOIL", "sections" : ["RUNSPEC"]}
diff --git a/lib/eclipse/share/keywords/001_Eclipse300/S/STCOND b/lib/eclipse/share/keywords/001_Eclipse300/S/STCOND
index 31a04b19e..702f034f4 100644
--- a/lib/eclipse/share/keywords/001_Eclipse300/S/STCOND
+++ b/lib/eclipse/share/keywords/001_Eclipse300/S/STCOND
@@ -3,6 +3,6 @@
"sections": ["PROPS"],
"size": 1,
"items": [
- {"name": "TEMPERATURE", "value_type": "DOUBLE", "dimension": "Temperature", "default": 60},
- {"name": "PRESSURE", "value_type": "DOUBLE", "dimension": "Pressure", "default": 14.6959}
+ {"name": "TEMPERATURE", "value_type": "DOUBLE", "dimension": "Temperature", "default": 15.56},
+ {"name": "PRESSURE", "value_type": "DOUBLE", "dimension": "Pressure", "default": 1.01325}
]}
diff --git a/lib/eclipse/share/keywords/001_Eclipse300/T/THCONSF b/lib/eclipse/share/keywords/001_Eclipse300/T/THCONSF
new file mode 100644
index 000000000..fb8ee6c5f
--- /dev/null
+++ b/lib/eclipse/share/keywords/001_Eclipse300/T/THCONSF
@@ -0,0 +1,8 @@
+{
+ "name": "THCONSF",
+ "sections": ["GRID"],
+ "data": {
+ "value_type": "DOUBLE",
+ "dimension": "1"
+ }
+}
diff --git a/lib/eclipse/share/keywords/001_Eclipse300/W/WATDENT b/lib/eclipse/share/keywords/001_Eclipse300/W/WATDENT
index d8d3bfa1e..5eba647e9 100644
--- a/lib/eclipse/share/keywords/001_Eclipse300/W/WATDENT
+++ b/lib/eclipse/share/keywords/001_Eclipse300/W/WATDENT
@@ -10,8 +10,8 @@
"comment": "item, the RM is _very_ inconsistent. (it says that the default for the second item is 1.67/degR in",
"comment": "FIELD units which is the same the 3e-4/K for METRIC but four orders of magnitude off!)",
"items" : [
- {"name" : "REFERENCE_TEMPERATURE" , "value_type" : "DOUBLE", "dimension" : "AbsoluteTemperature", "default": 527.67 },
- {"name" : "EXPANSION_COEFF_LINEAR" , "value_type" : "DOUBLE", "dimension" : "1/AbsoluteTemperature", "default": 1.67e-4 },
- {"name" : "EXPANSION_COEFF_QUADRATIC" , "value_type" : "DOUBLE", "dimension" : "1/AbsoluteTemperature*AbsoluteTemperature", "default": 9.26e-7 }
+ {"name" : "REFERENCE_TEMPERATURE" , "value_type" : "DOUBLE", "dimension" : "AbsoluteTemperature", "default": 293.15 },
+ {"name" : "EXPANSION_COEFF_LINEAR" , "value_type" : "DOUBLE", "dimension" : "1/AbsoluteTemperature", "default": 3.0e-4 },
+ {"name" : "EXPANSION_COEFF_QUADRATIC" , "value_type" : "DOUBLE", "dimension" : "1/AbsoluteTemperature*AbsoluteTemperature", "default": 3.0e-6 }
]
}
diff --git a/lib/eclipse/share/keywords/001_Eclipse300/W/WINJTEMP b/lib/eclipse/share/keywords/001_Eclipse300/W/WINJTEMP
new file mode 100644
index 000000000..31b9360cf
--- /dev/null
+++ b/lib/eclipse/share/keywords/001_Eclipse300/W/WINJTEMP
@@ -0,0 +1,11 @@
+{
+ "name": "WINJTEMP",
+ "sections": ["SCHEDULE"],
+ "items": [
+ {"name": "WELL", "value_type": "STRING"},
+ {"name": "STEAM_QUALITY", "value_type": "DOUBLE", "default": 1.0},
+ {"name": "TEMPERATURE", "value_type": "DOUBLE", "dimension": "Temperature", "default": 15.56 },
+ {"name": "PRESSURE", "value_type": "DOUBLE", "dimension": "Pressure", "default": 0.0 },
+ {"name": "ENTHALPY", "value_type": "DOUBLE", "dimension": "Energy/Mass", "default": 0.0 }
+ ]
+}
diff --git a/lib/eclipse/share/keywords/900_OPM/G/GASDENT b/lib/eclipse/share/keywords/900_OPM/G/GASDENT
new file mode 100644
index 000000000..5f43777c9
--- /dev/null
+++ b/lib/eclipse/share/keywords/900_OPM/G/GASDENT
@@ -0,0 +1,14 @@
+{
+ "name": "GASDENT",
+ "sections": ["PROPS"],
+ "size" : {
+ "keyword": "TABDIMS",
+ "item" : "NTPVT"
+ },
+
+ "items" : [
+ {"name" : "REFERENCE_TEMPERATURE" , "value_type" : "DOUBLE", "dimension" : "AbsoluteTemperature", "default": 293.15 },
+ {"name" : "EXPANSION_COEFF_LINEAR" , "value_type" : "DOUBLE", "dimension" : "1/AbsoluteTemperature", "default": 0.0 },
+ {"name" : "EXPANSION_COEFF_QUADRATIC" , "value_type" : "DOUBLE", "dimension" : "1/AbsoluteTemperature*AbsoluteTemperature", "default": 0.0 }
+ ]
+}
diff --git a/lib/eclipse/share/keywords/900_OPM/O/OILDENT b/lib/eclipse/share/keywords/900_OPM/O/OILDENT
new file mode 100644
index 000000000..f0b35ef17
--- /dev/null
+++ b/lib/eclipse/share/keywords/900_OPM/O/OILDENT
@@ -0,0 +1,14 @@
+{
+ "name": "OILDENT",
+ "sections": ["PROPS"],
+ "size" : {
+ "keyword": "TABDIMS",
+ "item" : "NTPVT"
+ },
+
+ "items" : [
+ {"name" : "REFERENCE_TEMPERATURE" , "value_type" : "DOUBLE", "dimension" : "AbsoluteTemperature", "default": 293.15 },
+ {"name" : "EXPANSION_COEFF_LINEAR" , "value_type" : "DOUBLE", "dimension" : "1/AbsoluteTemperature", "default": 0.0 },
+ {"name" : "EXPANSION_COEFF_QUADRATIC" , "value_type" : "DOUBLE", "dimension" : "1/AbsoluteTemperature*AbsoluteTemperature", "default": 0.0 }
+ ]
+}
diff --git a/lib/eclipse/share/keywords/keyword_list.cmake b/lib/eclipse/share/keywords/keyword_list.cmake
index 2b15af054..b587731c2 100644
--- a/lib/eclipse/share/keywords/keyword_list.cmake
+++ b/lib/eclipse/share/keywords/keyword_list.cmake
@@ -30,6 +30,7 @@ set( keywords
000_Eclipse100/A/AQUIFER_PROBE_NUMERIC
000_Eclipse100/A/AQUNUM
000_Eclipse100/A/AQUTAB
+ 000_Eclipse100/B/BLACKOIL
000_Eclipse100/B/BLOCK_PROBE
000_Eclipse100/B/BOX
000_Eclipse100/C/CECON
@@ -385,11 +386,15 @@ set( keywords
001_Eclipse300/C/COMPS
001_Eclipse300/C/CREF
001_Eclipse300/C/CREFS
+ 001_Eclipse300/D/DEADOIL
001_Eclipse300/D/DREF
001_Eclipse300/D/DREFS
001_Eclipse300/D/DZV
001_Eclipse300/G/GASVISCT
001_Eclipse300/G/GCONPROD
+ 001_Eclipse300/H/HEATCR
+ 001_Eclipse300/H/HEATCRT
+ 001_Eclipse300/L/LIVEOIL
001_Eclipse300/M/MW
001_Eclipse300/M/MWS
001_Eclipse300/O/OILCOMPR
@@ -400,10 +405,12 @@ set( keywords
001_Eclipse300/S/STCOND
001_Eclipse300/T/TEMPI
001_Eclipse300/T/TEMPVD
+ 001_Eclipse300/T/THCONSF
001_Eclipse300/T/THERMAL
001_Eclipse300/T/THERMEX1
001_Eclipse300/T/TREF
001_Eclipse300/T/TREFS
+ 001_Eclipse300/W/WINJTEMP
001_Eclipse300/W/WATDENT
001_Eclipse300/Z/ZFACT1
001_Eclipse300/Z/ZFACT1S
@@ -413,7 +420,9 @@ set( keywords
900_OPM/G/GCOMPIDX
900_OPM/G/GRUPRIG
+ 900_OPM/G/GASDENT
900_OPM/M/MINPVFIL
900_OPM/O/OCOMPIDX
+ 900_OPM/O/OILDENT
900_OPM/R/RHO
900_OPM/T/TLPMIXPA)