mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-14 06:03:28 -06:00
adding function computeWellConnectionDensitesPressures to StandardWell
This commit is contained in:
parent
0f997a537a
commit
e01e8c352a
@ -231,6 +231,12 @@ namespace Opm
|
||||
const std::vector<double>& surf_dens_perf);
|
||||
|
||||
void computeConnectionPressureDelta();
|
||||
|
||||
void computeWellConnectionDensitesPressures(const WellState& xw,
|
||||
const std::vector<double>& b_perf,
|
||||
const std::vector<double>& rsmax_perf,
|
||||
const std::vector<double>& rvmax_perf,
|
||||
const std::vector<double>& surf_dens_perf);
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1662,4 +1662,40 @@ namespace Opm
|
||||
std::partial_sum(beg, end, beg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
void
|
||||
StandardWell<TypeTag>::
|
||||
computeWellConnectionDensitesPressures(const WellState& xw,
|
||||
const std::vector<double>& b_perf,
|
||||
const std::vector<double>& rsmax_perf,
|
||||
const std::vector<double>& rvmax_perf,
|
||||
const std::vector<double>& surf_dens_perf)
|
||||
{
|
||||
// Compute densities
|
||||
const int nperf = numberOfPerforations();
|
||||
const int numComponent = numComponents();
|
||||
const int np = numberOfPhases();
|
||||
std::vector<double> perfRates(b_perf.size(),0.0);
|
||||
|
||||
for (int perf = 0; perf < nperf; ++perf) {
|
||||
for (int phase = 0; phase < np; ++phase) {
|
||||
perfRates[perf*numComponent + phase] = xw.perfPhaseRates()[(first_perf_ + perf) * np + phase];
|
||||
}
|
||||
if(has_solvent) {
|
||||
perfRates[perf*numComponent + solventCompIdx] = xw.perfRateSolvent()[perf + first_perf_];
|
||||
}
|
||||
}
|
||||
|
||||
computeConnectionDensities(perfRates, b_perf, rsmax_perf, rvmax_perf, surf_dens_perf);
|
||||
|
||||
computeConnectionPressureDelta();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user