GEOS
LineBlock.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 #ifndef GEOS_WELLBLOCK_HPP
17 #define GEOS_WELLBLOCK_HPP
18 
19 #include "mesh/generators/LineBlockABC.hpp"
20 
21 
22 namespace geos
23 {
24 
28 class LineBlock : public LineBlockABC
29 {
30 public:
36  LineBlock( string const & name, Group * const parent );
37 
42 
43  // getters for element data
44 
45  globalIndex numElements() const override final { return m_numElems; }
46 
51  void setNumElements( globalIndex numElems ) { m_numElems = numElems; }
52 
53  arrayView2d< real64 const > getElemCoords() const override final { return m_elemCenterCoords; }
54 
59  void setElemCoords( arrayView2d< real64 const > elemCenterCoords ) { m_elemCenterCoords = elemCenterCoords; }
60 
61  arrayView1d< globalIndex const > getNextElemIndex() const override final { return m_nextElemId; }
62 
67  void setNextElemIndex( arrayView1d< globalIndex const > nextElemId ) { m_nextElemId = nextElemId; }
68 
69  arrayView1d< arrayView1d< globalIndex const > const > getPrevElemIndices() const override final { return m_prevElemId.toNestedViewConst(); }
70 
71 
77 
78  arrayView2d< globalIndex const > getElemToNodesMap() const override final { return m_elemToNodesMap; }
79 
80 
85  void setElemToNodesMap( arrayView2d< globalIndex const > elemToNodesMap ) { m_elemToNodesMap = elemToNodesMap; }
86 
87  arrayView1d< real64 const > getElemVolume() const override final { return m_elemVolume; }
88 
89 
94  void setElemVolume( arrayView1d< real64 const > elemVolume ) { m_elemVolume = elemVolume; }
95 
96  real64 getElementRadius() const override final { return m_radius; }
97 
98 
103  void setElementRadius( real64 radius ) { m_radius = radius; }
104 
105  // getters for node data
106 
107  globalIndex numNodes() const override final { return m_numNodes; }
108 
109 
114  void setNumNodes( globalIndex numNodes ) { m_numNodes = numNodes; }
115 
116  arrayView2d< real64 const > getNodeCoords() const override final { return m_nodeCoords; }
117 
122  void setNodeCoords( arrayView2d< real64 const > nodeCoords ) { m_nodeCoords = nodeCoords; }
123 
124 
125 
126  // getters for perforation data
127 
128  globalIndex numPerforations() const override final { return m_numPerforations; }
129 
130 
136 
141  void setPerfCoords( arrayView2d< real64 const > perfCoords ) { m_perfCoords = perfCoords; }
142 
143  arrayView2d< real64 const > getPerfCoords() const override final { return m_perfCoords; }
144 
149  void setPerfTransmissibility( arrayView1d< real64 const > perfTransmissibility ) { m_perfTransmissibility = perfTransmissibility; }
150 
151  arrayView1d< real64 const > getPerfTransmissibility() const override final { return m_perfTransmissibility; }
152 
157  void setPerfSkinFactor( arrayView1d< real64 const > perfSkinFactor ) { m_perfSkinFactor = perfSkinFactor; }
158 
159  arrayView1d< real64 const > getPerfSkinFactor() const override final { return m_perfSkinFactor; }
160 
165  void setPerfTargetRegion( string_array const & perfTargetRegion ) { m_perfTargetRegion = perfTargetRegion; }
166 
167  string_array const & getPerfTargetRegion() const override final { return m_perfTargetRegion; }
168 
173  void setPerfElemIndex( arrayView1d< globalIndex const > perfElemId ) { m_perfElemId = perfElemId; }
174 
175  arrayView1d< globalIndex const > getPerfElemIndex() const override final { return m_perfElemId; }
176 
181  void setPerfStatusTableName ( string_array perfStatusTable ) { m_perforationStatusTableList = perfStatusTable; }
182  string_array const & getPerfStatusTableName() const override final { return m_perforationStatusTableList; }
183 
188  void setPerfName ( string_array perfName ) { m_perforationList = perfName; }
189 
190  string_array const & getPerfName() const override final { return m_perforationList; }
191 
196  void setWellControlsName( string const & wellControlsName ) { m_wellControlsName = wellControlsName; }
197 
198  string const & getWellControlsName( ) const override final { return m_wellControlsName; }
199 
204  void setWellGeneratorName( string const & wellGeneratorName ) { m_wellGeneratorName = wellGeneratorName; }
205 
206  string const & getWellGeneratorName( ) const override final { return m_wellGeneratorName; }
207 
209 
211 
212 
213 
214 private:
215 
216 
217  // XML Input
218 
220  real64 m_radius;
221 
222  // Geometry of the well (later passed to the WellElementSubRegion)
223 
224  // well element data
225 
227  globalIndex m_numElems;
228 
230  array2d< real64 > m_elemCenterCoords;
231 
233  array1d< globalIndex > m_nextElemId;
234 
236  array1d< array1d< globalIndex > > m_prevElemId;
237 
239  array2d< globalIndex > m_elemToNodesMap;
240 
242  array1d< real64 > m_elemVolume;
243 
244 
245  // well node data
246 
248  globalIndex m_numNodes;
249 
251  array2d< real64 > m_nodeCoords;
252 
253  // perforation data
254 
256  globalIndex m_numPerforations;
257 
259  array2d< real64 > m_perfCoords;
260 
262  array1d< real64 > m_perfTransmissibility;
263 
265  array1d< real64 > m_perfSkinFactor;
266 
268  string_array m_perfTargetRegion;
269 
271  array1d< globalIndex > m_perfElemId;
272  // Perforation data
273 
275  string_array m_perforationStatusTableList;
276 
278  string_array m_perforationList;
279 
281  string m_wellControlsName;
282 
284  string m_wellGeneratorName;
285 
286 };
287 }
288 #endif
void setPerfCoords(arrayView2d< real64 const > perfCoords)
Set the locations of the perforations.
Definition: LineBlock.hpp:141
string const & getWellGeneratorName() const override final
Get the well generator name.
Definition: LineBlock.hpp:206
string const & getWellControlsName() const override final
Get the well controls name.
Definition: LineBlock.hpp:198
arrayView2d< real64 const > getPerfCoords() const override final
Get the locations of the perforations.
Definition: LineBlock.hpp:143
void setElemVolume(arrayView1d< real64 const > elemVolume)
Set the volume of the well elements.
Definition: LineBlock.hpp:94
void setElemToNodesMap(arrayView2d< globalIndex const > elemToNodesMap)
Set the global indices of the well nodes nodes connected to each element.
Definition: LineBlock.hpp:85
arrayView2d< real64 const > getElemCoords() const override final
Get the physical location of the centers of well elements.
Definition: LineBlock.hpp:53
string_array const & getPerfName() const override final
Get names of perfs.
Definition: LineBlock.hpp:190
arrayView1d< real64 const > getPerfTransmissibility() const override final
Get the well transmissibility at the perforations.
Definition: LineBlock.hpp:151
string_array const & getPerfStatusTableName() const override final
Get names of perf status tables.
Definition: LineBlock.hpp:182
arrayView1d< real64 const > getPerfSkinFactor() const override final
Get the well skin factor at the perforations.
Definition: LineBlock.hpp:159
LineBlock(string const &name, Group *const parent)
Constructor for this class.
arrayView1d< real64 const > getElemVolume() const override final
Get the volume of the well elements.
Definition: LineBlock.hpp:87
arrayView1d< globalIndex const > getPerfElemIndex() const override final
Get the global indices of the well elements connected to each perforation.
Definition: LineBlock.hpp:175
void setWellGeneratorName(string const &wellGeneratorName)
Set the well genrator name.
Definition: LineBlock.hpp:204
arrayView1d< globalIndex const > getNextElemIndex() const override final
Get the global indices mapping an element to the next.
Definition: LineBlock.hpp:61
globalIndex numPerforations() const override final
Get the global number of perforations on this well.
Definition: LineBlock.hpp:128
string_array const & getPerfTargetRegion() const override final
Get the target region for the perforations.
Definition: LineBlock.hpp:167
real64 getElementRadius() const override final
Get the radius in the well.
Definition: LineBlock.hpp:96
void setNumElements(globalIndex numElems)
Set the global number of well elements.
Definition: LineBlock.hpp:51
void setElementRadius(real64 radius)
Set the radius in the well.
Definition: LineBlock.hpp:103
void setNumPerforations(globalIndex numPerforations)
Set the global number of perforations on this well.
Definition: LineBlock.hpp:135
arrayView2d< real64 const > getNodeCoords() const override final
Get the physical location of the centers of well elements.
Definition: LineBlock.hpp:116
void setPerfElemIndex(arrayView1d< globalIndex const > perfElemId)
Set the global indices of the well elements connected to each perforation.
Definition: LineBlock.hpp:173
void setPerfSkinFactor(arrayView1d< real64 const > perfSkinFactor)
Set the well skin factor at the perforations.
Definition: LineBlock.hpp:157
void setPerfTransmissibility(arrayView1d< real64 const > perfTransmissibility)
Set the well transmissibility at the perforations.
Definition: LineBlock.hpp:149
void setNextElemIndex(arrayView1d< globalIndex const > nextElemId)
Set the global indices mapping an element to the next.
Definition: LineBlock.hpp:67
globalIndex numElements() const override final
Get the global number of well elements.
Definition: LineBlock.hpp:45
void setPrevElemIndices(arrayView1d< arrayView1d< globalIndex const > const > prevElemIndices)
Set the global indices mapping an element to the previous ones.
arrayView1d< arrayView1d< globalIndex const > const > getPrevElemIndices() const override final
Get the global indices mapping an element to the previous ones.
Definition: LineBlock.hpp:69
void setNodeCoords(arrayView2d< real64 const > nodeCoords)
Set the physical location of the centers of well elements.
Definition: LineBlock.hpp:122
void setElemCoords(arrayView2d< real64 const > elemCenterCoords)
Set the physical location of the centers of well elements.
Definition: LineBlock.hpp:59
void setPerfStatusTableName(string_array perfStatusTable)
Set the perforation status table name array.
Definition: LineBlock.hpp:181
void setPerfTargetRegion(string_array const &perfTargetRegion)
Set the target region for the perforations.
Definition: LineBlock.hpp:165
globalIndex numNodes() const override final
Get the global number of well nodes.
Definition: LineBlock.hpp:107
arrayView2d< globalIndex const > getElemToNodesMap() const override final
Get the global indices of the well nodes nodes connected to each element.
Definition: LineBlock.hpp:78
void setPerfName(string_array perfName)
Set the perforation name array.
Definition: LineBlock.hpp:188
void setWellControlsName(string const &wellControlsName)
Set the well controls name.
Definition: LineBlock.hpp:196
void setNumNodes(globalIndex numNodes)
Set the global number of well nodes.
Definition: LineBlock.hpp:114
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
Definition: DataTypes.hpp:179
stdVector< string > string_array
A 1-dimensional array of geos::string types.
Definition: DataTypes.hpp:361
Array< T, 2, PERMUTATION > array2d
Alias for 2D array.
Definition: DataTypes.hpp:191
GEOS_GLOBALINDEX_TYPE globalIndex
Global index type (for indexing objects across MPI partitions).
Definition: DataTypes.hpp:87
double real64
64-bit floating point type.
Definition: DataTypes.hpp:98
ArrayView< T, 2, USD > arrayView2d
Alias for 2D array view.
Definition: DataTypes.hpp:195
Array< T, 1 > array1d
Alias for 1D array.
Definition: DataTypes.hpp:175