use privious table as default
This commit is contained in:
parent
491d1d1f15
commit
1f6dbae5cb
@ -483,11 +483,11 @@ inline quantity glir( const fn_args& args ) {
|
||||
double alq_rate = 0;
|
||||
|
||||
for (const auto& well : args.schedule_wells) {
|
||||
auto xwPos = args.wells.find(well.name());
|
||||
if (xwPos == args.wells.end())
|
||||
if (well.isInjector())
|
||||
continue;
|
||||
|
||||
if (well.isInjector())
|
||||
auto xwPos = args.wells.find(well.name());
|
||||
if (xwPos == args.wells.end())
|
||||
continue;
|
||||
|
||||
double eff_fac = efac( args.eff_factors, well.name() );
|
||||
|
@ -872,7 +872,6 @@ namespace {
|
||||
for (const auto& well_name : well_names) {
|
||||
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;
|
||||
auto& dynamic_state = this->wells_static.at(well_name);
|
||||
auto well2 = std::make_shared<Well>(*dynamic_state[handlerContext.currentStep]);
|
||||
@ -880,6 +879,10 @@ namespace {
|
||||
auto properties = std::make_shared<Well::WellProductionProperties>(well2->getProductionProperties());
|
||||
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)
|
||||
alq_type = this->getVFPProdTable(table_nr, handlerContext.currentStep).getALQType();
|
||||
properties->handleWCONHIST(alq_type, this->unit_system, record);
|
||||
@ -937,7 +940,6 @@ namespace {
|
||||
|
||||
for (const auto& well_name : well_names) {
|
||||
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;
|
||||
auto& dynamic_state = this->wells_static.at(well_name);
|
||||
auto well2 = std::make_shared<Well>(*dynamic_state[handlerContext.currentStep]);
|
||||
@ -948,6 +950,10 @@ namespace {
|
||||
if (well2->isAvailableForGroupControl())
|
||||
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)
|
||||
alq_type = this->getVFPProdTable(table_nr, handlerContext.currentStep).getALQType();
|
||||
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) {
|
||||
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);
|
||||
const auto alq_dim = VFPProdTable::ALQDimension(*alq_type, unit_system_arg);
|
||||
this->ALQValue = alq_dim.convertRawToSi(alq_input);
|
||||
@ -279,6 +280,7 @@ void Well::WellProductionProperties::handleWCONHIST(const std::optional<VFPProdT
|
||||
&& BHPH == other.BHPH
|
||||
&& THPH == other.THPH
|
||||
&& VFPTableNumber == other.VFPTableNumber
|
||||
&& ALQValue == other.ALQValue
|
||||
&& controlMode == other.controlMode
|
||||
&& m_productionControls == other.m_productionControls
|
||||
&& whistctl_cmode == other.whistctl_cmode
|
||||
|
Loading…
Reference in New Issue
Block a user