Merge pull request #1533 from akva2/foamconfig_fix

fixed: update FoamConfig defaults
This commit is contained in:
Arne Morten Kvarving
2020-03-05 11:16:18 +01:00
committed by GitHub
2 changed files with 13 additions and 4 deletions

View File

@@ -66,8 +66,8 @@ class FoamConfig
{
public:
enum class MobilityModel {
INVALID,
TAB
TAB,
FUNC
};
FoamConfig() = default;
@@ -94,7 +94,7 @@ public:
private:
std::vector<FoamData> data_;
Phase transport_phase_ = Phase::GAS;
MobilityModel mobility_model_ = MobilityModel::INVALID;
MobilityModel mobility_model_ = MobilityModel::TAB;
};
} // end namespace Opm

View File

@@ -132,8 +132,17 @@ FoamConfig::FoamConfig(const Deck& deck)
// do not store any data related to it.
const auto& kw_foamopts = deck.getKeyword<ParserKeywords::FOAMOPTS>();
transport_phase_ = get_phase(kw_foamopts.getRecord(0).getItem(0).get<std::string>(0));
if (kw_foamopts.getRecord(0).getItem(1).get<std::string>(0) == "TAB") {
std::string mobModel = kw_foamopts.getRecord(0).getItem(1).get<std::string>(0);
if (mobModel.empty()) {
if (transport_phase_ == Phase::GAS) {
mobility_model_ = MobilityModel::TAB;
} else if (transport_phase_ == Phase::WATER) {
mobility_model_ = MobilityModel::FUNC;
}
} else if (mobModel == "TAB") {
mobility_model_ = MobilityModel::TAB;
} else if (mobModel == "FUNC") {
mobility_model_ = MobilityModel::FUNC;
}
}
if (deck.hasKeyword<ParserKeywords::FOAMFSC>()) {