mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Move reportConnections
This commit is contained in:
parent
5b86ecd3e2
commit
6ac9e722fc
@ -166,30 +166,6 @@ void WellState::updateStatus(int well_index, Well::Status status)
|
||||
}
|
||||
|
||||
|
||||
void WellState::reportConnections(data::Well& well,
|
||||
const PhaseUsage&,
|
||||
const WellMapType::value_type& itr,
|
||||
const int* globalCellIdxMap) const
|
||||
{
|
||||
const auto well_index = itr.second[ 0 ];
|
||||
const auto& pd = this->well_perf_data_[well_index];
|
||||
const int num_perf_well = pd.size();
|
||||
well.connections.resize(num_perf_well);
|
||||
|
||||
const auto& perf_rates = this->perfRates(well_index);
|
||||
const auto& perf_pressure = this->perfPress(well_index);
|
||||
for( int i = 0; i < num_perf_well; ++i ) {
|
||||
const auto active_index = this->well_perf_data_[well_index][i].cell_index;
|
||||
auto& connection = well.connections[ i ];
|
||||
connection.index = globalCellIdxMap[active_index];
|
||||
connection.pressure = perf_pressure[i];
|
||||
connection.reservoir_rate = perf_rates[i];
|
||||
connection.trans_factor = pd[i].connection_transmissibility_factor;
|
||||
}
|
||||
assert(num_perf_well == int(well.connections.size()));
|
||||
}
|
||||
|
||||
|
||||
void WellState::initSingleWell(const std::vector<double>& cellPressures,
|
||||
const int w,
|
||||
const Well& well,
|
||||
|
@ -145,10 +145,6 @@ public:
|
||||
|
||||
void updateStatus(int well_index, Well::Status status);
|
||||
|
||||
virtual void reportConnections(data::Well& well, const PhaseUsage&,
|
||||
const WellMapType::value_type& itr,
|
||||
const int* globalCellIdxMap) const;
|
||||
|
||||
protected:
|
||||
WellContainer<Well::Status> status_;
|
||||
WellContainer<std::vector<PerforationData>> well_perf_data_;
|
||||
|
@ -550,7 +550,24 @@ void WellStateFullyImplicitBlackoil::reportConnections(data::Well& well,
|
||||
const int* globalCellIdxMap) const
|
||||
{
|
||||
using rt = data::Rates::opt;
|
||||
WellState::reportConnections(well, pu, wt, globalCellIdxMap);
|
||||
const auto well_index = wt.second[ 0 ];
|
||||
const auto& pd = this->well_perf_data_[well_index];
|
||||
const int num_perf_well = pd.size();
|
||||
well.connections.resize(num_perf_well);
|
||||
|
||||
const auto& perf_rates = this->perfRates(well_index);
|
||||
const auto& perf_pressure = this->perfPress(well_index);
|
||||
for( int i = 0; i < num_perf_well; ++i ) {
|
||||
const auto active_index = this->well_perf_data_[well_index][i].cell_index;
|
||||
auto& connection = well.connections[ i ];
|
||||
connection.index = globalCellIdxMap[active_index];
|
||||
connection.pressure = perf_pressure[i];
|
||||
connection.reservoir_rate = perf_rates[i];
|
||||
connection.trans_factor = pd[i].connection_transmissibility_factor;
|
||||
}
|
||||
assert(num_perf_well == int(well.connections.size()));
|
||||
|
||||
|
||||
const int np = pu.num_phases;
|
||||
size_t local_comp_index = 0;
|
||||
std::vector< rt > phs( np );
|
||||
|
@ -127,7 +127,7 @@ public:
|
||||
|
||||
void reportConnections(data::Well& well, const PhaseUsage &pu,
|
||||
const WellMapType::value_type& wt,
|
||||
const int* globalCellIdxMap) const override;
|
||||
const int* globalCellIdxMap) const;
|
||||
|
||||
/// init the MS well related.
|
||||
void initWellStateMSWell(const std::vector<Well>& wells_ecl,
|
||||
|
Loading…
Reference in New Issue
Block a user