Merge pull request #1957 from totto82/salinity

Add keyword SALINITY with unit molality
This commit is contained in:
Joakim Hove
2020-09-25 12:28:19 +02:00
committed by GitHub
4 changed files with 31 additions and 0 deletions
@@ -189,6 +189,8 @@ namespace Opm {
double rtemp() const;
double salinity() const;
bool operator==(const TableManager& data) const;
template<class Serializer>
@@ -239,6 +241,7 @@ namespace Opm {
stcond.serializeOp(serializer);
serializer(m_gas_comp_index);
serializer(m_rtemp);
serializer(m_salinity);
m_tlmixpar.serializeOp(serializer);
if (!serializer.isSerializing()) {
m_simpleTables = simpleTables;
@@ -540,6 +543,7 @@ namespace Opm {
StandardCond stcond;
std::size_t m_gas_comp_index;
double m_rtemp;
double m_salinity;
struct SplitSimpleTables {
size_t plyshMax = 0;
@@ -122,6 +122,8 @@ namespace Opm {
m_rtemp = ParserKeywords::RTEMP::TEMP::defaultValue;
m_rtemp += Metric::TemperatureOffset; // <- default values always use METRIC as the unit system!
m_salinity = ParserKeywords::SALINITY::MOLALITY::defaultValue;
initDims( deck );
initSimpleTables( deck );
initFullTables(deck, "PVTG", m_pvtgTables);
@@ -156,6 +158,9 @@ namespace Opm {
else if (deck.hasKeyword( "RTEMPA" ) )
m_rtemp = deck.getKeyword("RTEMPA").getRecord(0).getItem("TEMP").getSIDouble( 0 );
if( deck.hasKeyword( "SALINITY" ) )
m_salinity = deck.getKeyword("SALINITY").getRecord(0).getItem("MOLALITY").get<double>( 0 ); //unit independent of unit systems
if ( deck.hasKeyword( "ROCK2D") )
initRockTables(deck, "ROCK2D", m_rock2dTables );
@@ -247,6 +252,7 @@ namespace Opm {
if (data.jfunc)
jfunc = std::make_shared<JFunc>(*data.jfunc);
m_rtemp = data.m_rtemp;
m_salinity = data.m_salinity;
gasDenT = data.gasDenT;
oilDenT = data.oilDenT;
watDenT = data.watDenT;
@@ -298,6 +304,7 @@ namespace Opm {
result.stcond = StandardCond::serializeObject();
result.m_gas_comp_index = 77;
result.m_rtemp = 1.0;
result.m_salinity = 1.0;
result.m_tlmixpar = TLMixpar::serializeObject();
return result;
}
@@ -1144,6 +1151,10 @@ namespace Opm {
return this->m_rtemp;
}
double TableManager::salinity() const {
return this->m_salinity;
}
std::size_t TableManager::gas_comp_index() const {
return this->m_gas_comp_index;
}
@@ -1193,6 +1204,7 @@ namespace Opm {
stcond == data.stcond &&
jfuncOk &&
m_rtemp == data.m_rtemp &&
m_salinity == data.m_salinity &&
m_gas_comp_index == data.m_gas_comp_index;
}
@@ -0,0 +1,14 @@
{
"name": "SALINITY",
"sections": [
"PROPS"
],
"size": 1,
"items": [
{
"name": "MOLALITY",
"value_type": "DOUBLE",
"default": 0.0
}
]
}
@@ -1065,6 +1065,7 @@ set( keywords
001_Eclipse300/O/OPTIONS3
001_Eclipse300/P/PREF
001_Eclipse300/P/PREFS
001_Eclipse300/S/SALINITY
001_Eclipse300/S/STCOND
001_Eclipse300/T/TEMPI
001_Eclipse300/T/TEMPVD