21 #ifndef GEOS_MESH_GENERATORS_WELLGENERATORBASE_HPP_
22 #define GEOS_MESH_GENERATORS_WELLGENERATORBASE_HPP_
24 #include "mesh/generators/MeshComponentBase.hpp"
26 #include "codingUtilities/Utilities.hpp"
48 Group *
const parent );
59 virtual Group *
createChild(
string const & childKey,
string const & childName )
override;
214 constexpr
static char const * polylineNodeCoordsString() {
return "polylineNodeCoords"; }
215 constexpr
static char const * polylineSegmentConnString() {
return "polylineSegmentConn"; }
216 constexpr
static char const * numElementsPerSegmentString() {
return "numElementsPerSegment"; }
217 constexpr
static char const * minSegmentLengthString() {
return "minSegmentLength"; }
218 constexpr
static char const * minElementLengthString() {
return "minElementLength"; }
219 constexpr
static char const * radiusString() {
return "radius"; }
220 constexpr
static char const * wellRegionNameString() {
return "wellRegionName"; }
221 constexpr
static char const * wellControlsNameString() {
return "wellControlsName"; }
222 constexpr
static char const * perforationString() {
return "Perforation"; }
289 void logInternalWell()
const;
290 void logPerforationTable()
const;
void checkPerforationLocationsValidity()
Make sure that the perforation locations are valid:
arrayView1d< globalIndex const > getNextElemIndex() const
Get the global indices mapping an element to the next.
array2d< globalIndex > m_elemToNodesMap
Connectivity between elements and nodes.
int m_numElemsPerSegment
Number of well elements per polyline interval.
arrayView2d< real64 const > getElemCoords() const
Get the physical location of the centers of well elements.
globalIndex const m_numNodesPerElem
Number of nodes per well element.
arrayView1d< real64 const > getPerfTransmissibility() const
Get the well transmissibility at the perforations.
const string getWellRegionName() const
virtual Group * createChild(string const &childKey, string const &childName) override
Create a new geometric object (box, plane, etc) as a child of this group.
const int m_nDims
Number of physical dimensions.
void findPolylineHeadNodeIndex()
Find the head node of the well (i.e., top node of the polyline).
void postInputInitialization() override
This function provides capability to post process input values prior to any other initialization oper...
array2d< real64 > m_polyNodeCoords
Coordinates of the polyline nodes.
globalIndex getNextSegmentIndex(globalIndex topSegId, globalIndex currentNodeId) const
At a given node, find the next segment going in the direction of the bottom of the well.
void discretizePolyline()
Discretize the polyline by placing well elements.
void constructPolylineNodeToSegmentMap()
Map each polyline node to the polyline segment(s) it is connected to.
void generateWellGeometry()
Main function of the class that generates the well geometry.
WellGeneratorBase(const string &name, Group *const parent)
Constructor.
arrayView1d< real64 const > getPerfSkinFactor() const
Get the skin factor at a perforation.
real64 getMinElemLength() const
array2d< real64 > m_nodeCoords
Physical location of the nodes.
real64 getElementRadius() const
Get the radius in the well.
globalIndex numNodes() const
Get the global number of well nodes.
const string getWellControlsName() const
array1d< SortedArray< globalIndex > > m_polyNodeToSegmentMap
Map from the polyline nodes to the polyline nodes.
void connectPerforationsToWellElements()
Map each perforation to a well element.
arrayView2d< globalIndex const > getElemToNodesMap() const
Get the global indices of the well nodes nodes connected to each element.
real64 m_minElemLength
Min well element length.
string m_wellControlsName
Name of the constraints associated with this well.
arrayView1d< globalIndex const > getPerfElemIndex() const
Get the global indices of the well elements connected to each perforation.
string_array m_perforationList
List of perforation names.
array1d< globalIndex > m_nextElemId
Global index of the next well element.
array1d< real64 > m_perfTransmissibility
Well Peaceman index at the perforation.
array2d< globalIndex > m_segmentToPolyNodeMap
Connectivity between the polyline nodes.
arrayView2d< real64 const > getNodeCoords() const
Get the physical location of the centers of well elements.
array1d< real64 > m_perfDistFromHead
Physical location of the perforation wrt to well head.
const string_array & getPerforationList() const
array1d< real64 > m_elemVolume
Volume of well elements.
array1d< real64 > m_nodeDistFromHead
Physical location of the polyline node wrt to well head.
arrayView2d< real64 const > getPerfCoords() const
Get the locations of the perforations.
const array2d< globalIndex > & getSegmentToPolyNodeMap() const
Getter to the Segment to PolyNode mapping.
const array2d< real64 > & getPolyNodeCoord() const
Get the Coordinates of the polyline nodes.
virtual void expandObjectCatalogs() override
This function is used to expand any catalogs in the data structure.
arrayView1d< real64 const > getElemVolume() const
Get the volume of the well elements.
arrayView1d< arrayView1d< globalIndex const > const > getPrevElemIndices() const
Get the global indices mapping an element to the previous ones.
globalIndex numElements() const
Get the global number of well elements.
array2d< real64 > m_perfCoords
Absolute physical location of the perforation.
real64 m_radius
Radius area of the well (assumed to be valid for the entire well)
globalIndex numNodesPerElement() const
Get the number of nodes per well element.
real64 m_minSegmentLength
Min segment length.
array1d< array1d< globalIndex > > m_prevElemId
Global indices of the prev well elements (maybe need multiple prevs for branching)
int getPhysicalDimensionsNumber() const
array1d< real64 > m_perfSkinFactor
Skin Factor at the perforation.
array1d< globalIndex > m_perfElemId
Global index of the well element.
globalIndex m_polylineHeadNodeId
Index of the node at the well head.
globalIndex m_numNodes
Global number of well nodes.
void mergePerforations(array1d< array1d< localIndex > > const &elemToPerfMap)
Merge perforations on the elements with multiple perforations.
string m_wellRegionName
Name of the corresponding well region.
virtual void fillPolylineDataStructure()
Fills the intermediate polyline data structure.
globalIndex m_numElems
Global number of well elements.
globalIndex numPerforations() const
Get the global number of perforations on this well.
real64 getMinSegmentLength() const
globalIndex m_numPerforations
Global number of perforations.
array2d< real64 > m_elemCenterCoords
Physical location of the center of the well element.
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
Array< T, 2, PERMUTATION > array2d
Alias for 2D array.
GEOS_GLOBALINDEX_TYPE globalIndex
Global index type (for indexing objects across MPI partitions).
array1d< string > string_array
A 1-dimensional array of geos::string types.
double real64
64-bit floating point type.
ArrayView< T, 2, USD > arrayView2d
Alias for 2D array view.
Array< T, 1 > array1d
Alias for 1D array.