Merge pull request #2773 from bska/restart-gefac
Add Restart Support for Item 2 of GEFAC
This commit is contained in:
commit
cbfc727cd2
@ -61,6 +61,7 @@ struct RstGroup {
|
||||
float gas_voidage_limit;
|
||||
float glift_max_supply;
|
||||
float glift_max_rate;
|
||||
float efficiency_factor;
|
||||
|
||||
double oil_production_rate;
|
||||
double water_production_rate;
|
||||
|
@ -24,10 +24,13 @@
|
||||
|
||||
namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems {
|
||||
|
||||
namespace SGroup {
|
||||
enum index : std::vector<float>::size_type {
|
||||
EfficiencyFactor = 92, // Group's efficiency factor (Item 2 of GEFAC)
|
||||
};
|
||||
|
||||
namespace SGroup {
|
||||
enum prod_index : std::vector<float>::size_type {
|
||||
GuideRate = 2,
|
||||
GuideRate = 2, // Group's guide rate value
|
||||
OilRateLimit = 6, // Group's oil production target/limit
|
||||
WatRateLimit = 7, // Group's water production target/limit
|
||||
GasRateLimit = 8, // Group's gas production target/limit
|
||||
@ -41,7 +44,7 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
oilResRateLimit = 11, // Group's oil reservoir volume injection rate target/limit
|
||||
oilReinjectionLimit = 12, // Group's oil reinjection fraction target/limit
|
||||
oilVoidageLimit = 13, // Group's oil voidage injection fraction target/limit
|
||||
waterSurfRateLimit = 15, //i Group's water surface volume injection rate target/limit
|
||||
waterSurfRateLimit = 15, // Group's water surface volume injection rate target/limit
|
||||
waterResRateLimit = 16, // Group's water reservoir volume injection rate target/limit
|
||||
waterReinjectionLimit = 17, // Group's water reinjection fraction target/limit
|
||||
waterVoidageLimit = 18, // Group's water voidage injection fraction target/limit
|
||||
@ -49,7 +52,6 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
gasResRateLimit = 21, // Group's gas reservoir volume injection rate target/limit
|
||||
gasReinjectionLimit = 22, // Group's gas reinjection fraction target/limit
|
||||
gasVoidageLimit = 23, // Group's gas voidage injection fraction target/limit
|
||||
|
||||
};
|
||||
} // SGroup
|
||||
|
||||
|
@ -71,6 +71,7 @@ RstGroup::RstGroup(const ::Opm::UnitSystem& unit_system,
|
||||
gas_voidage_limit( sgrp_value(sgrp[VI::SGroup::gasVoidageLimit])),
|
||||
glift_max_supply( unit_system.to_si(M::gas_surface_rate, sgrp[VI::SGroup::GLOMaxSupply])),
|
||||
glift_max_rate( unit_system.to_si(M::gas_surface_rate, sgrp[VI::SGroup::GLOMaxRate])),
|
||||
efficiency_factor( unit_system.to_si(M::identity, sgrp[VI::SGroup::EfficiencyFactor])),
|
||||
oil_production_rate( unit_system.to_si(M::liquid_surface_rate, xgrp[VI::XGroup::OilPrRate])),
|
||||
water_production_rate( unit_system.to_si(M::liquid_surface_rate, xgrp[VI::XGroup::WatPrRate])),
|
||||
gas_production_rate( unit_system.to_si(M::gas_surface_rate, xgrp[VI::XGroup::GasPrRate])),
|
||||
|
@ -767,12 +767,13 @@ template <class SGrpArray>
|
||||
void staticContrib(const Opm::Group& group,
|
||||
const Opm::GasLiftOpt& glo,
|
||||
const Opm::SummaryState& sumState,
|
||||
const Opm::UnitSystem& units,
|
||||
const Opm::UnitSystem& units,
|
||||
SGrpArray& sGrp)
|
||||
{
|
||||
using Ix = ::Opm::RestartIO::Helpers::VectorItems::SGroup::index;
|
||||
using Isp = ::Opm::RestartIO::Helpers::VectorItems::SGroup::prod_index;
|
||||
using Isi = ::Opm::RestartIO::Helpers::VectorItems::SGroup::inj_index;
|
||||
using M = ::Opm::UnitSystem::measure;
|
||||
using M = ::Opm::UnitSystem::measure;
|
||||
|
||||
const auto dflt = -1.0e+20f;
|
||||
const auto dflt_2 = -2.0e+20f;
|
||||
@ -782,14 +783,14 @@ void staticContrib(const Opm::Group& group,
|
||||
|
||||
const auto init = std::vector<float> { // 112 Items (0..111)
|
||||
// 0 1 2 3 4
|
||||
infty, infty, dflt , infty, zero , // 0.. 4 ( 0)
|
||||
infty, infty, dflt , infty , zero , // 0.. 4 ( 0)
|
||||
zero , infty, infty, infty , infty, // 5.. 9 ( 1)
|
||||
infty, infty, infty, infty , dflt , // 10.. 14 ( 2)
|
||||
infty, infty, infty, infty , dflt , // 15.. 19 ( 3)
|
||||
infty, infty, infty, infty , dflt , // 20.. 24 ( 4)
|
||||
zero , zero , zero , dflt_2, zero , // 24.. 29 ( 5)
|
||||
zero , zero , zero , zero , zero , // 30.. 34 ( 6)
|
||||
infty ,zero , zero , zero , infty, // 35.. 39 ( 7)
|
||||
infty, zero , zero , zero , infty, // 35.. 39 ( 7)
|
||||
zero , zero , zero , zero , zero , // 40.. 44 ( 8)
|
||||
zero , zero , zero , zero , zero , // 45.. 49 ( 9)
|
||||
zero , infty, infty, infty , infty, // 50.. 54 (10)
|
||||
@ -820,6 +821,9 @@ void staticContrib(const Opm::Group& group,
|
||||
return static_cast<float>(units.from_si(u, x));
|
||||
};
|
||||
|
||||
sGrp[Ix::EfficiencyFactor] =
|
||||
sgprop(M::identity, group.getGroupEfficiencyFactor());
|
||||
|
||||
if (group.isProductionGroup()) {
|
||||
const auto& prod_cntl = group.productionControls(sumState);
|
||||
|
||||
|
@ -222,6 +222,8 @@ Group::Group(const std::string& name, std::size_t insert_index_arg, double udq_u
|
||||
Group::Group(const RestartIO::RstGroup& rst_group, std::size_t insert_index_arg, double udq_undefined_arg, const UnitSystem& unit_system_arg) :
|
||||
Group(rst_group.name, insert_index_arg, udq_undefined_arg, unit_system_arg)
|
||||
{
|
||||
this->gefac = rst_group.efficiency_factor;
|
||||
|
||||
const auto prod_limits = ProductionLimits { rst_group };
|
||||
const auto gas_inj_limits = GasInjectionLimits { rst_group };
|
||||
const auto water_inj_limits = WaterInjectionLimits{ rst_group };
|
||||
|
Loading…
Reference in New Issue
Block a user