GEOS
WellBHPConstraints.hpp
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2024 TotalEnergies
7  * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University
8  * Copyright (c) 2023-2024 Chevron
9  * Copyright (c) 2019- GEOS/GEOSX Contributors
10  * All rights reserved
11  *
12  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
13  * ------------------------------------------------------------------------------------------------------------
14  */
15 
16 /*
17  * @file WellBHPConstraints.hpp
18  */
19 
20 
21 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_WELLBHPCONSTRAINTS_HPP
22 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_WELLBHPCONSTRAINTS_HPP
23 
25 #include "dataRepository/Group.hpp"
27 #include "WellConstraintsBase.hpp"
28 namespace geos
29 {
30 
36 {
37 public:
38 
43 
49  explicit BHPConstraint( string const & name, dataRepository::Group * const parent );
50 
51 
55  ~BHPConstraint() override;
56 
60  BHPConstraint() = delete;
61 
65  BHPConstraint( BHPConstraint const & ) = delete;
66 
70  BHPConstraint( BHPConstraint && ) = delete;
71 
76  BHPConstraint & operator=( BHPConstraint const & ) = delete;
77 
83 
85 
86 
91 
92  // Temp interface - tjb
93  virtual ConstraintTypeId getControl() const override { return ConstraintTypeId::BHP; };
94 
96 
101  {
103  static constexpr char const * targetBHPString() { return "targetBHP"; }
105  static constexpr char const * refElevString() { return "referenceElevation"; }
106  }
107  viewKeysWellBHPConstraint;
108 
109  //virtual bool checkViolation( WellConstraintBase const & currentConstraint, real64 const & currentTime ) const override;
110 
116 
121  void setReferenceElevation( real64 const & refElevation ) { m_refElevation=refElevation; }
122 
128 
132  void setReferenceGravityCoef( real64 const & refGravCoef ) { m_refGravCoef = refGravCoef; }
133 
134 protected:
135 
136  virtual void postInputInitialization() override;
137 
140 
143 
144 };
145 
151 {
152 public:
153 
158 
164  explicit MinimumBHPConstraint( string const & name, dataRepository::Group * const parent );
165 
166 
171 
176 
181 
186 
192 
198 
200 
201 
206 
207 
213  {
215  static constexpr char const * targetBHPString() { return "targetBHP"; }
216  }
217  viewKeysWellBHPConstraint;
218 
219  virtual bool checkViolation( WellConstraintBase const & currentConstraint, real64 const & currentTime ) const override;
220 
221 protected:
222 
223  virtual void postInputInitialization() override;
224 
225 
226 };
227 
233 {
234 public:
235 
240 
246  explicit MaximumBHPConstraint( string const & name, dataRepository::Group * const parent );
247 
248 
253 
258 
263 
268 
274 
280 
282 
283 
288  // Temp interface - tjb
289  virtual ConstraintTypeId getControl() const override { return ConstraintTypeId::BHP; };
290 
291 
293 
298  {
300  static constexpr char const * targetBHPString() { return "targetBHP"; }
301  }
302  viewKeysWellBHPConstraint;
303 
304  virtual bool checkViolation( WellConstraintBase const & currentConstraint, real64 const & currentTime ) const override;
305 protected:
306 
307  virtual void postInputInitialization() override;
308 
309 
310 
311 private:
312 
313 
314 };
315 
316 
317 } //namespace geos
318 
319 #endif //GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_WELLBHPCONSTRAINTS_HPP
This class describes a minimum pressure constraint used to control a injection well.
BHPConstraint(BHPConstraint &&)=delete
Deleted move constructor.
void setReferenceElevation(real64 const &refElevation)
Set the reference elevation where the BHP control is enforced.
void setReferenceGravityCoef(real64 const &refGravCoef)
Setter for the reference gravity.
virtual void postInputInitialization() override
BHPConstraint()=delete
Deleted default constructor.
BHPConstraint(string const &name, dataRepository::Group *const parent)
Constructor for WellControls Objects.
~BHPConstraint() override
Default destructor.
real64 getReferenceGravityCoef() const
Getter for the reference gravity coefficient.
real64 m_refGravCoef
Gravity coefficient of the reference elevation.
BHPConstraint & operator=(BHPConstraint &&)=delete
Deleted move operator.
BHPConstraint & operator=(BHPConstraint const &)=delete
Deleted assignment operator.
real64 getReferenceElevation() const
Getter for the reference elevation where the BHP control is enforced.
BHPConstraint(BHPConstraint const &)=delete
Deleted copy constructor.
real64 m_refElevation
Reference elevation.
~MaximumBHPConstraint() override
Default destructor.
virtual void postInputInitialization() override
MaximumBHPConstraint(MaximumBHPConstraint &&)=delete
Deleted move constructor.
MaximumBHPConstraint(MaximumBHPConstraint const &)=delete
Deleted copy constructor.
MaximumBHPConstraint & operator=(MaximumBHPConstraint const &)=delete
Deleted assignment operator.
MaximumBHPConstraint()=delete
Deleted default constructor.
virtual bool checkViolation(WellConstraintBase const &currentConstraint, real64 const &currentTime) const override
Check if this constraint is violated.
MaximumBHPConstraint & operator=(MaximumBHPConstraint &&)=delete
Deleted move operator.
MaximumBHPConstraint(string const &name, dataRepository::Group *const parent)
Constructor for WellControls Objects.
This class describes a minimum pressure constraint used to control a injection well.
MinimumBHPConstraint(string const &name, dataRepository::Group *const parent)
Constructor for WellControls Objects.
MinimumBHPConstraint()=delete
Deleted default constructor.
virtual void postInputInitialization() override
~MinimumBHPConstraint() override
Default destructor.
MinimumBHPConstraint(MinimumBHPConstraint const &)=delete
Deleted copy constructor.
MinimumBHPConstraint & operator=(MinimumBHPConstraint const &)=delete
Deleted assignment operator.
MinimumBHPConstraint(MinimumBHPConstraint &&)=delete
Deleted move constructor.
MinimumBHPConstraint & operator=(MinimumBHPConstraint &&)=delete
Deleted move operator.
virtual bool checkViolation(WellConstraintBase const &currentConstraint, real64 const &currentTime) const override
Check if this constraint is violated.
double real64
64-bit floating point type.
Definition: DataTypes.hpp:98
Struct to serve as a container for variable strings and keys.
static constexpr char const * targetBHPString()
String key for the well target BHP.
static constexpr char const * refElevString()
String key for the well reference elevation (for BHP control)
Struct to serve as a container for variable strings and keys.
static constexpr char const * targetBHPString()
String key for the well target BHP.
Struct to serve as a container for variable strings and keys.
static constexpr char const * targetBHPString()
String key for the well target BHP.