opm-simulators
Loading...
Searching...
No Matches
Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits > Class Template Reference

Class for handling the blackoil well network model. More...

#include <BlackoilWellModelNetworkGeneric.hpp>

Public Member Functions

 BlackoilWellModelNetworkGeneric (BlackoilWellModelGeneric< Scalar, IndexTraits > &well_model)
bool active () const
 return true if network is active (at least one network well in prediction mode)
const std::map< std::string, Scalar > & nodePressures () const
void setNodePressures (const std::map< std::string, Scalar > &values)
void setFromRestart (const std::optional< std::map< std::string, double > > &restart_pressures)
void initialize (const int report_step)
 Initialize wells according to network configuration.
void initializeWell (WellInterfaceGeneric< Scalar, IndexTraits > &well)
 Initialize a single well according to network configuration.
void updateActiveState (const int report_step)
 Checks if network is active (at least one network well on prediction).
bool needPreStepRebalance (const int report_step) const
 Checks if there are reasons to perform a pre-step network re-balance.
bool shouldBalance (const int reportStepIndex, const NewtonIterationContext &iterCtx) const
 Checks if we shall perform a network re-balance.
bool willBalanceOnNextIteration (const int reportStepIndex, const NewtonIterationContext &iterCtx) const
 Checks if we will perform a network re-balance on the next Newton iteration.
Scalar updatePressures (const int reportStepIdx, const Scalar damping_factor, const Scalar update_upper_bound)
void assignNodeValues (std::map< std::string, data::NodeData > &nodevalues, const int reportStepIdx) const
void commitState ()
void resetState ()
template<class Serializer>
void serializeOp (Serializer &serializer)
bool operator== (const BlackoilWellModelNetworkGeneric< Scalar, IndexTraits > &rhs) const

Protected Member Functions

std::map< std::string, Scalar > computePressures (const Network::ExtNetwork &network, const VFPProdProperties< Scalar > &vfp_prod_props, const UnitSystem &unit_system, const int reportStepIdx, const Parallel::Communication &comm) const

Protected Attributes

bool active_ {false}
BlackoilWellModelGeneric< Scalar, IndexTraits > & well_model_
std::map< std::string, Scalar > node_pressures_
std::map< std::string, Scalar > last_valid_node_pressures_

Detailed Description

template<typename Scalar, typename IndexTraits>
class Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits >

Class for handling the blackoil well network model.

Member Function Documentation

◆ needPreStepRebalance()

template<typename Scalar, typename IndexTraits>
bool Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits >::needPreStepRebalance ( const int report_step) const

Checks if there are reasons to perform a pre-step network re-balance.

(Currently, the only reasons are network well status changes.) (TODO: Consider if adding network change events would be helpful.)

◆ shouldBalance()

template<typename Scalar, typename IndexTraits>
bool Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits >::shouldBalance ( const int reportStepIndex,
const NewtonIterationContext & iterCtx ) const

Checks if we shall perform a network re-balance.

This is typically controlled by the NETBALAN keyword.


The documentation for this class was generated from the following files: