Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits > Class Template Reference

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

#include <BlackoilWellModelNetworkGeneric.hpp>

Inheritance diagram for Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits >:
Inheritance graph

Public Member Functions

 BlackoilWellModelNetworkGeneric (BlackoilWellModelGeneric< Scalar, IndexTraits > &well_model)
 
virtual ~BlackoilWellModelNetworkGeneric ()=default
 
bool active () const
 return true if network is active (at least one network well in prediction mode) More...
 
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. More...
 
void initializeWell (WellInterfaceGeneric< Scalar, IndexTraits > &well)
 Initialize a single well according to network configuration. More...
 
void updateActiveState (const int report_step)
 Checks if network is active (at least one network well on prediction). More...
 
bool needPreStepRebalance (const int report_step) const
 
bool shouldBalance (const int reportStepIndex, const int iterationIdx) const
 
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 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.

Constructor & Destructor Documentation

◆ BlackoilWellModelNetworkGeneric()

template<typename Scalar , typename IndexTraits >
Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits >::BlackoilWellModelNetworkGeneric ( BlackoilWellModelGeneric< Scalar, IndexTraits > &  well_model)

◆ ~BlackoilWellModelNetworkGeneric()

template<typename Scalar , typename IndexTraits >
virtual Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits >::~BlackoilWellModelNetworkGeneric ( )
virtualdefault

Member Function Documentation

◆ active()

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits >::active ( ) const
inline

return true if network is active (at least one network well in prediction mode)

References Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits >::active_.

◆ assignNodeValues()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits >::assignNodeValues ( std::map< std::string, data::NodeData > &  nodevalues,
const int  reportStepIdx 
) const

◆ commitState()

◆ computePressures()

template<typename Scalar , typename IndexTraits >
std::map< std::string, Scalar > Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits >::computePressures ( const Network::ExtNetwork &  network,
const VFPProdProperties< Scalar > &  vfp_prod_props,
const int  reportStepIdx,
const Parallel::Communication comm 
) const
protected

◆ initialize()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits >::initialize ( const int  report_step)

Initialize wells according to network configuration.

◆ initializeWell()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits >::initializeWell ( WellInterfaceGeneric< Scalar, IndexTraits > &  well)

Initialize a single well according to network configuration.

◆ 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.)

◆ nodePressures()

template<typename Scalar , typename IndexTraits >
const std::map< std::string, Scalar > & Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits >::nodePressures ( ) const
inline

◆ operator==()

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits >::operator== ( const BlackoilWellModelNetworkGeneric< Scalar, IndexTraits > &  rhs) const

◆ resetState()

◆ serializeOp()

template<typename Scalar , typename IndexTraits >
template<class Serializer >
void Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits >::serializeOp ( Serializer &  serializer)
inline

◆ setFromRestart()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits >::setFromRestart ( const std::optional< std::map< std::string, double > > &  restart_pressures)

◆ setNodePressures()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits >::setNodePressures ( const std::map< std::string, Scalar > &  values)
inline

◆ shouldBalance()

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

◆ updateActiveState()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits >::updateActiveState ( const int  report_step)

Checks if network is active (at least one network well on prediction).

◆ updatePressures()

template<typename Scalar , typename IndexTraits >
Scalar Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits >::updatePressures ( const int  reportStepIdx,
const Scalar  damping_factor,
const Scalar  update_upper_bound 
)

Member Data Documentation

◆ active_

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits >::active_ {false}
protected

◆ last_valid_node_pressures_

◆ node_pressures_

◆ well_model_

template<typename Scalar , typename IndexTraits >
BlackoilWellModelGeneric<Scalar,IndexTraits>& Opm::BlackoilWellModelNetworkGeneric< Scalar, IndexTraits >::well_model_
protected

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