Productivity Index Calculator: Add Reinitialization operation

This commit adds a new member function

    WellProdIndexCalculator::reInit(const Well& well)

which reinitializes the internal arrays in the same way as the
constructor.  This is needed to ensure that the PI calculation
device is synchronised in the case of CTF rescaling-e.g., as a
result of WELPI.
This commit is contained in:
Bård Skaflestad
2020-10-19 23:06:13 +02:00
parent 3ac2f02f4f
commit aaca907f77
3 changed files with 213 additions and 2 deletions

View File

@@ -96,6 +96,11 @@ Opm::WellProdIndexCalculator::WellProdIndexCalculator(const Well& well)
: standardConnFactors_{ calculateStandardConnFactors(well) }
{}
void Opm::WellProdIndexCalculator::reInit(const Well& well)
{
this->standardConnFactors_ = calculateStandardConnFactors(well);
}
double
Opm::WellProdIndexCalculator::
connectionProdIndStandard(const std::size_t connIdx,

View File

@@ -41,6 +41,16 @@ namespace Opm {
/// per-connection static data.
explicit WellProdIndexCalculator(const Well& well);
/// Reinitialization operation
///
/// Needed to repopulate the internal data members in case of
/// changes to the Well's properties, e.g., as a result of the
/// Well's CTFs being rescaled due to WELPI.
///
/// \param[in] well Individual well for which to collect
/// per-connection static data.
void reInit(const Well& well);
/// Compute connection-level steady-state productivity index value
/// using dynamic phase mobility.
///