diff --git a/opm/simulators/wells/MultisegmentWellEval.cpp b/opm/simulators/wells/MultisegmentWellEval.cpp index 503b7b37e..48ea0a530 100644 --- a/opm/simulators/wells/MultisegmentWellEval.cpp +++ b/opm/simulators/wells/MultisegmentWellEval.cpp @@ -213,12 +213,12 @@ assembleAccelerationPressureLoss(const int seg, const int seg_upwind = segments_.upwinding_segment(seg); // acceleration term is *subtracted* from pressure equation - MultisegmentWellAssemble(baseif_). + MultisegmentWellAssemble(baseif_). assembleAccelerationTerm(seg, seg, seg_upwind, signed_velocity_head, linSys_); if (seg != seg_upwind) {// special treatment for reverse flow // extra derivatives are *added* to Jacobian (hence minus) const EvalWell extra_derivatives = -segments_.accelerationPressureLossContribution(seg, seg_area, /*extra_derivatives*/ true); - MultisegmentWellAssemble(baseif_). + MultisegmentWellAssemble(baseif_). assemblePressureEqExtraDerivatives(seg, seg_upwind, extra_derivatives, linSys_); } @@ -230,13 +230,13 @@ assembleAccelerationPressureLoss(const int seg, segments.pressure_drop_accel[seg] -= signed_velocity_head_inlet.value(); const int inlet_upwind = segments_.upwinding_segment(inlet); - MultisegmentWellAssemble(baseif_). + MultisegmentWellAssemble(baseif_). assembleAccelerationTerm(seg, inlet, inlet_upwind, -signed_velocity_head_inlet, linSys_); if (inlet != inlet_upwind) {// special treatment for reverse flow // extra derivatives are *added* to Jacobian (hence minus minus) const EvalWell extra_derivatives_inlet = segments_.accelerationPressureLossContribution(inlet, inlet_area, /*extra_derivatives*/ true); // in this case inlet_upwind = seg - MultisegmentWellAssemble(baseif_). + MultisegmentWellAssemble(baseif_). assemblePressureEqExtraDerivatives(seg, inlet_upwind, extra_derivatives_inlet, linSys_); } } @@ -271,7 +271,7 @@ assembleDefaultPressureEq(const int seg, if (reverseFlow){ // call function once again to obtain/assemble remaining derivatives extra_derivatives = -segments_.getFrictionPressureLoss(seg, /*extra_reverse_flow_derivatives*/ true); - MultisegmentWellAssemble(baseif_). + MultisegmentWellAssemble(baseif_). assemblePressureEqExtraDerivatives(seg, seg_upwind, extra_derivatives, linSys_); } pressure_equation -= friction_pressure_drop; @@ -282,7 +282,7 @@ assembleDefaultPressureEq(const int seg, const int outlet_segment_index = this->segmentNumberToIndex(this->segmentSet()[seg].outletSegment()); const EvalWell outlet_pressure = primary_variables_.getSegmentPressure(outlet_segment_index); - MultisegmentWellAssemble(baseif_). + MultisegmentWellAssemble(baseif_). assemblePressureEq(seg, seg_upwind, outlet_segment_index, pressure_equation, outlet_pressure, linSys_); @@ -306,7 +306,7 @@ assembleICDPressureEq(const int seg, if (const auto& segment = this->segmentSet()[seg]; (segment.segmentType() == Segment::SegmentType::VALVE) && (segment.valve().status() == Opm::ICDStatus::SHUT) ) { // we use a zero rate equation to handle SHUT valve - MultisegmentWellAssemble(baseif_). + MultisegmentWellAssemble(baseif_). assembleTrivialEq(seg, this->primary_variables_.eval(seg)[WQTotal].value(), linSys_); auto& ws = well_state.well(baseif_.indexOfWell()); @@ -352,9 +352,8 @@ assembleICDPressureEq(const int seg, } } if (reverseFlow){ - MultisegmentWellAssemble(baseif_). + MultisegmentWellAssemble(baseif_). assemblePressureEqExtraDerivatives(seg, seg_upwind, extra_derivatives, linSys_); - } pressure_equation = pressure_equation - icd_pressure_drop; @@ -365,7 +364,7 @@ assembleICDPressureEq(const int seg, const int outlet_segment_index = this->segmentNumberToIndex(this->segmentSet()[seg].outletSegment()); const EvalWell outlet_pressure = primary_variables_.getSegmentPressure(outlet_segment_index); - MultisegmentWellAssemble(baseif_). + MultisegmentWellAssemble(baseif_). assemblePressureEq(seg, seg_upwind, outlet_segment_index, pressure_equation, outlet_pressure, linSys_, @@ -392,15 +391,15 @@ assembleAccelerationAndHydroPressureLosses(const int seg, auto& ws = well_state.well(baseif_.indexOfWell()); auto& segments = ws.segments; if (!use_average_density){ - MultisegmentWellAssemble(baseif_). + MultisegmentWellAssemble(baseif_). assembleHydroPressureLoss(seg, seg, hydro_pressure_drop_seg, linSys_); segments.pressure_drop_hydrostatic[seg] = hydro_pressure_drop_seg.value(); } else { const int seg_outlet = this->segmentNumberToIndex(this->segmentSet()[seg].outletSegment()); const auto hydro_pressure_drop_outlet = segments_.getHydroPressureLoss(seg, seg_outlet); - MultisegmentWellAssemble(baseif_). + MultisegmentWellAssemble(baseif_). assembleHydroPressureLoss(seg, seg, 0.5*hydro_pressure_drop_seg, linSys_); - MultisegmentWellAssemble(baseif_). + MultisegmentWellAssemble(baseif_). assembleHydroPressureLoss(seg, seg_outlet, 0.5*hydro_pressure_drop_outlet, linSys_); segments.pressure_drop_hydrostatic[seg] = 0.5*hydro_pressure_drop_seg.value() + 0.5*hydro_pressure_drop_outlet.value(); } diff --git a/opm/simulators/wells/MultisegmentWell_impl.hpp b/opm/simulators/wells/MultisegmentWell_impl.hpp index 9c00b93fb..d0cef145a 100644 --- a/opm/simulators/wells/MultisegmentWell_impl.hpp +++ b/opm/simulators/wells/MultisegmentWell_impl.hpp @@ -1815,7 +1815,7 @@ namespace Opm for (int comp_idx = 0; comp_idx < this->num_components_; ++comp_idx) { const EvalWell accumulation_term = regularization_factor * (segment_surface_volume * this->primary_variables_.surfaceVolumeFraction(seg, comp_idx) - segment_fluid_initial_[seg][comp_idx]) / dt; - MultisegmentWellAssemble(*this). + MultisegmentWellAssemble(*this). assembleAccumulationTerm(seg, comp_idx, accumulation_term, this->linSys_); } } @@ -1828,7 +1828,7 @@ namespace Opm seg_upwind, comp_idx) * this->well_efficiency_factor_; - MultisegmentWellAssemble(*this). + MultisegmentWellAssemble(*this). assembleOutflowTerm(seg, seg_upwind, comp_idx, segment_rate, this->linSys_); } } @@ -1843,7 +1843,7 @@ namespace Opm inlet_upwind, comp_idx) * this->well_efficiency_factor_; - MultisegmentWellAssemble(*this). + MultisegmentWellAssemble(*this). assembleInflowTerm(seg, inlet, inlet_upwind, comp_idx, inlet_rate, this->linSys_); } } @@ -1888,7 +1888,7 @@ namespace Opm this->connectionRates_[perf][comp_idx] = Base::restrictEval(cq_s_effective); - MultisegmentWellAssemble(*this). + MultisegmentWellAssemble(*this). assemblePerforationEq(seg, cell_idx, comp_idx, cq_s_effective, this->linSys_); } } @@ -1897,7 +1897,7 @@ namespace Opm if (seg == 0) { // top segment, pressure equation is the control equation const auto& summaryState = ebosSimulator.vanguard().summaryState(); const Schedule& schedule = ebosSimulator.vanguard().schedule(); - MultisegmentWellAssemble(*this). + MultisegmentWellAssemble(*this). assembleControlEq(well_state, group_state, schedule,