mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Suppress warnings in the multisegment well code.
This commit is contained in:
parent
d7900d4fe8
commit
15fd5dad47
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include <dune/common/version.hh>
|
#include <dune/common/version.hh>
|
||||||
|
|
||||||
#include <opm/core/utility/platform_dependent/disable_warnings.h>
|
#include <opm/common/utility/platform_dependent/disable_warnings.h>
|
||||||
|
|
||||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 3)
|
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 3)
|
||||||
#include <dune/common/parallel/mpihelper.hh>
|
#include <dune/common/parallel/mpihelper.hh>
|
||||||
@ -43,7 +43,7 @@
|
|||||||
#undef USE_DUNE_CORNERPOINTGRID
|
#undef USE_DUNE_CORNERPOINTGRID
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <opm/core/utility/platform_dependent/reenable_warnings.h>
|
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
|
||||||
|
|
||||||
#include <opm/core/pressure/FlowBCManager.hpp>
|
#include <opm/core/pressure/FlowBCManager.hpp>
|
||||||
|
|
||||||
|
@ -100,15 +100,6 @@ namespace Opm {
|
|||||||
ReservoirState& reservoir_state,
|
ReservoirState& reservoir_state,
|
||||||
WellState& well_state);
|
WellState& well_state);
|
||||||
|
|
||||||
/// Called once after each time step.
|
|
||||||
/// In this class, this function does nothing.
|
|
||||||
/// \param[in] dt time step size
|
|
||||||
/// \param[in, out] reservoir_state reservoir state variables
|
|
||||||
/// \param[in, out] well_state well state variables
|
|
||||||
void afterStep(const double dt,
|
|
||||||
ReservoirState& reservoir_state,
|
|
||||||
WellState& well_state) {};
|
|
||||||
|
|
||||||
|
|
||||||
/// Assemble the residual and Jacobian of the nonlinear system.
|
/// Assemble the residual and Jacobian of the nonlinear system.
|
||||||
/// \param[in] reservoir_state reservoir state variables
|
/// \param[in] reservoir_state reservoir state variables
|
||||||
|
@ -96,7 +96,7 @@ namespace Opm {
|
|||||||
BlackoilMultiSegmentModel<Grid>::
|
BlackoilMultiSegmentModel<Grid>::
|
||||||
prepareStep(const double dt,
|
prepareStep(const double dt,
|
||||||
ReservoirState& reservoir_state,
|
ReservoirState& reservoir_state,
|
||||||
WellState& well_state)
|
WellState& /* well_state */)
|
||||||
{
|
{
|
||||||
pvdt_ = geo_.poreVolume() / dt;
|
pvdt_ = geo_.poreVolume() / dt;
|
||||||
if (active_[Gas]) {
|
if (active_[Gas]) {
|
||||||
@ -208,14 +208,15 @@ namespace Opm {
|
|||||||
well_cells.reserve(nperf);
|
well_cells.reserve(nperf);
|
||||||
for (int i = 0; i < nw; ++i) {
|
for (int i = 0; i < nw; ++i) {
|
||||||
const std::vector<int>& temp_well_cells = wellsMultiSegment()[i]->wellCells();
|
const std::vector<int>& temp_well_cells = wellsMultiSegment()[i]->wellCells();
|
||||||
|
const int num_cells_this_well = temp_well_cells.size();
|
||||||
const int n_current = well_cells.size();
|
const int n_current = well_cells.size();
|
||||||
if (wellsMultiSegment()[i]->isMultiSegmented()) {
|
if (wellsMultiSegment()[i]->isMultiSegmented()) {
|
||||||
for (int j = 0; j < temp_well_cells.size(); ++j) {
|
for (int j = 0; j < num_cells_this_well; ++j) {
|
||||||
well_cells_segmented_idx.push_back(j + n_current);
|
well_cells_segmented_idx.push_back(j + n_current);
|
||||||
}
|
}
|
||||||
well_cells_segmented.insert(well_cells_segmented.end(), temp_well_cells.begin(), temp_well_cells.end());
|
well_cells_segmented.insert(well_cells_segmented.end(), temp_well_cells.begin(), temp_well_cells.end());
|
||||||
} else {
|
} else {
|
||||||
for (int j = 0; j < temp_well_cells.size(); ++j) {
|
for (int j = 0; j < num_cells_this_well; ++j) {
|
||||||
well_cells_non_segmented_idx.push_back(j + n_current);
|
well_cells_non_segmented_idx.push_back(j + n_current);
|
||||||
}
|
}
|
||||||
well_cells_non_segmented.insert(well_cells_non_segmented.end(), temp_well_cells.begin(), temp_well_cells.end());
|
well_cells_non_segmented.insert(well_cells_non_segmented.end(), temp_well_cells.begin(), temp_well_cells.end());
|
||||||
@ -477,7 +478,7 @@ namespace Opm {
|
|||||||
well_cells.insert(well_cells.end(), temp_well_cells.begin(), temp_well_cells.end());
|
well_cells.insert(well_cells.end(), temp_well_cells.begin(), temp_well_cells.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(nperf == well_cells.size());
|
assert(nperf == int(well_cells.size()));
|
||||||
|
|
||||||
std::vector<ADB> mob_perfcells(np, ADB::null());
|
std::vector<ADB> mob_perfcells(np, ADB::null());
|
||||||
std::vector<ADB> b_perfcells(np, ADB::null());
|
std::vector<ADB> b_perfcells(np, ADB::null());
|
||||||
@ -526,7 +527,7 @@ namespace Opm {
|
|||||||
well_cells.insert(well_cells.end(), well->wellCells().begin(), well->wellCells().end());
|
well_cells.insert(well_cells.end(), well->wellCells().begin(), well->wellCells().end());
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(well_cells.size() == nperf);
|
assert(int(well_cells.size()) == nperf);
|
||||||
|
|
||||||
for (int phase = 0; phase < np; ++phase) {
|
for (int phase = 0; phase < np; ++phase) {
|
||||||
residual_.material_balance_eq[phase] -= superset(cq_s[phase], well_cells, nc);
|
residual_.material_balance_eq[phase] -= superset(cq_s[phase], well_cells, nc);
|
||||||
@ -794,7 +795,7 @@ namespace Opm {
|
|||||||
|
|
||||||
template <class Grid>
|
template <class Grid>
|
||||||
void BlackoilMultiSegmentModel<Grid>::updatePerfPhaseRatesAndPressures(const std::vector<ADB>& cq_s,
|
void BlackoilMultiSegmentModel<Grid>::updatePerfPhaseRatesAndPressures(const std::vector<ADB>& cq_s,
|
||||||
const SolutionState& state,
|
const SolutionState& /* state */,
|
||||||
WellState& xw)
|
WellState& xw)
|
||||||
{
|
{
|
||||||
// Update the perforation phase rates (used to calculate the pressure drop in the wellbore).
|
// Update the perforation phase rates (used to calculate the pressure drop in the wellbore).
|
||||||
@ -948,10 +949,11 @@ namespace Opm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (int debug = 0) {
|
#if 0
|
||||||
std::cout << " xw.bhp() is " << xw.bhp()[w] << std::endl;
|
// Debug output
|
||||||
std::cout << " ctrl_index " << ctrl_index << " nwc " << nwc << std::endl;
|
std::cout << " xw.bhp() is " << xw.bhp()[w] << std::endl;
|
||||||
}
|
std::cout << " ctrl_index " << ctrl_index << " nwc " << nwc << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (ctrl_index != nwc) {
|
if (ctrl_index != nwc) {
|
||||||
// Constraint number ctrl_index was broken, switch to it.
|
// Constraint number ctrl_index was broken, switch to it.
|
||||||
@ -1046,7 +1048,7 @@ namespace Opm {
|
|||||||
template <class Grid>
|
template <class Grid>
|
||||||
void BlackoilMultiSegmentModel<Grid>::addWellControlEq(const SolutionState& state,
|
void BlackoilMultiSegmentModel<Grid>::addWellControlEq(const SolutionState& state,
|
||||||
const WellState& xw,
|
const WellState& xw,
|
||||||
const V& aliveWells)
|
const V& /* aliveWells */)
|
||||||
{
|
{
|
||||||
// the name of the function is a a little misleading.
|
// the name of the function is a a little misleading.
|
||||||
// Basically it is the function for the pressure equation.
|
// Basically it is the function for the pressure equation.
|
||||||
@ -1156,39 +1158,40 @@ namespace Opm {
|
|||||||
start_segment += nseg;
|
start_segment += nseg;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (int debug = 0) {
|
#if 0
|
||||||
std::cout << "output bhp_targets " << std::endl;
|
// Debug output.
|
||||||
for (int i = 0; i < nw; ++i) {
|
std::cout << "output bhp_targets " << std::endl;
|
||||||
std::cout << i << " " << bhp_targets(i) << std::endl;
|
for (int i = 0; i < nw; ++i) {
|
||||||
}
|
std::cout << i << " " << bhp_targets(i) << std::endl;
|
||||||
std::cout << " bhp_well_elems " << std::endl;
|
|
||||||
std::cout << " the size of bhp_well_elems is " << bhp_well_elems.size() << std::endl;
|
|
||||||
for (int i = 0; i < bhp_well_elems.size(); ++i) {
|
|
||||||
std::cout << " bhp_well_elems " << i << " is " << bhp_well_elems[i] << std::endl;
|
|
||||||
}
|
|
||||||
std::cout << " rate_well_elems " << std::endl;
|
|
||||||
std::cout << " the size of rate_well_elems is " << rate_well_elems.size() << std::endl;
|
|
||||||
for (int i = 0; i < rate_well_elems.size(); ++i) {
|
|
||||||
std::cout << " rate_well_elems " << i << " is " << rate_well_elems[i] << std::endl;
|
|
||||||
}
|
|
||||||
std::cout << " bhp_top_elems " << std::endl;
|
|
||||||
std::cout << " the size of bhp_top_elems is " << bhp_top_elems.size() << std::endl;
|
|
||||||
for (int i = 0; i < bhp_top_elems.size(); ++i) {
|
|
||||||
std::cout << " bhp_top_elems " << i << " is " << bhp_top_elems[i] << std::endl;
|
|
||||||
}
|
|
||||||
std::cout << " rate_top_elems " << std::endl;
|
|
||||||
std::cout << " the size of the rate_top_elems " << rate_top_elems.size() << std::endl;
|
|
||||||
for (int i = 0; i < rate_top_elems.size(); ++i) {
|
|
||||||
std::cout << " rate_top_elems " << i << " is " << rate_top_elems[i] << std::endl;
|
|
||||||
}
|
|
||||||
std::cout << " the others_elems " << std::endl;
|
|
||||||
std::cout << " the size of others_elems is " << others_elems.size() << std::endl;
|
|
||||||
for(int i = 0; i < others_elems.size(); ++i) {
|
|
||||||
std::cout << "others_elems " << i << " is " << others_elems[i] << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cin.ignore();
|
|
||||||
}
|
}
|
||||||
|
std::cout << " bhp_well_elems " << std::endl;
|
||||||
|
std::cout << " the size of bhp_well_elems is " << bhp_well_elems.size() << std::endl;
|
||||||
|
for (size_t i = 0; i < bhp_well_elems.size(); ++i) {
|
||||||
|
std::cout << " bhp_well_elems " << i << " is " << bhp_well_elems[i] << std::endl;
|
||||||
|
}
|
||||||
|
std::cout << " rate_well_elems " << std::endl;
|
||||||
|
std::cout << " the size of rate_well_elems is " << rate_well_elems.size() << std::endl;
|
||||||
|
for (size_t i = 0; i < rate_well_elems.size(); ++i) {
|
||||||
|
std::cout << " rate_well_elems " << i << " is " << rate_well_elems[i] << std::endl;
|
||||||
|
}
|
||||||
|
std::cout << " bhp_top_elems " << std::endl;
|
||||||
|
std::cout << " the size of bhp_top_elems is " << bhp_top_elems.size() << std::endl;
|
||||||
|
for (size_t i = 0; i < bhp_top_elems.size(); ++i) {
|
||||||
|
std::cout << " bhp_top_elems " << i << " is " << bhp_top_elems[i] << std::endl;
|
||||||
|
}
|
||||||
|
std::cout << " rate_top_elems " << std::endl;
|
||||||
|
std::cout << " the size of the rate_top_elems " << rate_top_elems.size() << std::endl;
|
||||||
|
for (size_t i = 0; i < rate_top_elems.size(); ++i) {
|
||||||
|
std::cout << " rate_top_elems " << i << " is " << rate_top_elems[i] << std::endl;
|
||||||
|
}
|
||||||
|
std::cout << " the others_elems " << std::endl;
|
||||||
|
std::cout << " the size of others_elems is " << others_elems.size() << std::endl;
|
||||||
|
for(size_t i = 0; i < others_elems.size(); ++i) {
|
||||||
|
std::cout << "others_elems " << i << " is " << others_elems[i] << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cin.ignore();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// for each segment: 1, if the segment is the top segment, then control equation
|
// for each segment: 1, if the segment is the top segment, then control equation
|
||||||
@ -1486,10 +1489,10 @@ namespace Opm {
|
|||||||
template <class Grid>
|
template <class Grid>
|
||||||
void
|
void
|
||||||
BlackoilMultiSegmentModel<Grid>::updateWellState(const V& dwells,
|
BlackoilMultiSegmentModel<Grid>::updateWellState(const V& dwells,
|
||||||
WellState& well_state)
|
WellState& well_state)
|
||||||
{
|
{
|
||||||
|
|
||||||
if( !wellsMultiSegment().empty() )
|
if (!wellsMultiSegment().empty())
|
||||||
{
|
{
|
||||||
const int np = numPhases();
|
const int np = numPhases();
|
||||||
const int nw = wellsMultiSegment().size();
|
const int nw = wellsMultiSegment().size();
|
||||||
@ -1549,56 +1552,56 @@ namespace Opm {
|
|||||||
// TODO: handling the THP control related.
|
// TODO: handling the THP control related.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (int debug = 0) {
|
#if 0
|
||||||
std::cout << " output all the well state informations after updateWellState()" << std::endl;
|
// Debug output.
|
||||||
const int np = well_state.numberOfPhases();
|
std::cout << " output all the well state informations after updateWellState()" << std::endl;
|
||||||
const int nw = well_state.numberOfWells();
|
const int np = well_state.numberOfPhases();
|
||||||
const int nperf_total = well_state.numberOfPerforations();
|
const int nw = well_state.numberOfWells();
|
||||||
const int nseg_total = well_state.numberOfSegments();
|
const int nperf_total = well_state.numberOfPerforations();
|
||||||
|
const int nseg_total = well_state.numberOfSegments();
|
||||||
|
|
||||||
std::cout << " number of wells : " << nw << " nubmer of segments : " << nseg_total << std::endl;
|
std::cout << " number of wells : " << nw << " nubmer of segments : " << nseg_total << std::endl;
|
||||||
std::cout << " number of phase : " << np << " nubmer of perforations " << nperf_total << std::endl;
|
std::cout << " number of phase : " << np << " nubmer of perforations " << nperf_total << std::endl;
|
||||||
|
|
||||||
std::cout << " bhps : " << std::endl;
|
std::cout << " bhps : " << std::endl;
|
||||||
for (int i = 0; i < nw; ++i) {
|
for (int i = 0; i < nw; ++i) {
|
||||||
std::cout << well_state.bhp()[i] << std::endl;
|
std::cout << well_state.bhp()[i] << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << " thps : " << std::endl;
|
std::cout << " thps : " << std::endl;
|
||||||
|
|
||||||
for (int i = 0; i < nw; ++i) {
|
for (int i = 0; i < nw; ++i) {
|
||||||
std::cout << well_state.thp()[i] << std::endl;
|
std::cout << well_state.thp()[i] << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << " well rates " << std::endl;
|
std::cout << " well rates " << std::endl;
|
||||||
for (int i = 0; i < nw; ++i) {
|
for (int i = 0; i < nw; ++i) {
|
||||||
std::cout << i;
|
std::cout << i;
|
||||||
for (int p = 0; p < np; ++p) {
|
for (int p = 0; p < np; ++p) {
|
||||||
std::cout << " " << well_state.wellRates()[np * i + p];
|
std::cout << " " << well_state.wellRates()[np * i + p];
|
||||||
}
|
|
||||||
std::cout << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << " segment pressures and segment phase rates : " << std::endl;
|
|
||||||
for (int i = 0; i < nseg_total; ++i) {
|
|
||||||
std::cout << i << " " << well_state.segPress()[i];
|
|
||||||
for (int p = 0; p < np; ++p) {
|
|
||||||
std::cout << " " << well_state.segPhaseRates()[np * i + p];
|
|
||||||
}
|
|
||||||
std::cout << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << " perf pressures and pref phase rates : " << std::endl;
|
|
||||||
for (int i = 0; i < nperf_total; ++i) {
|
|
||||||
std::cout << i << " " << well_state.perfPress()[i];
|
|
||||||
for (int p = 0; p < np; ++p) {
|
|
||||||
std::cout << " " << well_state.perfPhaseRates()[np * i + p];
|
|
||||||
}
|
|
||||||
std::cout << std::endl;
|
|
||||||
}
|
|
||||||
std::cout << " output all the well state informations after updateWellState() DONE!!!!" << std::endl;
|
|
||||||
}
|
}
|
||||||
|
std::cout << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << " segment pressures and segment phase rates : " << std::endl;
|
||||||
|
for (int i = 0; i < nseg_total; ++i) {
|
||||||
|
std::cout << i << " " << well_state.segPress()[i];
|
||||||
|
for (int p = 0; p < np; ++p) {
|
||||||
|
std::cout << " " << well_state.segPhaseRates()[np * i + p];
|
||||||
|
}
|
||||||
|
std::cout << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << " perf pressures and pref phase rates : " << std::endl;
|
||||||
|
for (int i = 0; i < nperf_total; ++i) {
|
||||||
|
std::cout << i << " " << well_state.perfPress()[i];
|
||||||
|
for (int p = 0; p < np; ++p) {
|
||||||
|
std::cout << " " << well_state.perfPhaseRates()[np * i + p];
|
||||||
|
}
|
||||||
|
std::cout << std::endl;
|
||||||
|
}
|
||||||
|
std::cout << " output all the well state informations after updateWellState() DONE!!!!" << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1738,7 +1741,7 @@ namespace Opm {
|
|||||||
|
|
||||||
template <class Grid>
|
template <class Grid>
|
||||||
void
|
void
|
||||||
BlackoilMultiSegmentModel<Grid>::computeSegmentDensities(const SolutionState& state,
|
BlackoilMultiSegmentModel<Grid>::computeSegmentDensities(const SolutionState& /* state */,
|
||||||
const std::vector<ADB>& cq_s,
|
const std::vector<ADB>& cq_s,
|
||||||
const std::vector<ADB>& b_perf,
|
const std::vector<ADB>& b_perf,
|
||||||
const WellState& xw)
|
const WellState& xw)
|
||||||
@ -1753,7 +1756,7 @@ namespace Opm {
|
|||||||
const int nseg_total = xw.numberOfSegments();
|
const int nseg_total = xw.numberOfSegments();
|
||||||
const int np = numPhases();
|
const int np = numPhases();
|
||||||
|
|
||||||
assert(np == b_perf.size());
|
assert(np == int(b_perf.size()));
|
||||||
|
|
||||||
well_segment_densities_ = ADB::constant(V::Zero(nseg_total)); // initialize to be zero
|
well_segment_densities_ = ADB::constant(V::Zero(nseg_total)); // initialize to be zero
|
||||||
|
|
||||||
|
@ -118,8 +118,8 @@ namespace Opm
|
|||||||
wells_multisegment[i].reset(new WellMultiSegment(wells_ecl[i], timer.currentStepNum(), wells));
|
wells_multisegment[i].reset(new WellMultiSegment(wells_ecl[i], timer.currentStepNum(), wells));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
// for DEBUGGING OUTPUT
|
// for DEBUGGING OUTPUT
|
||||||
if (int debug = 0) {
|
|
||||||
std::cout << " the number of the wells from EclipseState " << wells_ecl.size() << std::endl;
|
std::cout << " the number of the wells from EclipseState " << wells_ecl.size() << std::endl;
|
||||||
for (size_t i = 0; i < wells_ecl.size(); ++i) {
|
for (size_t i = 0; i < wells_ecl.size(); ++i) {
|
||||||
std::cout << " well name " << wells_ecl[i]->name() << std::endl;
|
std::cout << " well name " << wells_ecl[i]->name() << std::endl;
|
||||||
@ -184,7 +184,7 @@ namespace Opm
|
|||||||
std::cout << " output well information for well " << well->name() << " done!!!! " << std::endl;
|
std::cout << " output well information for well " << well->name() << " done!!!! " << std::endl;
|
||||||
}
|
}
|
||||||
std::cin.ignore();
|
std::cin.ignore();
|
||||||
}
|
#endif
|
||||||
// DEBUGGING OUTPUT is DONE
|
// DEBUGGING OUTPUT is DONE
|
||||||
|
|
||||||
|
|
||||||
|
@ -330,23 +330,23 @@ namespace Opm
|
|||||||
return m_well_name_;
|
return m_well_name_;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool WellMultiSegment::isMultiSegmented() const {
|
bool WellMultiSegment::isMultiSegmented() const {
|
||||||
return m_is_multi_segment_;
|
return m_is_multi_segment_;
|
||||||
}
|
}
|
||||||
|
|
||||||
const enum WellType WellMultiSegment::wellType() const {
|
WellType WellMultiSegment::wellType() const {
|
||||||
return m_well_type_;
|
return m_well_type_;
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct WellControls* WellMultiSegment::wellControls() const {
|
const WellControls* WellMultiSegment::wellControls() const {
|
||||||
return m_well_controls_;
|
return m_well_controls_;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int WellMultiSegment::numberOfPerforations() const {
|
int WellMultiSegment::numberOfPerforations() const {
|
||||||
return m_number_of_perforations_;
|
return m_number_of_perforations_;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int WellMultiSegment::numberOfSegments() const {
|
int WellMultiSegment::numberOfSegments() const {
|
||||||
return m_number_of_segments_;
|
return m_number_of_segments_;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -354,7 +354,7 @@ namespace Opm
|
|||||||
return m_comp_frac_;
|
return m_comp_frac_;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int WellMultiSegment::numberOfPhases() const {
|
int WellMultiSegment::numberOfPhases() const {
|
||||||
return m_number_of_phases_;
|
return m_number_of_phases_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,10 +21,10 @@
|
|||||||
#define OPM_WELLMULTISEGMENT_HEADER_INCLUDED
|
#define OPM_WELLMULTISEGMENT_HEADER_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#include <opm/core/utility/platform_dependent/disable_warnings.h>
|
#include <opm/common/utility/platform_dependent/disable_warnings.h>
|
||||||
#include <Eigen/Eigen>
|
#include <Eigen/Eigen>
|
||||||
#include <Eigen/Sparse>
|
#include <Eigen/Sparse>
|
||||||
#include <opm/core/utility/platform_dependent/reenable_warnings.h>
|
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
|
||||||
|
|
||||||
#include <opm/core/wells.h>
|
#include <opm/core/wells.h>
|
||||||
#include <opm/core/well_controls.h>
|
#include <opm/core/well_controls.h>
|
||||||
@ -54,16 +54,16 @@ namespace Opm
|
|||||||
WellMultiSegment(WellConstPtr well, size_t time_step, const Wells* wells);
|
WellMultiSegment(WellConstPtr well, size_t time_step, const Wells* wells);
|
||||||
|
|
||||||
const std::string& name() const;
|
const std::string& name() const;
|
||||||
const bool isMultiSegmented() const;
|
bool isMultiSegmented() const;
|
||||||
const int numberOfPerforations() const;
|
int numberOfPerforations() const;
|
||||||
const int numberOfSegments() const;
|
int numberOfSegments() const;
|
||||||
|
|
||||||
const struct WellControls* wellControls() const;
|
const WellControls* wellControls() const;
|
||||||
const std::vector<double>& compFrac() const;
|
const std::vector<double>& compFrac() const;
|
||||||
|
|
||||||
const int numberOfPhases() const;
|
int numberOfPhases() const;
|
||||||
|
|
||||||
const enum WellType wellType() const;
|
WellType wellType() const;
|
||||||
const std::vector<double>& wellIndex() const;
|
const std::vector<double>& wellIndex() const;
|
||||||
const std::vector<double>& perfDepth() const;
|
const std::vector<double>& perfDepth() const;
|
||||||
const std::vector<int>& wellCells() const;
|
const std::vector<int>& wellCells() const;
|
||||||
|
@ -363,75 +363,76 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (int debug = 0) {
|
#if 0
|
||||||
std::cout << " output all the well state informations after initialization " << std::endl;
|
// Debugging output.
|
||||||
const int nperf_total = numberOfPerforations();
|
std::cout << " output all the well state informations after initialization " << std::endl;
|
||||||
const int nseg_total = numberOfSegments();
|
const int nperf_total = numberOfPerforations();
|
||||||
|
const int nseg_total = numberOfSegments();
|
||||||
|
|
||||||
std::cout << " number of wells : " << nw << " nubmer of segments : " << nseg_total << std::endl;
|
std::cout << " number of wells : " << nw << " nubmer of segments : " << nseg_total << std::endl;
|
||||||
std::cout << " number of phase : " << np << " nubmer of perforations " << nperf_total << std::endl;
|
std::cout << " number of phase : " << np << " nubmer of perforations " << nperf_total << std::endl;
|
||||||
|
|
||||||
std::cout << " bhps : " << std::endl;
|
std::cout << " bhps : " << std::endl;
|
||||||
for (int i = 0; i < nw; ++i) {
|
for (int i = 0; i < nw; ++i) {
|
||||||
std::cout << bhp()[i] << std::endl;
|
std::cout << bhp()[i] << std::endl;
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << " thps : " << std::endl;
|
|
||||||
|
|
||||||
for (int i = 0; i < nw; ++i) {
|
|
||||||
std::cout << thp()[i] << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << " well rates " << std::endl;
|
|
||||||
for (int i = 0; i < nw; ++i) {
|
|
||||||
std::cout << i;
|
|
||||||
for (int p = 0; p < np; ++p) {
|
|
||||||
std::cout << " " << wellRates()[np * i + p];
|
|
||||||
}
|
|
||||||
std::cout << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << " segment pressures and segment phase rates : " << std::endl;
|
|
||||||
for (int i = 0; i < nseg_total; ++i) {
|
|
||||||
std::cout << i << " " << segPress()[i];
|
|
||||||
for (int p = 0; p < np; ++p) {
|
|
||||||
std::cout << " " << segPhaseRates()[np * i + p];
|
|
||||||
}
|
|
||||||
std::cout << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << " perf pressures and pref phase rates : " << std::endl;
|
|
||||||
for (int i = 0; i < nperf_total; ++i) {
|
|
||||||
std::cout << i << " " << perfPress()[i];
|
|
||||||
for (int p = 0; p < np; ++p) {
|
|
||||||
std::cout << " " << perfPhaseRates()[np * i + p];
|
|
||||||
}
|
|
||||||
std::cout << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << " locations of the top segments : " << std::endl;
|
|
||||||
for (int i = 0; i < nw; ++i) {
|
|
||||||
std::cout << i << " " << top_segment_loc_[i] << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << " output all the information from the wellMap " << std::endl;
|
|
||||||
|
|
||||||
for (WellMapType::const_iterator iter = wellMap().begin(); iter != wellMap().end(); ++iter) {
|
|
||||||
std::cout << " well name : " << iter->first << std::endl;
|
|
||||||
const MapentryType &wellmapInfo = iter->second;
|
|
||||||
std::cout << " well number : " << wellmapInfo.well_number << " start segment " << wellmapInfo.start_segment
|
|
||||||
<< " number of segment : " << wellmapInfo.number_of_segments << std::endl;
|
|
||||||
std::cout << " start perforation : " << wellmapInfo.start_perforation << " number of perforations : " << wellmapInfo.number_of_perforations << std::endl;
|
|
||||||
const int nseg_well = wellmapInfo.number_of_segments;
|
|
||||||
std::cout << " start performation ofr each segment and number of perforation that each segment has" << std::endl;
|
|
||||||
for (int i = 0; i < nseg_well; ++i) {
|
|
||||||
std::cout << " segment " << i << " start perforation " << wellmapInfo.start_perforation_segment[i]
|
|
||||||
<< " number of perforations " << wellmapInfo.number_of_perforations_segment[i] << std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
std::cout << " output the well state right after intialization is DONE! " << std::endl;
|
|
||||||
std::cin.ignore();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::cout << " thps : " << std::endl;
|
||||||
|
|
||||||
|
for (int i = 0; i < nw; ++i) {
|
||||||
|
std::cout << thp()[i] << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << " well rates " << std::endl;
|
||||||
|
for (int i = 0; i < nw; ++i) {
|
||||||
|
std::cout << i;
|
||||||
|
for (int p = 0; p < np; ++p) {
|
||||||
|
std::cout << " " << wellRates()[np * i + p];
|
||||||
|
}
|
||||||
|
std::cout << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << " segment pressures and segment phase rates : " << std::endl;
|
||||||
|
for (int i = 0; i < nseg_total; ++i) {
|
||||||
|
std::cout << i << " " << segPress()[i];
|
||||||
|
for (int p = 0; p < np; ++p) {
|
||||||
|
std::cout << " " << segPhaseRates()[np * i + p];
|
||||||
|
}
|
||||||
|
std::cout << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << " perf pressures and pref phase rates : " << std::endl;
|
||||||
|
for (int i = 0; i < nperf_total; ++i) {
|
||||||
|
std::cout << i << " " << perfPress()[i];
|
||||||
|
for (int p = 0; p < np; ++p) {
|
||||||
|
std::cout << " " << perfPhaseRates()[np * i + p];
|
||||||
|
}
|
||||||
|
std::cout << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << " locations of the top segments : " << std::endl;
|
||||||
|
for (int i = 0; i < nw; ++i) {
|
||||||
|
std::cout << i << " " << top_segment_loc_[i] << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << " output all the information from the wellMap " << std::endl;
|
||||||
|
|
||||||
|
for (WellMapType::const_iterator iter = wellMap().begin(); iter != wellMap().end(); ++iter) {
|
||||||
|
std::cout << " well name : " << iter->first << std::endl;
|
||||||
|
const MapentryType &wellmapInfo = iter->second;
|
||||||
|
std::cout << " well number : " << wellmapInfo.well_number << " start segment " << wellmapInfo.start_segment
|
||||||
|
<< " number of segment : " << wellmapInfo.number_of_segments << std::endl;
|
||||||
|
std::cout << " start perforation : " << wellmapInfo.start_perforation << " number of perforations : " << wellmapInfo.number_of_perforations << std::endl;
|
||||||
|
const int nseg_well = wellmapInfo.number_of_segments;
|
||||||
|
std::cout << " start performation ofr each segment and number of perforation that each segment has" << std::endl;
|
||||||
|
for (int i = 0; i < nseg_well; ++i) {
|
||||||
|
std::cout << " segment " << i << " start perforation " << wellmapInfo.start_perforation_segment[i]
|
||||||
|
<< " number of perforations " << wellmapInfo.number_of_perforations_segment[i] << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
std::cout << " output the well state right after intialization is DONE! " << std::endl;
|
||||||
|
std::cin.ignore();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<double>& segPhaseRates() { return segphaserates_; }
|
std::vector<double>& segPhaseRates() { return segphaserates_; }
|
||||||
@ -471,10 +472,11 @@ namespace Opm
|
|||||||
const WellMapType& wellMap() const { return wellMap_; }
|
const WellMapType& wellMap() const { return wellMap_; }
|
||||||
WellMapType& wellMap() { return wellMap_; }
|
WellMapType& wellMap() { return wellMap_; }
|
||||||
|
|
||||||
const int numberOfPhases() const { return np_; }
|
int numberOfPhases() const { return np_; }
|
||||||
const int numberOfSegments() const { return nseg_; }
|
int numberOfSegments() const { return nseg_; }
|
||||||
const int numberOfPerforations() const { return nperf_; }
|
int numberOfPerforations() const { return nperf_; }
|
||||||
const int numberOfWells() const { return nwells_; }
|
int numberOfWells() const { return nwells_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<double> bhp_;
|
std::vector<double> bhp_;
|
||||||
std::vector<double> thp_;
|
std::vector<double> thp_;
|
||||||
|
Loading…
Reference in New Issue
Block a user