mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
parent
1d7b33aa55
commit
62f5040aea
@ -35,6 +35,7 @@
|
|||||||
#include <opm/simulators/wells/WellInterfaceIndices.hpp>
|
#include <opm/simulators/wells/WellInterfaceIndices.hpp>
|
||||||
#include <opm/simulators/wells/WellState.hpp>
|
#include <opm/simulators/wells/WellState.hpp>
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
@ -494,14 +495,17 @@ computeProperties(const WellState& well_state,
|
|||||||
constexpr double small_value = 1.e-10;
|
constexpr double small_value = 1.e-10;
|
||||||
for (int p = 0; p < np; ++p) {
|
for (int p = 0; p < np; ++p) {
|
||||||
const int ebosPhaseIdx = well_.flowPhaseToEbosPhaseIdx(p);
|
const int ebosPhaseIdx = well_.flowPhaseToEbosPhaseIdx(p);
|
||||||
const double factor = non_zero_total_mobility ?
|
const auto mob_ratio = non_zero_total_mobility
|
||||||
invB(cell_idx, ebosPhaseIdx) * mobility(cell_idx, ebosPhaseIdx) / total_mobility : invB(cell_idx, ebosPhaseIdx) * small_value / total_invB;
|
? mobility(cell_idx, ebosPhaseIdx) / total_mobility
|
||||||
perfRates[perf * well_.numComponents() + p] = well_tw_fraction * factor;
|
: small_value / total_invB;
|
||||||
|
perfRates[perf * well_.numComponents() + p] = well_tw_fraction * invB(cell_idx, ebosPhaseIdx) * mob_ratio;
|
||||||
}
|
}
|
||||||
if constexpr (Indices::enableSolvent) {
|
if constexpr (Indices::enableSolvent) {
|
||||||
const double factor = non_zero_total_mobility ?
|
const auto mob_ratio = non_zero_total_mobility
|
||||||
solventInverseFormationVolumeFactor(cell_idx) * solventMobility(cell_idx) / total_mobility : solventInverseFormationVolumeFactor(cell_idx) * small_value / total_invB;
|
? solventMobility(cell_idx) / total_mobility
|
||||||
perfRates[perf * well_.numComponents() + Indices::contiSolventEqIdx] = well_tw_fraction * factor;
|
: small_value / total_invB;
|
||||||
|
perfRates[perf * well_.numComponents() + Indices::contiSolventEqIdx] =
|
||||||
|
well_tw_fraction * solventInverseFormationVolumeFactor(cell_idx) * mob_ratio;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user