Add Restart Support for Item 2 of GEFAC
That is, save and restore the group efficiency factor value to/from the SGRP array in the restart file.
This commit is contained in:
parent
7aae45a67f
commit
c51724942b
@ -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;
|
||||
|
@ -25,6 +25,9 @@
|
||||
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)
|
||||
};
|
||||
|
||||
enum prod_index : std::vector<float>::size_type {
|
||||
GuideRate = 2, // Group's guide rate value
|
||||
|
@ -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])),
|
||||
|
@ -770,6 +770,7 @@ void staticContrib(const Opm::Group& group,
|
||||
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;
|
||||
@ -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