https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
SubChannelMesh Class Referenceabstract

Base class for subchannel meshes. More...

#include <SubChannelMesh.h>

Inheritance diagram for SubChannelMesh:
[legend]

Public Types

enum  ParallelType { ParallelType::DEFAULT, ParallelType::REPLICATED, ParallelType::DISTRIBUTED }
 
typedef std::pair< const Node *, BoundaryIDPeriodicNodeInfo
 
typedef DataFileName DataFileParameterType
 

Public Member Functions

 SubChannelMesh (const InputParameters &parameters)
 
 SubChannelMesh (const SubChannelMesh &other_mesh)
 
virtual const std::vector< Real > & getZGrid () const
 Get axial location of layers. More...
 
virtual unsigned int getZIndex (const Point &point) const
 Get axial index of point. More...
 
virtual const std::vector< std::vector< Real > > & getKGrid () const
 Get axial cell location and value of loss coefficient. More...
 
virtual const std::vector< Real > & getZBlockage () const
 Get axial location of blockage (in,out) [m]. More...
 
virtual const std::vector< unsigned int > & getIndexBlockage () const
 Get index of blocked subchannels. More...
 
virtual const std::vector< Real > & getReductionBlockage () const
 Get area reduction of blocked subchannels. More...
 
virtual const RealgetKij () const
 Return lateral loss coefficient. More...
 
virtual unsigned int getNumOfAxialCells () const
 Return the number of axial cells. More...
 
virtual Node * getChannelNode (unsigned int i_chan, unsigned int iz) const =0
 Get the subchannel mesh node for a given channel index and elevation index. More...
 
virtual Node * getPinNode (unsigned int i_pin, unsigned int iz) const =0
 Get the pin mesh node for a given pin index and elevation index. More...
 
Node * getChannelNodeFromDuct (Node *duct_node) const
 Function that gets the channel node from the duct node. More...
 
Node * getDuctNodeFromChannel (Node *channel_node) const
 Function that gets the duct node from the channel node. More...
 
virtual unsigned int getNumOfChannels () const =0
 Return the number of channels per layer. More...
 
bool pinMeshExist () const
 Return if Pin Mesh exists or not. More...
 
bool ductMeshExist () const
 Return if Duct Mesh exists or not. More...
 
virtual unsigned int getNumOfGapsPerLayer () const =0
 Return the number of gaps per layer. More...
 
virtual unsigned int getNumOfPins () const =0
 Return the number of pins. More...
 
virtual const std::pair< unsigned int, unsigned int > & getGapChannels (unsigned int i_gap) const =0
 Return a pair of subchannel indices for a given gap index. More...
 
virtual const std::pair< unsigned int, unsigned int > & getGapPins (unsigned int i_gap) const =0
 Return a pair of pin indices for a given gap index. More...
 
virtual const std::vector< unsigned int > & getChannelGaps (unsigned int i_chan) const =0
 Return a vector of gap indices for a given channel index. More...
 
virtual const std::vector< unsigned int > & getPinChannels (unsigned int i_pin) const =0
 Return a vector of channel indices for a given Pin index. More...
 
virtual const std::vector< unsigned int > & getChannelPins (unsigned int i_chan) const =0
 Return a vector of pin indices for a given channel index. More...
 
virtual const RealgetPitch () const
 Return the undeformed pitch between 2 subchannels. More...
 
virtual const RealgetPinDiameter () const
 Return undeformed Pin diameter. More...
 
Real getAssemblyFlowArea () const
 Return undeformed bundle inlet flow area. More...
 
Real getAssemblyWettedPerimeter () const
 Return undeformed bundle inlet wetted perimeter. More...
 
Real getAssemblyHydraulicDiameter () const
 Return undeformed bundle-average hydraulic diameter. More...
 
virtual Real getSubchannelFlowArea (unsigned int i_chan, Real z) const =0
 Return undeformed flow area for a subchannel at an axial location, including any blockage reduction. More...
 
virtual Real getSubchannelWettedPerimeter (unsigned int i_chan) const =0
 Return undeformed wetted perimeter for a subchannel. More...
 
virtual const RealgetCrossflowSign (unsigned int i_chan, unsigned int i_local) const =0
 Return a sign for the crossflow given a subchannel index and local neighbor index. More...
 
virtual const RealgetHeatedLengthEntry () const
 Return unheated length at entry. More...
 
virtual const RealgetHeatedLength () const
 Return heated length. More...
 
virtual const RealgetHeatedLengthExit () const
 Return unheated length at exit. More...
 
virtual unsigned int getSubchannelIndexFromPoint (const Point &p) const =0
 Return a subchannel index for a given physical point p More...
 
virtual unsigned int channelIndex (const Point &point) const =0
 
virtual unsigned int getPinIndexFromPoint (const Point &p) const =0
 Return a pin index for a given physical point p More...
 
virtual unsigned int pinIndex (const Point &p) const =0
 
virtual EChannelType getSubchannelType (unsigned int index) const =0
 Return the type of the subchannel for given subchannel index. More...
 
virtual Real getGapWidth (unsigned int axial_index, unsigned int gap_index) const =0
 Return gap width for a given gap index. More...
 
const std::vector< Node * > & getDuctNodes () const
 Function that returns the vector with the duct nodes. More...
 
void setChannelToDuctMaps (const std::vector< Node *> &duct_nodes)
 Function that sets the channel-to-duct maps. More...
 
virtual MooseMeshclone () const
 
virtual std::unique_ptr< MooseMeshsafeClone () const=0
 
void determineUseDistributedMesh ()
 
std::unique_ptr< MeshBase > buildMeshBaseObject (unsigned int dim=libMesh::invalid_uint)
 
std::unique_ptr< TbuildTypedMesh (unsigned int dim=libMesh::invalid_uint)
 
void setMeshBase (std::unique_ptr< MeshBase > mesh_base)
 
virtual void init ()
 
virtual void buildMesh ()=0
 
virtual unsigned int dimension () const
 
virtual unsigned int spatialDimension () const
 
virtual unsigned int effectiveSpatialDimension () const
 
unsigned int getBlocksMaxDimension (const std::vector< SubdomainName > &blocks) const
 
std::vector< BoundaryIDgetBoundaryIDs (const Elem *const elem, const unsigned short int side) const
 
std::vector< std::vector< BoundaryID > > getBoundaryIDs (const Elem *const elem) const
 
const std::set< BoundaryID > & getBoundaryIDs () const
 
std::vector< BoundaryIDgetBoundaryIDs (const std::vector< BoundaryName > &boundary_name, bool generate_unknown=false) const
 
const Elem * getLowerDElem (const Elem *, unsigned short int) const
 
unsigned int getHigherDSide (const Elem *elem) const
 
void buildNodeList ()
 
void buildBndElemList ()
 
const std::map< dof_id_type, std::vector< dof_id_type > > & nodeToElemMap ()
 
const std::map< dof_id_type, std::vector< dof_id_type > > & nodeToActiveSemilocalElemMap ()
 
virtual bnd_node_iterator bndNodesBegin ()
 
virtual bnd_node_iterator bndNodesEnd ()
 
virtual bnd_elem_iterator bndElemsBegin ()
 
virtual bnd_elem_iterator bndElemsEnd ()
 
void buildNodeListFromSideList ()
 
