added changes to write NETBALAN keyword data to InteHead

This commit is contained in:
Jostein Alvestad
2021-10-15 14:17:17 +02:00
parent 741bd5da95
commit 2911e11033
5 changed files with 39 additions and 3 deletions

View File

@@ -136,6 +136,11 @@ namespace Opm { namespace RestartIO {
int ninobr;
};
struct NetBalanceDims {
int maxNoIterationsNBC;
int maxNoIterationsTHP;
};
struct AquiferDims {
// Number of active analytic aquifers (# unique aquifer IDs)
int numAquifers {0};
@@ -212,6 +217,7 @@ namespace Opm { namespace RestartIO {
InteHEAD& variousParam(const int version, const int iprog);
InteHEAD& wellSegDimensions(const WellSegDims& wsdim);
InteHEAD& networkDimensions(const NetworkDims& nwdim);
InteHEAD& netBalanceData(const NetBalanceDims& nwbaldim);
InteHEAD& regionDimensions(const RegDims& rdim);
InteHEAD& rockOpts(const RockOpts& rckop);
InteHEAD& ngroups(const Group& gr);

View File

@@ -94,6 +94,9 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
WHISTC = 71, // Calendar year of report step
NETBALAN_5 = 77, // NETBALAN, Item5
NETBALAN_3 = 79, // NETBALAN, Item3
NEWTMX = 80, // Tuning, Record3, Item1
NEWTMN = 81, // Tuning, Record3, Item2
LITMAX = 82, // Tuning, Record3, Item3

View File

@@ -534,6 +534,19 @@ namespace {
};
}
Opm::RestartIO::InteHEAD::NetBalanceDims
getNetworkBalanceDims(const Opm::Schedule& sched,
const std::size_t lookup_step)
{
const int maxNoItNBC = sched[lookup_step].network_balance().pressure_max_iter();
const int maxNoItTHP = sched[lookup_step].network_balance().thp_max_iter() .;
return {
maxNoItNBC,
maxNoItTHP
};
}
} // Anonymous
// #####################################################################
@@ -591,6 +604,7 @@ createInteHead(const EclipseState& es,
.nominatedPhaseGuideRate(setGuideRateNominatedPhase(sched, report_step, lookup_step))
.whistControlMode (getWhistctlMode(sched, report_step, lookup_step))
.networkDimensions (getNetworkDims(sched, lookup_step, rspec))
.netBalanceData (getNetworkBalanceDims(sched, lookup_step))
.rockOpts(getRockOpts(rckcfg,rdim))
;

View File

@@ -125,9 +125,10 @@ enum index : std::vector<int>::size_type {
ih_074 = 74 , // 0 0
ih_075 = 75 , // 0 0
ih_076 = 76 , // 0 0 2
ih_077 = 77 , // 0 0
NETBALAN_5 = VI::intehead::NETBALAN_5, // NETBALAN item 5 - Maximum number of iterations allowed in the calculation of the THP
// for manifold groups under rate control (ECLIPSE 100).
ih_078 = 78 , // 0 0
ih_079 = 79 , // 0 0
NETBALAN_3 = VI::intehead::NETBALAN_3, // NETBALAN item 3 - Maximum number of iterations allowed in the network balancing calculation
NEWTMX = VI::intehead::NEWTMX, // 0 0 Tuning,Record3,Item1
NEWTMN = VI::intehead::NEWTMN, // 0 0 Tuning,Record3,Item2
LITMAX = VI::intehead::LITMAX, // 0 0 Tuning,Record3,Item3
@@ -810,6 +811,18 @@ Opm::RestartIO::InteHEAD::networkDimensions(const NetworkDims& nwdim)
return *this;
}
Opm::RestartIO::InteHEAD&
Opm::RestartIO::InteHEAD::netBalanceData(const NetBalanceDims& nwbaldim)
{
this->data_[NETBALAN_3] = nwbaldim.maxNoIterationsNBC;
this->data_[NETBALAN_5] = nwbaldim.maxNoIterationsTHP;
return *this;
}
// =====================================================================
Opm::RestartIO::InteHEAD::TimePoint

View File

@@ -15,7 +15,7 @@
{
"name": "PRESSURE_CONVERGENCE_LIMIT",
"value_type": "DOUBLE",
"default": 1e-05,
"default": 1e-01,
"dimension" : "Pressure"
},
{