Merge pull request #1533 from akva2/foamconfig_fix
fixed: update FoamConfig defaults
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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>()) {
|
||||
|
||||
Reference in New Issue
Block a user