mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Refactor of connecrions & completions
This commit is contained in:
parent
904665a10e
commit
94d57f686c
@ -161,8 +161,8 @@ namespace Opm
|
|||||||
// multi-phase flow model
|
// multi-phase flow model
|
||||||
WellSegment::MultiPhaseModelEnum multiphaseModel() const;
|
WellSegment::MultiPhaseModelEnum multiphaseModel() const;
|
||||||
|
|
||||||
// get the SegmentSet from the well_ecl_
|
// get the WellSegments from the well_ecl_
|
||||||
const SegmentSet& segmentSet() const;
|
const WellSegments& segmentSet() const;
|
||||||
|
|
||||||
// protected member variables from the Base class
|
// protected member variables from the Base class
|
||||||
using Base::well_ecl_;
|
using Base::well_ecl_;
|
||||||
|
@ -52,11 +52,11 @@ namespace Opm
|
|||||||
if (has_polymer) {
|
if (has_polymer) {
|
||||||
OPM_THROW(std::runtime_error, "polymer is not supported by multisegment well yet");
|
OPM_THROW(std::runtime_error, "polymer is not supported by multisegment well yet");
|
||||||
}
|
}
|
||||||
// since we decide to use the SegmentSet from the well parser. we can reuse a lot from it.
|
// since we decide to use the WellSegments from the well parser. we can reuse a lot from it.
|
||||||
// for other facilities needed but not available from parser, we need to process them here
|
// for other facilities needed but not available from parser, we need to process them here
|
||||||
|
|
||||||
// initialize the segment_perforations_
|
// initialize the segment_perforations_
|
||||||
const ConnectionSet& completion_set = well_ecl_->getConnections(current_step_);
|
const WellConnections& completion_set = well_ecl_->getConnections(current_step_);
|
||||||
for (int perf = 0; perf < number_of_perforations_; ++perf) {
|
for (int perf = 0; perf < number_of_perforations_; ++perf) {
|
||||||
const Connection& completion = completion_set.get(perf);
|
const Connection& completion = completion_set.get(perf);
|
||||||
const int segment_number = completion.getSegmentNumber();
|
const int segment_number = completion.getSegmentNumber();
|
||||||
@ -792,11 +792,11 @@ namespace Opm
|
|||||||
|
|
||||||
|
|
||||||
template <typename TypeTag>
|
template <typename TypeTag>
|
||||||
const SegmentSet&
|
const WellSegments&
|
||||||
MultisegmentWell<TypeTag>::
|
MultisegmentWell<TypeTag>::
|
||||||
segmentSet() const
|
segmentSet() const
|
||||||
{
|
{
|
||||||
return well_ecl_->getSegmentSet(current_step_);
|
return well_ecl_->getWellSegments(current_step_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -808,7 +808,7 @@ namespace Opm
|
|||||||
MultisegmentWell<TypeTag>::
|
MultisegmentWell<TypeTag>::
|
||||||
numberOfSegments() const
|
numberOfSegments() const
|
||||||
{
|
{
|
||||||
return segmentSet().numberSegment();
|
return segmentSet().size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -547,11 +547,11 @@ namespace Opm
|
|||||||
segrates_.push_back(wellRates()[np * w + p]);
|
segrates_.push_back(wellRates()[np * w + p]);
|
||||||
}
|
}
|
||||||
} else { // it is a multi-segment well
|
} else { // it is a multi-segment well
|
||||||
const SegmentSet& segment_set = well_ecl->getSegmentSet(time_step);
|
const WellSegments& segment_set = well_ecl->getWellSegments(time_step);
|
||||||
// assuming the order of the perforations in well_ecl is the same with Wells
|
// assuming the order of the perforations in well_ecl is the same with Wells
|
||||||
const ConnectionSet& completion_set = well_ecl->getConnections(time_step);
|
const WellConnections& completion_set = well_ecl->getConnections(time_step);
|
||||||
// number of segment for this single well
|
// number of segment for this single well
|
||||||
const int well_nseg = segment_set.numberSegment();
|
const int well_nseg = segment_set.size();
|
||||||
const int nperf = completion_set.size();
|
const int nperf = completion_set.size();
|
||||||
nseg_ += well_nseg;
|
nseg_ += well_nseg;
|
||||||
// we need to know for each segment, how many perforation it has and how many segments using it as outlet_segment
|
// we need to know for each segment, how many perforation it has and how many segments using it as outlet_segment
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include <opm/grid/utility/compressedToCartesian.hpp>
|
#include <opm/grid/utility/compressedToCartesian.hpp>
|
||||||
#include <opm/core/props/rock/RockFromDeck.hpp>
|
#include <opm/core/props/rock/RockFromDeck.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/ConnectionSet.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/WellConnections.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
Loading…
Reference in New Issue
Block a user