mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-18 21:43:27 -06:00
Added computations for total flow for each well
This commit is contained in:
parent
c992deb147
commit
af849bf9e9
@ -437,6 +437,20 @@ namespace Opm
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void computeFlowRatePerWell(const Wells& wells, const std::vector<double>& flow_rates_per_cell,
|
||||
std::vector<double>& flow_rates_per_well)
|
||||
{
|
||||
int index_in_flow_rates = 0;
|
||||
for(int w = 0; w < wells.number_of_wells; w++) {
|
||||
int number_of_cells = wells.well_connpos[w+1]-wells.well_connpos[w];
|
||||
double flow_sum = 0.0;
|
||||
for(int i = 0; i < number_of_cells; i++) {
|
||||
flow_sum += flow_rates_per_cell[index_in_flow_rates++];
|
||||
}
|
||||
flow_rates_per_well.push_back(flow_sum);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace Opm
|
||||
|
@ -180,6 +180,9 @@ namespace Opm
|
||||
void computeWDP(const Wells& wells, const UnstructuredGrid& grid, const std::vector<double>& saturations,
|
||||
const std::vector<double>& densities, std::vector<double>& wdp);
|
||||
|
||||
void computeFlowRatePerWell(const Wells& wells, const std::vector<double>& flow_rates_per_cell,
|
||||
std::vector<double>& flow_rates_per_well);
|
||||
|
||||
/// Encapsulates the watercut curves.
|
||||
class Watercut
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user