Merge pull request #3773 from totto82/fixWDFAC

Fix for connection D factors
This commit is contained in:
Bård Skaflestad 2023-11-17 09:05:36 +01:00 committed by GitHub
commit c9cecb9036
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,11 +73,13 @@ namespace Opm {
const auto non_trivial_dfactor = const auto non_trivial_dfactor =
std::any_of(connections.begin(), connections.end(), std::any_of(connections.begin(), connections.end(),
[](const auto& conn) { return conn.dFactor() > 0.0; }); [](const auto& conn) { return conn.dFactor() != 0.0; });
if (non_trivial_dfactor) // non-trivial dfactors detected use connection D factors
if (non_trivial_dfactor) {
m_type = WDFACTYPE::CON_DFACTOR; m_type = WDFACTYPE::CON_DFACTOR;
} }
}
double WDFAC::getDFactor(double rho, double mu, double k, double phi, double rw, double h) const { double WDFAC::getDFactor(double rho, double mu, double k, double phi, double rw, double h) const {