WellInterfaceIndices: rename flowPhaseToEboxCompIdx to flowPhaseToModelCompIdx

This commit is contained in:
Arne Morten Kvarving 2024-02-06 12:12:13 +01:00
parent 3ae685d47c
commit c029a57c72
3 changed files with 6 additions and 6 deletions

View File

@ -59,7 +59,7 @@ WellInterfaceIndices(const Well& well,
template<class FluidSystem, class Indices, class Scalar>
int
WellInterfaceIndices<FluidSystem,Indices,Scalar>::
flowPhaseToEbosCompIdx(const int phaseIdx) const
flowPhaseToModelCompIdx(const int phaseIdx) const
{
const auto& pu = this->phaseUsage();
if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx) && pu.phase_pos[Water] == phaseIdx)

View File

@ -39,7 +39,7 @@ public:
using WellInterfaceFluidSystem<FluidSystem>::Water;
using Eval = DenseAd::Evaluation<Scalar, /*size=*/Indices::numEq>;
int flowPhaseToEbosCompIdx(const int phaseIdx) const;
int flowPhaseToModelCompIdx(const int phaseIdx) const;
int ebosCompIdxToFlowCompIdx(const unsigned compIdx) const;
double scalingFactor(const int phaseIdx) const;

View File

@ -1472,18 +1472,18 @@ namespace Opm
// No nonzero rates.
// Use the computed rate directly
for (int p = 0; p < this->number_of_phases_; ++p) {
ws.surface_rates[p] = well_q_s[this->flowPhaseToEbosCompIdx(p)];
ws.surface_rates[p] = well_q_s[this->flowPhaseToModelCompIdx(p)];
}
return;
}
// Set the currently-zero phase flows to be nonzero in proportion to well_q_s.
const double initial_nonzero_rate = ws.surface_rates[nonzero_rate_index];
const int comp_idx_nz = this->flowPhaseToEbosCompIdx(nonzero_rate_index);
const int comp_idx_nz = this->flowPhaseToModelCompIdx(nonzero_rate_index);
if (std::abs(well_q_s[comp_idx_nz]) > floating_point_error_epsilon) {
for (int p = 0; p < this->number_of_phases_; ++p) {
if (p != nonzero_rate_index) {
const int comp_idx = this->flowPhaseToEbosCompIdx(p);
const int comp_idx = this->flowPhaseToModelCompIdx(p);
double& rate = ws.surface_rates[p];
rate = (initial_nonzero_rate / well_q_s[comp_idx_nz]) * (well_q_s[comp_idx]);
}
@ -1792,7 +1792,7 @@ namespace Opm
// Note: E100's notion of PI value phase mobility includes
// the reciprocal FVF.
const auto connMob =
mobility[this->flowPhaseToEbosCompIdx(p)]
mobility[this->flowPhaseToModelCompIdx(p)]
* fs.invB(this->flowPhaseToEbosPhaseIdx(p)).value();
connPI[p] = connPICalc(connMob);