changes to correct output of restart data for networks
corrections to intehead for netbalan data plus improvements createdoubhead simplification of code due to changes in master correction to default value for NETBALAN PRESSURE_CONVERGENCE_LIMIT
This commit is contained in:
@@ -123,6 +123,11 @@ namespace Opm { namespace RestartIO {
|
||||
int nominated_phase;
|
||||
};
|
||||
|
||||
|
||||
struct ActiveNetwork {
|
||||
int actnetwrk;
|
||||
};
|
||||
|
||||
struct NetworkDims {
|
||||
int noactnod;
|
||||
int noactbr;
|
||||
@@ -216,6 +221,7 @@ namespace Opm { namespace RestartIO {
|
||||
InteHEAD& tuningParam(const TuningPar& tunpar);
|
||||
InteHEAD& variousParam(const int version, const int iprog);
|
||||
InteHEAD& wellSegDimensions(const WellSegDims& wsdim);
|
||||
InteHEAD& activeNetwork(const ActiveNetwork& actntwrk);
|
||||
InteHEAD& networkDimensions(const NetworkDims& nwdim);
|
||||
InteHEAD& netBalanceData(const NetBalanceDims& nwbaldim);
|
||||
InteHEAD& regionDimensions(const RegDims& rdim);
|
||||
|
||||
@@ -94,6 +94,8 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
|
||||
WHISTC = 71, // Calendar year of report step
|
||||
|
||||
ACTNETWRK = 74, // Indicator for active external network (= 0: no active network, = 2 Active network)
|
||||
|
||||
NETBALAN_5 = 77, // NETBALAN, Item5
|
||||
NETBALAN_3 = 79, // NETBALAN, Item3
|
||||
|
||||
|
||||
@@ -599,7 +599,7 @@ allocate(const std::vector<int>& inteHead)
|
||||
using WV = Opm::RestartIO::Helpers::WindowedArray<double>;
|
||||
|
||||
return WV {
|
||||
WV::NumWindows{ nodmax(inteHead) },
|
||||
WV::NumWindows{ nbrmax(inteHead) },
|
||||
WV::WindowSize{ entriesPerRbran(inteHead) }
|
||||
};
|
||||
}
|
||||
|
||||
@@ -486,6 +486,17 @@ namespace {
|
||||
: Value::FirstIterationOnly;
|
||||
}
|
||||
|
||||
Opm::RestartIO::InteHEAD::ActiveNetwork
|
||||
getActiveNetwork(const Opm::Schedule& sched,
|
||||
const std::size_t lookup_step)
|
||||
{
|
||||
const auto& netwrk = sched[lookup_step].network();
|
||||
const auto actntwrk = netwrk.active() ? 2 : 0;
|
||||
return {
|
||||
actntwrk
|
||||
};
|
||||
}
|
||||
|
||||
Opm::RestartIO::InteHEAD::NetworkDims
|
||||
getNetworkDims(const Opm::Schedule& sched,
|
||||
const std::size_t lookup_step,
|
||||
@@ -520,11 +531,19 @@ namespace {
|
||||
|
||||
Opm::RestartIO::InteHEAD::NetBalanceDims
|
||||
getNetworkBalanceParameters(const Opm::Schedule& sched,
|
||||
const std::size_t lookup_step)
|
||||
const std::size_t report_step)
|
||||
{
|
||||
const int maxNoItNBC = sched[lookup_step].network_balance().pressure_max_iter();
|
||||
const int maxNoItTHP = sched[lookup_step].network_balance().thp_max_iter();
|
||||
|
||||
int maxNoItNBC = 0;
|
||||
int maxNoItTHP = 10;
|
||||
if (report_step > 0) {
|
||||
const auto& sched_state = sched[report_step];
|
||||
if (sched_state.network().active()) {
|
||||
const auto lookup_step = report_step - 1;
|
||||
const auto& netbal = sched[lookup_step].network_balance();
|
||||
maxNoItNBC = netbal.pressure_max_iter();
|
||||
maxNoItTHP = netbal.thp_max_iter();
|
||||
}
|
||||
}
|
||||
return {
|
||||
maxNoItNBC,
|
||||
maxNoItTHP
|
||||
@@ -589,8 +608,9 @@ createInteHead(const EclipseState& es,
|
||||
.variousUDQ_ACTIONXParam()
|
||||
.nominatedPhaseGuideRate(setGuideRateNominatedPhase(sched, report_step, lookup_step))
|
||||
.whistControlMode (getWhistctlMode(sched, report_step, lookup_step))
|
||||
.activeNetwork (getActiveNetwork(sched, lookup_step))
|
||||
.networkDimensions (getNetworkDims(sched, lookup_step, rspec))
|
||||
.netBalanceData (getNetworkBalanceParameters(sched, lookup_step))
|
||||
.netBalanceData (getNetworkBalanceParameters(sched, report_step))
|
||||
.rockOpts(getRockOpts(rckcfg,rdim))
|
||||
;
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ enum index : std::vector<int>::size_type {
|
||||
NWHISTCTL = VI::intehead::WHISTC, // index for WHISTCTL keyword
|
||||
ih_072 = 72 , // 0 0
|
||||
ih_073 = 73 , // 0 0
|
||||
ih_074 = 74 , // 0 0
|
||||
ACTIVENETWRK = VI::intehead::ACTNETWRK, // Indicator for active external network (= 0: no active network, = 2 Active network)
|
||||
ih_075 = 75 , // 0 0
|
||||
ih_076 = 76 , // 0 0 2
|
||||
NETBALAN_5 = VI::intehead::NETBALAN_5, // NETBALAN item 5 - Maximum number of iterations allowed in the calculation of the THP
|
||||
@@ -794,6 +794,16 @@ liftOptParam(int in_enc)
|
||||
return *this;
|
||||
}
|
||||
|
||||
Opm::RestartIO::InteHEAD&
|
||||
Opm::RestartIO::InteHEAD::activeNetwork(const ActiveNetwork& actntwrk)
|
||||
{
|
||||
this->data_[ACTIVENETWRK] = actntwrk.actnetwrk;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Opm::RestartIO::InteHEAD&
|
||||
Opm::RestartIO::InteHEAD::networkDimensions(const NetworkDims& nwdim)
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
{
|
||||
"name": "PRESSURE_CONVERGENCE_LIMIT",
|
||||
"value_type": "DOUBLE",
|
||||
"default": 1e-01,
|
||||
"default": 1e+04,
|
||||
"dimension" : "Pressure"
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user