mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Adapt to enum changes
This commit is contained in:
@@ -164,9 +164,9 @@ namespace Opm
|
||||
int number_segments_;
|
||||
|
||||
// components of the pressure drop to be included
|
||||
WellSegment::CompPressureDropEnum compPressureDrop() const;
|
||||
WellSegments::CompPressureDrop compPressureDrop() const;
|
||||
// multi-phase flow model
|
||||
WellSegment::MultiPhaseModelEnum multiphaseModel() const;
|
||||
WellSegments::MultiPhaseModel multiphaseModel() const;
|
||||
|
||||
// get the WellSegments from the well_ecl_
|
||||
const WellSegments& segmentSet() const;
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace Opm
|
||||
perf_depth_.resize(number_of_perforations_, 0.);
|
||||
for (size_t perf = 0; perf < completion_set.size(); ++perf) {
|
||||
const Connection& connection = completion_set.get(perf);
|
||||
if (connection.state() == WellCompletion::OPEN) {
|
||||
if (connection.state() == Connection::State::OPEN) {
|
||||
const int segment_index = segmentNumberToIndex(connection.segment());
|
||||
segment_perforations_[segment_index].push_back(i_perf_wells);
|
||||
perf_depth_[i_perf_wells] = connection.depth();
|
||||
@@ -931,7 +931,7 @@ namespace Opm
|
||||
|
||||
|
||||
template <typename TypeTag>
|
||||
WellSegment::CompPressureDropEnum
|
||||
WellSegments::CompPressureDrop
|
||||
MultisegmentWell<TypeTag>::
|
||||
compPressureDrop() const
|
||||
{
|
||||
@@ -943,7 +943,7 @@ namespace Opm
|
||||
|
||||
|
||||
template <typename TypeTag>
|
||||
WellSegment::MultiPhaseModelEnum
|
||||
WellSegments::MultiPhaseModel
|
||||
MultisegmentWell<TypeTag>::
|
||||
multiphaseModel() const
|
||||
{
|
||||
@@ -1869,7 +1869,7 @@ namespace Opm
|
||||
frictionalPressureLossConsidered() const
|
||||
{
|
||||
// HF- and HFA needs to consider frictional pressure loss
|
||||
return (segmentSet().compPressureDrop() != WellSegment::H__);
|
||||
return (segmentSet().compPressureDrop() != WellSegments::CompPressureDrop::H__);
|
||||
}
|
||||
|
||||
|
||||
@@ -1881,7 +1881,7 @@ namespace Opm
|
||||
MultisegmentWell<TypeTag>::
|
||||
accelerationalPressureLossConsidered() const
|
||||
{
|
||||
return (segmentSet().compPressureDrop() == WellSegment::HFA);
|
||||
return (segmentSet().compPressureDrop() == WellSegments::CompPressureDrop::HFA);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,10 @@
|
||||
#include <utility>
|
||||
#include <algorithm>
|
||||
#include <locale>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Events.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Well2.hpp>
|
||||
|
||||
#include <opm/core/well_controls.h>
|
||||
|
||||
namespace Opm
|
||||
@@ -85,7 +88,7 @@ namespace Opm
|
||||
|
||||
inline void
|
||||
historyRates(const PhaseUsage& pu,
|
||||
const ProductionControls& p,
|
||||
const Well2::ProductionControls& p,
|
||||
std::vector<double>& rates)
|
||||
{
|
||||
assert (! p.prediction_mode);
|
||||
|
||||
@@ -608,7 +608,7 @@ namespace Opm
|
||||
// change temperature for injecting fluids
|
||||
if (well_type_ == INJECTOR && cq_s[activeCompIdx] > 0.0){
|
||||
// only handles single phase injection now
|
||||
assert(this->well_ecl_.injectorType() != WellInjector::MULTI);
|
||||
assert(this->well_ecl_.injectorType() != Well2::InjectorType::MULTI);
|
||||
fs.setTemperature(this->well_ecl_.temperature());
|
||||
typedef typename std::decay<decltype(fs)>::type::Scalar FsScalar;
|
||||
typename FluidSystem::template ParameterCache<FsScalar> paramCache;
|
||||
@@ -2534,7 +2534,7 @@ namespace Opm
|
||||
auto phase = well_ecl_.getInjectionProperties().injectorType;
|
||||
// only single phase injection handled
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) {
|
||||
if (phase == WellInjector::TypeEnum::WATER) {
|
||||
if (phase == Well2::InjectorType::WATER) {
|
||||
primary_variables_[WFrac] = 1.0;
|
||||
} else {
|
||||
primary_variables_[WFrac] = 0.0;
|
||||
@@ -2542,7 +2542,7 @@ namespace Opm
|
||||
}
|
||||
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
|
||||
if (phase == WellInjector::TypeEnum::GAS) {
|
||||
if (phase == Well2::InjectorType::GAS) {
|
||||
primary_variables_[GFrac] = 1.0 - wsolvent();
|
||||
if (has_solvent) {
|
||||
primary_variables_[SFrac] = wsolvent();
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Well2.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WellTestState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.hpp>
|
||||
|
||||
|
||||
#include <opm/core/wells.h>
|
||||
#include <opm/core/well_controls.h>
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace Opm
|
||||
|
||||
int num_active_connections = 0;
|
||||
for (int c = 0; c < num_conns; ++c) {
|
||||
if (connections[c].state() == WellCompletion::OPEN) {
|
||||
if (connections[c].state() == Connection::State::OPEN) {
|
||||
completions_[connections[c].complnum()].push_back(num_active_connections++);
|
||||
}
|
||||
}
|
||||
@@ -312,7 +312,7 @@ namespace Opm
|
||||
}
|
||||
|
||||
auto injectorType = well_ecl_.injectorType();
|
||||
if (injectorType == WellInjector::GAS) {
|
||||
if (injectorType == Well2::InjectorType::GAS) {
|
||||
double solvent_fraction = well_ecl_.getSolventFraction();
|
||||
return solvent_fraction;
|
||||
} else {
|
||||
@@ -336,7 +336,7 @@ namespace Opm
|
||||
|
||||
auto injectorType = well_ecl_.injectorType();
|
||||
|
||||
if (injectorType == WellInjector::WATER) {
|
||||
if (injectorType == Well2::InjectorType::WATER) {
|
||||
WellPolymerProperties polymer = well_ecl_.getPolymerProperties();
|
||||
const double polymer_injection_concentration = polymer.m_polymerConcentration;
|
||||
return polymer_injection_concentration;
|
||||
@@ -361,7 +361,7 @@ namespace Opm
|
||||
|
||||
auto injectorType = well_ecl_.injectorType();
|
||||
|
||||
if (injectorType == WellInjector::GAS) {
|
||||
if (injectorType == Well2::InjectorType::GAS) {
|
||||
WellFoamProperties fprop = well_ecl_.getFoamProperties();
|
||||
return fprop.m_foamConcentration;
|
||||
} else {
|
||||
@@ -923,8 +923,8 @@ namespace Opm
|
||||
|
||||
// for the moment, we only handle rate limits, not handling potential limits
|
||||
// the potential limits should not be difficult to add
|
||||
const WellEcon::QuantityLimitEnum& quantity_limit = econ_production_limits.quantityLimit();
|
||||
if (quantity_limit == WellEcon::POTN) {
|
||||
const auto& quantity_limit = econ_production_limits.quantityLimit();
|
||||
if (quantity_limit == WellEconProductionLimits::QuantityLimit::POTN) {
|
||||
const std::string msg = std::string("POTN limit for well ") + name() + std::string(" is not supported for the moment. \n")
|
||||
+ std::string("All the limits will be evaluated based on RATE. ");
|
||||
deferred_logger.warning("NOT_SUPPORTING_POTN", msg);
|
||||
@@ -973,9 +973,9 @@ namespace Opm
|
||||
checkRatioEconLimits(econ_production_limits, well_state, ratio_report, deferred_logger);
|
||||
|
||||
if (ratio_report.ratio_limit_violated) {
|
||||
const WellEcon::WorkoverEnum workover = econ_production_limits.workover();
|
||||
const auto workover = econ_production_limits.workover();
|
||||
switch (workover) {
|
||||
case WellEcon::CON:
|
||||
case WellEconProductionLimits::EconWorkover::CON:
|
||||
{
|
||||
const int worst_offending_completion = ratio_report.worst_offending_completion;
|
||||
|
||||
@@ -1014,7 +1014,7 @@ namespace Opm
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WellEcon::WELL:
|
||||
case WellEconProductionLimits::EconWorkover::WELL:
|
||||
{
|
||||
well_test_state.closeWell(name(), WellTestConfig::Reason::ECONOMIC, simulation_time);
|
||||
if (write_message_to_opmlog) {
|
||||
@@ -1029,12 +1029,12 @@ namespace Opm
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WellEcon::NONE:
|
||||
break;
|
||||
case WellEconProductionLimits::EconWorkover::NONE:
|
||||
break;
|
||||
default:
|
||||
{
|
||||
deferred_logger.warning("NOT_SUPPORTED_WORKOVER_TYPE",
|
||||
"not supporting workover type " + WellEcon::WorkoverEnumToString(workover) );
|
||||
"not supporting workover type " + WellEconProductionLimits::EconWorkover2String(workover) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1152,7 +1152,7 @@ namespace Opm
|
||||
const auto& connectionSet = well_ecl_.getConnections();
|
||||
for (size_t c=0; c<connectionSet.size(); c++) {
|
||||
const auto& connection = connectionSet.get(c);
|
||||
if (connection.state() == WellCompletion::OPEN) {
|
||||
if (connection.state() == Connection::State::OPEN) {
|
||||
const int i = connection.getI();
|
||||
const int j = connection.getJ();
|
||||
const int k = connection.getK();
|
||||
@@ -1175,15 +1175,15 @@ namespace Opm
|
||||
double perf_length; // the length of the well perforation
|
||||
|
||||
switch (connection.dir()) {
|
||||
case Opm::WellCompletion::DirectionEnum::X:
|
||||
case Opm::Connection::Direction::X:
|
||||
re = std::sqrt(cubical[1] * cubical[2] / M_PI);
|
||||
perf_length = cubical[0];
|
||||
break;
|
||||
case Opm::WellCompletion::DirectionEnum::Y:
|
||||
case Opm::Connection::Direction::Y:
|
||||
re = std::sqrt(cubical[0] * cubical[2] / M_PI);
|
||||
perf_length = cubical[1];
|
||||
break;
|
||||
case Opm::WellCompletion::DirectionEnum::Z:
|
||||
case Opm::Connection::Direction::Z:
|
||||
re = std::sqrt(cubical[0] * cubical[1] / M_PI);
|
||||
perf_length = cubical[2];
|
||||
break;
|
||||
|
||||
@@ -669,7 +669,7 @@ namespace Opm
|
||||
std::vector<std::vector<int>> segment_perforations(well_nseg);
|
||||
for (size_t perf = 0; perf < completion_set.size(); ++perf) {
|
||||
const Connection& connection = completion_set.get(perf);
|
||||
if (connection.state() == WellCompletion::OPEN) {
|
||||
if (connection.state() == Connection::State::OPEN) {
|
||||
const int segment_index = segment_set.segmentNumberToIndex(connection.segment());
|
||||
segment_perforations[segment_index].push_back(n_activeperf);
|
||||
n_activeperf++;
|
||||
|
||||
Reference in New Issue
Block a user