21 #ifndef GEOS_MESH_GENERATORS_WELLGENERATORBASE_HPP_
22 #define GEOS_MESH_GENERATORS_WELLGENERATORBASE_HPP_
24 #include "mesh/generators/WellGeneratorABC.hpp"
26 #include "codingUtilities/Utilities.hpp"
48 Group *
const parent );
63 virtual Group *
createChild(
string const & childKey,
string const & childName )
override;
224 constexpr
static char const * polylineNodeCoordsString() {
return "polylineNodeCoords"; }
225 constexpr
static char const * polylineSegmentConnString() {
return "polylineSegmentConn"; }
226 constexpr
static char const * numElementsPerSegmentString() {
return "numElementsPerSegment"; }
227 constexpr
static char const * minSegmentLengthString() {
return "minSegmentLength"; }
228 constexpr
static char const * minElementLengthString() {
return "minElementLength"; }
229 constexpr
static char const * radiusString() {
return "radius"; }
230 constexpr
static char const * wellRegionNameString() {
return "wellRegionName"; }
231 constexpr
static char const * wellControlsNameString() {
return "wellControlsName"; }
232 constexpr
static char const * perforationString() {
return "Perforation"; }
299 void logInternalWell()
const;
300 void logPerforationTable()
const;
void checkPerforationLocationsValidity()
Make sure that the perforation locations are valid:
array2d< globalIndex > m_elemToNodesMap
Connectivity between elements and nodes.
int m_numElemsPerSegment
Number of well elements per polyline interval.
globalIndex const m_numNodesPerElem
Number of nodes per well element.
virtual Group * createChild(string const &childKey, string const &childName) override
Create a new geometric object (box, plane, etc) as a child of this group.
int getPhysicalDimensionsNumber() const override
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 numNodesPerElement() const override
Get the number of nodes per well element.
globalIndex numPerforations() const override
Get the global number of perforations on this well.
globalIndex numNodes() const override
Get the global number of well nodes.
arrayView1d< globalIndex const > getNextElemIndex() const override
Get the global indices mapping an element to the next.
arrayView2d< real64 const > getPerfCoords() const override
Get the locations of the perforations.
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.
arrayView1d< real64 const > getElemVolume() const override
Get the volume of the well elements.
void discretizePolyline()
Discretize the polyline by placing well elements.
const string_array & getPerforationList() const override
void constructPolylineNodeToSegmentMap()
Map each polyline node to the polyline segment(s) it is connected to.
real64 getMinSegmentLength() const override
real64 getElementRadius() const override
Get the radius in the well.
WellGeneratorBase(const string &name, Group *const parent)
Constructor.
arrayView2d< real64 const > getElemCoords() const override
Get the physical location of the centers of well elements.
array2d< real64 > m_nodeCoords
Physical location of the nodes.
real64 getMinElemLength() const override
array1d< SortedArray< globalIndex > > m_polyNodeToSegmentMap
Map from the polyline nodes to the polyline nodes.
void connectPerforationsToWellElements()
Map each perforation to a well element.
real64 m_minElemLength
Min well element length.
string m_wellControlsName
Name of the constraints associated with this well.
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.
const string getWellRegionName() const override
array1d< real64 > m_perfDistFromHead
Physical location of the perforation wrt to well head.
array1d< real64 > m_elemVolume
Volume of well elements.
array1d< real64 > m_nodeDistFromHead
Physical location of the polyline node wrt to well head.
arrayView2d< globalIndex const > getElemToNodesMap() const override
Get the global indices of the well nodes nodes connected to each element.
arrayView2d< real64 const > getNodeCoords() const override
Get the physical location of the centers of well elements.
arrayView1d< real64 const > getPerfTransmissibility() const override
Get the well transmissibility at the perforations.
virtual void expandObjectCatalogs() override
This function is used to expand any catalogs in the data structure.
static CatalogInterface::CatalogType & getCatalog()
Accessor for the singleton Catalog object.
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)
arrayView1d< real64 const > getPerfSkinFactor() const override
Get the skin factor at a perforation.
real64 m_minSegmentLength
Min segment length.
array1d< array1d< globalIndex > > m_prevElemId
Global indices of the prev well elements (maybe need multiple prevs for branching)
array1d< real64 > m_perfSkinFactor
Skin Factor at the perforation.
array1d< globalIndex > m_perfElemId
Global index of the well element.
const array2d< globalIndex > & getSegmentToPolyNodeMap() const override
Getter to the Segment to PolyNode mapping.
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.
arrayView1d< globalIndex const > getPerfElemIndex() const override
Get the global indices of the well elements connected to each perforation.
globalIndex m_numElems
Global number of well elements.
const array2d< real64 > & getPolyNodeCoord() const override
Get the Coordinates of the polyline nodes.
const string getWellControlsName() const override
globalIndex m_numPerforations
Global number of perforations.
void generateWellGeometry() override
Main function of the class that generates the well geometry.
globalIndex numElements() const override
Get the global number of well elements.
arrayView1d< arrayView1d< globalIndex const > const > getPrevElemIndices() const override
Get the global indices mapping an element to the previous ones.
array2d< real64 > m_elemCenterCoords
Physical location of the center of the well element.
This class provides the base class/interface for the catalog value objects.
std::unordered_map< std::string, std::unique_ptr< CatalogInterface< BASETYPE, ARGS... > > > CatalogType
This is the type that will be used for the catalog. The catalog is actually instantiated in the BASET...
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.