std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > buildSideList ()
 
std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > buildActiveSideList () const
 
unsigned int sideWithBoundaryID (const Elem *const elem, const BoundaryID boundary_id) const
 
MeshBase::node_iterator localNodesBegin ()
 
MeshBase::const_node_iterator localNodesBegin () const
 
MeshBase::node_iterator localNodesEnd ()
 
MeshBase::const_node_iterator localNodesEnd () const
 
MeshBase::element_iterator activeLocalElementsBegin ()
 
MeshBase::const_element_iterator activeLocalElementsBegin () const
 
const MeshBase::element_iterator activeLocalElementsEnd ()
 
const MeshBase::const_element_iterator activeLocalElementsEnd () const
 
virtual dof_id_type nNodes () const
 
virtual dof_id_type nElem () const
 
virtual dof_id_type nLocalNodes () const
 
virtual dof_id_type nActiveElem () const
 
virtual dof_id_type nActiveLocalElem () const
 
virtual SubdomainID nSubdomains () const
 
virtual unsigned int nPartitions () const
 
virtual bool skipPartitioning () const
 
virtual bool skipNoncriticalPartitioning () const
 
virtual dof_id_type maxNodeId () const
 
virtual dof_id_type maxElemId () const
 
virtual const Node & node (const dof_id_type i) const
 
virtual Node & node (const dof_id_type i)
 
virtual const Node & nodeRef (const dof_id_type i) const
 
virtual Node & nodeRef (const dof_id_type i)
 
virtual const Node * nodePtr (const dof_id_type i) const
 
virtual Node * nodePtr (const dof_id_type i)
 
virtual const Node * queryNodePtr (const dof_id_type i) const
 
virtual Node * queryNodePtr (const dof_id_type i)
 
virtual Elem * elem (const dof_id_type i)
 
virtual const Elem * elem (const dof_id_type i) const
 
virtual Elem * elemPtr (const dof_id_type i)
 
virtual const Elem * elemPtr (const dof_id_type i) const
 
virtual Elem * queryElemPtr (const dof_id_type i)
 
virtual const Elem * queryElemPtr (const dof_id_type i) const
 
bool prepared () const
 
virtual void prepared (bool state)
 
void needsPrepareForUse ()
 
void meshChanged ()
 
virtual void onMeshChanged ()
 
void cacheChangedLists ()
 
ConstElemPointerRangerefinedElementRange () const
 
ConstElemPointerRangecoarsenedElementRange () const
 
const std::vector< const Elem *> & coarsenedElementChildren (const Elem *elem) const
 
void updateActiveSemiLocalNodeRange (std::set< dof_id_type > &ghosted_elems)
 
bool isSemiLocal (Node *const node) const
 
const std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > & getBoundariesToElems () const
 
const std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > & getBoundariesToActiveSemiLocalElemIds () const
 
std::unordered_set< dof_id_typegetBoundaryActiveSemiLocalElemIds (BoundaryID bid) const
 
std::unordered_set< dof_id_typegetBoundaryActiveNeighborElemIds (BoundaryID bid) const
 
bool isBoundaryFullyExternalToSubdomains (BoundaryID bid, const std::set< SubdomainID > &blk_group) const
 
const std::set< SubdomainID > & meshSubdomains () const
 
const std::set< BoundaryID > & meshBoundaryIds () const
 
const std::set< BoundaryID > & meshSidesetIds () const
 
const std::set< BoundaryID > & meshNodesetIds () const
 
void setBoundaryToNormalMap (std::unique_ptr< std::map< BoundaryID, RealVectorValue >> boundary_map)
 
void setBoundaryToNormalMap (std::map< BoundaryID, RealVectorValue > *boundary_map)
 
void setMeshBoundaryIDs (std::set< BoundaryID > boundary_IDs)
 
const RealVectorValuegetNormalByBoundaryID (BoundaryID id) const
 
bool prepare (const MeshBase *mesh_to_clone)
 
void update ()
 
unsigned int uniformRefineLevel () const
 
void setUniformRefineLevel (unsigned int, bool deletion=true)
 
bool skipDeletionRepartitionAfterRefine () const
 
bool skipRefineWhenUseSplit () const
 
void addGhostedBoundary (BoundaryID boundary_id)
 
void setGhostedBoundaryInflation (const std::vector< Real > &inflation)
 
const std::set< unsigned int > & getGhostedBoundaries () const
 
const std::vector< Real > & getGhostedBoundaryInflation () const
 
void ghostGhostedBoundaries ()
 
void needGhostGhostedBoundaries (bool needghost)
 
unsigned int getPatchSize () const
 
unsigned int getGhostingPatchSize () const
 
unsigned int getMaxLeafSize () const
 
void setPatchUpdateStrategy (Moose::PatchUpdateType patch_update_strategy)
 
const Moose::PatchUpdateTypegetPatchUpdateStrategy () const
 
libMesh::BoundingBox getInflatedProcessorBoundingBox (Real inflation_multiplier=0.01) const
 
 operator libMesh::MeshBase & ()
 
 operator const libMesh::MeshBase & () const
 
MeshBase & getMesh ()
 
MeshBase & getMesh (const std::string &name)
 
const MeshBase & getMesh () const
 
const MeshBase & getMesh (const std::string &name) const
 
const MeshBase * getMeshPtr () const
 
Moose::Kokkos::MeshgetKokkosMesh ()
 
const Moose::Kokkos::MeshgetKokkosMesh () const
 
void printInfo (std::ostream &os=libMesh::out, const unsigned int verbosity=0) const
 
const std::set< SubdomainID > & getNodeBlockIds (const Node &node) const
 
const std::vector< dof_id_type > & getNodeList (boundary_id_type nodeset_id) const
 
const Node * addUniqueNode (const Point &p, Real tol=1e-6)
 
Node * addQuadratureNode (const Elem *elem, const unsigned short int side, const unsigned int qp, BoundaryID bid, const Point &point)
 
Node * getQuadratureNode (const Elem *elem, const unsigned short int side, const unsigned int qp)
 
void clearQuadratureNodes ()
 
BoundaryID getBoundaryID (const BoundaryName &boundary_name) const
 
SubdomainID getSubdomainID (const SubdomainName &subdomain_name) const
 
std::vector< SubdomainIDgetSubdomainIDs (const std::vector< SubdomainName > &subdomain_names) const
 
std::set< SubdomainIDgetSubdomainIDs (const std::set< SubdomainName > &subdomain_names) const
 
void setSubdomainName (SubdomainID subdomain_id, const SubdomainName &name)
 
const std::string & getSubdomainName (SubdomainID subdomain_id) const
 
std::vector< SubdomainName > getSubdomainNames (const std::vector< SubdomainID > &subdomain_ids) const
 
void setBoundaryName (BoundaryID boundary_id, BoundaryName name)
 
const std::string & getBoundaryName (const BoundaryID boundary_id) const
 
std::string getBoundaryString (const BoundaryID boundary_id) const
 
void buildPeriodicNodeMap (std::multimap< dof_id_type, dof_id_type > &periodic_node_map, unsigned int var_number, libMesh::PeriodicBoundaries *pbs) const
 
void buildPeriodicNodeSets (std::map< BoundaryID, std::set< dof_id_type >> &periodic_node_sets, unsigned int var_number, libMesh::PeriodicBoundaries *pbs) const
 
