GEOS
WellInjectionConstraint.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 WellInjectionConstraint.hpp
18  */
19 
20 
21 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_WELLINJECTIONCONSTRAINT_HPP
22 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_WELLINJECTIONCONSTRAINT_HPP
23 
25 #include "dataRepository/Group.hpp"
27 
28 namespace geos
29 {
30 
31 using namespace dataRepository;
37 template< typename ConstraintType >
38 class InjectionConstraint : public ConstraintType
39 {
40 public:
46 
52  explicit InjectionConstraint( string const & name, dataRepository::Group * const parent );
53 
58 
62  InjectionConstraint() = delete;
63 
68 
73 
79 
85 
87 
92  static string catalogName()
93  {
94  return "InjectionConstraint"+ConstraintType::catalogName();
95  }
96 
98  {
100  static constexpr char const * injectionStreamString() { return "injectionStream"; }
102  static constexpr char const * injectionTemperatureString() { return "injectionTemperature"; }
103  };
104 
109  arrayView1d< real64 const > getInjectionStream() const { return m_injectionStream; }
110 
115  real64 getInjectionTemperature() const { return m_injectionTemperature; }
116 
117 protected:
118 
119  virtual void postInputInitialization() override;
120  static bool isViolated( const real64 & currentValue, const real64 & constraintValue )
121  { return currentValue > constraintValue; }
122 
123  void validateInjectionStream();
124 private:
125 
127  array1d< real64 > m_injectionStream;
128 
130  real64 m_injectionTemperature;
131 
132 };
133 
134 
135 } //namespace geos
136 
137 #endif //GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_WELLINJECTIONCONSTRAINT_HPP
This class describes constraint used to control a injection well.
InjectionConstraint(InjectionConstraint &&)=delete
Deleted move constructor.
InjectionConstraint()=delete
Deleted default constructor.
InjectionConstraint(string const &name, dataRepository::Group *const parent)
Constructor for WellControls Objects.
~InjectionConstraint() override
Default destructor.
InjectionConstraint & operator=(InjectionConstraint &&)=delete
Deleted move operator.
static string catalogName()
name of the node manager in the object catalog
InjectionConstraint & operator=(InjectionConstraint const &)=delete
Deleted assignment operator.
InjectionConstraint(InjectionConstraint const &)=delete
Deleted copy constructor.
real64 getInjectionTemperature() const
Const accessor for the temperature of the injection stream.
arrayView1d< real64 const > getInjectionStream() const
Const accessor for the composition of the injection stream.
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
Definition: DataTypes.hpp:179
double real64
64-bit floating point type.
Definition: DataTypes.hpp:98
static constexpr char const * injectionStreamString()
String key for the well injection stream.
static constexpr char const * injectionTemperatureString()
String key for the well injection temperature.