mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #4369 from akva2/wellsegments_hpp_include
add missing WellSegments.hpp includes
This commit is contained in:
commit
adda7e4a3c
@ -36,6 +36,7 @@
|
|||||||
#include <opm/input/eclipse/Schedule/Group/GuideRateConfig.hpp>
|
#include <opm/input/eclipse/Schedule/Group/GuideRateConfig.hpp>
|
||||||
#include <opm/input/eclipse/Schedule/MSW/SICD.hpp>
|
#include <opm/input/eclipse/Schedule/MSW/SICD.hpp>
|
||||||
#include <opm/input/eclipse/Schedule/MSW/Valve.hpp>
|
#include <opm/input/eclipse/Schedule/MSW/Valve.hpp>
|
||||||
|
#include <opm/input/eclipse/Schedule/MSW/WellSegments.hpp>
|
||||||
#include <opm/input/eclipse/Schedule/Network/Balance.hpp>
|
#include <opm/input/eclipse/Schedule/Network/Balance.hpp>
|
||||||
#include <opm/input/eclipse/Schedule/Network/ExtNetwork.hpp>
|
#include <opm/input/eclipse/Schedule/Network/ExtNetwork.hpp>
|
||||||
#include <opm/input/eclipse/Schedule/RFTConfig.hpp>
|
#include <opm/input/eclipse/Schedule/RFTConfig.hpp>
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include <opm/simulators/wells/BlackoilWellModelRestart.hpp>
|
#include <opm/simulators/wells/BlackoilWellModelRestart.hpp>
|
||||||
|
|
||||||
#include <opm/input/eclipse/Schedule/Group/GuideRateConfig.hpp>
|
#include <opm/input/eclipse/Schedule/Group/GuideRateConfig.hpp>
|
||||||
|
#include <opm/input/eclipse/Schedule/MSW/WellSegments.hpp>
|
||||||
|
|
||||||
#include <opm/output/data/Groups.hpp>
|
#include <opm/output/data/Groups.hpp>
|
||||||
|
|
||||||
|
@ -165,11 +165,6 @@ namespace Opm
|
|||||||
// regularize msw equation
|
// regularize msw equation
|
||||||
bool regularize_;
|
bool regularize_;
|
||||||
|
|
||||||
// components of the pressure drop to be included
|
|
||||||
WellSegments::CompPressureDrop compPressureDrop() const;
|
|
||||||
// multi-phase flow model
|
|
||||||
WellSegments::MultiPhaseModel multiphaseModel() const;
|
|
||||||
|
|
||||||
// the intial amount of fluids in each segment under surface condition
|
// the intial amount of fluids in each segment under surface condition
|
||||||
std::vector<std::vector<double> > segment_fluid_initial_;
|
std::vector<std::vector<double> > segment_fluid_initial_;
|
||||||
|
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
|
|
||||||
#include <opm/common/ErrorMacros.hpp>
|
#include <opm/common/ErrorMacros.hpp>
|
||||||
|
|
||||||
|
#include <opm/input/eclipse/Schedule/MSW/WellSegments.hpp>
|
||||||
|
|
||||||
#include <opm/simulators/linalg/bda/WellContributions.hpp>
|
#include <opm/simulators/linalg/bda/WellContributions.hpp>
|
||||||
#include <opm/simulators/linalg/istlsparsematrixadapter.hh>
|
#include <opm/simulators/linalg/istlsparsematrixadapter.hh>
|
||||||
#include <opm/simulators/linalg/matrixblock.hh>
|
#include <opm/simulators/linalg/matrixblock.hh>
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
|
|
||||||
#include <opm/simulators/wells/MultisegmentWellEval.hpp>
|
#include <opm/simulators/wells/MultisegmentWellEval.hpp>
|
||||||
|
|
||||||
|
#include <opm/input/eclipse/Schedule/MSW/WellSegments.hpp>
|
||||||
|
|
||||||
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
|
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
|
||||||
|
|
||||||
#include <opm/models/blackoil/blackoilindices.hh>
|
#include <opm/models/blackoil/blackoilindices.hh>
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include <opm/common/utility/numeric/RootFinders.hpp>
|
#include <opm/common/utility/numeric/RootFinders.hpp>
|
||||||
|
|
||||||
#include <opm/input/eclipse/Schedule/VFPInjTable.hpp>
|
#include <opm/input/eclipse/Schedule/VFPInjTable.hpp>
|
||||||
|
#include <opm/input/eclipse/Schedule/MSW/WellSegments.hpp>
|
||||||
|
|
||||||
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>
|
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>
|
||||||
#include <opm/simulators/wells/VFPHelpers.hpp>
|
#include <opm/simulators/wells/VFPHelpers.hpp>
|
||||||
@ -181,6 +182,27 @@ accelerationalPressureLossConsidered() const
|
|||||||
return (segmentSet().compPressureDrop() == WellSegments::CompPressureDrop::HFA);
|
return (segmentSet().compPressureDrop() == WellSegments::CompPressureDrop::HFA);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Scalar>
|
||||||
|
double
|
||||||
|
MultisegmentWellGeneric<Scalar>::getSegmentDp(const int seg,
|
||||||
|
const double density,
|
||||||
|
const std::vector<double>& seg_dp) const
|
||||||
|
{
|
||||||
|
const double segment_depth = this->segmentSet()[seg].depth();
|
||||||
|
const int outlet_segment_index = this->segmentNumberToIndex(this->segmentSet()[seg].outletSegment());
|
||||||
|
const double segment_depth_outlet = seg == 0 ? baseif_.refDepth() : this->segmentSet()[outlet_segment_index].depth();
|
||||||
|
double dp = wellhelpers::computeHydrostaticCorrection(segment_depth_outlet, segment_depth,
|
||||||
|
density, baseif_.gravity());
|
||||||
|
// we add the hydrostatic correction from the outlet segment
|
||||||
|
// in order to get the correction all the way to the bhp ref depth.
|
||||||
|
if (seg > 0) {
|
||||||
|
dp += seg_dp[outlet_segment_index];
|
||||||
|
}
|
||||||
|
|
||||||
|
return dp;
|
||||||
|
}
|
||||||
|
|
||||||
template class MultisegmentWellGeneric<double>;
|
template class MultisegmentWellGeneric<double>;
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
@ -22,8 +22,6 @@
|
|||||||
#ifndef OPM_MULTISEGMENTWELL_GENERIC_HEADER_INCLUDED
|
#ifndef OPM_MULTISEGMENTWELL_GENERIC_HEADER_INCLUDED
|
||||||
#define OPM_MULTISEGMENTWELL_GENERIC_HEADER_INCLUDED
|
#define OPM_MULTISEGMENTWELL_GENERIC_HEADER_INCLUDED
|
||||||
|
|
||||||
#include <opm/input/eclipse/Schedule/MSW/WellSegments.hpp>
|
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -35,6 +33,8 @@ namespace Opm
|
|||||||
class DeferredLogger;
|
class DeferredLogger;
|
||||||
class SummaryState;
|
class SummaryState;
|
||||||
class WellInterfaceGeneric;
|
class WellInterfaceGeneric;
|
||||||
|
enum class WellSegmentCompPressureDrop;
|
||||||
|
class WellSegments;
|
||||||
class WellState;
|
class WellState;
|
||||||
|
|
||||||
template <typename Scalar>
|
template <typename Scalar>
|
||||||
@ -61,7 +61,7 @@ protected:
|
|||||||
void scaleSegmentPressuresWithBhp(WellState& well_state) const;
|
void scaleSegmentPressuresWithBhp(WellState& well_state) const;
|
||||||
|
|
||||||
// components of the pressure drop to be included
|
// components of the pressure drop to be included
|
||||||
WellSegments::CompPressureDrop compPressureDrop() const;
|
WellSegmentCompPressureDrop compPressureDrop() const;
|
||||||
|
|
||||||
/// Detect oscillation or stagnation based on the residual measure history
|
/// Detect oscillation or stagnation based on the residual measure history
|
||||||
void detectOscillations(const std::vector<double>& measure_history,
|
void detectOscillations(const std::vector<double>& measure_history,
|
||||||
@ -72,6 +72,10 @@ protected:
|
|||||||
bool accelerationalPressureLossConsidered() const;
|
bool accelerationalPressureLossConsidered() const;
|
||||||
bool frictionalPressureLossConsidered() const;
|
bool frictionalPressureLossConsidered() const;
|
||||||
|
|
||||||
|
double getSegmentDp(const int seg,
|
||||||
|
const double density,
|
||||||
|
const std::vector<double>& seg_dp) const;
|
||||||
|
|
||||||
const WellInterfaceGeneric& baseif_;
|
const WellInterfaceGeneric& baseif_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <opm/simulators/wells/MultisegmentWellPrimaryVariables.hpp>
|
#include <opm/simulators/wells/MultisegmentWellPrimaryVariables.hpp>
|
||||||
|
|
||||||
|
#include <opm/input/eclipse/Schedule/MSW/WellSegments.hpp>
|
||||||
|
|
||||||
#include <opm/material/fluidsystems/BlackOilDefaultIndexTraits.hpp>
|
#include <opm/material/fluidsystems/BlackOilDefaultIndexTraits.hpp>
|
||||||
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
|
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include <opm/common/ErrorMacros.hpp>
|
#include <opm/common/ErrorMacros.hpp>
|
||||||
|
|
||||||
|
#include <opm/input/eclipse/Schedule/MSW/WellSegments.hpp>
|
||||||
#include <opm/input/eclipse/Schedule/Well/WellConnections.hpp>
|
#include <opm/input/eclipse/Schedule/Well/WellConnections.hpp>
|
||||||
|
|
||||||
#include <opm/material/densead/EvaluationFormat.hpp>
|
#include <opm/material/densead/EvaluationFormat.hpp>
|
||||||
|
@ -1246,20 +1246,12 @@ namespace Opm
|
|||||||
std::fill(this->ipr_b_.begin(), this->ipr_b_.end(), 0.);
|
std::fill(this->ipr_b_.begin(), this->ipr_b_.end(), 0.);
|
||||||
|
|
||||||
const int nseg = this->numberOfSegments();
|
const int nseg = this->numberOfSegments();
|
||||||
const double ref_depth = this->ref_depth_;
|
|
||||||
std::vector<double> seg_dp(nseg, 0.0);
|
std::vector<double> seg_dp(nseg, 0.0);
|
||||||
for (int seg = 0; seg < nseg; ++seg) {
|
for (int seg = 0; seg < nseg; ++seg) {
|
||||||
// calculating the perforation rate for each perforation that belongs to this segment
|
// calculating the perforation rate for each perforation that belongs to this segment
|
||||||
const double segment_depth = this->segmentSet()[seg].depth();
|
const double dp = this->getSegmentDp(seg,
|
||||||
const int outlet_segment_index = this->segmentNumberToIndex(this->segmentSet()[seg].outletSegment());
|
this->segments_.density(seg).value(),
|
||||||
const double segment_depth_outlet = seg == 0? ref_depth : this->segmentSet()[outlet_segment_index].depth();
|
seg_dp);
|
||||||
double dp = wellhelpers::computeHydrostaticCorrection(segment_depth_outlet, segment_depth,
|
|
||||||
this->segments_.density(seg).value(), this->gravity_);
|
|
||||||
// we add the hydrostatic correction from the outlet segment
|
|
||||||
// in order to get the correction all the way to the bhp ref depth.
|
|
||||||
if (seg > 0) {
|
|
||||||
dp += seg_dp[outlet_segment_index];
|
|
||||||
}
|
|
||||||
seg_dp[seg] = dp;
|
seg_dp[seg] = dp;
|
||||||
for (const int perf : this->segments_.perforations()[seg]) {
|
for (const int perf : this->segments_.perforations()[seg]) {
|
||||||
std::vector<Scalar> mob(this->num_components_, 0.0);
|
std::vector<Scalar> mob(this->num_components_, 0.0);
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include <opm/simulators/wells/WellState.hpp>
|
#include <opm/simulators/wells/WellState.hpp>
|
||||||
|
|
||||||
#include <opm/common/ErrorMacros.hpp>
|
#include <opm/common/ErrorMacros.hpp>
|
||||||
|
#include <opm/input/eclipse/Schedule/MSW/WellSegments.hpp>
|
||||||
#include <opm/input/eclipse/Schedule/Schedule.hpp>
|
#include <opm/input/eclipse/Schedule/Schedule.hpp>
|
||||||
#include <opm/input/eclipse/Schedule/Well/WellConnections.hpp>
|
#include <opm/input/eclipse/Schedule/Well/WellConnections.hpp>
|
||||||
|
|
||||||
|
@ -72,6 +72,7 @@
|
|||||||
#include <opm/input/eclipse/Schedule/MSW/AICD.hpp>
|
#include <opm/input/eclipse/Schedule/MSW/AICD.hpp>
|
||||||
#include <opm/input/eclipse/Schedule/MSW/SICD.hpp>
|
#include <opm/input/eclipse/Schedule/MSW/SICD.hpp>
|
||||||
#include <opm/input/eclipse/Schedule/MSW/Valve.hpp>
|
#include <opm/input/eclipse/Schedule/MSW/Valve.hpp>
|
||||||
|
#include <opm/input/eclipse/Schedule/MSW/WellSegments.hpp>
|
||||||
#include <opm/input/eclipse/Schedule/Network/Balance.hpp>
|
#include <opm/input/eclipse/Schedule/Network/Balance.hpp>
|
||||||
#include <opm/input/eclipse/Schedule/Network/ExtNetwork.hpp>
|
#include <opm/input/eclipse/Schedule/Network/ExtNetwork.hpp>
|
||||||
#include <opm/input/eclipse/Schedule/Network/Node.hpp>
|
#include <opm/input/eclipse/Schedule/Network/Node.hpp>
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
|
#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
|
||||||
#include <opm/input/eclipse/Parser/Parser.hpp>
|
#include <opm/input/eclipse/Parser/Parser.hpp>
|
||||||
#include <opm/input/eclipse/Parser/ParseContext.hpp>
|
#include <opm/input/eclipse/Parser/ParseContext.hpp>
|
||||||
|
#include <opm/input/eclipse/Schedule/MSW/WellSegments.hpp>
|
||||||
#include <opm/input/eclipse/Schedule/Schedule.hpp>
|
#include <opm/input/eclipse/Schedule/Schedule.hpp>
|
||||||
#include <opm/input/eclipse/Schedule/SummaryState.hpp>
|
#include <opm/input/eclipse/Schedule/SummaryState.hpp>
|
||||||
#include <opm/input/eclipse/Schedule/Well/WellConnections.hpp>
|
#include <opm/input/eclipse/Schedule/Well/WellConnections.hpp>
|
||||||
|
Loading…
Reference in New Issue
Block a user