added DOUBHEAD items for NETBALAN
This commit is contained in:
parent
d1a1050e67
commit
60d57f06b7
@ -57,6 +57,15 @@ namespace Opm { namespace RestartIO {
|
|||||||
double min_ec_grad;
|
double min_ec_grad;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct NetBalanceDims {
|
||||||
|
double balancingInterval;
|
||||||
|
double convTolNodPres;
|
||||||
|
double convTolTHPCalc;
|
||||||
|
double targBranchBalError;
|
||||||
|
double maxBranchBalError;
|
||||||
|
double minTimeStepSize;
|
||||||
|
};
|
||||||
|
|
||||||
DoubHEAD();
|
DoubHEAD();
|
||||||
|
|
||||||
~DoubHEAD() = default;
|
~DoubHEAD() = default;
|
||||||
@ -79,6 +88,7 @@ namespace Opm { namespace RestartIO {
|
|||||||
DoubHEAD& udq_param(const UDQParams& udqPar);
|
DoubHEAD& udq_param(const UDQParams& udqPar);
|
||||||
DoubHEAD& guide_rate_param(const guideRate& guide_rp);
|
DoubHEAD& guide_rate_param(const guideRate& guide_rp);
|
||||||
DoubHEAD& lift_opt_param(const liftOptPar& lo_par);
|
DoubHEAD& lift_opt_param(const liftOptPar& lo_par);
|
||||||
|
DoubHEAD& netBalDimensions(const NetBalanceDims& net_bal_par);
|
||||||
|
|
||||||
const std::vector<double>& data() const
|
const std::vector<double>& data() const
|
||||||
{
|
{
|
||||||
|
@ -43,6 +43,12 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
|||||||
XxxMBE = 18,
|
XxxMBE = 18,
|
||||||
XxxLCV = 19,
|
XxxLCV = 19,
|
||||||
XxxWFL = 20,
|
XxxWFL = 20,
|
||||||
|
Netbalan_1 = 51,
|
||||||
|
Netbalan_2 = 53,
|
||||||
|
Netbalan_4 = 50,
|
||||||
|
Netbalan_6 = 63,
|
||||||
|
Netbalan_7 = 64,
|
||||||
|
Netbalan_8 = 66,
|
||||||
TrgDPR = 82,
|
TrgDPR = 82,
|
||||||
TfDiff = 83,
|
TfDiff = 83,
|
||||||
DdpLim = 84,
|
DdpLim = 84,
|
||||||
|
@ -121,6 +121,27 @@ namespace {
|
|||||||
units.from_si(M::oil_gas_ratio, glo.min_eco_gradient())
|
units.from_si(M::oil_gas_ratio, glo.min_eco_gradient())
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Opm::RestartIO::DoubHEAD::NetBalanceDims
|
||||||
|
getNetworkBalanceDims(const Opm::Schedule& sched,
|
||||||
|
const std::size_t lookup_step)
|
||||||
|
{
|
||||||
|
const double balancingInterval = sched[lookup_step].network_balance().interval();
|
||||||
|
const double convTolNodPres = sched[lookup_step].network_balance().pressure_tolerance();
|
||||||
|
const double convTolTHPCalc = sched[lookup_step].network_balance().thp_tolerance();
|
||||||
|
const double targBranchBalError = sched[lookup_step].network_balance().target_balance_error();
|
||||||
|
const double maxBranchBalError = sched[lookup_step].network_balance().max_balance_error();
|
||||||
|
const double minTimeStepSize = sched[lookup_step].network_balance().min_tstep();
|
||||||
|
|
||||||
|
return {
|
||||||
|
balancingInterval,
|
||||||
|
convTolNodPres,
|
||||||
|
convTolTHPCalc,
|
||||||
|
targBranchBalError,
|
||||||
|
maxBranchBalError,
|
||||||
|
minTimeStepSize
|
||||||
|
};
|
||||||
|
}
|
||||||
} // Anonymous
|
} // Anonymous
|
||||||
|
|
||||||
// #####################################################################
|
// #####################################################################
|
||||||
@ -146,6 +167,7 @@ createDoubHead(const EclipseState& es,
|
|||||||
.udq_param(rspec.udqParams())
|
.udq_param(rspec.udqParams())
|
||||||
.guide_rate_param(computeGuideRate(sched, lookup_step))
|
.guide_rate_param(computeGuideRate(sched, lookup_step))
|
||||||
.lift_opt_param(computeLiftOptParam(sched, usys, lookup_step))
|
.lift_opt_param(computeLiftOptParam(sched, usys, lookup_step))
|
||||||
|
.netBalDimensions(getNetworkBalanceDims(sched, lookup_step))
|
||||||
;
|
;
|
||||||
|
|
||||||
if (nextTimeStep > 0.0) {
|
if (nextTimeStep > 0.0) {
|
||||||
|
@ -100,10 +100,10 @@ enum Index : std::vector<double>::size_type {
|
|||||||
dh_049 = 49,
|
dh_049 = 49,
|
||||||
|
|
||||||
// 50..59
|
// 50..59
|
||||||
dh_050 = 50,
|
Netbalan_4 = VI::doubhead::Netbalan_4,
|
||||||
dh_051 = 51,
|
Netbalan_1 = VI::doubhead::Netbalan_1,
|
||||||
dh_052 = 52,
|
dh_052 = 52,
|
||||||
dh_053 = 53,
|
Netbalan_2 = VI::doubhead::Netbalan_2,
|
||||||
dh_054 = 54,
|
dh_054 = 54,
|
||||||
dh_055 = 55,
|
dh_055 = 55,
|
||||||
dh_056 = 56,
|
dh_056 = 56,
|
||||||
@ -115,10 +115,10 @@ enum Index : std::vector<double>::size_type {
|
|||||||
dh_060 = 60,
|
dh_060 = 60,
|
||||||
dh_061 = 61,
|
dh_061 = 61,
|
||||||
dh_062 = 62,
|
dh_062 = 62,
|
||||||
dh_063 = 63,
|
Netbalan_6 = VI::doubhead::Netbalan_6,
|
||||||
dh_064 = 64,
|
Netbalan_7 = VI::doubhead::Netbalan_7,
|
||||||
dh_065 = 65,
|
dh_065 = 65,
|
||||||
dh_066 = 66,
|
Netbalan_8 = VI::doubhead::Netbalan_8,
|
||||||
dh_067 = 67,
|
dh_067 = 67,
|
||||||
dh_068 = 68,
|
dh_068 = 68,
|
||||||
dh_069 = 69,
|
dh_069 = 69,
|
||||||
@ -383,13 +383,8 @@ Opm::RestartIO::DoubHEAD::DoubHEAD()
|
|||||||
this->data_[Index::dh_026] = 0.0;
|
this->data_[Index::dh_026] = 0.0;
|
||||||
this->data_[Index::dh_027] = 0.0;
|
this->data_[Index::dh_027] = 0.0;
|
||||||
this->data_[Index::dh_028] = 0.0;
|
this->data_[Index::dh_028] = 0.0;
|
||||||
this->data_[Index::dh_050] = 0.01;
|
|
||||||
this->data_[Index::dh_054] = 1.0e+20;
|
this->data_[Index::dh_054] = 1.0e+20;
|
||||||
this->data_[Index::dh_055] = 1.0e+20;
|
|
||||||
this->data_[Index::dh_063] = 1.0e+20;
|
|
||||||
this->data_[Index::dh_064] = 1.0e+20;
|
|
||||||
this->data_[Index::dh_065] = 0.0;
|
this->data_[Index::dh_065] = 0.0;
|
||||||
this->data_[Index::dh_066] = 0.0;
|
|
||||||
this->data_[Index::dh_069] = -1.0;
|
this->data_[Index::dh_069] = -1.0;
|
||||||
this->data_[Index::dh_080] = 1.0e+20;
|
this->data_[Index::dh_080] = 1.0e+20;
|
||||||
this->data_[Index::dh_081] = 1.0e+20;
|
this->data_[Index::dh_081] = 1.0e+20;
|
||||||
@ -650,3 +645,17 @@ Opm::RestartIO::DoubHEAD::lift_opt_param(const liftOptPar& lo_par)
|
|||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Opm::RestartIO::DoubHEAD&
|
||||||
|
Opm::RestartIO::DoubHEAD::netBalDimensions(const NetBalanceDims& net_bal_par)
|
||||||
|
{
|
||||||
|
this->data_[Netbalan_1] = net_bal_par.balancingInterval;
|
||||||
|
this->data_[Netbalan_2] = net_bal_par.convTolNodPres;
|
||||||
|
this->data_[Netbalan_4] = net_bal_par.convTolTHPCalc;
|
||||||
|
this->data_[Netbalan_6] = net_bal_par.targBranchBalError;
|
||||||
|
this->data_[Netbalan_7] = net_bal_par.maxBranchBalError;
|
||||||
|
this->data_[Netbalan_8] = net_bal_par.minTimeStepSize;
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user