use privious table as default
This commit is contained in:
@@ -483,11 +483,11 @@ inline quantity glir( const fn_args& args ) {
|
|||||||
double alq_rate = 0;
|
double alq_rate = 0;
|
||||||
|
|
||||||
for (const auto& well : args.schedule_wells) {
|
for (const auto& well : args.schedule_wells) {
|
||||||
auto xwPos = args.wells.find(well.name());
|
if (well.isInjector())
|
||||||
if (xwPos == args.wells.end())
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (well.isInjector())
|
auto xwPos = args.wells.find(well.name());
|
||||||
|
if (xwPos == args.wells.end())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
double eff_fac = efac( args.eff_factors, well.name() );
|
double eff_fac = efac( args.eff_factors, well.name() );
|
||||||
|
|||||||
@@ -872,7 +872,6 @@ namespace {
|
|||||||
for (const auto& well_name : well_names) {
|
for (const auto& well_name : well_names) {
|
||||||
this->updateWellStatus( well_name , handlerContext.currentStep , status, false, handlerContext.keyword.location() );
|
this->updateWellStatus( well_name , handlerContext.currentStep , status, false, handlerContext.keyword.location() );
|
||||||
|
|
||||||
const auto table_nr = record.getItem("VFP_TABLE").get< int >(0);
|
|
||||||
std::optional<VFPProdTable::ALQ_TYPE> alq_type;
|
std::optional<VFPProdTable::ALQ_TYPE> alq_type;
|
||||||
auto& dynamic_state = this->wells_static.at(well_name);
|
auto& dynamic_state = this->wells_static.at(well_name);
|
||||||
auto well2 = std::make_shared<Well>(*dynamic_state[handlerContext.currentStep]);
|
auto well2 = std::make_shared<Well>(*dynamic_state[handlerContext.currentStep]);
|
||||||
@@ -880,6 +879,10 @@ namespace {
|
|||||||
auto properties = std::make_shared<Well::WellProductionProperties>(well2->getProductionProperties());
|
auto properties = std::make_shared<Well::WellProductionProperties>(well2->getProductionProperties());
|
||||||
bool update_well = false;
|
bool update_well = false;
|
||||||
|
|
||||||
|
auto table_nr = record.getItem("VFP_TABLE").get< int >(0);
|
||||||
|
if(record.getItem("VFP_TABLE").defaultApplied(0))
|
||||||
|
table_nr = properties->VFPTableNumber;
|
||||||
|
|
||||||
if (table_nr != 0)
|
if (table_nr != 0)
|
||||||
alq_type = this->getVFPProdTable(table_nr, handlerContext.currentStep).getALQType();
|
alq_type = this->getVFPProdTable(table_nr, handlerContext.currentStep).getALQType();
|
||||||
properties->handleWCONHIST(alq_type, this->unit_system, record);
|
properties->handleWCONHIST(alq_type, this->unit_system, record);
|
||||||
@@ -937,7 +940,6 @@ namespace {
|
|||||||
|
|
||||||
for (const auto& well_name : well_names) {
|
for (const auto& well_name : well_names) {
|
||||||
this->updateWellStatus(well_name, handlerContext.currentStep, status, false, handlerContext.keyword.location());
|
this->updateWellStatus(well_name, handlerContext.currentStep, status, false, handlerContext.keyword.location());
|
||||||
const auto table_nr = record.getItem("VFP_TABLE").get< int >(0);
|
|
||||||
std::optional<VFPProdTable::ALQ_TYPE> alq_type;
|
std::optional<VFPProdTable::ALQ_TYPE> alq_type;
|
||||||
auto& dynamic_state = this->wells_static.at(well_name);
|
auto& dynamic_state = this->wells_static.at(well_name);
|
||||||
auto well2 = std::make_shared<Well>(*dynamic_state[handlerContext.currentStep]);
|
auto well2 = std::make_shared<Well>(*dynamic_state[handlerContext.currentStep]);
|
||||||
@@ -948,6 +950,10 @@ namespace {
|
|||||||
if (well2->isAvailableForGroupControl())
|
if (well2->isAvailableForGroupControl())
|
||||||
properties->addProductionControl(Well::ProducerCMode::GRUP);
|
properties->addProductionControl(Well::ProducerCMode::GRUP);
|
||||||
|
|
||||||
|
auto table_nr = record.getItem("VFP_TABLE").get< int >(0);
|
||||||
|
if(record.getItem("VFP_TABLE").defaultApplied(0))
|
||||||
|
table_nr = properties->VFPTableNumber;
|
||||||
|
|
||||||
if (table_nr != 0)
|
if (table_nr != 0)
|
||||||
alq_type = this->getVFPProdTable(table_nr, handlerContext.currentStep).getALQType();
|
alq_type = this->getVFPProdTable(table_nr, handlerContext.currentStep).getALQType();
|
||||||
properties->handleWCONPROD(alq_type, this->unit_system, well_name, record);
|
properties->handleWCONPROD(alq_type, this->unit_system, well_name, record);
|
||||||
|
|||||||
@@ -92,7 +92,8 @@ namespace Opm {
|
|||||||
|
|
||||||
void Well::WellProductionProperties::init_vfp(const std::optional<VFPProdTable::ALQ_TYPE>& alq_type, const UnitSystem& unit_system_arg, const DeckRecord& record) {
|
void Well::WellProductionProperties::init_vfp(const std::optional<VFPProdTable::ALQ_TYPE>& alq_type, const UnitSystem& unit_system_arg, const DeckRecord& record) {
|
||||||
if (alq_type) {
|
if (alq_type) {
|
||||||
this->VFPTableNumber = record.getItem("VFP_TABLE").get<int>(0);
|
if (!record.getItem("VFP_TABLE").defaultApplied(0))
|
||||||
|
this->VFPTableNumber = record.getItem("VFP_TABLE").get< int >(0);
|
||||||
double alq_input = record.getItem("ALQ").get<double>(0);
|
double alq_input = record.getItem("ALQ").get<double>(0);
|
||||||
const auto alq_dim = VFPProdTable::ALQDimension(*alq_type, unit_system_arg);
|
const auto alq_dim = VFPProdTable::ALQDimension(*alq_type, unit_system_arg);
|
||||||
this->ALQValue = alq_dim.convertRawToSi(alq_input);
|
this->ALQValue = alq_dim.convertRawToSi(alq_input);
|
||||||
@@ -279,6 +280,7 @@ void Well::WellProductionProperties::handleWCONHIST(const std::optional<VFPProdT
|
|||||||
&& BHPH == other.BHPH
|
&& BHPH == other.BHPH
|
||||||
&& THPH == other.THPH
|
&& THPH == other.THPH
|
||||||
&& VFPTableNumber == other.VFPTableNumber
|
&& VFPTableNumber == other.VFPTableNumber
|
||||||
|
&& ALQValue == other.ALQValue
|
||||||
&& controlMode == other.controlMode
|
&& controlMode == other.controlMode
|
||||||
&& m_productionControls == other.m_productionControls
|
&& m_productionControls == other.m_productionControls
|
||||||
&& whistctl_cmode == other.whistctl_cmode
|
&& whistctl_cmode == other.whistctl_cmode
|
||||||
|
|||||||
Reference in New Issue
Block a user