Real dimensionWidth (unsigned int component) const
 
bool detectOrthogonalDimRanges (Real tol=1e-6)
 
void addPeriodicVariable (const unsigned int sys_num, const unsigned int var_num, const BoundaryID primary, const BoundaryID secondary)
 
const std::array< bool, 3 > & queryPeriodicDimensions (const unsigned int sys_num, const unsigned int var_num) const
 
const std::array< bool, 3 > & queryPeriodicDimensions (const MooseVariableBase &var) const
 
bool isTranslatedPeriodic (const unsigned int sys_num, const unsigned int var_num, const unsigned int component) const
 
bool isTranslatedPeriodic (const MooseVariableBase &var, const unsigned int component) const
 
bool isTranslatedPeriodic (const unsigned int var_num, const unsigned int component) const
 
RealVectorValue minPeriodicVector (const unsigned int sys_num, const unsigned int var_num, Point p, Point q) const
 
RealVectorValue minPeriodicVector (const MooseVariableBase &var, const Point &p, const Point &q) const
 
RealVectorValue minPeriodicVector (const unsigned int var_num, const Point &p, const Point &q) const
 
Real minPeriodicDistance (const unsigned int sys_num, const unsigned int var_num, const Point &p, const Point &q) const
 
Real minPeriodicDistance (const MooseVariableBase &var, const Point &p, const Point &q) const
 
Real minPeriodicDistance (const unsigned int var_num, const Point &p, const Point &q) const
 
void detectPairedSidesets ()
 
bool hasDetectedPairedSidesets () const
 
const std::pair< BoundaryID, BoundaryID > * getPairedBoundaryMapping (unsigned int component) const
 
void buildRefinementAndCoarseningMaps (Assembly *assembly)
 
const std::vector< std::vector< QpMap > > & getRefinementMap (const Elem &elem, int parent_side, int child, int child_side)
 
const std::vector< std::pair< unsigned int, QpMap > > & getCoarseningMap (const Elem &elem, int input_side)
 
void changeBoundaryId (const boundary_id_type old_id, const boundary_id_type new_id, bool delete_prev)
 
const std::set< BoundaryID > & getSubdomainBoundaryIds (const SubdomainID subdomain_id) const
 
std::set< BoundaryIDgetSubdomainInterfaceBoundaryIds (const SubdomainID subdomain_id) const
 
std::set< SubdomainIDgetBoundaryConnectedBlocks (const BoundaryID bid) const
 
std::set< SubdomainIDgetBoundaryConnectedSecondaryBlocks (const BoundaryID bid) const
 
std::set< SubdomainIDgetInterfaceConnectedBlocks (const BoundaryID bid) const
 
const std::set< SubdomainID > & getBlockConnectedBlocks (const SubdomainID subdomain_id) const
 
bool isBoundaryNode (dof_id_type node_id) const
 
bool isBoundaryNode (dof_id_type node_id, BoundaryID bnd_id) const
 
bool isBoundaryElem (dof_id_type elem_id) const
 
bool isBoundaryElem (dof_id_type elem_id, BoundaryID bnd_id) const
 
void errorIfDistributedMesh (std::string name) const
 
virtual bool isDistributedMesh () const
 
bool isParallelTypeForced () const
 
void setParallelType (ParallelType parallel_type)
 
ParallelType getParallelType () const
 
const MooseEnumpartitionerName () const
 
bool isPartitionerForced () const
 
void allowRecovery (bool allow)
 
void setCustomPartitioner (libMesh::Partitioner *partitioner)
 
bool isRegularOrthogonal ()
 
bool hasSecondOrderElements ()
 
virtual std::unique_ptr< libMesh::PointLocatorBasegetPointLocator () const
 
virtual std::string getFileName () const
 
void needsRemoteElemDeletion (bool need_delete)
 
bool needsRemoteElemDeletion () const
 
void allowRemoteElementRemoval (bool allow_removal)
 
bool allowRemoteElementRemoval () const
 
void deleteRemoteElements ()
 
bool hasMeshBase () const
 
bool hasElementID (const std::string &id_name) const
 
unsigned int getElementIDIndex (const std::string &id_name) const
 
dof_id_type maxElementID (unsigned int elem_id_index) const
 
dof_id_type minElementID (unsigned int elem_id_index) const
 
bool areElemIDsIdentical (const std::string &id_name1, const std::string &id_name2) const
 
std::set< dof_id_typegetAllElemIDs (unsigned int elem_id_index) const
 
std::set< dof_id_typegetElemIDsOnBlocks (unsigned int elem_id_index, const std::set< SubdomainID > &blks) const
 
unsigned int getMaxSidesPerElem () const
 
unsigned int getMaxNodesPerElem () const
 
unsigned int getMaxNodesPerSide () const
 
std::unordered_map< dof_id_type, std::set< dof_id_type > > getElemIDMapping (const std::string &from_id_name, const std::string &to_id_name) const
 
void cacheFaceInfoVariableOwnership () const
 
void cacheFVElementalDoFs () const
 
void computeFiniteVolumeCoords () const
 
void isDisplaced (bool is_displaced)
 
bool isDisplaced () const
 
const std::map< boundary_id_type, std::vector< dof_id_type > > & nodeSetNodes () const
 
Moose::CoordinateSystemType getCoordSystem (SubdomainID sid) const
 
const std::map< SubdomainID, Moose::CoordinateSystemType > & getCoordSystem () const
 
Moose::CoordinateSystemType getUniqueCoordSystem () const
 
void setCoordSystem (const std::vector< SubdomainName > &blocks, const MultiMooseEnum &coord_sys)
 
void setAxisymmetricCoordAxis (const MooseEnum &rz_coord_axis)
 
void setGeneralAxisymmetricCoordAxes (const std::vector< SubdomainName > &blocks, const std::vector< std::pair< Point, RealVectorValue >> &axes)
 
const std::pair< Point, RealVectorValue > & getGeneralAxisymmetricCoordAxis (SubdomainID subdomain_id) const
 
bool usingGeneralAxisymmetricCoordAxes () const
 
unsigned int getAxisymmetricRadialCoord () const
 
void checkCoordinateSystems ()
 
void setCoordData (const MooseMesh &other_mesh)
 
void markFiniteVolumeInfoDirty ()
 
bool isFiniteVolumeInfoDirty () const
 
MooseAppCoordTransformcoordTransform ()
 
const MooseUnitslengthUnit () const
 
const std::unordered_map< std::pair< const Elem *, unsigned short int >, const Elem *> & getLowerDElemMap () const
 
bool isSplit () const
 
void buildFiniteVolumeInfo () const
 
void setupFiniteVolumeMeshData () const
 
void doingPRefinement (bool doing_p_refinement)
 
bool doingPRefinement () const
 
unsigned int maxPLevel () const
 
unsigned int maxHLevel () const
 
const std::vector< QpMap > & getPRefinementMap (const Elem &elem) const
 
const std::vector< QpMap > & getPRefinementSideMap (const Elem &elem) const
 
const std::vector< QpMap > & getPCoarseningMap (const Elem &elem) const
 
const std::vector< QpMap > & getPCoarseningSideMap (const Elem &elem) const
 
void buildPRefinementAndCoarseningMaps (Assembly *assembly)
 
bool hasLowerD () const
 
const std::set< SubdomainID > & interiorLowerDBlocks () const
 
const std::set< SubdomainID > & boundaryLowerDBlocks () const
 
bool getConstructNodeListFromSideList ()
 
bool getDisplaceNodeListBySideList ()
 
virtual bool enabled () const
 
std::shared_ptr< MooseObjectgetSharedPtr ()
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
bool isKokkosObject () const
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
const std::string & name () const
 
std::string typeAndName () const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParametersparameters () const
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
const TgetParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const TqueryParam (const std::string &name) const
 
const TgetRenamedParam (const std::string &old_name, const std::string &new_name) const
 
T getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool haveParameter (const std::string &name) const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &name) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 
void mooseError (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecatedNoTrace (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
PerfGraphperfGraph ()
 
libMesh::ConstElemRangegetActiveLocalElementRange ()
 
libMesh::ConstElemRangegetActiveLocalElementRange ()
 
libMesh::NodeRangegetActiveNodeRange ()
 
libMesh::NodeRangegetActiveNodeRange ()
 
SemiLocalNodeRangegetActiveSemiLocalNodeRange () const
 
SemiLocalNodeRangegetActiveSemiLocalNodeRange () const
 
libMesh::ConstNodeRangegetLocalNodeRange ()
 
libMesh::ConstNodeRangegetLocalNodeRange ()
 
libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode *> * getBoundaryNodeRange ()
 
libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode *> * getBoundaryNodeRange ()
 
libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement *> * getBoundaryElementRange ()
 
libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement *> * getBoundaryElementRange ()
 
virtual Real getMinInDimension (unsigned int component) const
 
virtual Real getMinInDimension (unsigned int component) const
 
virtual Real getMaxInDimension (unsigned int component) const
 
virtual Real getMaxInDimension (unsigned int component) const
 
bool isCustomPartitionerRequested () const
 
bool isCustomPartitionerRequested () const
 
void setIsCustomPartitionerRequested (bool cpr)
 
void setIsCustomPartitionerRequested (bool cpr)
 
unsigned int nFace () const
 
unsigned int nFace () const
 
const std::vector< const FaceInfo *> & faceInfo () const
 
const FaceInfofaceInfo (const Elem *elem, unsigned int side) const
 
const std::vector< const FaceInfo *> & faceInfo () const
 
const FaceInfofaceInfo (const Elem *elem, unsigned int side) const
 
face_info_iterator ownedFaceInfoBegin ()
 
face_info_iterator ownedFaceInfoBegin ()
 
face_info_iterator ownedFaceInfoEnd ()
 
face_info_iterator ownedFaceInfoEnd ()
 
elem_info_iterator ownedElemInfoBegin ()
 
elem_info_iterator ownedElemInfoBegin ()
 
elem_info_iterator ownedElemInfoEnd ()
 
elem_info_iterator ownedElemInfoEnd ()
 
const ElemInfoelemInfo (const dof_id_type id) const
 
const ElemInfoelemInfo (const dof_id_type id) const
 
const std::vector< const ElemInfo *> & elemInfoVector () const
 
const std::vector< const ElemInfo *> & elemInfoVector () const
 
const std::vector< FaceInfo > & allFaceInfo () const
 
const std::vector< FaceInfo > & allFaceInfo () const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 

Static Public Member Functions

static InputParameters validParams ()
 
static void generateZGrid (Real unheated_length_entry, Real heated_length, Real unheated_length_exit, unsigned int n_cells, std::vector< Real > &z_grid)
 Generate the spacing in z-direction using heated and unteaded lengths. More...
 
static void setSubdomainName (MeshBase &mesh, SubdomainID subdomain_id, const SubdomainName &name)
 
static void changeBoundaryId (MeshBase &mesh, const boundary_id_type old_id, const boundary_id_type new_id, bool delete_prev)
 
static void callMooseError (MooseApp *const app, const InputParameters &params, std::string msg, const bool with_prefix, const hit::Node *node, const bool show_trace=true)
 
static MooseEnum partitioning ()
 
static MooseEnum elemTypes ()
 
static void setPartitioner (MeshBase &mesh_base, MooseEnum &partitioner, bool use_distributed_mesh, const InputParameters &params, MooseObject &context_obj)
 

Public Attributes

bool _pin_mesh_exist = false
 
bool _duct_mesh_exist = false
 
std::vector< std::vector< Real > > _subchannel_position
 x,y coordinates of the subchannel centroids More...
 
 usingCombinedWarningSolutionWarnings
 
const ConsoleStream _console
 

Static Public Attributes

static const std::array< bool, 3 > periodic_dim_default
 
static const std::string type_param
 
static const std::string name_param
 
static const std::string unique_name_param
 
static const std::string app_param
 
static const std::string moose_base_param
 
static const std::string kokkos_object_param
 

Protected Types

typedef std::vector< BndNode *>::iterator bnd_node_iterator_imp
 
typedef std::vector< BndNode *>::const_iterator const_bnd_node_iterator_imp
 
typedef std::vector< BndElement *>::iterator bnd_elem_iterator_imp
 
typedef std::vector< BndElement *>::const_iterator const_bnd_elem_iterator_imp
 

Protected Member Functions

void cacheInfo ()
 
void freeBndNodes ()
 
void freeBndElems ()
 
void setPartitionerHelper (MeshBase *mesh=nullptr)
 
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 
TdeclareRestartableData (const std::string &data_name, Args &&... args)
 
ManagedValue< TdeclareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
const TgetRestartableData (const std::string &data_name) const
 
TdeclareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
TdeclareRecoverableData (const std::string &data_name, Args &&... args)
 
TdeclareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 
TdeclareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 
std::string restartableName (const std::string &data_name) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 
std::string timedSectionName (const std::string &section_name) const
 

Protected Attributes

Real _unheated_length_entry
 unheated length of the fuel Pin at the entry of the assembly More...
 
Real _heated_length
 heated length of the fuel Pin More...
 
Real _unheated_length_exit
 unheated length of the fuel Pin at the exit of the assembly More...
 
std::vector< Real_z_grid
 axial location of nodes More...
 
std::vector< std::vector< Real > > _k_grid
 axial form loss coefficient per computational cell More...
 
std::vector< Node * > _duct_nodes
 A list of all mesh nodes that form the (elements of) the duct mesh that surrounds the pins/subchannels. More...
 
std::map< Node *, Node * > _chan_to_duct_node_map
 Maps between channel nodes and duct nodes. More...
 
std::map< Node *, Node * > _duct_node_to_chan_map
 
std::vector< Real_spacer_z
 axial location of the spacers More...
 
std::vector< Real_spacer_k
 form loss coefficient of the spacers More...
 
std::vector< Real_z_blockage
 axial location of blockage (inlet, outlet) [m] More...
 
std::vector< unsigned int_index_blockage
 index of subchannels affected by blockage More...
 
std::vector< Real_reduction_blockage
 area reduction of subchannels affected by blockage More...
 
Real _kij
 Lateral form loss coefficient. More...
 
Real _pitch
 Distance between the neighbor fuel pins, pitch. More...
 
Real _pin_diameter
 fuel Pin diameter More...
 
Real _assembly_flow_area
 Undeformed bundle inlet flow area. More...
 
Real _assembly_wetted_perimeter
 Undeformed bundle inlet wetted perimeter. More...
 
Real _assembly_hydraulic_diameter
 Undeformed bundle-average hydraulic diameter. More...
 
unsigned int _n_cells
 number of axial cells More...
 
 X
 
 Y
 
 Z
 
 MIN
 
 MAX
 
std::vector< std::unique_ptr< libMesh::GhostingFunctor > > _ghosting_functors
 
std::vector< std::shared_ptr< RelationshipManager > > _relationship_managers
 
bool _built_from_other_mesh
 
ParallelType _parallel_type
 
bool _use_distributed_mesh
 
bool _distribution_overridden
 
bool _parallel_type_overridden
 
std::unique_ptr< libMesh::MeshBase_mesh
 
std::unique_ptr< Moose::Kokkos::Mesh_kokkos_mesh
 
MooseEnum _partitioner_name
 
bool _partitioner_overridden
 
std::unique_ptr< libMesh::Partitioner_custom_partitioner
 
bool _custom_partitioner_requested
 
unsigned int _uniform_refine_level
 
bool _skip_refine_when_use_split
 
bool _skip_deletion_repartition_after_refine
 
bool _is_changed
 
bool _is_nemesis
 
bool _moose_mesh_prepared
 
std::unique_ptr< ConstElemPointerRange_refined_elements
 
std::unique_ptr< ConstElemPointerRange_coarsened_elements
 
std::map< const Elem *, std::vector< const Elem *> > _coarsened_element_children
 
std::set< Node *> _semilocal_node_list
 
std::unique_ptr< libMesh::ConstElemRange_active_local_elem_range
 
std::unique_ptr< SemiLocalNodeRange_active_semilocal_node_range
 
std::unique_ptr< libMesh::NodeRange_active_node_range
 
std::unique_ptr< libMesh::ConstNodeRange_local_node_range
 
std::unique_ptr< libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode *> > _bnd_node_range
 
std::unique_ptr< libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement *> > _bnd_elem_range
 
std::map< dof_id_type, std::vector< dof_id_type > > _node_to_elem_map
 
bool _node_to_elem_map_built
 
std::map< dof_id_type, std::vector< dof_id_type > > _node_to_active_semilocal_elem_map
 
bool _node_to_active_semilocal_elem_map_built
 
std::set< SubdomainID_mesh_subdomains
 
std::unique_ptr< std::map< BoundaryID, RealVectorValue > > _boundary_to_normal_map
 
std::vector< BndNode *> _bnd_nodes
 
std::map< boundary_id_type, std::set< dof_id_type > > _bnd_node_ids
 
std::vector< BndElement *> _bnd_elems
 
std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > _bnd_elem_ids
 
std::map< dof_id_type, Node *> _quadrature_nodes
 
std::map< dof_id_type, std::map< unsigned int, std::map< dof_id_type, Node *> > > _elem_to_side_to_qp_to_quadrature_nodes
 
std::vector< BndNode_extra_bnd_nodes
 
std::map< dof_id_type, std::set< SubdomainID > > _block_node_list
 
std::map< boundary_id_type, std::vector< dof_id_type > > _node_set_nodes
 
std::set< unsigned int_ghosted_boundaries
 
std::vector< Real_ghosted_boundaries_inflation
 
unsigned int _patch_size
 
unsigned int _ghosting_patch_size
 
unsigned int _max_leaf_size
 
Moose::PatchUpdateType _patch_update_strategy
 
std::vector< Node *> _node_map
 
bool _regular_orthogonal_mesh
 
std::vector< std::vector< Real > > _bounds
 
std::optional< std::vector< std::pair< BoundaryID, BoundaryID > > > _paired_boundary
 
const bool _is_split
 
const bool & _enabled
 
MooseApp_app
 
Factory_factory
 
ActionFactory_action_factory
 
const std::string & _type
 
const std::string & _name
 
const InputParameters_pars
 
MooseApp_restartable_app
 
const std::string _restartable_system_name
 
const THREAD_ID _restartable_tid
 
const bool _restartable_read_only
 
MooseApp_pg_moose_app
 
const std::string _prefix
 
std::set< BoundaryID_mesh_boundary_ids
 
std::set< BoundaryID_mesh_sideset_ids
 
std::set< BoundaryID_mesh_nodeset_ids
 
const Parallel::Communicator & _communicator
 

Detailed Description

Base class for subchannel meshes.

Definition at line 22 of file SubChannelMesh.h.

Constructor & Destructor Documentation

◆ SubChannelMesh() [1/2]

SubChannelMesh::SubChannelMesh ( const InputParameters parameters)

Definition at line 20 of file SubChannelMesh.C.

21  : MooseMesh(params),
22  _kij(0.0),
26 {
27 }
MooseMesh()=delete
Real _assembly_wetted_perimeter
Undeformed bundle inlet wetted perimeter.
Real _assembly_flow_area
Undeformed bundle inlet flow area.
Real _kij
Lateral form loss coefficient.
Real _assembly_hydraulic_diameter
Undeformed bundle-average hydraulic diameter.

◆ SubChannelMesh() [2/2]

SubChannelMesh::SubChannelMesh ( const SubChannelMesh other_mesh)

Definition at line 29 of file SubChannelMesh.C.

30  : MooseMesh(other_mesh),
31  _pin_mesh_exist(other_mesh._pin_mesh_exist),
34  _heated_length(other_mesh._heated_length),
36  _z_grid(other_mesh._z_grid),
37  _k_grid(other_mesh._k_grid),
38  _duct_nodes(other_mesh._duct_nodes),
41  _spacer_z(other_mesh._spacer_z),
42  _spacer_k(other_mesh._spacer_k),
43  _z_blockage(other_mesh._z_blockage),
44  _index_blockage(other_mesh._index_blockage),
46  _kij(other_mesh._kij),
47  _pitch(other_mesh._pitch),
48  _pin_diameter(other_mesh._pin_diameter),
52  _n_cells(other_mesh._n_cells)
53 {
55 }
std::vector< Real > _z_grid
axial location of nodes
MooseMesh()=delete
std::vector< std::vector< Real > > _k_grid
axial form loss coefficient per computational cell
std::map< Node *, Node * > _duct_node_to_chan_map
Real _unheated_length_entry
unheated length of the fuel Pin at the entry of the assembly
std::vector< std::vector< Real > > _subchannel_position
x,y coordinates of the subchannel centroids
std::vector< Node * > _duct_nodes
A list of all mesh nodes that form the (elements of) the duct mesh that surrounds the pins/subchannel...
std::vector< Real > _spacer_k
form loss coefficient of the spacers
Real _assembly_wetted_perimeter
Undeformed bundle inlet wetted perimeter.
Real _unheated_length_exit
unheated length of the fuel Pin at the exit of the assembly
std::vector< Real > _z_blockage
axial location of blockage (inlet, outlet) [m]
Real _pin_diameter
fuel Pin diameter
std::vector< Real > _reduction_blockage
area reduction of subchannels affected by blockage
Real _pitch
Distance between the neighbor fuel pins, pitch.
std::vector< Real > _spacer_z
axial location of the spacers
Real _assembly_flow_area
Undeformed bundle inlet flow area.
std::map< Node *, Node * > _chan_to_duct_node_map
Maps between channel nodes and duct nodes.
Real _kij
Lateral form loss coefficient.
unsigned int _n_cells
number of axial cells
Real _heated_length
heated length of the fuel Pin
Real _assembly_hydraulic_diameter
Undeformed bundle-average hydraulic diameter.
std::vector< unsigned int > _index_blockage
index of subchannels affected by blockage

Member Function Documentation

◆ channelIndex()

virtual unsigned int SubChannelMesh::channelIndex ( const Point &  point) const
pure virtual

◆ ductMeshExist()

bool SubChannelMesh::ductMeshExist ( ) const
inline

Return if Duct Mesh exists or not.

Definition at line 101 of file SubChannelMesh.h.

101 { return _duct_mesh_exist; }

◆ generateZGrid()

void SubChannelMesh::generateZGrid ( Real  unheated_length_entry,
Real  heated_length,
Real  unheated_length_exit,
unsigned int  n_cells,
std::vector< Real > &  z_grid 
)
static

Generate the spacing in z-direction using heated and unteaded lengths.

Definition at line 58 of file SubChannelMesh.C.

Referenced by SCMQuadDuctMeshGenerator::SCMQuadDuctMeshGenerator(), SCMQuadSubChannelMeshGenerator::SCMQuadSubChannelMeshGenerator(), SCMTriDuctMeshGenerator::SCMTriDuctMeshGenerator(), and SCMTriSubChannelMeshGenerator::SCMTriSubChannelMeshGenerator().

63 {
64  Real L = unheated_length_entry + heated_length + unheated_length_exit;
65  Real dz = L / n_cells;
66  for (unsigned int i = 0; i < n_cells + 1; i++)
67  z_grid.push_back(dz * i);
68 }
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
dof_id_type n_cells

◆ getAssemblyFlowArea()

Real SubChannelMesh::getAssemblyFlowArea ( ) const
inline

Return undeformed bundle inlet flow area.

Definition at line 152 of file SubChannelMesh.h.

Referenced by SubChannel1PhaseProblem::externalSolve().

152 { return _assembly_flow_area; }
Real _assembly_flow_area
Undeformed bundle inlet flow area.

◆ getAssemblyHydraulicDiameter()

Real SubChannelMesh::getAssemblyHydraulicDiameter ( ) const
inline

Return undeformed bundle-average hydraulic diameter.

Definition at line 162 of file SubChannelMesh.h.

Referenced by SubChannel1PhaseProblem::externalSolve().

Real _assembly_hydraulic_diameter
Undeformed bundle-average hydraulic diameter.

◆ getAssemblyWettedPerimeter()

Real SubChannelMesh::getAssemblyWettedPerimeter ( ) const
inline

Return undeformed bundle inlet wetted perimeter.

Definition at line 157 of file SubChannelMesh.h.

157 { return _assembly_wetted_perimeter; }
Real _assembly_wetted_perimeter
Undeformed bundle inlet wetted perimeter.

◆ getChannelGaps()

virtual const std::vector<unsigned int>& SubChannelMesh::getChannelGaps ( unsigned int  i_chan) const
pure virtual

◆ getChannelNode()

virtual Node* SubChannelMesh::getChannelNode ( unsigned int  i_chan,
unsigned int  iz 
) const
pure virtual

◆ getChannelNodeFromDuct()

Node * SubChannelMesh::getChannelNodeFromDuct ( Node *  duct_node) const

Function that gets the channel node from the duct node.

Definition at line 104 of file SubChannelMesh.C.

Referenced by SubChannel1PhaseProblem::externalSolve().

105 {
106  auto it = _duct_node_to_chan_map.find(duct_node);
107  return (it == _duct_node_to_chan_map.end()) ? nullptr : it->second;
108 }
std::map< Node *, Node * > _duct_node_to_chan_map

◆ getChannelPins()

virtual const std::vector<unsigned int>& SubChannelMesh::getChannelPins ( unsigned int  i_chan) const
pure virtual

◆ getCrossflowSign()

virtual const Real& SubChannelMesh::getCrossflowSign ( unsigned int  i_chan,
unsigned int  i_local 
) const
pure virtual

Return a sign for the crossflow given a subchannel index and local neighbor index.

Implemented in TriSubChannelMesh, and QuadSubChannelMesh.

Referenced by SubChannel1PhaseProblem::computeDP(), TriSubChannel1PhaseProblem::computeh(), SubChannel1PhaseProblem::computeSumWij(), and SubChannel1PhaseProblem::implicitPetscSolve().

◆ getDuctNodeFromChannel()

Node * SubChannelMesh::getDuctNodeFromChannel ( Node *  channel_node) const

Function that gets the duct node from the channel node.

Definition at line 97 of file SubChannelMesh.C.

Referenced by SubChannel1PhaseProblem::computeAddedHeatDuct().

98 {
99  auto it = _chan_to_duct_node_map.find(channel_node);
100  return (it == _chan_to_duct_node_map.end()) ? nullptr : it->second;
101 }
std::map< Node *, Node * > _chan_to_duct_node_map
Maps between channel nodes and duct nodes.

◆ getDuctNodes()

const std::vector<Node *>& SubChannelMesh::getDuctNodes ( ) const
inline

Function that returns the vector with the duct nodes.

Definition at line 223 of file SubChannelMesh.h.

Referenced by SubChannel1PhaseProblem::externalSolve().

223 { return _duct_nodes; }
std::vector< Node * > _duct_nodes
A list of all mesh nodes that form the (elements of) the duct mesh that surrounds the pins/subchannel...

◆ getGapChannels()

virtual const std::pair<unsigned int, unsigned int>& SubChannelMesh::getGapChannels ( unsigned int  i_gap) const
pure virtual

◆ getGapPins()

virtual const std::pair<unsigned int, unsigned int>& SubChannelMesh::getGapPins ( unsigned int  i_gap) const
pure virtual

Return a pair of pin indices for a given gap index.

Implemented in TriSubChannelMesh, and QuadSubChannelMesh.

Referenced by TriSubChannel1PhaseProblem::initializeSolution().

◆ getGapWidth()

virtual Real SubChannelMesh::getGapWidth ( unsigned int  axial_index,
unsigned int  gap_index 
) const
pure virtual

◆ getHeatedLength()

virtual const Real& SubChannelMesh::getHeatedLength ( ) const
inlinevirtual

◆ getHeatedLengthEntry()

virtual const Real& SubChannelMesh::getHeatedLengthEntry ( ) const
inlinevirtual

◆ getHeatedLengthExit()

virtual const Real& SubChannelMesh::getHeatedLengthExit ( ) const
inlinevirtual

Return unheated length at exit.

Definition at line 193 of file SubChannelMesh.h.

Referenced by SCMPinSurfaceTemperature::execute(), SCMPlanarMean::execute(), and QuadSubChannelNormalSliceValues::output().

193 { return _unheated_length_exit; }
Real _unheated_length_exit
unheated length of the fuel Pin at the exit of the assembly

◆ getIndexBlockage()

virtual const std::vector<unsigned int>& SubChannelMesh::getIndexBlockage ( ) const
inlinevirtual

Get index of blocked subchannels.

Definition at line 51 of file SubChannelMesh.h.

Referenced by QuadSubChannel1PhaseProblem::initializeSolution(), TriSubChannel1PhaseProblem::initializeSolution(), and MarvelTriFlowAreaIC::value().

51 { return _index_blockage; }
std::vector< unsigned int > _index_blockage
index of subchannels affected by blockage

◆ getKGrid()

virtual const std::vector<std::vector<Real> >& SubChannelMesh::getKGrid ( ) const
inlinevirtual

Get axial cell location and value of loss coefficient.

Definition at line 41 of file SubChannelMesh.h.

Referenced by SubChannel1PhaseProblem::computeDP().

41 { return _k_grid; }
std::vector< std::vector< Real > > _k_grid
axial form loss coefficient per computational cell

◆ getKij()

virtual const Real& SubChannelMesh::getKij ( ) const
inlinevirtual

Return lateral loss coefficient.

Definition at line 61 of file SubChannelMesh.h.

61 { return _kij; }
Real _kij
Lateral form loss coefficient.

◆ getNumOfAxialCells()

virtual unsigned int SubChannelMesh::getNumOfAxialCells ( ) const
inlinevirtual

◆ getNumOfChannels()

virtual unsigned int SubChannelMesh::getNumOfChannels ( ) const
pure virtual

◆ getNumOfGapsPerLayer()

virtual unsigned int SubChannelMesh::getNumOfGapsPerLayer ( ) const
pure virtual

Return the number of gaps per layer.

Implemented in TriSubChannelMesh, and QuadSubChannelMesh.

Referenced by SubChannel1PhaseProblem::SubChannel1PhaseProblem().

◆ getNumOfPins()

virtual unsigned int SubChannelMesh::getNumOfPins ( ) const
pure virtual

◆ getPinChannels()

virtual const std::vector<unsigned int>& SubChannelMesh::getPinChannels ( unsigned int  i_pin) const
pure virtual

Return a vector of channel indices for a given Pin index.

Implemented in TriSubChannelMesh, and QuadSubChannelMesh.

Referenced by SubChannel1PhaseProblem::externalSolve(), and TriSubChannel1PhaseProblem::initializeSolution().

◆ getPinDiameter()

virtual const Real& SubChannelMesh::getPinDiameter ( ) const
inlinevirtual

◆ getPinIndexFromPoint()

virtual unsigned int SubChannelMesh::getPinIndexFromPoint ( const Point &  p) const
pure virtual

Return a pin index for a given physical point p

Implemented in TriSubChannelMesh, and QuadSubChannelMesh.

◆ getPinNode()

virtual Node* SubChannelMesh::getPinNode ( unsigned int  i_pin,
unsigned int  iz 
) const
pure virtual

◆ getPitch()

virtual const Real& SubChannelMesh::getPitch ( ) const
inlinevirtual

◆ getReductionBlockage()

virtual const std::vector<Real>& SubChannelMesh::getReductionBlockage ( ) const
inlinevirtual

Get area reduction of blocked subchannels.

Definition at line 56 of file SubChannelMesh.h.

Referenced by QuadSubChannel1PhaseProblem::initializeSolution(), TriSubChannel1PhaseProblem::initializeSolution(), and MarvelTriFlowAreaIC::value().

56 { return _reduction_blockage; }
std::vector< Real > _reduction_blockage
area reduction of subchannels affected by blockage

◆ getSubchannelFlowArea()

virtual Real SubChannelMesh::getSubchannelFlowArea ( unsigned int  i_chan,
Real  z 
) const
pure virtual

Return undeformed flow area for a subchannel at an axial location, including any blockage reduction.

Implemented in QuadSubChannelMesh, and TriSubChannelMesh.

◆ getSubchannelIndexFromPoint()

virtual unsigned int SubChannelMesh::getSubchannelIndexFromPoint ( const Point &  p) const
pure virtual

Return a subchannel index for a given physical point p

Implemented in TriSubChannelMesh, and QuadSubChannelMesh.

Referenced by SCMBlockedMassFlowRateAux::computeValue().

◆ getSubchannelType()

virtual EChannelType SubChannelMesh::getSubchannelType ( unsigned int  index) const
pure virtual

◆ getSubchannelWettedPerimeter()

virtual Real SubChannelMesh::getSubchannelWettedPerimeter ( unsigned int  i_chan) const
pure virtual

Return undeformed wetted perimeter for a subchannel.

Implemented in QuadSubChannelMesh, and TriSubChannelMesh.

◆ getZBlockage()

virtual const std::vector<Real>& SubChannelMesh::getZBlockage ( ) const
inlinevirtual

Get axial location of blockage (in,out) [m].

Definition at line 46 of file SubChannelMesh.h.

Referenced by QuadSubChannel1PhaseProblem::initializeSolution(), TriSubChannel1PhaseProblem::initializeSolution(), and MarvelTriFlowAreaIC::value().

46 { return _z_blockage; }
std::vector< Real > _z_blockage
axial location of blockage (inlet, outlet) [m]

◆ getZGrid()

virtual const std::vector<Real>& SubChannelMesh::getZGrid ( ) const
inlinevirtual

◆ getZIndex()

unsigned int SubChannelMesh::getZIndex ( const Point &  point) const
virtual

Get axial index of point.

Definition at line 71 of file SubChannelMesh.C.

Referenced by SubChannel1PhaseProblem::externalSolve(), SCMSolutionTransfer::getFromNode(), SCMPinSolutionTransfer::getFromNode(), and setChannelToDuctMaps().

72 {
73  if (_z_grid.size() == 0)
74  mooseError("_z_grid is empty.");
75 
76  if (point(2) <= _z_grid[0])
77  return 0;
78  if (point(2) >= _z_grid[_z_grid.size() - 1])
79  return _z_grid.size() - 1;
80 
81  unsigned int lo = 0;
82  unsigned int hi = _z_grid.size();
83  while (lo < hi)
84  {
85  unsigned int mid = (lo + hi) / 2;
86  if (std::abs(_z_grid[mid] - point(2)) < 1e-5)
87  return mid;
88  else if (_z_grid[mid] < point(2))
89  lo = mid;
90  else
91  hi = mid;
92  }
93  return lo;
94 }
std::vector< Real > _z_grid
axial location of nodes
void mooseError(Args &&... args) const

◆ pinIndex()

virtual unsigned int SubChannelMesh::pinIndex ( const Point &  p) const
pure virtual

◆ pinMeshExist()

bool SubChannelMesh::pinMeshExist ( ) const
inline

◆ setChannelToDuctMaps()

void SubChannelMesh::setChannelToDuctMaps ( const std::vector< Node *> &  duct_nodes)

Function that sets the channel-to-duct maps.

Definition at line 111 of file SubChannelMesh.C.

Referenced by SCMQuadDuctMeshGenerator::generate(), and SCMTriDuctMeshGenerator::generate().

112 {
113  _duct_nodes.clear();
114  _chan_to_duct_node_map.clear();
115  _duct_node_to_chan_map.clear();
116 
117  if (_z_grid.empty())
118  mooseError("setChannelToDuctMaps: _z_grid is empty; cannot match duct nodes by z.");
119 
120  if (_subchannel_position.empty())
121  mooseError(
122  "setChannelToDuctMaps: _subchannel_position is empty; cannot map duct nodes to channels.");
123 
124  for (size_t i = 0; i < duct_nodes.size(); ++i)
125  {
126  Node * dn = duct_nodes[i];
127 
128  // 1) Find closest subchannel center in XY
129  unsigned int min_chan = 0;
130  Real min_dist = std::numeric_limits<Real>::max();
131 
132  const Point ductpos((*dn)(0), (*dn)(1), 0.0);
133 
134  for (unsigned int j = 0; j < _subchannel_position.size(); ++j)
135  {
136  const Point chanpos(_subchannel_position[j][0], _subchannel_position[j][1], 0.0);
137  const Real dist = (chanpos - ductpos).norm();
138 
139  if (dist < min_dist)
140  {
141  min_dist = dist;
142  min_chan = j;
143  }
144  }
145 
146  // 2) Find channel node at the same z using getZIndex + virtual accessor
147  const unsigned int iz = getZIndex(*dn);
148  Node * chan_node = getChannelNode(min_chan, iz);
149 
150  // 3) Store bidirectional mapping
151  _duct_node_to_chan_map[dn] = chan_node;
152  _chan_to_duct_node_map[chan_node] = dn;
153  }
154 
155  _duct_nodes = duct_nodes;
156  _duct_mesh_exist = true;
157 }
std::vector< Real > _z_grid
axial location of nodes
std::map< Node *, Node * > _duct_node_to_chan_map
std::vector< std::vector< Real > > _subchannel_position
x,y coordinates of the subchannel centroids
std::vector< Node * > _duct_nodes
A list of all mesh nodes that form the (elements of) the duct mesh that surrounds the pins/subchannel...
virtual Node * getChannelNode(unsigned int i_chan, unsigned int iz) const =0
Get the subchannel mesh node for a given channel index and elevation index.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::map< Node *, Node * > _chan_to_duct_node_map
Maps between channel nodes and duct nodes.
auto norm(const T &a)
void mooseError(Args &&... args) const
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
virtual unsigned int getZIndex(const Point &point) const
Get axial index of point.

◆ validParams()

InputParameters SubChannelMesh::validParams ( )
static

Definition at line 13 of file SubChannelMesh.C.

Referenced by QuadSubChannelMesh::validParams(), and TriSubChannelMesh::validParams().

14 {
16  params.addClassDescription("Base class for all mesh containers");
17  return params;
18 }
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _assembly_flow_area

Real SubChannelMesh::_assembly_flow_area
protected

◆ _assembly_hydraulic_diameter

Real SubChannelMesh::_assembly_hydraulic_diameter
protected

◆ _assembly_wetted_perimeter

Real SubChannelMesh::_assembly_wetted_perimeter
protected

◆ _chan_to_duct_node_map

std::map<Node *, Node *> SubChannelMesh::_chan_to_duct_node_map
protected

Maps between channel nodes and duct nodes.

Definition at line 251 of file SubChannelMesh.h.

Referenced by getDuctNodeFromChannel(), and setChannelToDuctMaps().

◆ _duct_mesh_exist

bool SubChannelMesh::_duct_mesh_exist = false

Definition at line 231 of file SubChannelMesh.h.

Referenced by ductMeshExist(), and setChannelToDuctMaps().

◆ _duct_node_to_chan_map

std::map<Node *, Node *> SubChannelMesh::_duct_node_to_chan_map
protected

Definition at line 252 of file SubChannelMesh.h.

Referenced by getChannelNodeFromDuct(), and setChannelToDuctMaps().

◆ _duct_nodes

std::vector<Node *> SubChannelMesh::_duct_nodes
protected

A list of all mesh nodes that form the (elements of) the duct mesh that surrounds the pins/subchannels.

Definition at line 248 of file SubChannelMesh.h.

Referenced by getDuctNodes(), and setChannelToDuctMaps().

◆ _heated_length

Real SubChannelMesh::_heated_length
protected

heated length of the fuel Pin

Definition at line 237 of file SubChannelMesh.h.

Referenced by getHeatedLength().

◆ _index_blockage

std::vector<unsigned int> SubChannelMesh::_index_blockage
protected

index of subchannels affected by blockage

Definition at line 262 of file SubChannelMesh.h.

Referenced by getIndexBlockage(), TriSubChannelMesh::getSubchannelFlowArea(), and QuadSubChannelMesh::getSubchannelFlowArea().

◆ _k_grid

std::vector<std::vector<Real> > SubChannelMesh::_k_grid
protected

axial form loss coefficient per computational cell

Definition at line 244 of file SubChannelMesh.h.

Referenced by getKGrid().

◆ _kij

Real SubChannelMesh::_kij
protected

Lateral form loss coefficient.

Definition at line 267 of file SubChannelMesh.h.

Referenced by getKij().

◆ _n_cells

unsigned int SubChannelMesh::_n_cells
protected

number of axial cells

Definition at line 280 of file SubChannelMesh.h.

Referenced by getNumOfAxialCells().

◆ _pin_diameter

Real SubChannelMesh::_pin_diameter
protected

◆ _pin_mesh_exist

bool SubChannelMesh::_pin_mesh_exist = false

Definition at line 230 of file SubChannelMesh.h.

Referenced by pinMeshExist().

◆ _pitch

Real SubChannelMesh::_pitch
protected

◆ _reduction_blockage

std::vector<Real> SubChannelMesh::_reduction_blockage
protected

area reduction of subchannels affected by blockage

Definition at line 264 of file SubChannelMesh.h.

Referenced by getReductionBlockage(), TriSubChannelMesh::getSubchannelFlowArea(), and QuadSubChannelMesh::getSubchannelFlowArea().

◆ _spacer_k

std::vector<Real> SubChannelMesh::_spacer_k
protected

form loss coefficient of the spacers

Definition at line 257 of file SubChannelMesh.h.

◆ _spacer_z

std::vector<Real> SubChannelMesh::_spacer_z
protected

axial location of the spacers

Definition at line 255 of file SubChannelMesh.h.

◆ _subchannel_position

std::vector<std::vector<Real> > SubChannelMesh::_subchannel_position

x,y coordinates of the subchannel centroids

Definition at line 284 of file SubChannelMesh.h.

Referenced by TriSubChannelMesh::channelIndex(), setChannelToDuctMaps(), SubChannelMesh(), and SubChannelPointValue::SubChannelPointValue().

◆ _unheated_length_entry

Real SubChannelMesh::_unheated_length_entry
protected

unheated length of the fuel Pin at the entry of the assembly

Definition at line 235 of file SubChannelMesh.h.

Referenced by SCMTriSubChannelMeshGenerator::generate(), SCMQuadSubChannelMeshGenerator::generate(), and getHeatedLengthEntry().

◆ _unheated_length_exit

Real SubChannelMesh::_unheated_length_exit
protected

unheated length of the fuel Pin at the exit of the assembly

Definition at line 239 of file SubChannelMesh.h.

Referenced by getHeatedLengthExit().

◆ _z_blockage

std::vector<Real> SubChannelMesh::_z_blockage
protected

axial location of blockage (inlet, outlet) [m]

Definition at line 260 of file SubChannelMesh.h.

Referenced by TriSubChannelMesh::getSubchannelFlowArea(), QuadSubChannelMesh::getSubchannelFlowArea(), and getZBlockage().

◆ _z_grid

std::vector<Real> SubChannelMesh::_z_grid
protected

The documentation for this class was generated from the following files: