@@ -266,18 +266,24 @@ initialize(const int report_step)
266266 const auto & network = well_model_.schedule ()[report_step].network ();
267267 if (network.active () && !node_pressures_.empty ()) {
268268 for (auto & well : well_model_.genericWells ()) {
269- // Producers only, since we so far only support the
270- // "extended" network model (properties defined by
271- // BRANPROP and NODEPROP) which only applies to producers.
272- if (well->isProducer ()) {
273- const auto it = this ->node_pressures_ .find (well->wellEcl ().groupName ());
274- if (it != this ->node_pressures_ .end ()) {
275- // The well belongs to a group which has a network nodal pressure,
276- // set the dynamic THP constraint based on the network nodal pressure
277- const Scalar nodal_pressure = it->second ;
278- well->setDynamicThpLimit (nodal_pressure);
279- }
280- }
269+ initializeWell (*well);
270+ }
271+ }
272+ }
273+
274+ template <typename Scalar, typename IndexTraits>
275+ void BlackoilWellModelNetworkGeneric<Scalar, IndexTraits>::
276+ initializeWell (WellInterfaceGeneric<Scalar,IndexTraits>& well)
277+ {
278+ // Producers only, since we so far only support the
279+ // "extended" network model (properties defined by
280+ // BRANPROP and NODEPROP) which only applies to producers.
281+ if (well.isProducer () && !node_pressures_.empty ()) {
282+ const auto it = this ->node_pressures_ .find (well.wellEcl ().groupName ());
283+ if (it != this ->node_pressures_ .end ()) {
284+ // The well belongs to a group which has a network nodal pressure,
285+ // set the dynamic THP constraint based on the network nodal pressure
286+ well.setDynamicThpLimit (it->second );
281287 }
282288 }
283289}
0 commit comments