Support for mechanical dispersion

This commit is contained in:
David Landa Marban 2023-10-25 19:45:49 +02:00
parent 003560e00d
commit 0d993ebd6a
7 changed files with 34 additions and 2 deletions

View File

@ -130,7 +130,8 @@ namespace ALIAS {
namespace GRID {
static const std::unordered_map<std::string, keyword_info<double>> double_keywords = {{"MULTPV", keyword_info<double>{}.init(1.0)},
static const std::unordered_map<std::string, keyword_info<double>> double_keywords = {{"DISPERC",keyword_info<double>{}.unit_string("Length")},
{"MULTPV", keyword_info<double>{}.init(1.0)},
{"NTG", keyword_info<double>{}.init(1.0)},
{"PORO", keyword_info<double>{}.distribute_top(true)},
{"PERMX", keyword_info<double>{}.unit_string("Permeability").distribute_top(true)},

View File

@ -71,6 +71,7 @@ public:
std::size_t num_rock_tables() const;
Hysteresis hysteresis_mode() const;
bool water_compaction() const;
bool dispersion() const;
bool operator==(const RockConfig& other) const;
@ -83,6 +84,7 @@ public:
serializer(num_tables);
serializer(m_water_compaction);
serializer(hyst_mode);
serializer(m_dispersion);
}
private:
@ -92,6 +94,7 @@ private:
std::size_t num_tables = 0;
bool m_water_compaction = false;
Hysteresis hyst_mode = Hysteresis::REVERS;
bool m_dispersion = false;
};
} //namespace Opm

View File

@ -24,6 +24,7 @@
#include <opm/input/eclipse/Deck/Deck.hpp>
#include <opm/input/eclipse/Parser/ParserKeywords/D.hpp>
#include <opm/input/eclipse/Parser/ParserKeywords/R.hpp>
#include <stdexcept>
@ -98,6 +99,7 @@ RockConfig::RockConfig(const Deck& deck, const FieldPropsManager& fp)
using rock = ParserKeywords::ROCK;
using rockopts = ParserKeywords::ROCKOPTS;
using rockcomp = ParserKeywords::ROCKCOMP;
using disperc = ParserKeywords::DISPERC;
if (deck.hasKeyword<rock>()) {
for (const auto& table : RockTable { deck.get<rock>().back() }) {
@ -126,6 +128,10 @@ RockConfig::RockConfig(const Deck& deck, const FieldPropsManager& fp)
this->m_active = false;
}
}
if (deck.hasKeyword<disperc>()) {
this->m_dispersion = true;
}
}
RockConfig RockConfig::serializationTestObject()
@ -137,6 +143,7 @@ RockConfig RockConfig::serializationTestObject()
result.num_tables = 10;
result.m_water_compaction = false;
result.hyst_mode = Hysteresis::HYSTER;
result.m_dispersion = false;
return result;
}
@ -171,6 +178,11 @@ bool RockConfig::water_compaction() const
return this->m_water_compaction;
}
bool RockConfig::dispersion() const
{
return this->m_dispersion;
}
bool RockConfig::operator==(const RockConfig& other) const
{
return (this->num_property == other.num_property)
@ -178,7 +190,8 @@ bool RockConfig::operator==(const RockConfig& other) const
&& (this->num_tables == other.num_tables)
&& (this->m_active == other.m_active)
&& (this->m_water_compaction == other.m_water_compaction)
&& (this->hyst_mode == other.hyst_mode);
&& (this->hyst_mode == other.hyst_mode)
&& (this->m_dispersion == other.m_dispersion);
}
} //namespace Opm

View File

@ -0,0 +1,10 @@
{
"name": "DISPERC",
"sections": [
"GRID"
],
"data": {
"value_type": "DOUBLE",
"dimension": "Length"
}
}

View File

@ -1109,6 +1109,7 @@ set( keywords
900_OPM/C/COMPTRAJ
900_OPM/C/CONNECTION_PROBE_OPM
900_OPM/D/DISGASW
900_OPM/D/DISPERC
900_OPM/D/DRSDTCON
900_OPM/E/EXIT
900_OPM/G/GCOMPIDX

View File

@ -332,6 +332,9 @@ soluteComponentIndex(unsigned phaseIdx)
case oilPhaseIdx:
return gasCompIdx;
case gasPhaseIdx:
if (enableVaporizedWater()) {
return waterCompIdx;
}
return oilCompIdx;
default:

View File

@ -447,6 +447,7 @@ namespace {
{"NTG" , ::Opm::UnitSystem::measure::identity},
// the rest in alphabetic order starting here
{"BIOTCOEF" , ::Opm::UnitSystem::measure::identity},
{"DISPERC" , ::Opm::UnitSystem::measure::length},
{"POELCOEF" , ::Opm::UnitSystem::measure::identity},
{"PRATIO" , ::Opm::UnitSystem::measure::identity},
{"THERMEXR" , ::Opm::UnitSystem::measure::identity}, // 1/(temperature difference)