21 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_WELLPHASEVOLUMERATECONSTRAINT_HPP
22 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_WELLPHASEVOLUMERATECONSTRAINT_HPP
27 #include "WellConstraintsBase.hpp"
28 #include "WellConstants.hpp"
34 template<
typename T >
39 for(
integer ip = 0; ip < fluidModel.numFluidPhases(); ++ip )
41 if( fluidModel.phaseNames()[ip] == inputPhase )
111 return "PhaseVolumeRateConstraint";
132 void setPhaseName(
const string & phaseName ) { m_phaseName = phaseName; }
176 template<
typename T >
184 ": Invalid phase type for simulation fluid model",
#define GEOS_THROW_IF(COND, MSG,...)
Conditionally raise a hard error and terminate the program.
This class describes a phase rate constraint used to control a well of WellConstraintType type (Injec...
const string & getPhaseName() const
Get the target phase name.
void setPhaseName(const string &phaseName)
Set the target phase name.
static string catalogName()
name of the node manager in the object catalog
PhaseVolumeRateConstraint(PhaseVolumeRateConstraint const &)=delete
Deleted copy constructor.
~PhaseVolumeRateConstraint() override
Default destructor.
PhaseVolumeRateConstraint & operator=(PhaseVolumeRateConstraint const &)=delete
Deleted assignment operator.
PhaseVolumeRateConstraint()=delete
Deleted default constructor.
virtual bool checkViolation(WellConstraintBase const ¤tConstraint, real64 const ¤tTime) const override
Check if this constraint is violated.
const localIndex & getPhaseIndex() const
Get the target phase index.
PhaseVolumeRateConstraint(string const &name, dataRepository::Group *const parent)
Constructor for WellControls Objects.
PhaseVolumeRateConstraint & operator=(PhaseVolumeRateConstraint &&)=delete
Deleted move operator.
PhaseVolumeRateConstraint(PhaseVolumeRateConstraint &&)=delete
Deleted move constructor.
virtual void postInputInitialization() override
void setPhaseIndex(const localIndex &phaseIndex)
Set the target phase index.
void validatePhaseType(T const &fluidModel)
Validate phase type is consistent with fluidmodel.
std::string string
String type.
double real64
64-bit floating point type.
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
int integer
Signed integer type.
static constexpr char const * phaseRateString()
String key for the well target phase rate.
static constexpr char const * phaseNameString()
String key for the well target phase name.