21 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_WELLCONTROLS_HPP
22 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_WELLCONTROLS_HPP
30 namespace dataRepository
34 static constexpr
auto wellControls =
"WellControls";
196 return m_targetBHPTable->
evaluate( ¤tTime );
205 return m_rateSign * m_targetTotalRateTable->
evaluate( ¤tTime );
214 return m_rateSign * m_targetPhaseRateTable->
evaluate( ¤tTime );
223 return m_rateSign * m_targetMassRateTable->
evaluate( ¤tTime );
350 static constexpr
char const *
refElevString() {
return "referenceElevation"; }
352 static constexpr
char const *
typeString() {
return "type"; }
435 string m_targetPhaseName;
444 real64 m_injectionTemperature;
447 integer m_useSurfaceConditions;
450 string m_referenceReservoirRegion;
459 string m_targetTotalRateTableName;
462 string m_targetPhaseRateTableName;
465 string m_targetMassRateTableName;
468 string m_targetBHPTableName;
471 string m_statusTableName;
474 string m_perfStatusTableName;
480 real64 m_initialPressureCoefficient;
505 real64 m_regionAveragePressure;
508 real64 m_regionAverageTemperature;
virtual void evaluate(dataRepository::Group const &group, real64 const time, SortedArrayView< localIndex const > const &set, arrayView1d< real64 > const &result) const override final
Method to evaluate a function on a target object.
This class describes the controls used to operate a well.
~WellControls() override
Default destructor.
void setWellStatus(real64 const ¤tTime, WellControls::Status status)
Set well status from time and internal action, eg. all perfs closed.
bool isProducer() const
Is the well a producer?
virtual void postInputInitialization() override
WellControls & operator=(WellControls &&)=delete
Deleted move operator.
real64 getRegionAverageTemperature() const
Getter for the reservoir average temperature when m_useSurfaceConditions == 0.
string referenceReservoirRegion() const
Getter for the reservoir region associated with reservoir volume constraint.
Control getControl() const
Get the control type for the well.
void setNextDtFromTables(real64 const ¤tTime, real64 &nextDt)
set next time step based on tables intervals
struct geos::WellControls::viewKeyStruct viewKeysWellControls
ViewKey struct for the WellControls class.
bool isInjector() const
Is the well an injector?
real64 getReferenceElevation() const
Getter for the reference elevation where the BHP control is enforced.
WellControls::Status getWellStatus() const
Is the well open (or shut) based on internal action.
WellControls(WellControls &&)=delete
Deleted move constructor.
real64 getTargetPhaseRate(real64 const ¤tTime) const
Get the target phase rate.
void switchToBHPControl(real64 const &val)
Set the control type to BHP and set a numerical value for the control.
void switchToTotalRateControl(real64 const &val)
Set the control type to total rate and set a numerical value for the control.
real64 getRegionAveragePressure() const
Getter for the reservoir average pressure when m_useSurfaceConditions == 0.
integer useSurfaceConditions() const
Getter for the flag specifying whether we check rates at surface or reservoir conditions.
real64 getTargetTotalRate(real64 const ¤tTime) const
Get the target total rate.
void setReferenceGravityCoef(real64 const &refGravCoef)
Setter for the reference gravity.
WellControls(string const &name, dataRepository::Group *const parent)
Constructor for WellControls Objects.
void setRegionAverageTemperature(real64 regionAverageTemperature)
Set the reservoir average temperature when m_useSurfaceConditions == 0.
void setControl(Control const &newControl)
Set the control type for the well.
WellControls(WellControls const &)=delete
Deleted copy constructor.
WellControls & operator=(WellControls const &)=delete
Deleted assignment operator.
const string & getTargetPhaseName() const
Get the target phase name.
void switchToMassRateControl(real64 const &val)
Set the control type to mass rate and set a numerical value for the control.
void switchToPhaseRateControl(real64 const &val)
Set the control type to phase rate and set a numerical value for the control.
real64 getTargetMassRate(real64 const ¤tTime) const
Get the target mass rate.
bool isCrossflowEnabled() const
Getter for the flag to enable crossflow.
WellControls()=delete
Deleted default constructor.
real64 getTargetBHP(real64 const ¤tTime) const
Get the target bottom hole pressure value.
bool isWellOpen() const
Is the well open (or shut) at currentTime, status initalized in WellSolverBase::implicitStepSetup.
const real64 & getSurfaceTemperature() const
Getter for the surface temperature when m_useSurfaceConditions == 1.
Control getInputControl() const
Get the input control type for the well.
arrayView1d< real64 const > getInjectionStream() const
Const accessor for the composition of the injection stream.
real64 getReferenceGravityCoef() const
Getter for the reference gravity coefficient.
real64 getInitialPressureCoefficient() const
Getter for the initial pressure coefficient.
const real64 & getSurfacePressure() const
Getter for the surface pressure when m_useSurfaceConditions == 1.
real64 getInjectionTemperature() const
Const accessor for the temperature of the injection stream.
void setRegionAveragePressure(real64 regionAveragePressure)
Set the reservoir average pressure when m_useSurfaceConditions == 0.
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
double real64
64-bit floating point type.
int integer
Signed integer type.
Array< T, 1 > array1d
Alias for 1D array.
ENUM_STRINGS(LinearSolverParameters::SolverType, "direct", "cg", "gmres", "fgmres", "bicgstab", "richardson", "preconditioner")
Declare strings associated with enumeration values.
Struct to serve as a container for variable strings and keys.
static constexpr char const * targetBHPTableNameString()
string key for BHP table name
static constexpr char const * initialPressureCoefficientString()
string key for the initial pressure coefficient
static constexpr char const * useSurfaceConditionsString()
String key for checking the rates at surface conditions.
static constexpr char const * perfStatusTableNameString()
string key for perforation status table name
static constexpr char const * refElevString()
String key for the well reference elevation (for BHP control)
static constexpr char const * enableCrossflowString()
string key for the crossflow flag
static constexpr char const * targetMassRateTableNameString()
string key for mass rate table name
static constexpr char const * referenceReservoirRegionString()
String key for reference reservoir region.
static constexpr char const * injectionTemperatureString()
String key for the well injection temperature.
static constexpr char const * surfaceTemperatureString()
String key for the surface temperature.
static constexpr char const * injectionStreamString()
String key for the well injection stream.
static constexpr char const * statusTableNameString()
string key for status table name
static constexpr char const * targetTotalRateTableNameString()
string key for total rate table name
static constexpr char const * targetBHPString()
String key for the well target BHP.
static constexpr char const * targetTotalRateString()
String key for the well target rate.
static constexpr char const * targetPhaseRateTableNameString()
string key for phase rate table name
static constexpr char const * surfacePressureString()
String key for the surface pressure.
static constexpr char const * targetPhaseNameString()
String key for the well target phase name.
static constexpr char const * targetMassRateString()
String key for the well target phase name.
static constexpr char const * targetPhaseRateString()
String key for the well target phase rate.
static constexpr char const * inputControlString()
String key for the well input control.
static constexpr char const * typeString()
String key for the well type.
static constexpr char const * currentControlString()
String key for the well current control.