mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Use Well index for perf skin pressure
This commit is contained in:
parent
89ae75b46c
commit
8f9a3f0140
@ -1306,7 +1306,7 @@ namespace Opm
|
|||||||
if constexpr (Base::has_polymermw) {
|
if constexpr (Base::has_polymermw) {
|
||||||
if (this->isInjector()) {
|
if (this->isInjector()) {
|
||||||
auto * perf_water_velocity = &well_state.perfWaterVelocity()[this->first_perf_];
|
auto * perf_water_velocity = &well_state.perfWaterVelocity()[this->first_perf_];
|
||||||
auto * perf_skin_pressure = &well_state.perfSkinPressure()[this->first_perf_];
|
auto * perf_skin_pressure = well_state.perfSkinPressure(this->index_of_well_);
|
||||||
for (int perf = 0; perf < number_of_perforations_; ++perf) {
|
for (int perf = 0; perf < number_of_perforations_; ++perf) {
|
||||||
perf_water_velocity[perf] = primary_variables_[Bhp + 1 + perf];
|
perf_water_velocity[perf] = primary_variables_[Bhp + 1 + perf];
|
||||||
perf_skin_pressure[perf] = primary_variables_[Bhp + 1 + number_of_perforations_ + perf];
|
perf_skin_pressure[perf] = primary_variables_[Bhp + 1 + number_of_perforations_ + perf];
|
||||||
@ -2834,7 +2834,7 @@ namespace Opm
|
|||||||
if constexpr (Base::has_polymermw) {
|
if constexpr (Base::has_polymermw) {
|
||||||
if (this->isInjector()) {
|
if (this->isInjector()) {
|
||||||
const auto * water_velocity = &well_state.perfWaterVelocity()[first_perf_];
|
const auto * water_velocity = &well_state.perfWaterVelocity()[first_perf_];
|
||||||
const auto * skin_pressure = &well_state.perfSkinPressure()[first_perf_];
|
const auto * skin_pressure = well_state.perfSkinPressure(this->index_of_well_);
|
||||||
for (int perf = 0; perf < number_of_perforations_; ++perf) {
|
for (int perf = 0; perf < number_of_perforations_; ++perf) {
|
||||||
primary_variables_[Bhp + 1 + perf] = water_velocity[perf];
|
primary_variables_[Bhp + 1 + perf] = water_velocity[perf];
|
||||||
primary_variables_[Bhp + 1 + number_of_perforations_ + perf] = skin_pressure[perf];
|
primary_variables_[Bhp + 1 + number_of_perforations_ + perf] = skin_pressure[perf];
|
||||||
|
@ -481,11 +481,11 @@ void WellState::init(const std::vector<double>& cellPressures,
|
|||||||
if (global_num_perf_same)
|
if (global_num_perf_same)
|
||||||
{
|
{
|
||||||
auto * throughput_target = this->perfThroughput(newIndex);
|
auto * throughput_target = this->perfThroughput(newIndex);
|
||||||
auto * pressure_target = &perf_skin_pressure_[connpos];
|
auto * pressure_target = this->perfSkinPressure(newIndex);
|
||||||
auto * velocity_target = &perf_water_velocity_[connpos];
|
auto * velocity_target = &perf_water_velocity_[connpos];
|
||||||
|
|
||||||
const auto * throughput_src = prevState->perfThroughput(oldIndex);
|
const auto * throughput_src = prevState->perfThroughput(oldIndex);
|
||||||
const auto * pressure_src = &prevState->perfSkinPressure()[oldPerf_idx_beg];
|
const auto * pressure_src = prevState->perfSkinPressure(oldIndex);
|
||||||
const auto * velocity_src = &prevState->perfWaterVelocity()[oldPerf_idx_beg];
|
const auto * velocity_src = &prevState->perfWaterVelocity()[oldPerf_idx_beg];
|
||||||
|
|
||||||
for (int perf = 0; perf < num_perf_this_well; ++perf)
|
for (int perf = 0; perf < num_perf_this_well; ++perf)
|
||||||
|
@ -246,12 +246,12 @@ public:
|
|||||||
return &perf_water_throughput_[this->first_perf_index_[well_index]];
|
return &perf_water_throughput_[this->first_perf_index_[well_index]];
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<double>& perfSkinPressure() {
|
double * perfSkinPressure(std::size_t well_index) {
|
||||||
return perf_skin_pressure_;
|
return &perf_skin_pressure_[this->first_perf_index_[well_index]];
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<double>& perfSkinPressure() const {
|
const double * perfSkinPressure(std::size_t well_index) const {
|
||||||
return perf_skin_pressure_;
|
return &perf_skin_pressure_[this->first_perf_index_[well_index]];
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<double>& perfWaterVelocity() {
|
std::vector<double>& perfWaterVelocity() {
|
||||||
|
Loading…
Reference in New Issue
Block a user