https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
FlowChannelBase Class Referenceabstract

A base class for flow channels. More...

#include <FlowChannelBase.h>

Inheritance diagram for FlowChannelBase:
[legend]

Public Types

enum  EConvHeatTransGeom { PIPE , ROD_BUNDLE , HEX_ROD_BUNDLE }
 Type of convective heat transfer geometry. More...
 
enum  EPipeType { STRAIGHT , CURVED , DOWNCOMER }
 Pipe type. More...
 
enum  EPipeLocation { INTERIOR , EDGE , CORNER }
 Pipe location. More...
 
enum  EComponentSetupStatus {
  CREATED , MESH_PREPARED , INITIALIZED_PRIMARY , INITIALIZED_SECONDARY ,
  CHECKED
}
 Component setup status type. More...
 
typedef DataFileName DataFileParameterType
 

Public Member Functions

 FlowChannelBase (const InputParameters &params)
 
virtual void addVariables () override
 
virtual void addMooseObjects () override
 
virtual const Real & getGravityAngle () const
 Gets the gravity angle for this component.
 
const UserObjectName & getFluidPropertiesName () const
 Gets the name of the fluid properties user object for this component.
 
virtual const THM::FlowModelIDgetFlowModelID () const =0
 Gets the flow model ID.
 
virtual std::shared_ptr< const FlowModelgetFlowModel () const
 
const FunctionName & getAreaFunctionName () const
 Get the name of the function describing the flow channel area.
 
virtual FunctionName createAreaFunctionAndGetName ()
 Creates the area function if needed and then stores the name.
 
EConvHeatTransGeom getHeatTransferGeometry () const
 Gets heat transfer geometry.
 
EPipeLocation getPipeLocation () const
 Gets the pipe location.
 
std::vector< std::string > getHeatTransferNames () const
 Gets the names of all connected heat transfer components.
 
bool getTemperatureMode () const
 Gets temperature mode flag.
 
unsigned int getNumberOfHeatTransferConnections () const
 Gets the number of heat transfer connections.
 
std::vector< VariableName > getHeatedPerimeterNames () const
 Gets heated perimeter names for connected heat transfers.
 
std::vector< VariableName > getWallTemperatureNames () const
 Gets wall temperature names for connected heat transfers.
 
std::vector< MaterialPropertyName > getWallTemperatureMatNames () const
 
std::vector< MaterialPropertyName > getWallHeatFluxNames () const
 Gets wall heat flux names for connected heat transfers.
 
void addHeatTransferName (const std::string &ht_name) const
 Adds the name of a heat transfer component to the flow channel's list.
 
std::string getHeatTransferNamesSuffix (const std::string &ht_name) const
 Gets suffix to add to heat-transfer-related names in a heat transfer component.
 
std::vector< std::shared_ptr< ClosuresBase > > getClosuresObjects () const
 Get the used closures object(s)
 
virtual void buildMesh () override
 
unsigned int getNodesetID () const
 Gets the 1D component nodeset ID.
 
const BoundaryName & getNodesetName () const
 Gets the 1D component nodeset name.
 
virtual const std::vector< Connection > & getConnections (Component1DConnection::EEndType end_type) const
 Gets the vector of connections of an end type for this component.
 
std::string stringify (EComponentSetupStatus status) const
 Return a string for the setup status.
 
const std::string & cname () const
 Get the component name.
 
Componentparent ()
 
const THMMeshconstMesh () const
 Const reference to mesh, which can be called at any point.
 
THMMeshmesh ()
 Non-const reference to THM mesh, which can only be called before the end of mesh setup.
 
THMProblemgetTHMProblem () const
 Gets the THM problem.
 
template<typename T >
bool hasParam (const std::string &name) const
 Test if a parameter exists in the object's input parameters.
 
const std::vector< std::string > & getDependencies () const
 Returns a list of names of components that this component depends upon.
 
void executeInit ()
 Wrapper function for init() that marks the function as being called.
 
void executeInitSecondary ()
 Wrapper function for initSecondary() that marks the function as being called.
 
void executeCheck () const
 Wrapper function for check() that marks the function as being called.
 
void executeSetupMesh ()
 Wrapper function for setupMesh() that marks the function as being called.
 
virtual void addRelationshipManagers (Moose::RelationshipManagerType)
 Adds relationship managers for the component.
 
virtual ConvergencegetNonlinearConvergence () const
 Gets the Component's nonlinear Convergence object if it has one.
 
template<typename T >
const TgetComponent (const std::string &name) const
 Return a reference to a component via a parameter name.
 
template<typename T >
const TgetComponentByName (const std::string &cname) const
 Return a reference to a component given its name.
 
template<typename T >
bool hasComponent (const std::string &name) const
 Check the existence and type of a component via a parameter name.
 
template<typename T >
bool hasComponentByName (const std::string &cname) const
 Check the existence and type of a component given its name.
 
void connectObject (const InputParameters &obj_params, const std::string &obj_name, const std::string &param) const
 Connects a controllable parameter of the component to a controllable parameter of a constituent object.
 
void connectObject (const InputParameters &obj_params, const std::string &obj_name, const std::string &comp_param, const std::string &obj_param) const
 Connects a controllable parameter of the component to a controllable parameter of a constituent object.
 
void checkSetupStatus (const EComponentSetupStatus &status) const
 Throws an error if the supplied setup status of this component has not been reached.
 
void checkComponentExistsByName (const std::string &comp_name) const
 Checks that a component exists.
 
template<typename T >
void checkComponentOfTypeExists (const std::string &param) const
 Checks that the component of a certain type exists, where the name is given by a parameter.
 
template<typename T >
void checkComponentOfTypeExistsByName (const std::string &comp_name) const
 Checks that the component of a certain type exists.
 
template<typename... Args>
void logError (Args &&... args) const
 Logs an error.
 
template<typename... Args>
void logWarning (Args &&... args) const
 Logs a warning.
 
void addDependency (const std::string &dependency)
 Adds a component name to the list of dependencies.
 
template<typename T >
T getEnumParam (const std::string &param, bool log_error=true) const
 Gets an enum parameter.
 
bool problemIsTransient () const
 Whether the problem is transient.
 
const std::vector< dof_id_type > & getNodeIDs () const
 Gets the node IDs corresponding to this component.
 
const std::vector< dof_id_type > & getElementIDs () const
 Gets the element IDs corresponding to this component.
 
virtual const std::vector< SubdomainName > & getSubdomainNames () const
 Gets the subdomain names for this component.
 
virtual const std::vector< Moose::CoordinateSystemType > & getCoordSysTypes () const
 Gets the coordinate system types for this component.
 
template<typename T >
void insistParameterExists (const std::string &function_name, const std::string &param_name) const
 Runtime check to make sure that a parameter of specified type exists in the component's input parameters.
 
template<typename T >
void checkParameterValueLessThan (const std::string &param, const T &value_max) const
 Checks that a parameter value is less than a value.
 
template<typename T >
void checkSizeLessThan (const std::string &param, const unsigned int &n_entries) const
 Checks that the size of a vector parameter is less than a value.
 
template<typename T >
void checkSizeGreaterThan (const std::string &param, const unsigned int &n_entries) const
 Checks that the size of a vector parameter is greater than a value.
 
template<typename T1 , typename T2 >
void checkEqualSize (const std::string &param1, const std::string &param2) const
 Checks that the size of two vector parameters are equal.
 
template<typename T >
void checkSizeEqualsValue (const std::string &param, const unsigned int &n_entries) const
 Checks that the size of a vector parameter equals a value.
 
template<typename T >
void checkSizeEqualsValue (const std::string &param, const unsigned int &n_entries, const std::string &description) const
 Checks that the size of a vector parameter equals a value.
 
template<typename T1 , typename T2 >
void checkSizeEqualsParameterValue (const std::string &param1, const std::string &param2) const
 Checks that the size of a vector parameter equals the value of another parameter.
 
void checkMutuallyExclusiveParameters (const std::vector< std::string > &params, bool need_one_specified=true) const
 Checks that exactly one parameter out of a list is provided.
 
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 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
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
template<typename... Args>
void logComponentError (const std::string &component_name, Args &&... args) const
 Logs an error for a component.
 
template<typename... Args>
void logComponentWarning (const std::string &component_name, Args &&... args) const
 Logs a warning for a component.
 
std::string genName (const std::string &prefix, unsigned int id, const std::string &suffix="") const
 Build a name from a prefix, number and possible suffix.
 
std::string genName (const std::string &prefix, unsigned int i, unsigned int j, const std::string &suffix="") const
 Build a name from a prefix, 2 numbers and possible suffix.
 
std::string genName (const std::string &prefix, const std::string &name, unsigned int i) const
 Build a name from 2 strings and a number.
 
std::string genName (const std::string &prefix, const std::string &middle, const std::string &suffix="") const
 Build a name from strings.
 
std::string genSafeName (const std::string &prefix, const std::string &middle, const std::string &suffix="") const
 Build a name from strings that is safe to use in input files (i.e.
 
const Moose::Functor< Real > * defaultFunctor (const std::string &name)
 
const Moose::Functor< ADReal > * defaultFunctor (const std::string &name)
 
virtual Point getPosition () const
 
Point getStartPoint () const
 
Point getEndPoint () const
 
virtual RealVectorValue getDirection () const
 
virtual Real getRotation () const
 
virtual Real getNumElems () const
 
virtual Real getLength () const
 
Real getMinimumElemSize () const
 Gets the minimum element size.
 
Real computeAxialCoordinate (const Point &p) const
 
Real computeRadialCoordinate (const Point &p) const
 
unsigned int getAxialSectionIndex (const Point &p) const
 
unsigned int getAxialElementIndex (const Point &p_center) const
 
Point computeRealPointFromReferencePoint (const Point &p) const
 Computes point in 3-D space from a point in reference space.
 
Point computeReferencePointFromRealPoint (const Point &p) const
 Computes point in reference space from a point in 3-D space.
 
MooseEnum getAlignmentAxis () const
 Gets an axis MooseEnum for the axis the component is aligned with.
 
std::vector< Real > getElementBoundaryCoordinates () const
 Gets the element boundary coordinates for the aligned axis.
 
Real getGravityMagnitude () const
 Gets gravity magnitude.
 

Static Public Member Functions

static MooseEnum getConvHeatTransGeometry (const std::string &name)
 Gets a MooseEnum for convective heat transfer geometry type.
 
static MooseEnum getPipeType (const std::string &name)
 Gets a MooseEnum for pipe type.
 
static MooseEnum getPipeLocation (const std::string &name)
 Gets a MooseEnum for pipe location.
 
static InputParameters validParams ()
 
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 std::string deduceFunctorName (const std::string &name, const InputParameters &params)
 
static Point computeRealPointFromReferencePoint (const Point &p, const RealVectorValue &position, const RealTensorValue &R, const RealTensorValue &Rx)
 Computes point in 3-D space from a point in reference space.
 
static Point computeReferencePointFromRealPoint (const Point &p, const RealVectorValue &position, const RealTensorValue &R_inv, const RealTensorValue &Rx_inv)
 Computes point in reference space from a point in 3-D space.
 
static MooseEnum getAlignmentAxis (const RealVectorValue &dir)
 Gets an axis MooseEnum for the axis the component is aligned with.
 
static std::vector< Real > getElementBoundaryCoordinates (const RealVectorValue &position, const RealVectorValue &orientation, const Real &rotation, const std::vector< Real > &lengths, const std::vector< unsigned int > &n_elems)
 Gets the element boundary coordinates for the aligned axis.
 
static RealTensorValue computeDirectionTransformationTensor (const RealVectorValue &dir)
 Computes the direction transformation tensor.
 
static RealTensorValue computeXRotationTransformationTensor (const Real &rotation)
 Computes the rotation transformation tensor.
 

Public Attributes

 usingCombinedWarningSolutionWarnings
 
const ConsoleStream _console
 
Real _dx_min
 Minimum element size.
 

Static Public Attributes

static const std::map< std::string, EConvHeatTransGeom_heat_transfer_geom_to_enum
 Map of convective heat transfer geometry type to enum.
 
static const std::map< std::string, EPipeType_pipe_type_to_enum
 Map of pipe type to enum.
 
static const std::map< std::string, EPipeLocation_pipe_location_to_enum
 Map of pipe location to enum.
 
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 Member Functions

virtual std::shared_ptr< FlowModelbuildFlowModel ()=0
 
virtual void init () override
 Initializes the component.
 
virtual void initSecondary () override
 Perform secondary initialization, which relies on init() being called for all components.
 
virtual void check () const override
 Check the component integrity.
 
virtual void addCommonObjects ()
 Adds objects which are common for single- and two-phase flow.
 
virtual void getHeatTransferVariableNames ()
 Populates heat connection variable names lists.
 
virtual bool usingSecondOrderMesh () const override
 Check if second order mesh is being used by this geometrical component.
 
std::string sortBy () const
 
virtual void setupMesh () override
 Performs mesh setup such as creating mesh or naming mesh sets.
 
Elem * addElement (libMesh::ElemType elem_type, const std::vector< dof_id_type > &node_ids)
 
Elem * addElementEdge2 (dof_id_type node0, dof_id_type node1)
 
Elem * addElementEdge3 (dof_id_type node0, dof_id_type node1, dof_id_type node2)
 
Elem * addElementQuad4 (dof_id_type node0, dof_id_type node1, dof_id_type node2, dof_id_type node3)
 
Elem * addElementQuad9 (dof_id_type node0, dof_id_type node1, dof_id_type node2, dof_id_type node3, dof_id_type node4, dof_id_type node5, dof_id_type node6, dof_id_type node7, dof_id_type node8)
 
const FunctionName & getVariableFn (const FunctionName &fn_param_name)
 Makes a constant function parameter controllable and returns its name.
 
void addRelationshipManagersFromParameters (const InputParameters &moose_object_pars)
 Method to add a relationship manager for the objects being added to the system.
 
Node * addNode (const Point &pt)
 
Elem * addNodeElement (dof_id_type node)
 
virtual void setSubdomainInfo (SubdomainID subdomain_id, const std::string &subdomain_name, const Moose::CoordinateSystemType &coord_system=Moose::COORD_XYZ)
 Sets the next subdomain ID, name, and coordinate system.
 
void addNonlinearStepFunctorMaterial (const std::string &functor_name, const std::string &property, bool functor_is_ad)
 Adds a functor material to compute the absolute value of the change (step) of some functor between nonlinear iterations.
 
void addMaximumFunctorPostprocessor (const std::string &functor_name, const std::string &pp_name, const Real normalization, const std::vector< SubdomainName > &subdomains)
 Adds a Postprocessor to compute the maximum of a functor over some domain.
 
void addMultiPostprocessorConvergence (const std::vector< PostprocessorName > &postprocessors, const std::vector< std::string > &descriptions, const std::vector< Real > &tolerances)
 Adds a MultiPostprocessorConvergence for nonlinear convergence for the component.
 
std::string nonlinearConvergenceName () const
 Nonlinear Convergence name.
 
template<typename T >
void passParameter (const std::string &name, const std::string &new_name, InputParameters &params) const
 Passes a parameter from this object's input parameters to another set of input parameters.
 
template<typename T >
void passParameter (const std::string &name, InputParameters &params) const
 Passes a parameter from this object's input parameters to another set of input parameters.
 
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 
std::string deduceFunctorName (const std::string &name) const
 
const Moose::Functor< T > & getFunctor (const std::string &name)
 
const Moose::Functor< T > & getFunctor (const std::string &name, THREAD_ID tid)
 
const Moose::Functor< T > & getFunctor (const std::string &name, SubProblem &subproblem)
 
const Moose::Functor< T > & getFunctor (const std::string &name, SubProblem &subproblem, THREAD_ID tid)
 
bool isFunctor (const std::string &name) const
 
bool isFunctor (const std::string &name, const SubProblem &subproblem) const
 
Moose::ElemArg makeElemArg (const Elem *elem, bool correct_skewnewss=false) const
 
void checkFunctorSupportsSideIntegration (const std::string &name, bool qp_integration)
 
const Moose::Functor< T > & getFunctorByName (const std::string &name)
 

Protected Attributes

std::shared_ptr< FlowModel_flow_model
 The flow model used by this flow channel.
 
const UserObjectName & _fp_name
 Name of fluid properties user object.
 
const Real _gravity_angle
 Angle between orientation vector and gravity vector, in degrees.
 
FunctionName _area_function
 Function describing the flow channel area.
 
std::vector< std::shared_ptr< ClosuresBase > > _closures_objects
 Closures object(s)
 
const bool & _pipe_pars_transferred
 
const Real & _roughness
 Roughness of flow channel surface, [m].
 
EConvHeatTransGeom _HT_geometry
 Convective Heat transfer geometry.
 
EPipeLocation _pipe_location
 Pipe location within the bundle.
 
const Real & _PoD
 Pitch to diameter ratio for parallel bundle heat transfer.
 
bool _has_PoD
 True if user provides PoD.
 
bool _temperature_mode
 True if there is one or more sources specified by wall temperature.
 
std::vector< std::string > _heat_transfer_names
 Names of the heat transfer components connected to this component.
 
unsigned int _n_heat_transfer_connections
 Number of connected heat transfer components.
 
std::vector< MaterialPropertyName > _Hw_1phase_names
 1-phase wall heat transfer coefficient names for connected heat transfers
 
std::vector< MaterialPropertyName > _Hw_liquid_names
 liquid wall heat transfer coefficient names for connected heat transfers
 
std::vector< MaterialPropertyName > _Hw_vapor_names
 vapor wall heat transfer coefficient names for connected heat transfers
 
std::vector< VariableName > _P_hf_names
 heated perimeter names for connected heat transfers
 
std::vector< VariableName > _T_wall_names
 wall temperature auxvariable names for connected heat transfers
 
std::vector< MaterialPropertyName > _T_wall_mat_names
 wall temperature material names for connected heat transfers
 
std::vector< MaterialPropertyName > _q_wall_names
 wall heat flux names for connected heat transfers
 
std::map< Component1DConnection::EEndType, std::vector< Connection > > _connections
 Map of end type to a list of connections.
 
const std::vector< std::string > & _axial_region_names
 Axial region names.
 
std::vector< Real > _node_locations
 Node locations along the main axis.
 
Component_parent
 Pointer to a parent component (used in composed components)
 
THMProblem_sim
 THM problem this component is part of TODO: make _sim private (applications need to switch to getters to avoid breaking).
 
Factory_factory
 The Factory associated with the MooseApp.
 
const Real & _zero
 
THMMesh_mesh
 The THM mesh TODO: make _mesh private (applications need to switch to getters to avoid breaking)
 
std::vector< dof_id_type > _node_ids
 Node IDs of this component.
 
std::vector< dof_id_type > _elem_ids
 Element IDs of this component.
 
std::vector< SubdomainID_subdomain_ids
 List of subdomain IDs this components owns.
 
std::vector< SubdomainName > _subdomain_names
 List of subdomain names this components owns.
 
std::vector< Moose::CoordinateSystemType_coord_sys
 List of coordinate system for each subdomain.
 
const bool & _enabled
 
MooseApp_app
 
ActionFactory_action_factory
 
const std::string & _type
 
const std::string & _name
 
const InputParameters_pars
 
const Parallel::Communicator & _communicator
 
Logger_log
 
const Point & _position
 Start position of axis in 3-D space.
 
const RealVectorValue & _dir_unnormalized
 Unnormalized direction of axis from start position to end position.
 
const RealVectorValue _dir
 Normalized direction of axis from start position to end position.
 
const Real & _rotation
 Angle of rotation about the x-axis.
 
std::vector< Real > _lengths
 Length of each axial section.
 
Real _length
 Total axial length.
 
const Point _end_point
 End point of line segment.
 
std::vector< unsigned int_n_elems
 Number of elements in each axial section.
 
unsigned int _n_elem
 Total number of axial elements.
 
const unsigned int _n_sections
 Number of axial sections.
 
std::vector< Real > _section_end
 Axial coordinate of the end of each axial section using the line 'position' as the origin.
 
std::vector< Real > _x_centers
 Center axial coordinate of each axial element.
 
const RealTensorValue _R
 Direction transformation tensor.
 
const RealTensorValue _Rx
 Rotational transformation tensor about x-axis.
 
const RealTensorValue _R_inv
 Inverse direction transformation tensor.
 
const RealTensorValue _Rx_inv
 Inverse rotational transformation tensor about x-axis.
 
const std::string _moose_object_name_dlsi
 Name of the MOOSE object.
 
const RealVectorValue & _gravity_vector
 Gravitational acceleration vector.
 
const Real _gravity_magnitude
 Gravitational acceleration magnitude.
 
const bool _gravity_is_zero
 Gravitational acceleration magnitude is zero?
 
const RealVectorValue _gravity_direction
 Gravitational acceleration unit direction.
 

Private Member Functions

virtual void buildMeshNodes ()
 
void generateNodeLocations ()
 Generates axial node locations and stores in _node_locations.
 
unsigned int computeNumberOfNodes (unsigned int n_elems)
 Computes the number of axial nodes from the number of elements.
 
std::vector< Real > getUniformNodeLocations (Real length, unsigned int n_nodes)
 Computes the local positions of axial nodes for an axial section.
 
void placeLocalNodeLocations (Real start_length, unsigned int start_node, std::vector< Real > &local_node_locations)
 Puts local positions of axial nodes for an axial section into _node_locations.
 
void addRelationshipManager (const InputParameters &moose_object_pars, std::string rm_name, Moose::RelationshipManagerType rm_type, Moose::RelationshipManagerInputParameterCallback rm_input_parameter_func, Moose::RMSystemType sys_type=Moose::RMSystemType::NONE)
 Method for adding a single relationship manager.
 
const Moose::Functor< T > * defaultFunctor (const std::string &name)
 
const Moose::Functor< Real > * defaultFunctor (const std::string &name)
 
const Moose::Functor< ADReal > * defaultFunctor (const std::string &name)
 
const Moose::Functor< T > & getFunctorByName (const std::string &name, SubProblem &subproblem, THREAD_ID tid)
 
virtual bool isADObject () const override
 

Static Private Member Functions

static const hit::Node * getHitNode (const InputParameters &params)
 
static std::string messagePrefix (const InputParameters &params, const bool hit_prefix)
 
static RealVectorValue initializeDirectionVector (const RealVectorValue &dir_unnormalized)
 Computes a normalized direction vector or reports an error if the zero vector is provided.
 

Private Attributes

BoundaryID _nodeset_id
 Nodeset ID for all 1D component nodes.
 
BoundaryName _nodeset_name
 Nodeset name for all 1D component nodes.
 
EComponentSetupStatus _component_setup_status
 Component setup status.
 
std::vector< std::string > _dependencies
 List of names of components that this component depends upon.
 
const MooseBase_si_moose_base
 
const FEProblemBase_si_problem
 
const InputParameters_fi_params
 
const std::string _fi_name
 
SubProblem *const _fi_subproblem
 
const THREAD_ID _fi_tid
 
std::vector< std::unique_ptr< Moose::Functor< Real > > > _default_real_functors
 
std::vector< std::unique_ptr< Moose::Functor< ADReal > > > _default_ad_real_functors
 

Detailed Description

A base class for flow channels.

A flow channel is defined by its position, direction, length and area.

Definition at line 22 of file FlowChannelBase.h.

Member Enumeration Documentation

◆ EComponentSetupStatus

Component setup status type.

Enumerator
CREATED 

only created

MESH_PREPARED 

mesh set up

INITIALIZED_PRIMARY 

mesh set up, called primary init

INITIALIZED_SECONDARY 

mesh set up, called both inits

CHECKED 

mesh set up, called both inits, checked

Definition at line 37 of file Component.h.

38 {
39 CREATED,
43 CHECKED
44 };
@ CHECKED
mesh set up, called both inits, checked
Definition Component.h:43
@ MESH_PREPARED
mesh set up
Definition Component.h:40
@ INITIALIZED_PRIMARY
mesh set up, called primary init
Definition Component.h:41
@ INITIALIZED_SECONDARY
mesh set up, called both inits
Definition Component.h:42
@ CREATED
only created
Definition Component.h:39

◆ EConvHeatTransGeom

Type of convective heat transfer geometry.

Enumerator
PIPE 

pipe geometry

ROD_BUNDLE 

square array rod bundle geometry

HEX_ROD_BUNDLE 

hexagonal array rod bundle geometry

Definition at line 28 of file FlowChannelBase.h.

29 {
30 PIPE,
33 };
@ ROD_BUNDLE
square array rod bundle geometry
@ HEX_ROD_BUNDLE
hexagonal array rod bundle geometry
@ PIPE
pipe geometry

◆ EPipeLocation

Pipe location.

Enumerator
INTERIOR 
EDGE 
CORNER 

Definition at line 42 of file FlowChannelBase.h.

◆ EPipeType

Pipe type.

Enumerator
STRAIGHT 
CURVED 
DOWNCOMER 

Definition at line 35 of file FlowChannelBase.h.

Constructor & Destructor Documentation

◆ FlowChannelBase()

FlowChannelBase::FlowChannelBase ( const InputParameters params)

Definition at line 114 of file FlowChannelBase.C.

115 : Component1D(params),
116 GravityInterface(params),
117
118 _flow_model(nullptr),
119 _fp_name(getParam<UserObjectName>("fp")),
120 _gravity_angle(MooseUtils::absoluteFuzzyEqual(_gravity_magnitude, 0.0)
121 ? 0.0
123 180 / M_PI),
124 _pipe_pars_transferred(getParam<bool>("pipe_pars_transferred")),
125 _roughness(getParam<Real>("roughness")),
126 _HT_geometry(getEnumParam<EConvHeatTransGeom>("heat_transfer_geom")),
127 _pipe_location(getEnumParam<EPipeLocation>("pipe_location")),
128 _PoD(getParam<Real>("PoD")),
129 _has_PoD(isParamValid("PoD")),
130 _temperature_mode(false),
132{
133}
Base class for 1D components.
Definition Component1D.h:19
T getEnumParam(const std::string &param, bool log_error=true) const
Gets an enum parameter.
Definition Component.h:590
const RealVectorValue _dir
Normalized direction of axis from start position to end position.
EPipeLocation _pipe_location
Pipe location within the bundle.
EConvHeatTransGeom
Type of convective heat transfer geometry.
EConvHeatTransGeom _HT_geometry
Convective Heat transfer geometry.
std::shared_ptr< FlowModel > _flow_model
The flow model used by this flow channel.
const bool & _pipe_pars_transferred
unsigned int _n_heat_transfer_connections
Number of connected heat transfer components.
EPipeLocation
Pipe location.
const Real & _roughness
Roughness of flow channel surface, [m].
const Real _gravity_angle
Angle between orientation vector and gravity vector, in degrees.
const UserObjectName & _fp_name
Name of fluid properties user object.
bool _temperature_mode
True if there is one or more sources specified by wall temperature.
bool _has_PoD
True if user provides PoD.
const Real & _PoD
Pitch to diameter ratio for parallel bundle heat transfer.
Interface for specifying gravity at the component level.
const RealVectorValue & _gravity_vector
Gravitational acceleration vector.
const Real _gravity_magnitude
Gravitational acceleration magnitude.
const T & getParam(const std::string &name) const
bool isParamValid(const std::string &name) const
auto norm(const T &a)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Member Function Documentation

◆ addCommonObjects()

void FlowChannelBase::addCommonObjects ( )
protectedvirtual

Adds objects which are common for single- and two-phase flow.

Definition at line 239 of file FlowChannelBase.C.

240{
242 ts_execute_on = {EXEC_TIMESTEP_BEGIN, EXEC_INITIAL};
243
244 {
245 std::string class_name = "DirectionMaterial";
246 InputParameters params = _factory.getValidParams(class_name);
247 params.set<std::vector<SubdomainName>>("block") = getSubdomainNames();
248 getTHMProblem().addMaterial(class_name, genName(name(), "dir_mat"), params);
249 }
250
252 {
253 // Area
254 {
255 std::string class_name = "FunctionAux";
256 InputParameters params = _factory.getValidParams(class_name);
257 params.set<AuxVariableName>("variable") = FlowModel::AREA_LINEAR;
258 params.set<std::vector<SubdomainName>>("block") = getSubdomainNames();
259 params.set<FunctionName>("function") = _area_function;
260 params.set<ExecFlagEnum>("execute_on") = ts_execute_on;
261 const std::string aux_kernel_name = genName(name(), "area_linear_aux");
262 getTHMProblem().addAuxKernel(class_name, aux_kernel_name, params);
263 }
264 {
265 const std::string class_name = "ProjectionAux";
266 InputParameters params = _factory.getValidParams(class_name);
267 params.set<AuxVariableName>("variable") = FlowModel::AREA;
268 params.set<std::vector<SubdomainName>>("block") = getSubdomainNames();
269 params.set<std::vector<VariableName>>("v") = {FlowModel::AREA_LINEAR};
270 params.set<ExecFlagEnum>("execute_on") = ts_execute_on;
271 const std::string aux_kernel_name = genName(name(), "area_aux");
272 getTHMProblem().addAuxKernel(class_name, aux_kernel_name, params);
273 }
274 }
275}
const ExecFlagType EXEC_TIMESTEP_BEGIN
const ExecFlagType EXEC_INITIAL
const std::string name
Definition Setup.h:21
virtual const std::vector< SubdomainName > & getSubdomainNames() const
Gets the subdomain names for this component.
Definition Component.C:345
THMProblem & getTHMProblem() const
Gets the THM problem.
Definition Component.C:135
Factory & _factory
The Factory associated with the MooseApp.
Definition Component.h:497
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters &parameters)
virtual void addAuxKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
InputParameters getValidParams(const std::string &name) const
FunctionName _area_function
Function describing the flow channel area.
static const std::string AREA
Definition FlowModel.h:102
static const std::string AREA_LINEAR
Definition FlowModel.h:103
T & set(const std::string &name, bool quiet_mode=false)
std::string genName(const std::string &prefix, unsigned int id, const std::string &suffix="") const
Build a name from a prefix, number and possible suffix.
ExecFlagEnum getDefaultExecFlagEnum()

Referenced by addMooseObjects().

◆ addDependency()

void Component::addDependency ( const std::string &  dependency)
inherited

Adds a component name to the list of dependencies.

Parameters
[in]dependencyname of component to add to list of dependencies

Definition at line 129 of file Component.C.

130{
131 _dependencies.push_back(dependency);
132}
std::vector< std::string > _dependencies
List of names of components that this component depends upon.
Definition Component.h:542

Referenced by Component1DConnection::addConnection(), HeatTransferBase::HeatTransferBase(), HeatTransferFromHeatStructure3D1Phase::HeatTransferFromHeatStructure3D1Phase(), HSCoupler2D2DRadiation::HSCoupler2D2DRadiation(), HSCoupler2D3D::HSCoupler2D3D(), and Shaft::Shaft().

◆ addElement()

Elem * GeometricalComponent::addElement ( libMesh::ElemType  elem_type,
const std::vector< dof_id_type > &  node_ids 
)
protectedinherited

Definition at line 27 of file GeometricalComponent.C.

29{
30 auto elem = mesh().addElement(elem_type, node_ids);
31 _elem_ids.push_back(elem->id());
32 return elem;
33}
std::vector< dof_id_type > _elem_ids
Element IDs of this component.
Definition Component.h:508
THMMesh & mesh()
Non-const reference to THM mesh, which can only be called before the end of mesh setup.
Definition Component.C:60
Elem * addElement(libMesh::ElemType elem_type, const std::vector< dof_id_type > &node_ids)
Add a new element into the mesh.
Definition THMMesh.C:103

Referenced by FileMeshComponent::buildMesh().

◆ addElementEdge2()

Elem * GeometricalComponent::addElementEdge2 ( dof_id_type  node0,
dof_id_type  node1 
)
protectedinherited

Definition at line 36 of file GeometricalComponent.C.

37{
38 auto elem = mesh().addElementEdge2(node0, node1);
39 _elem_ids.push_back(elem->id());
40 return elem;
41}
Elem * addElementEdge2(dof_id_type node0, dof_id_type node1)
Definition THMMesh.C:128

Referenced by Component1D::buildMesh().

◆ addElementEdge3()

Elem * GeometricalComponent::addElementEdge3 ( dof_id_type  node0,
dof_id_type  node1,
dof_id_type  node2 
)
protectedinherited

Definition at line 44 of file GeometricalComponent.C.

45{
46 auto elem = mesh().addElementEdge3(node0, node1, node2);
47 _elem_ids.push_back(elem->id());
48 return elem;
49}
Elem * addElementEdge3(dof_id_type node0, dof_id_type node1, dof_id_type node2)
Definition THMMesh.C:141

Referenced by Component1D::buildMesh().

◆ addElementQuad4()

Elem * GeometricalComponent::addElementQuad4 ( dof_id_type  node0,
dof_id_type  node1,
dof_id_type  node2,
dof_id_type  node3 
)
protectedinherited

Definition at line 52 of file GeometricalComponent.C.

56{
57 auto elem = mesh().addElementQuad4(node0, node1, node2, node3);
58 _elem_ids.push_back(elem->id());
59 return elem;
60}
Elem * addElementQuad4(dof_id_type node0, dof_id_type node1, dof_id_type node2, dof_id_type node3)
Definition THMMesh.C:155

Referenced by Component2D::build2DMesh().

◆ addElementQuad9()

Elem * GeometricalComponent::addElementQuad9 ( dof_id_type  node0,
dof_id_type  node1,
dof_id_type  node2,
dof_id_type  node3,
dof_id_type  node4,
dof_id_type  node5,
dof_id_type  node6,
dof_id_type  node7,
dof_id_type  node8 
)
protectedinherited

Definition at line 63 of file GeometricalComponent.C.

72{
73 auto elem = mesh().addElementQuad9(node0, node1, node2, node3, node4, node5, node6, node7, node8);
74 _elem_ids.push_back(elem->id());
75 return elem;
76}
Elem * addElementQuad9(dof_id_type node0, dof_id_type node1, dof_id_type node2, dof_id_type node3, dof_id_type node4, dof_id_type node5, dof_id_type node6, dof_id_type node7, dof_id_type node8)
Definition THMMesh.C:170

Referenced by Component2D::build2DMesh2ndOrder().

◆ addHeatTransferName()

void FlowChannelBase::addHeatTransferName ( const std::string &  ht_name) const

Adds the name of a heat transfer component to the flow channel's list.

This function is called from a heat transfer component to add its name to the flow channel's list, so that the flow channel can communicate with it, such as for determining variable names used in averages of heat transfer variables.

Parameters
[in]ht_namename of the heat transfer component

Definition at line 342 of file FlowChannelBase.C.

343{
344 _heat_transfer_names.push_back(name);
346}
std::vector< std::string > _heat_transfer_names
Names of the heat transfer components connected to this component.

Referenced by HeatTransferBase::init(), and HeatTransferFromHeatStructure3D1Phase::init().

◆ addMaximumFunctorPostprocessor()

void Component::addMaximumFunctorPostprocessor ( const std::string &  functor_name,
const std::string &  pp_name,
const Real  normalization,
const std::vector< SubdomainName > &  subdomains 
)
protectedinherited

Adds a Postprocessor to compute the maximum of a functor over some domain.

Parameters
[in]functor_nameFunctor for which to compute maximum
[in]pp_nameName of new Postprocessor
[in]normalizationFactor by which to divide quantity
[in]subdomainsSubdomains over which to compute maximum

Definition at line 252 of file Component.C.

256{
257 const std::string class_name = "ElementExtremeFunctorValue";
258 InputParameters params = _factory.getValidParams(class_name);
259 params.set<std::vector<SubdomainName>>("block") = subdomains;
260 params.set<MooseEnum>("value_type") = "max";
261 params.set<MooseFunctorName>("functor") = functor_name;
262 params.set<Real>("scale") = 1.0 / normalization;
263 params.set<ExecFlagEnum>("execute_on") = EXEC_NONLINEAR_CONVERGENCE;
264 params.set<std::vector<OutputName>>("outputs") = {"none"};
265 getTHMProblem().addPostprocessor(class_name, pp_name, params);
266}
virtual void addPostprocessor(const std::string &pp_name, const std::string &name, InputParameters &parameters)

Referenced by FlowChannel1Phase::addMooseObjects(), and HeatStructureBase::addMooseObjects().

◆ addMooseObjects()

void FlowChannelBase::addMooseObjects ( )
overridevirtual

Reimplemented from Component.

Reimplemented in FlowChannel1Phase, and FlowChannel1PhaseBase.

Definition at line 278 of file FlowChannelBase.C.

279{
281
282 ExecFlagEnum execute_on_initial_linear(MooseUtils::getDefaultExecFlagEnum());
283 execute_on_initial_linear = {EXEC_INITIAL, EXEC_LINEAR};
284
285 // total heat flux perimeter aux kernel
287 {
288 const std::string class_name = "SumAux";
289 InputParameters params = _factory.getValidParams(class_name);
290 params.set<AuxVariableName>("variable") = FlowModel::HEAT_FLUX_PERIMETER;
291 params.set<std::vector<SubdomainName>>("block") = getSubdomainNames();
292 params.set<std::vector<VariableName>>("values") = _P_hf_names;
293 params.set<ExecFlagEnum>("execute_on") = execute_on_initial_linear;
294 getTHMProblem().addAuxKernel(class_name, genName(name(), "P_hf_auxkernel"), params);
295 }
296
297 // weighted average wall heat flux aux kernel
299 {
301 {
302 const std::string class_name = "ADWeightedAverageMaterial";
303 InputParameters params = _factory.getValidParams(class_name);
304 params.set<MaterialPropertyName>("prop_name") = FlowModel::HEAT_FLUX_WALL;
305 params.set<std::vector<SubdomainName>>("block") = getSubdomainNames();
306 params.set<std::vector<MaterialPropertyName>>("values") = _q_wall_names;
307 params.set<std::vector<VariableName>>("weights") = _P_hf_names;
309 class_name, genName(name(), FlowModel::HEAT_FLUX_WALL, "w_avg_mat"), params);
310 }
311 else if (_n_heat_transfer_connections == 0)
312 {
313 const std::string class_name = "ADConstantMaterial";
314 InputParameters params = _factory.getValidParams(class_name);
315 params.set<std::string>("property_name") = FlowModel::HEAT_FLUX_WALL;
316 params.set<std::vector<SubdomainName>>("block") = getSubdomainNames();
317 params.set<Real>("value") = 0;
319 class_name, genName(name(), FlowModel::HEAT_FLUX_WALL, "zero_mat"), params);
320 }
321 }
322
323 const auto & vpp_vars = getParam<std::vector<VariableName>>("vpp_vars");
324 if (vpp_vars.size() > 0)
325 {
326 const std::string class_name = "ElementValueSampler";
327 InputParameters params = _factory.getValidParams(class_name);
328 params.set<std::vector<SubdomainName>>("block") = getSubdomainNames();
329 params.set<std::vector<VariableName>>("variable") = vpp_vars;
330 params.set<std::string>("sort_by") = sortBy();
331 params.set<ExecFlagEnum>("execute_on") = {EXEC_INITIAL, EXEC_TIMESTEP_END};
332 getTHMProblem().addVectorPostprocessor(class_name, name() + "_vars_vpp", params);
333 }
334
335 _flow_model->addMooseObjects();
336
337 for (const auto & closures : _closures_objects)
338 closures->addMooseObjectsFlowChannel(*this);
339}
const ExecFlagType EXEC_TIMESTEP_END
const ExecFlagType EXEC_LINEAR
std::string sortBy() const
virtual void addVectorPostprocessor(const std::string &pp_name, const std::string &name, InputParameters &parameters)
std::vector< VariableName > _P_hf_names
heated perimeter names for connected heat transfers
std::vector< std::shared_ptr< ClosuresBase > > _closures_objects
Closures object(s)
std::vector< MaterialPropertyName > _q_wall_names
wall heat flux names for connected heat transfers
virtual void addCommonObjects()
Adds objects which are common for single- and two-phase flow.
static const std::string HEAT_FLUX_WALL
Definition FlowModel.h:104
static const std::string HEAT_FLUX_PERIMETER
Definition FlowModel.h:105

Referenced by FlowChannel1PhaseBase::addMooseObjects().

◆ addMultiPostprocessorConvergence()

void Component::addMultiPostprocessorConvergence ( const std::vector< PostprocessorName > &  postprocessors,
const std::vector< std::string > &  descriptions,
const std::vector< Real > &  tolerances 
)
protectedinherited

Adds a MultiPostprocessorConvergence for nonlinear convergence for the component.

Parameters
[in]postprocessorsPostprocessors to compare
[in]descriptionsDescription of each Postprocessor
[in]tolerancesTolerance for each check

Definition at line 269 of file Component.C.

272{
273 const std::string class_name = "MultiPostprocessorConvergence";
274 InputParameters params = _factory.getValidParams(class_name);
275 params.set<std::vector<PostprocessorName>>("postprocessors") = postprocessors;
276 params.set<std::vector<std::string>>("descriptions") = descriptions;
277 params.set<std::vector<Real>>("tolerances") = tolerances;
278 params.set<unsigned int>("min_iterations") = 1;
279 params.set<unsigned int>("max_iterations") = std::numeric_limits<unsigned int>::max();
281}
std::string nonlinearConvergenceName() const
Nonlinear Convergence name.
Definition Component.h:486
virtual void addConvergence(const std::string &type, const std::string &name, InputParameters &parameters)

Referenced by FlowChannel1Phase::addMooseObjects(), and HeatStructureBase::addMooseObjects().

◆ addNode()

Node * Component::addNode ( const Point &  pt)
protectedinherited

Definition at line 203 of file Component.C.

204{
205 auto node = mesh().addNode(pt);
206 _node_ids.push_back(node->id());
207 return node;
208}
std::vector< dof_id_type > _node_ids
Node IDs of this component.
Definition Component.h:506
Node * addNode(const Point &pt)
Add a new node into the mesh.
Definition THMMesh.C:95

Referenced by Component2D::build2DMesh(), Component2D::build2DMesh2ndOrder(), FileMeshComponent::buildMesh(), Component1D::buildMeshNodes(), ElbowPipe1Phase::buildMeshNodes(), and VolumeJunction1Phase::setupMesh().

◆ addNodeElement()

Elem * Component::addNodeElement ( dof_id_type  node)
protectedinherited

Definition at line 211 of file Component.C.

212{
213 auto elem = mesh().addNodeElement(node);
214 _elem_ids.push_back(elem->id());
215 return elem;
216}
Elem * addNodeElement(dof_id_type node)
Definition THMMesh.C:116

Referenced by VolumeJunction1Phase::setupMesh().

◆ addNonlinearStepFunctorMaterial()

void Component::addNonlinearStepFunctorMaterial ( const std::string &  functor_name,
const std::string &  property,
bool  functor_is_ad 
)
protectedinherited

Adds a functor material to compute the absolute value of the change (step) of some functor between nonlinear iterations.

Parameters
[in]functor_nameFunctor for which to compute step
[in]propertyName of new step functor material property
[in]functor_is_adIs the functor for which to compute the step AD?

Definition at line 236 of file Component.C.

239{
240 const std::string class_name =
241 functor_is_ad ? "ADFunctorChangeFunctorMaterial" : "FunctorChangeFunctorMaterial";
242 InputParameters params = _factory.getValidParams(class_name);
243 params.set<std::vector<SubdomainName>>("block") = getSubdomainNames();
244 params.set<MooseFunctorName>("functor") = functor_name;
245 params.set<MooseEnum>("change_over") = "nonlinear";
246 params.set<std::string>("prop_name") = property;
247 params.set<bool>("take_absolute_value") = true;
248 getTHMProblem().addFunctorMaterial(class_name, genName(name(), property + "_fmat"), params);
249}
virtual void addFunctorMaterial(const std::string &functor_material_name, const std::string &name, InputParameters &parameters)
const std::string & name() const

Referenced by FlowChannel1Phase::addMooseObjects(), and HeatStructureBase::addMooseObjects().

◆ addRelationshipManager()

void Component::addRelationshipManager ( const InputParameters moose_object_pars,
std::string  rm_name,
Moose::RelationshipManagerType  rm_type,
Moose::RelationshipManagerInputParameterCallback  rm_input_parameter_func,
Moose::RMSystemType  sys_type = Moose::RMSystemType::NONE 
)
privateinherited

Method for adding a single relationship manager.

This method was copied from Action.

Parameters
moose_object_parsThe parameters of the MooseObject that requested the RM
rm_nameThe class type of the RM, e.g. ElementSideNeighborLayers
rm_typeThe RelationshipManagerType, e.g. geometric, algebraic, coupling
rm_input_parameter_funcThe RM callback function, typically a lambda defined in the requesting MooseObject's validParams function
sys_typeA RMSystemType that can be used to limit the systems and consequent dof_maps that the RM can be attached to

Definition at line 163 of file Component.C.

169{
170 // These need unique names
171 static unsigned int unique_object_id = 0;
172
173 auto new_name = moose_object_pars.getBase() + '_' + name() + '_' + rm_name + "_" +
174 Moose::stringify(rm_type) + " " + std::to_string(unique_object_id);
175
176 auto rm_params = _factory.getValidParams(rm_name);
177 rm_params.set<Moose::RelationshipManagerType>("rm_type") = rm_type;
178
179 rm_params.set<std::string>("for_whom") = name();
180
181 // If there is a callback for setting the RM parameters let's use it
182 if (rm_input_parameter_func)
183 rm_input_parameter_func(moose_object_pars, rm_params);
184
185 rm_params.set<MooseMesh *>("mesh") = &_mesh;
186
187 if (!rm_params.areAllRequiredParamsValid())
188 mooseError("Missing required parameters for RelationshipManager " + rm_name + " for object " +
189 name());
190
191 auto rm_obj = _factory.create<RelationshipManager>(rm_name, new_name, rm_params);
192
193 const bool added = _app.addRelationshipManager(rm_obj);
194
195 // Delete the resources created on behalf of the RM if it ends up not being added to the App.
196 if (!added)
198 else // we added it
199 unique_object_id++;
200}
THMMesh & _mesh
The THM mesh TODO: make _mesh private (applications need to switch to getters to avoid breaking)
Definition Component.h:503
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
void releaseSharedObjects(const MooseObject &moose_object, THREAD_ID tid=0)
const std::string & getBase() const
bool addRelationshipManager(std::shared_ptr< RelationshipManager > relationship_manager)
void mooseError(Args &&... args) const
MooseApp & _app
std::string stringify(const T &t)
RelationshipManagerType

Referenced by Component::addRelationshipManagersFromParameters().

◆ addRelationshipManagers()

virtual void Component::addRelationshipManagers ( Moose::RelationshipManagerType  )
inlinevirtualinherited

Adds relationship managers for the component.

Reimplemented in FileMeshPhysicsComponent.

Definition at line 111 of file Component.h.

111{}

◆ addRelationshipManagersFromParameters()

void Component::addRelationshipManagersFromParameters ( const InputParameters moose_object_pars)
protectedinherited

Method to add a relationship manager for the objects being added to the system.

Relationship managers have to be added relatively early. In many cases before the Action::act() method is called.

This method was copied from Action.

Parameters
moose_object_parsThe MooseObject to inspect for RelationshipManagers to add

Definition at line 148 of file Component.C.

149{
150 const auto & buildable_types = moose_object_pars.getBuildableRelationshipManagerTypes();
151
152 for (const auto & buildable_type : buildable_types)
153 {
154 auto & rm_name = std::get<0>(buildable_type);
155 auto & rm_type = std::get<1>(buildable_type);
156 auto rm_input_parameter_func = std::get<2>(buildable_type);
157
158 addRelationshipManager(moose_object_pars, rm_name, rm_type, rm_input_parameter_func);
159 }
160}
void addRelationshipManager(const InputParameters &moose_object_pars, std::string rm_name, Moose::RelationshipManagerType rm_type, Moose::RelationshipManagerInputParameterCallback rm_input_parameter_func, Moose::RMSystemType sys_type=Moose::RMSystemType::NONE)
Method for adding a single relationship manager.
Definition Component.C:163
const std::vector< std::tuple< std::string, Moose::RelationshipManagerType, Moose::RelationshipManagerInputParameterCallback > > & getBuildableRelationshipManagerTypes() const

Referenced by FileMeshPhysicsComponent::addRelationshipManagers().

◆ addVariables()

void FlowChannelBase::addVariables ( )
overridevirtual

Reimplemented from Component.

Definition at line 216 of file FlowChannelBase.C.

217{
218 // This should be called after initSecondary() because it relies on the names
219 // generated in initSecondary() of heat transfer components
221
222 _flow_model->addVariables();
223
224 // total heat flux perimeter
226 {
227 const std::string class_name = "SumIC";
228 InputParameters params = _factory.getValidParams(class_name);
229 params.set<VariableName>("variable") = FlowModel::HEAT_FLUX_PERIMETER;
230 params.set<std::vector<SubdomainName>>("block") = getSubdomainNames();
231 params.set<std::vector<VariableName>>("values") = _P_hf_names;
232 getTHMProblem().addSimInitialCondition(class_name, genName(name(), "P_hf_ic"), params);
233 }
234
235 _flow_model->addInitialConditions();
236}
virtual void getHeatTransferVariableNames()
Populates heat connection variable names lists.
bool isRestarting() const
void addSimInitialCondition(const std::string &type, const std::string &name, InputParameters params)
Definition Simulation.C:495

◆ buildFlowModel()

virtual std::shared_ptr< FlowModel > FlowChannelBase::buildFlowModel ( )
protectedpure virtual

Implemented in FlowChannel1PhaseBase.

Referenced by init().

◆ buildMesh()

void Component1D::buildMesh ( )
overridevirtualinherited

Implements GeneratedMeshComponent.

Definition at line 34 of file Component1D.C.

35{
37
38 MeshBase & the_mesh = mesh().getMesh();
39 BoundaryInfo & boundary_info = the_mesh.get_boundary_info();
40
41 // create nodeset for all nodes for this component
44 boundary_info.nodeset_name(_nodeset_id) = _nodeset_name;
45
46 // Check that the number of nodes is consistent with the number of nodes in case component
47 // developers screw up (typically in buildMeshNodes() call)
49 {
50 if (_node_ids.size() != (2 * _n_elem + 1))
52 ": Inconsistent number of nodes and elements. You have ",
53 _n_elem,
54 " elements and ",
55 _node_ids.size(),
56 " nodes.");
57 }
58 else
59 {
60 if (_node_ids.size() != _n_elem + 1)
62 ": Inconsistent number of nodes and elements. You have ",
63 _n_elem,
64 " elements and ",
65 _node_ids.size(),
66 " nodes.");
67 }
68
69 for (auto & node_id : _node_ids)
70 {
71 const Node * nd = the_mesh.node_ptr(node_id);
72 boundary_info.add_node(nd, _nodeset_id);
73 }
74
75 // elems
76 BoundaryID bc_id_inlet = mesh().getNextBoundaryId();
77 BoundaryID bc_id_outlet = mesh().getNextBoundaryId();
78 auto & binfo = mesh().getMesh().get_boundary_info();
79 for (unsigned int i = 0; i < _n_elem; i++)
80 {
81 Elem * elem = nullptr;
83 elem = addElementEdge3(_node_ids[2 * i], _node_ids[2 * i + 2], _node_ids[2 * i + 1]);
84 else
85 elem = addElementEdge2(_node_ids[i], _node_ids[i + 1]);
86
87 // BCs
88 if (i == 0)
89 {
90 Point pt = _position;
91 _connections[Component1DConnection::IN].push_back(Connection(pt, elem, 0, bc_id_inlet, -1));
92 boundary_info.add_side(elem, 0, bc_id_inlet);
93 binfo.sideset_name(bc_id_inlet) = genName(name(), "in");
94 }
95 if (i == (_n_elem - 1))
96 {
97 Point pt = _position + _length * _dir;
98 _connections[Component1DConnection::OUT].push_back(Connection(pt, elem, 1, bc_id_outlet, 1));
99 boundary_info.add_side(elem, 1, bc_id_outlet);
100 binfo.sideset_name(bc_id_outlet) = genName(name(), "out");
101 }
102 }
103
104 if (_axial_region_names.size() > 0)
105 {
106 unsigned int k = 0;
107 for (unsigned int i = 0; i < _axial_region_names.size(); i++)
108 {
109 const std::string & region_name = _axial_region_names[i];
110 SubdomainID subdomain_id = mesh().getNextSubdomainId();
111 setSubdomainInfo(subdomain_id, genName(name(), region_name));
112
113 for (unsigned int j = 0; j < _n_elems[i]; j++, k++)
114 {
115 dof_id_type elem_id = _elem_ids[k];
116 mesh().elemPtr(elem_id)->subdomain_id() = subdomain_id;
117 }
118 }
119 }
120 else
121 {
122 SubdomainID subdomain_id = mesh().getNextSubdomainId();
123 setSubdomainInfo(subdomain_id, name());
124
125 for (auto && id : _elem_ids)
126 mesh().elemPtr(id)->subdomain_id() = subdomain_id;
127 }
128
129 // Update the mesh
130 mesh().update();
131}
boundary_id_type BoundaryID
std::map< Component1DConnection::EEndType, std::vector< Connection > > _connections
Map of end type to a list of connections.
Definition Component1D.h:79
virtual void buildMeshNodes()
Definition Component1D.C:23
virtual bool usingSecondOrderMesh() const override
Check if second order mesh is being used by this geometrical component.
BoundaryName _nodeset_name
Nodeset name for all 1D component nodes.
Definition Component1D.h:87
BoundaryID _nodeset_id
Nodeset ID for all 1D component nodes.
Definition Component1D.h:85
virtual void setSubdomainInfo(SubdomainID subdomain_id, const std::string &subdomain_name, const Moose::CoordinateSystemType &coord_system=Moose::COORD_XYZ)
Sets the next subdomain ID, name, and coordinate system.
Definition Component.C:219
unsigned int _n_elem
Total number of axial elements.
std::vector< unsigned int > _n_elems
Number of elements in each axial section.
const Point & _position
Start position of axis in 3-D space.
const std::vector< std::string > & _axial_region_names
Axial region names.
Elem * addElementEdge3(dof_id_type node0, dof_id_type node1, dof_id_type node2)
Elem * addElementEdge2(dof_id_type node0, dof_id_type node1)
virtual Elem * elemPtr(const dof_id_type i)
MeshBase & getMesh()
void update()
virtual SubdomainID getNextSubdomainId()
Gets the next subdomain ID.
Definition THMMesh.C:202
virtual BoundaryID getNextBoundaryId()
Gets the next nodeset or sideset ID.
Definition THMMesh.C:209
uint8_t dof_id_type

◆ buildMeshNodes()

void Component1D::buildMeshNodes ( )
privatevirtualinherited

Reimplemented in ElbowPipe1Phase.

Definition at line 23 of file Component1D.C.

24{
25 Point p(0, 0, 0);
26 for (unsigned int i = 0; i < _node_locations.size(); i++)
27 {
28 p(0) = _node_locations[i];
29 addNode(p);
30 }
31}
const Real p
Node * addNode(const Point &pt)
Definition Component.C:203
std::vector< Real > _node_locations
Node locations along the main axis.

Referenced by Component1D::buildMesh().

◆ check()

void FlowChannelBase::check ( ) const
overrideprotectedvirtual

Check the component integrity.

Reimplemented from GeneratedMeshComponent.

Reimplemented in FlowChannel1Phase, and FlowChannel1PhaseBase.

Definition at line 196 of file FlowChannelBase.C.

197{
199
200 for (const auto & closures : _closures_objects)
201 closures->checkFlowChannel(*this);
202
203 // check types of heat transfer for all sources; must be all of same type
205 for (unsigned int i = 0; i < _heat_transfer_names.size(); i++)
206 {
207 const HeatTransferBase & heat_transfer =
208 getComponentByName<HeatTransferBase>(_heat_transfer_names[i]);
209 if (!heat_transfer.isTemperatureType())
210 logError("Heat sources for a flow channel must be all of temperature type or all of heat "
211 "flux type");
212 }
213}
void logError(Args &&... args) const
Logs an error.
Definition Component.h:226
virtual void check() const
Check the component integrity.
Definition Component.h:416
Base class for heat transfer connections.
virtual bool isTemperatureType() const =0
Returns whether this heat transfer is specified by temperature, rather than heat flux.

Referenced by FlowChannel1PhaseBase::check().

◆ checkComponentExistsByName()

void Component::checkComponentExistsByName ( const std::string &  comp_name) const
inherited

Checks that a component exists.

Parameters
[in]comp_namename of the component

Definition at line 141 of file Component.C.

142{
143 if (!_sim.hasComponent(comp_name))
144 logError("The component '", comp_name, "' does not exist");
145}
THMProblem & _sim
THM problem this component is part of TODO: make _sim private (applications need to switch to getters...
Definition Component.h:494
bool hasComponent(const std::string &name) const
Find out if simulation has a component with the given name.

◆ checkComponentOfTypeExists()

template<typename T >
void Component::checkComponentOfTypeExists ( const std::string &  param) const
inherited

Checks that the component of a certain type exists, where the name is given by a parameter.

Template Parameters
Tenforced type of component
Parameters
[in]paramparameter name for component name

Definition at line 636 of file Component.h.

637{
638 insistParameterExists<std::string>(__FUNCTION__, param);
639
640 const std::string & comp_name = getParam<std::string>(param);
641 checkComponentOfTypeExistsByName<T>(comp_name);
642}

◆ checkComponentOfTypeExistsByName()

template<typename T >
void Component::checkComponentOfTypeExistsByName ( const std::string &  comp_name) const
inherited

Checks that the component of a certain type exists.

Template Parameters
Tenforced type of component
Parameters
[in]comp_namecomponent name

Definition at line 646 of file Component.h.

647{
648 if (!_sim.hasComponentOfType<T>(comp_name))
649 {
650 if (_sim.hasComponent(comp_name))
651 logError("The component '", comp_name, "' is not of type '", demangle(typeid(T).name()), "'");
652 else
653 logError("The component '", comp_name, "' does not exist");
654 }
655}
const double T
bool hasComponentOfType(const std::string &name) const
Find out if simulation has a component with the given name and specified type.
Definition Simulation.h:493
std::string demangle(const char *name)

◆ checkEqualSize()

template<typename T1 , typename T2 >
void Component::checkEqualSize ( const std::string &  param1,
const std::string &  param2 
) const
inherited

Checks that the size of two vector parameters are equal.

Template Parameters
T1type of element in the first vector parameter
T2type of element in the second vector parameter
Parameters
[in]param1first parameter name
[in]param2second parameter name

Definition at line 702 of file Component.h.

703{
704 insistParameterExists<std::vector<T1>>(__FUNCTION__, param1);
705 insistParameterExists<std::vector<T2>>(__FUNCTION__, param2);
706
707 const auto & value1 = getParam<std::vector<T1>>(param1);
708 const auto & value2 = getParam<std::vector<T2>>(param2);
709 if (value1.size() != value2.size())
710 logError("The number of entries in parameter '",
711 param1,
712 "' (",
713 value1.size(),
714 ") must equal the number of entries of parameter '",
715 param2,
716 "' (",
717 value2.size(),
718 ")");
719}

◆ checkMutuallyExclusiveParameters()

void Component::checkMutuallyExclusiveParameters ( const std::vector< std::string > &  params,
bool  need_one_specified = true 
) const
inherited

Checks that exactly one parameter out of a list is provided.

Parameters
[in]paramsvector of parameter names
[in]need_one_specifiedNeed one of the parameters specified?

Definition at line 284 of file Component.C.

286{
287 unsigned int n_provided_params = 0;
288 for (const auto & param : params)
289 if (isParamValid(param))
290 n_provided_params++;
291
292 if (n_provided_params != 1)
293 {
294 std::string params_list_string = "{'" + params[0] + "'";
295 for (unsigned int i = 1; i < params.size(); ++i)
296 params_list_string += ", '" + params[i] + "'";
297 params_list_string += "}";
298
299 if (n_provided_params == 0 && need_one_specified)
300 logError("One of the parameters ", params_list_string, " must be provided");
301
302 if (n_provided_params != 0)
303 logError("Only one of the parameters ", params_list_string, " can be provided");
304 }
305}
if(subdm)

◆ checkParameterValueLessThan()

template<typename T >
void Component::checkParameterValueLessThan ( const std::string &  param,
const T value_max 
) const
inherited

Checks that a parameter value is less than a value.

Template Parameters
Ttype of parameter
Parameters
[in]paramparameter name
[in]value_maxvalue which parameter value must be less than

Definition at line 659 of file Component.h.

660{
661 insistParameterExists<T>(__FUNCTION__, param);
662
663 const auto & value = getParam<T>(param);
664 if (value >= value_max)
665 logError("The value of parameter '", param, "' (", value, ") must be less than ", value_max);
666}
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)

◆ checkSetupStatus()

void Component::checkSetupStatus ( const EComponentSetupStatus status) const
inherited

Throws an error if the supplied setup status of this component has not been reached.

This is useful for getter functions that rely on data initialized after the constructor; if an error is not thrown, then uninitialized data could be returned from these functions.

Parameters
[in]statusSetup status that this component must have reached

Definition at line 117 of file Component.C.

118{
119 if (_component_setup_status < status)
121 ": The component setup status (",
123 ") is less than the required status (",
124 stringify(status),
125 ")");
126}
std::string stringify(EComponentSetupStatus status) const
Return a string for the setup status.
Definition Component.C:309
EComponentSetupStatus _component_setup_status
Component setup status.
Definition Component.h:539

Referenced by getAreaFunctionName(), Component2D::getBoundaryArea(), Component2D::getBoundaryInfo(), FileMeshComponent::getBoundaryInfo(), Component2D::getBoundaryInfo(), Component1DConnection::getBoundaryNames(), Component1D::getConnections(), Component::getCoordSysTypes(), Component::getElementIDs(), Component2D::getExternalBoundaryName(), Component2D::getExternalBoundaryType(), getFlowModel(), FlowBoundary::getFluidPropertiesName(), FlowJunction::getFluidPropertiesName(), HeatTransferBase::getFluidPropertiesName(), HeatTransferBase::getHeatedPerimeterName(), getHeatTransferNames(), getHeatTransferNamesSuffix(), Component::getNodeIDs(), Component1DConnection::getNodeIDs(), Component1D::getNodesetID(), Component1D::getNodesetName(), Component::getSubdomainNames(), HeatTransfer1PhaseBase::getWallHeatTransferCoefficient1PhaseName(), HeatTransferBase::getWallTemperatureMatName(), HeatTransferBase::getWallTemperatureName(), Component2D::hasBoundary(), FileMeshComponent::hasBoundary(), Component2D::hasExternalBoundary(), and HeatStructureFromFile3D::hasRegion().

◆ checkSizeEqualsParameterValue()

template<typename T1 , typename T2 >
void Component::checkSizeEqualsParameterValue ( const std::string &  param1,
const std::string &  param2 
) const
inherited

Checks that the size of a vector parameter equals the value of another parameter.

Template Parameters
T1type of element in the vector parameter
T2type of the parameter whose value is compared to size
Parameters
[in]param1vector parameter name
[in]param2name of parameter whose value is compared to size

Definition at line 760 of file Component.h.

762{
763 insistParameterExists<std::vector<T1>>(__FUNCTION__, param1);
764 insistParameterExists<T2>(__FUNCTION__, param2);
765
766 const auto & value1 = getParam<std::vector<T1>>(param1);
767 const auto & value2 = getParam<T2>(param2);
768 if (value1.size() != value2)
769 logError("The number of entries in parameter '",
770 param1,
771 "' (",
772 value1.size(),
773 ") must be equal to the value of parameter '",
774 param2,
775 "' (",
776 value2,
777 ")");
778}

◆ checkSizeEqualsValue() [1/2]

template<typename T >
void Component::checkSizeEqualsValue ( const std::string &  param,
const unsigned int n_entries 
) const
inherited

Checks that the size of a vector parameter equals a value.

This version does not supply a description to the value.

Template Parameters
Ttype of element in the vector parameter
Parameters
[in]paramparameter name
[in]n_entriesvalue which parameter size must be equal to

Definition at line 723 of file Component.h.

724{
725 insistParameterExists<std::vector<T>>(__FUNCTION__, param);
726
727 const auto & param_value = getParam<std::vector<T>>(param);
728 if (param_value.size() != n_entries)
729 logError("The number of entries in parameter '",
730 param,
731 "' (",
732 param_value.size(),
733 ") must be equal to ",
734 n_entries);
735}

◆ checkSizeEqualsValue() [2/2]

template<typename T >
void Component::checkSizeEqualsValue ( const std::string &  param,
const unsigned int n_entries,
const std::string &  description 
) const
inherited

Checks that the size of a vector parameter equals a value.

This version supplies a description to the value.

Template Parameters
Ttype of element in the vector parameter
Parameters
[in]paramparameter name
[in]n_entriesvalue which parameter size must be equal to
[in]descriptiondescription of the value that size must be equal to

Definition at line 739 of file Component.h.

742{
743 insistParameterExists<std::vector<T>>(__FUNCTION__, param);
744
745 const auto & param_value = getParam<std::vector<T>>(param);
746 if (param_value.size() != n_entries)
747 logError("The number of entries in parameter '",
748 param,
749 "' (",
750 param_value.size(),
751 ") must be equal to ",
752 description,
753 " (",
754 n_entries,
755 ")");
756}

◆ checkSizeGreaterThan()

template<typename T >
void Component::checkSizeGreaterThan ( const std::string &  param,
const unsigned int n_entries 
) const
inherited

Checks that the size of a vector parameter is greater than a value.

Template Parameters
Ttype of element in the vector parameter
Parameters
[in]paramparameter name
[in]n_entriesvalue which parameter size must be greater than

Definition at line 686 of file Component.h.

687{
688 insistParameterExists<std::vector<T>>(__FUNCTION__, param);
689
690 const auto & value = getParam<std::vector<T>>(param);
691 if (value.size() <= n_entries)
692 logError("The number of entries in the parameter '",
693 param,
694 "' (",
695 value.size(),
696 ") must be greater than ",
697 n_entries);
698}

◆ checkSizeLessThan()

template<typename T >
void Component::checkSizeLessThan ( const std::string &  param,
const unsigned int n_entries 
) const
inherited

Checks that the size of a vector parameter is less than a value.

Template Parameters
Ttype of element in the vector parameter
Parameters
[in]paramparameter name
[in]n_entriesvalue which parameter size must be less than

Definition at line 670 of file Component.h.

671{
672 insistParameterExists<std::vector<T>>(__FUNCTION__, param);
673
674 const auto & value = getParam<std::vector<T>>(param);
675 if (value.size() >= n_entries)
676 logError("The number of entries in the parameter '",
677 param,
678 "' (",
679 value.size(),
680 ") must be less than ",
681 n_entries);
682}

◆ cname()

const std::string & Component::cname ( ) const
inherited

Get the component name.

Returns
The name of the component. For composite component, return its parent name

Definition at line 51 of file Component.C.

52{
53 if (_parent)
54 return _parent->cname();
55 else
56 return name();
57}
const std::string & cname() const
Get the component name.
Definition Component.C:51
Component * _parent
Pointer to a parent component (used in composed components)
Definition Component.h:489

Referenced by ShaftConnectedCompressor1Phase::buildVolumeJunctionUserObject(), ShaftConnectedPump1Phase::buildVolumeJunctionUserObject(), ShaftConnectedTurbine1Phase::buildVolumeJunctionUserObject(), Closures1PhaseSimple::checkFlowChannel(), Closures1PhaseSimple::checkHeatTransfer(), Component::cname(), Component::logError(), and Component::logWarning().

◆ computeAxialCoordinate()

Real DiscreteLineSegmentInterface::computeAxialCoordinate ( const Point &  p) const
inherited

Definition at line 110 of file DiscreteLineSegmentInterface.C.

111{
112 const Real ax_coord = _dir * (p - _position);
113 if (MooseUtils::absoluteFuzzyLessThan(ax_coord, 0.0) ||
114 MooseUtils::absoluteFuzzyGreaterThan(ax_coord, _length))
116 ": The point ",
117 p,
118 " has an invalid axial coordinate (",
119 ax_coord,
120 "). Valid axial coordinates are in the range (0,",
121 _length,
122 ").");
123 else
124 return ax_coord;
125}
void mooseError(Args &&... args)
const std::string _moose_object_name_dlsi
Name of the MOOSE object.

Referenced by DiscreteLineSegmentInterfaceTestAux::computeValue(), DiscreteLineSegmentInterface::getAxialElementIndex(), and DiscreteLineSegmentInterface::getAxialSectionIndex().

◆ computeDirectionTransformationTensor()

RealTensorValue DiscreteLineSegmentInterface::computeDirectionTransformationTensor ( const RealVectorValue &  dir)
staticinherited

Computes the direction transformation tensor.

Parameters
[in]dirDirection vector

Definition at line 85 of file DiscreteLineSegmentInterface.C.

86{
87 if (MooseUtils::absoluteFuzzyEqual(dir.norm(), 0.0))
88 mooseError("The direction vector must not be the zero vector.");
89
90 const auto dir_normalized = dir / dir.norm();
91 const Real theta = acos(dir_normalized(2));
92 const Real aphi = atan2(dir_normalized(1), dir_normalized(0));
93 return RealTensorValue(
94 RealVectorValue(cos(aphi) * sin(theta), -sin(aphi), -cos(aphi) * cos(theta)),
95 RealVectorValue(sin(aphi) * sin(theta), cos(aphi), -sin(aphi) * cos(theta)),
96 RealVectorValue(cos(theta), 0.0, sin(theta)));
97}
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sin(_arg) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tan
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template cos(_arg) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(cos
TensorValue< Real > RealTensorValue
VectorValue< Real > RealVectorValue

Referenced by DiscreteLineSegmentInterface::getElementBoundaryCoordinates().

◆ computeNumberOfNodes()

unsigned int GeneratedMeshComponent::computeNumberOfNodes ( unsigned int  n_elems)
privateinherited

Computes the number of axial nodes from the number of elements.

Parameters
[in]n_elemsThe number of axial elements

Definition at line 71 of file GeneratedMeshComponent.C.

72{
73 return usingSecondOrderMesh() ? (2 * n_elems) + 1 : n_elems + 1;
74}
virtual bool usingSecondOrderMesh() const =0
Check if second order mesh is being used by this geometrical component.

Referenced by GeneratedMeshComponent::generateNodeLocations().

◆ computeRadialCoordinate()

Real DiscreteLineSegmentInterface::computeRadialCoordinate ( const Point &  p) const
inherited

Definition at line 128 of file DiscreteLineSegmentInterface.C.

129{
130 const RealVectorValue v = (p - _position);
131 return v.cross(_dir).norm();
132}
const double v
TypeVector< typename CompareTypes< T, T2 >::supertype > cross(const TypeVector< T2 > &v) const

Referenced by DiscreteLineSegmentInterfaceTestAux::computeValue().

◆ computeRealPointFromReferencePoint() [1/2]

Point DiscreteLineSegmentInterface::computeRealPointFromReferencePoint ( const Point &  p) const
inherited

Computes point in 3-D space from a point in reference space.

Parameters
[in]pPoint in reference space

Definition at line 166 of file DiscreteLineSegmentInterface.C.

167{
169}
Point computeRealPointFromReferencePoint(const Point &p) const
Computes point in 3-D space from a point in reference space.
const RealTensorValue _R
Direction transformation tensor.
const RealTensorValue _Rx
Rotational transformation tensor about x-axis.

Referenced by DiscreteLineSegmentInterface::computeRealPointFromReferencePoint(), DiscreteLineSegmentInterface::getElementBoundaryCoordinates(), and GeneratedMeshComponent::setupMesh().

◆ computeRealPointFromReferencePoint() [2/2]

Point DiscreteLineSegmentInterface::computeRealPointFromReferencePoint ( const Point &  p,
const RealVectorValue &  position,
const RealTensorValue &  R,
const RealTensorValue &  Rx 
)
staticinherited

Computes point in 3-D space from a point in reference space.

Parameters
[in]pPoint in reference space

Definition at line 157 of file DiscreteLineSegmentInterface.C.

161{
162 return R * (Rx * p) + position;
163}
const double R

◆ computeReferencePointFromRealPoint() [1/2]

Point DiscreteLineSegmentInterface::computeReferencePointFromRealPoint ( const Point &  p) const
inherited

Computes point in reference space from a point in 3-D space.

Parameters
[in]pPoint in 3-D space

Definition at line 181 of file DiscreteLineSegmentInterface.C.

182{
184}
const RealTensorValue _Rx_inv
Inverse rotational transformation tensor about x-axis.
const RealTensorValue _R_inv
Inverse direction transformation tensor.
Point computeReferencePointFromRealPoint(const Point &p) const
Computes point in reference space from a point in 3-D space.

Referenced by DiscreteLineSegmentInterface::computeReferencePointFromRealPoint().

◆ computeReferencePointFromRealPoint() [2/2]

Point DiscreteLineSegmentInterface::computeReferencePointFromRealPoint ( const Point &  p,
const RealVectorValue &  position,
const RealTensorValue &  R_inv,
const RealTensorValue &  Rx_inv 
)
staticinherited

Computes point in reference space from a point in 3-D space.

Parameters
[in]pPoint in 3-D space

Definition at line 172 of file DiscreteLineSegmentInterface.C.

176{
177 return Rx_inv * R_inv * (p - position);
178}

◆ computeXRotationTransformationTensor()

RealTensorValue DiscreteLineSegmentInterface::computeXRotationTransformationTensor ( const Real &  rotation)
staticinherited

Computes the rotation transformation tensor.

Parameters
[in]rotationRotation about the x-axis, in degrees

Definition at line 100 of file DiscreteLineSegmentInterface.C.

101{
102 const Real rotation_rad = M_PI * rotation / 180.;
103 const RealVectorValue Rx_x(1., 0., 0.);
104 const RealVectorValue Rx_y(0., cos(rotation_rad), -sin(rotation_rad));
105 const RealVectorValue Rx_z(0., sin(rotation_rad), cos(rotation_rad));
106 return RealTensorValue(Rx_x, Rx_y, Rx_z);
107}

Referenced by DiscreteLineSegmentInterface::getElementBoundaryCoordinates().

◆ connectObject() [1/2]

void Component::connectObject ( const InputParameters obj_params,
const std::string &  obj_name,
const std::string &  comp_param,
const std::string &  obj_param 
) const
inherited

Connects a controllable parameter of the component to a controllable parameter of a constituent object.

This is achieved by creating a "controllable parameter alias".

Parameters
[in]obj_paramsConstituent object input parameters object
[in]obj_nameConstituent object name
[in]comp_paramControllable component parameter
[in]obj_paramConstituent object parameter

Definition at line 106 of file Component.C.

110{
111 MooseObjectParameterName alias("component", this->name(), comp_param, "::");
112 MooseObjectParameterName obj_controlled_param(obj_params.getBase(), obj_name, obj_param);
114}
void addControllableParameterAlias(const MooseObjectParameterName &alias, const MooseObjectParameterName &secondary)
InputParameterWarehouse & getInputParameterWarehouse()

◆ connectObject() [2/2]

void Component::connectObject ( const InputParameters obj_params,
const std::string &  obj_name,
const std::string &  param 
) const
inherited

Connects a controllable parameter of the component to a controllable parameter of a constituent object.

This version assumes that the component and object have the same control parameter name.

Parameters
[in]obj_paramsConstituent object input parameters object
[in]obj_nameConstituent object name
[in]paramControllable parameter name (same in both component and constituent object)

Definition at line 98 of file Component.C.

101{
102 connectObject(obj_params, obj_name, param, param);
103}
void connectObject(const InputParameters &obj_params, const std::string &obj_name, const std::string &param) const
Connects a controllable parameter of the component to a controllable parameter of a constituent objec...
Definition Component.C:98

Referenced by GateValve1Phase::addMooseObjects(), HeatSourceFromTotalPower::addMooseObjects(), InletDensityVelocity1Phase::addMooseObjects(), InletMassFlowRateTemperature1Phase::addMooseObjects(), InletStagnationPressureTemperature1Phase::addMooseObjects(), InletVelocityTemperature1Phase::addMooseObjects(), Outlet1Phase::addMooseObjects(), SimpleTurbine1Phase::addMooseObjects(), TotalPower::addMooseObjects(), Closures1PhaseTHM::addWallFFMaterial(), VolumeJunction1Phase::buildVolumeJunctionUserObject(), JunctionParallelChannels1Phase::buildVolumeJunctionUserObject(), Pump1Phase::buildVolumeJunctionUserObject(), ShaftConnectedCompressor1Phase::buildVolumeJunctionUserObject(), ShaftConnectedPump1Phase::buildVolumeJunctionUserObject(), ShaftConnectedTurbine1Phase::buildVolumeJunctionUserObject(), SimpleTurbine1Phase::buildVolumeJunctionUserObject(), Component::connectObject(), FlowModel::getVariableFn(), and GeometricalComponent::getVariableFn().

◆ constMesh()

const THMMesh & Component::constMesh ( ) const
inlineinherited

Const reference to mesh, which can be called at any point.

Note that overloading mesh() was not possible due to the need to call this const version, even when the component is not const.

Definition at line 63 of file Component.h.

63{ return _mesh; }

Referenced by FileMeshPhysicsComponent::getMesh(), and Component1DJunction::initSecondary().

◆ createAreaFunctionAndGetName()

FunctionName FlowChannelBase::createAreaFunctionAndGetName ( )
virtual

Creates the area function if needed and then stores the name.

Definition at line 152 of file FlowChannelBase.C.

153{
154 // Area function has already been created; just need to return its name
155 return getParam<FunctionName>("A");
156}

Referenced by init().

◆ executeCheck()

void Component::executeCheck ( ) const
inherited

Wrapper function for check() that marks the function as being called.

Definition at line 84 of file Component.C.

85{
86 check();
88}

Referenced by Simulation::integrityCheck().

◆ executeInit()

void Component::executeInit ( )
inherited

Wrapper function for init() that marks the function as being called.

Definition at line 70 of file Component.C.

71{
72 init();
74}
virtual void init()
Initializes the component.
Definition Component.h:405

◆ executeInitSecondary()

void Component::executeInitSecondary ( )
inherited

Wrapper function for initSecondary() that marks the function as being called.

Definition at line 77 of file Component.C.

78{
81}
virtual void initSecondary()
Perform secondary initialization, which relies on init() being called for all components.
Definition Component.h:411

◆ executeSetupMesh()

void Component::executeSetupMesh ( )
inherited

Wrapper function for setupMesh() that marks the function as being called.

Definition at line 91 of file Component.C.

92{
93 setupMesh();
95}
virtual void setupMesh()
Performs mesh setup such as creating mesh or naming mesh sets.
Definition Component.h:421

◆ generateNodeLocations()

void GeneratedMeshComponent::generateNodeLocations ( )
privateinherited

Generates axial node locations and stores in _node_locations.

Definition at line 77 of file GeneratedMeshComponent.C.

78{
79 unsigned int n_nodes = computeNumberOfNodes(_n_elem);
80 unsigned int start_node = 0;
81 Real start_length = 0.0;
82 _node_locations = std::vector<Real>(n_nodes);
83 _node_locations[0] = start_length;
84
85 for (unsigned int i = 0; i < _n_sections; ++i)
86 {
87 Real section_length = _lengths[i];
88 Real section_n_elems = _n_elems[i];
89 Real section_n_nodes = computeNumberOfNodes(section_n_elems);
90
91 std::vector<Real> section_node_array = getUniformNodeLocations(section_length, section_n_nodes);
92 placeLocalNodeLocations(start_length, start_node, section_node_array);
93
94 start_length += section_length;
95 start_node += (section_n_nodes - 1);
96 }
97}
const unsigned int _n_sections
Number of axial sections.
std::vector< Real > _lengths
Length of each axial section.
void placeLocalNodeLocations(Real start_length, unsigned int start_node, std::vector< Real > &local_node_locations)
Puts local positions of axial nodes for an axial section into _node_locations.
unsigned int computeNumberOfNodes(unsigned int n_elems)
Computes the number of axial nodes from the number of elements.
std::vector< Real > getUniformNodeLocations(Real length, unsigned int n_nodes)
Computes the local positions of axial nodes for an axial section.
const dof_id_type n_nodes

Referenced by GeneratedMeshComponent::setupMesh().

◆ genName() [1/4]

std::string NamingInterface::genName ( const std::string &  prefix,
const std::string &  middle,
const std::string &  suffix = "" 
) const
inlineinherited

Build a name from strings.

Definition at line 66 of file NamingInterface.h.

69 {
70 std::stringstream ss;
71 ss << prefix << ":" << middle;
72 if (!suffix.empty())
73 ss << ":" << suffix;
74 return ss.str();
75 }

◆ genName() [2/4]

std::string NamingInterface::genName ( const std::string &  prefix,
const std::string &  name,
unsigned int  i 
) const
inlineinherited

Build a name from 2 strings and a number.

Definition at line 56 of file NamingInterface.h.

57 {
58 std::stringstream ss;
59 ss << prefix << ":" << name << ":" << i;
60 return ss.str();
61 }

◆ genName() [3/4]

std::string NamingInterface::genName ( const std::string &  prefix,
unsigned int  i,
unsigned int  j,
const std::string &  suffix = "" 
) const
inlineinherited

Build a name from a prefix, 2 numbers and possible suffix.

Definition at line 41 of file NamingInterface.h.

45 {
46 std::stringstream ss;
47 ss << prefix << ":" << i << ":" << j;
48 if (!suffix.empty())
49 ss << ":" << suffix;
50 return ss.str();
51 }

◆ genName() [4/4]

std::string NamingInterface::genName ( const std::string &  prefix,
unsigned int  id,
const std::string &  suffix = "" 
) const
inlineinherited

Build a name from a prefix, number and possible suffix.

Definition at line 29 of file NamingInterface.h.

30 {
31 std::stringstream ss;
32 ss << prefix << ":" << id;
33 if (!suffix.empty())
34 ss << ":" << suffix;
35 return ss.str();
36 }

Referenced by Closures1PhaseBase::addAverageWallTemperatureMaterial(), FlowModel::addCommonInitialConditions(), FlowModel::addCommonMooseObjects(), addCommonObjects(), Simulation::addComponentScalarIC(), HeatStructureBase::addConstantDensitySolidPropertiesMaterial(), Simulation::addConstantIC(), Simulation::addConstantScalarIC(), FlowModel1PhaseBase::addDensityAux(), FlowModelGasMix::addDensityIC(), FlowModelSinglePhase::addDensityIC(), FlowModel1PhaseBase::addEnergyGravityKernel(), FlowChannel1Phase::addFlowChannel1PhaseFunctorMaterial(), FlowModelGasMix::addFluidPropertiesMaterials(), FlowModelSinglePhase::addFluidPropertiesMaterials(), VolumeJunctionCoupledFlux1Phase::addFluxTransfer(), FlowModel1PhaseBase::addFunctionIC(), Simulation::addFunctionIC(), FlowModel1PhaseBase::addHeatConductionDGKernel(), HeatTransferBase::addHeatedPerimeter(), HeatConductionModel::addHeatEquationRZ(), HeatConductionModel::addHeatEquationXYZ(), HeatTransferFromTemperature1Phase::addHeatTransferKernels(), FlowChannel1PhaseBase::addHydraulicDiameterMaterial(), FlowModelGasMix::addMassDiffusionEnergyDGKernel(), FlowModelGasMix::addMassDiffusionSpeciesDGKernel(), FlowModelGasMix::addMassFractionAux(), FlowModel1PhaseBase::addMomentumAreaGradientKernel(), FlowModel1PhaseBase::addMomentumFrictionKernel(), FlowModel1PhaseBase::addMomentumGravityKernel(), FlowChannel1Phase::addMooseObjects(), addMooseObjects(), FormLoss1PhaseBase::addMooseObjects(), FormLossFromExternalApp1Phase::addMooseObjects(), FormLossFromFunction1Phase::addMooseObjects(), GateValve1Phase::addMooseObjects(), HeatSourceFromPowerDensity::addMooseObjects(), HeatSourceFromTotalPower::addMooseObjects(), HeatSourceVolumetric1Phase::addMooseObjects(), HeatStructure2DCoupler::addMooseObjects(), HeatStructure2DRadiationCouplerRZ::addMooseObjects(), HeatTransferBase::addMooseObjects(), HeatTransferFromExternalAppHeatFlux1Phase::addMooseObjects(), HeatTransferFromHeatFlux1Phase::addMooseObjects(), HeatTransferFromHeatStructure1Phase::addMooseObjects(), HeatTransferFromHeatStructure3D1Phase::addMooseObjects(), HeatTransferFromSpecifiedTemperature1Phase::addMooseObjects(), HSBoundaryAmbientConvection::addMooseObjects(), HSBoundaryExternalAppConvection::addMooseObjects(), HSBoundaryExternalAppHeatFlux::addMooseObjects(), HSBoundaryExternalAppTemperature::addMooseObjects(), HSBoundaryHeatFlux::addMooseObjects(), HSBoundaryRadiation::addMooseObjects(), HSBoundarySpecifiedTemperature::addMooseObjects(), HSCoupler2D2DRadiation::addMooseObjects(), HSCoupler2D3D::addMooseObjects(), InletVelocityTemperature1Phase::addMooseObjects(), JunctionOneToOne1Phase::addMooseObjects(), Shaft::addMooseObjects(), ShaftConnectedCompressor1Phase::addMooseObjects(), ShaftConnectedPump1Phase::addMooseObjects(), ShaftConnectedTurbine1Phase::addMooseObjects(), SimpleTurbine1Phase::addMooseObjects(), TotalPower::addMooseObjects(), VolumeJunction1Phase::addMooseObjects(), FunctorClosures::addMooseObjectsFlowChannel(), Closures1PhaseSimple::addMooseObjectsHeatTransfer(), Component::addNonlinearStepFunctorMaterial(), FlowChannel1Phase::addNormalized1PhaseResidualNorm(), FlowModelSinglePhase::addPassiveTransportIC(), FlowModelGasMix::addPressureAux(), FlowModelSinglePhase::addPressureAux(), VolumeJunctionCoupledFlux1Phase::addPropertyTransfer(), FlowModelGasMix::addRDGAdvectionDGKernels(), FlowModelSinglePhase::addRDGAdvectionDGKernels(), FlowModel1PhaseBase::addRhoAIC(), FlowModelGasMix::addRhoEAIC(), FlowModelSinglePhase::addRhoEAIC(), FlowModel1PhaseBase::addRhoUAIC(), FlowModelGasMix::addSlopeReconstructionMaterial(), FlowModelSinglePhase::addSlopeReconstructionMaterial(), FlowModel1PhaseBase::addSpecificInternalEnergyAux(), FlowModel1PhaseBase::addSpecificInternalEnergyIC(), FlowModel1PhaseBase::addSpecificTotalEnthalpyAux(), FlowModel1PhaseBase::addSpecificTotalEnthalpyIC(), FlowModel1PhaseBase::addSpecificVolumeAux(), FlowModel1PhaseBase::addSpecificVolumeIC(), FlowModelGasMix::addTemperatureAux(), FlowModelSinglePhase::addTemperatureAux(), FlowModel1PhaseBase::addTimeDerivativeKernelIfTransient(), addVariables(), FlowModel1PhaseBase::addVelocityAux(), FlowModel1PhaseBase::addVelocityIC(), VolumeJunction1Phase::addVolumeJunctionIC(), VolumeJunctionCoupledFlux1Phase::addVolumeJunctionKernel(), Closures1PhaseTHM::addWallFFMaterial(), Closures1PhaseBase::addWallFrictionFunctionMaterial(), Closures1PhaseTHM::addWallHTCMaterial(), ClosuresBase::addWallTemperatureFromAuxMaterial(), Closures1PhaseSimple::addWallTemperatureFromHeatFluxMaterial(), FlowBoundary1Phase::addWeakBCs(), FlowBoundaryGasMix::addWeakBCs(), ClosuresBase::addWeightedAverageMaterial(), FlowModelGasMix::addXiRhoAIC(), ClosuresBase::addZeroMaterial(), FileMeshComponent::buildMesh(), Component1D::buildMesh(), Component2D::buildMesh(), HeatSourceBase::HeatSourceBase(), Component::nonlinearConvergenceName(), and Simulation::setupInitialConditionsFromFile().

◆ genSafeName()

std::string NamingInterface::genSafeName ( const std::string &  prefix,
const std::string &  middle,
const std::string &  suffix = "" 
) const
inlineinherited

Build a name from strings that is safe to use in input files (i.e.

can be exposed to users)

Definition at line 80 of file NamingInterface.h.

83 {
84 std::stringstream ss;
85 ss << prefix << "_" << middle;
86 if (!suffix.empty())
87 ss << "_" << suffix;
88 return ss.str();
89 }

Referenced by HSBoundaryAmbientConvection::addMooseObjects(), HSBoundaryExternalAppConvection::addMooseObjects(), HSBoundaryExternalAppHeatFlux::addMooseObjects(), HSBoundaryHeatFlux::addMooseObjects(), and HSBoundaryRadiation::addMooseObjects().

◆ getAlignmentAxis() [1/2]

MooseEnum DiscreteLineSegmentInterface::getAlignmentAxis ( ) const
inherited

Gets an axis MooseEnum for the axis the component is aligned with.

If the axis does not align with the x, y, or z axis, then an invalid MooseEnum is returned.

Definition at line 201 of file DiscreteLineSegmentInterface.C.

202{
203 return getAlignmentAxis(_dir);
204}
MooseEnum getAlignmentAxis() const
Gets an axis MooseEnum for the axis the component is aligned with.

Referenced by CoupledHeatTransferAction::addUserObjects(), CoupledHeatTransferAction::CoupledHeatTransferAction(), DiscreteLineSegmentInterface::getAlignmentAxis(), and DiscreteLineSegmentInterface::getElementBoundaryCoordinates().

◆ getAlignmentAxis() [2/2]

MooseEnum DiscreteLineSegmentInterface::getAlignmentAxis ( const RealVectorValue &  dir)
staticinherited

Gets an axis MooseEnum for the axis the component is aligned with.

If the axis does not align with the x, y, or z axis, then an invalid MooseEnum is returned.

Definition at line 187 of file DiscreteLineSegmentInterface.C.

188{
189 MooseEnum axis("x y z");
190 if (THM::areParallelVectors(dir, RealVectorValue(1, 0, 0)))
191 axis = "x";
192 else if (THM::areParallelVectors(dir, RealVectorValue(0, 1, 0)))
193 axis = "y";
194 else if (THM::areParallelVectors(dir, RealVectorValue(0, 0, 1)))
195 axis = "z";
196
197 return axis;
198}
bool areParallelVectors(const RealVectorValue &a, const RealVectorValue &b, const Real &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
Tests if two real-valued vectors are parallel within some absolute tolerance.

◆ getAreaFunctionName()

const FunctionName & FlowChannelBase::getAreaFunctionName ( ) const

Get the name of the function describing the flow channel area.

Returns
The name of the function describing the flow channel area

Definition at line 144 of file FlowChannelBase.C.

145{
147
148 return _area_function;
149}
void checkSetupStatus(const EComponentSetupStatus &status) const
Throws an error if the supplied setup status of this component has not been reached.
Definition Component.C:117

Referenced by FlowModel::addCommonInitialConditions(), and HeatTransferBase::init().

◆ getAxialElementIndex()

unsigned int DiscreteLineSegmentInterface::getAxialElementIndex ( const Point &  p_center) const
inherited

Definition at line 146 of file DiscreteLineSegmentInterface.C.

147{
148 const Real axial_coordinate = computeAxialCoordinate(p_center);
149 for (unsigned int i = 0; i < _n_elem; ++i)
150 if (MooseUtils::absoluteFuzzyEqual(axial_coordinate, _x_centers[i]))
151 return i;
152
153 mooseError("No axial element index was found.");
154}
std::vector< Real > _x_centers
Center axial coordinate of each axial element.
Real computeAxialCoordinate(const Point &p) const

Referenced by DiscreteLineSegmentInterfaceTestAux::computeValue().

◆ getAxialSectionIndex()

unsigned int DiscreteLineSegmentInterface::getAxialSectionIndex ( const Point &  p) const
inherited

Definition at line 135 of file DiscreteLineSegmentInterface.C.

136{
137 const Real axial_coordinate = computeAxialCoordinate(p);
138 for (unsigned int i = 0; i < _n_sections; ++i)
139 if (MooseUtils::absoluteFuzzyLessEqual(axial_coordinate, _section_end[i]))
140 return i;
141
142 mooseError("No axial section index was found.");
143}
std::vector< Real > _section_end
Axial coordinate of the end of each axial section using the line 'position' as the origin.

Referenced by DiscreteLineSegmentInterfaceTestAux::computeValue().

◆ getClosuresObjects()

std::vector< std::shared_ptr< ClosuresBase > > FlowChannelBase::getClosuresObjects ( ) const
inline

Get the used closures object(s)

Returns
The closures object(s)

Definition at line 185 of file FlowChannelBase.h.

186 {
187 return _closures_objects;
188 }

Referenced by HeatTransferBase::init(), and HeatTransferFromHeatStructure3D1Phase::init().

◆ getComponent()

template<typename T >
const T & Component::getComponent ( const std::string &  name) const
inherited

Return a reference to a component via a parameter name.

Template Parameters
Tthe type of the component we are requesting
Parameters
nameThe parameter name that has the component name

Definition at line 557 of file Component.h.

558{
559 const std::string & comp_name = getParam<std::string>(pname);
560 return getComponentByName<T>(comp_name);
561}

◆ getComponentByName()

template<typename T >
const T & Component::getComponentByName ( const std::string &  cname) const
inherited

Return a reference to a component given its name.

Template Parameters
Tthe type of the component we are requesting
Parameters
cnameThe name of the component

Definition at line 565 of file Component.h.

566{
567 return _sim.getComponentByName<T>(comp_name);
568}
const T & getComponentByName(const std::string &name) const
Get component by its name.
Definition Simulation.h:504

◆ getConnections()

const std::vector< Component1D::Connection > & Component1D::getConnections ( Component1DConnection::EEndType  end_type) const
virtualinherited

Gets the vector of connections of an end type for this component.

Parameters
[in]end_typeend type for the connections to get

Definition at line 156 of file Component1D.C.

157{
159
160 std::map<Component1DConnection::EEndType, std::vector<Connection>>::const_iterator it =
161 _connections.find(end_type);
162 if (it != _connections.end())
163 return it->second;
164 else
165 mooseError(name(), ": Invalid end type (", end_type, ").");
166}

Referenced by Component1DConnection::setupMesh(), and Component1DJunction::setupMesh().

◆ getConvHeatTransGeometry()

MooseEnum FlowChannelBase::getConvHeatTransGeometry ( const std::string &  name)
static

Gets a MooseEnum for convective heat transfer geometry type.

Parameters
[in]namedefault value
Returns
MooseEnum for convective heat transfer geometry type

Definition at line 30 of file FlowChannelBase.C.

31{
32 return THM::getMooseEnum<EConvHeatTransGeom>(name, _heat_transfer_geom_to_enum);
33}
static const std::map< std::string, EConvHeatTransGeom > _heat_transfer_geom_to_enum
Map of convective heat transfer geometry type to enum.

Referenced by validParams().

◆ getCoordSysTypes()

const std::vector< Moose::CoordinateSystemType > & Component::getCoordSysTypes ( ) const
virtualinherited

Gets the coordinate system types for this component.

Returns
vector of coordinate system types for this component

Definition at line 353 of file Component.C.

354{
356
357 return _coord_sys;
358}
std::vector< Moose::CoordinateSystemType > _coord_sys
List of coordinate system for each subdomain.
Definition Component.h:515

◆ getDependencies()

const std::vector< std::string > & Component::getDependencies ( ) const
inlineinherited

Returns a list of names of components that this component depends upon.

Definition at line 86 of file Component.h.

86{ return _dependencies; }

◆ getDirection()

virtual RealVectorValue DiscreteLineSegmentInterface::getDirection ( ) const
inlinevirtualinherited

◆ getElementBoundaryCoordinates() [1/2]

std::vector< Real > DiscreteLineSegmentInterface::getElementBoundaryCoordinates ( ) const
inherited

Gets the element boundary coordinates for the aligned axis.

Definition at line 257 of file DiscreteLineSegmentInterface.C.

258{
260}
const Real & _rotation
Angle of rotation about the x-axis.
std::vector< Real > getElementBoundaryCoordinates() const
Gets the element boundary coordinates for the aligned axis.

Referenced by CoupledHeatTransferAction::addUserObjects(), and DiscreteLineSegmentInterface::getElementBoundaryCoordinates().

◆ getElementBoundaryCoordinates() [2/2]

std::vector< Real > DiscreteLineSegmentInterface::getElementBoundaryCoordinates ( const RealVectorValue &  position,
const RealVectorValue &  orientation,
const Real &  rotation,
const std::vector< Real > &  lengths,
const std::vector< unsigned int > &  n_elems 
)
staticinherited

Gets the element boundary coordinates for the aligned axis.

Parameters
[in]positionStart position of axis in 3-D space
[in]orientationDirection of axis from start position to end position
[in]rotationAngle of rotation about the x-axis, in degrees
[in]lengthsLength of each axial section
[in]n_elemsNumber of elements in each axial section

Definition at line 207 of file DiscreteLineSegmentInterface.C.

213{
214 const auto axis = getAlignmentAxis(orientation);
215
216 unsigned int d;
217 if (axis == "x")
218 d = 0;
219 else if (axis == "y")
220 d = 1;
221 else if (axis == "z")
222 d = 2;
223 else
224 mooseError("Invalid axis.");
225
226 const auto R = computeDirectionTransformationTensor(orientation);
227 const auto Rx = computeXRotationTransformationTensor(rotation);
228
229 const unsigned int n_elems_total = std::accumulate(n_elems.begin(), n_elems.end(), 0);
230 const unsigned int n_sections = lengths.size();
231
232 unsigned int i_section_start = 0;
233 Real section_start_ref_position = 0.0;
234 std::vector<Real> element_boundary_coordinates(n_elems_total + 1);
235 element_boundary_coordinates[0] =
236 computeRealPointFromReferencePoint(Point(0, 0, 0), position, R, Rx)(d);
237 for (unsigned int j = 0; j < n_sections; ++j)
238 {
239 const Real section_dx = lengths[j] / n_elems[j];
240 for (unsigned int k = 0; k < n_elems[j]; ++k)
241 {
242 const unsigned int i = i_section_start + k + 1;
243 const Real ref_position = section_start_ref_position + section_dx * k;
244 const Point ref_point = Point(ref_position, 0, 0);
245 element_boundary_coordinates[i] =
246 computeRealPointFromReferencePoint(ref_point, position, R, Rx)(d);
247 }
248
249 section_start_ref_position += lengths[j];
250 i_section_start += n_elems[j];
251 }
252
253 return element_boundary_coordinates;
254}
static RealTensorValue computeDirectionTransformationTensor(const RealVectorValue &dir)
Computes the direction transformation tensor.
static RealTensorValue computeXRotationTransformationTensor(const Real &rotation)
Computes the rotation transformation tensor.

◆ getElementIDs()

const std::vector< dof_id_type > & Component::getElementIDs ( ) const
inherited

Gets the element IDs corresponding to this component.

Definition at line 337 of file Component.C.

338{
340
341 return _elem_ids;
342}

Referenced by HeatTransferFromHeatStructure1Phase::setupMesh(), and HeatTransferFromHeatStructure3D1Phase::setupMesh().

◆ getEndPoint()

Point DiscreteLineSegmentInterface::getEndPoint ( ) const
inlineinherited

Definition at line 29 of file DiscreteLineSegmentInterface.h.

29{ return _end_point; }
const Point _end_point
End point of line segment.

Referenced by FlowChannel1Phase::addNormalized1PhaseResidualNorm().

◆ getEnumParam()

template<typename T >
T Component::getEnumParam ( const std::string &  param,
bool  log_error = true 
) const
inherited

Gets an enum parameter.

This function takes the name of a MooseEnum parameter that is tied to an enum defined in THM. If the value is invalid, an error will be logged, and a negative integer will be cast into the enum type.

Template Parameters
Tenum type
Parameters
[in]paramname of the MooseEnum parameter
[in]log_errorIf true, log an error if the valid is invalid

Definition at line 590 of file Component.h.

591{
592 const MooseEnum & moose_enum = getParam<MooseEnum>(param);
593 const T value = THM::stringToEnum<T>(moose_enum);
594 if (log_error && static_cast<int>(value) < 0) // cast necessary for scoped enums
595 {
596 // Get the keys from the MooseEnum. Unfortunately, this returns a list of
597 // *all* keys, including the invalid key that was supplied. Thus, that key
598 // needs to be manually excluded below.
599 const std::vector<std::string> & keys = moose_enum.getNames();
600
601 // Create the string of keys to go in the error message. The last element of
602 // keys is skipped because the invalid key should always be last.
603 std::string keys_string = "{";
604 for (unsigned int i = 0; i < keys.size() - 1; ++i)
605 {
606 if (i != 0)
607 keys_string += ",";
608 keys_string += "'" + keys[i] + "'";
609 }
610 keys_string += "}";
611
612 logError("The parameter '" + param + "' was given an invalid value ('" +
613 std::string(moose_enum) + "'). Valid values (case-insensitive) are " + keys_string);
614 }
615
616 return value;
617}
std::vector< std::string > getNames() const

◆ getFlowModel()

std::shared_ptr< const FlowModel > FlowChannelBase::getFlowModel ( ) const
virtual

◆ getFlowModelID()

virtual const THM::FlowModelID & FlowChannelBase::getFlowModelID ( ) const
pure virtual

Gets the flow model ID.

Implemented in FlowChannel1Phase, and FlowChannelGasMix.

Referenced by FlowBoundary::init(), FlowJunction::init(), and HeatTransferBase::init().

◆ getFluidPropertiesName()

const UserObjectName & FlowChannelBase::getFluidPropertiesName ( ) const
inline

Gets the name of the fluid properties user object for this component.

Definition at line 68 of file FlowChannelBase.h.

68{ return _fp_name; }

Referenced by FlowBoundary::init(), FlowJunction::init(), and HeatTransferBase::init().

◆ getGravityAngle()

virtual const Real & FlowChannelBase::getGravityAngle ( ) const
inlinevirtual

Gets the gravity angle for this component.

Returns
gravity angle for this component

Definition at line 63 of file FlowChannelBase.h.

63{ return _gravity_angle; }

◆ getGravityMagnitude()

Real GravityInterface::getGravityMagnitude ( ) const
inlineinherited

Gets gravity magnitude.

Definition at line 26 of file GravityInterface.h.

26{ return _gravity_magnitude; }

◆ getHeatedPerimeterNames()

std::vector< VariableName > FlowChannelBase::getHeatedPerimeterNames ( ) const
inline

Gets heated perimeter names for connected heat transfers.

Definition at line 142 of file FlowChannelBase.h.

142{ return _P_hf_names; }

Referenced by Closures1PhaseBase::addAverageWallTemperatureMaterial(), and Closures1PhaseSimple::addMooseObjectsFlowChannel().

◆ getHeatTransferGeometry()

EConvHeatTransGeom FlowChannelBase::getHeatTransferGeometry ( ) const
inline

Gets heat transfer geometry.

Definition at line 117 of file FlowChannelBase.h.

117{ return _HT_geometry; }

Referenced by Closures1PhaseTHM::addWallFFMaterial(), and Closures1PhaseTHM::addWallHTCMaterial().

◆ getHeatTransferNames()

std::vector< std::string > FlowChannelBase::getHeatTransferNames ( ) const

Gets the names of all connected heat transfer components.

Definition at line 395 of file FlowChannelBase.C.

◆ getHeatTransferNamesSuffix()

std::string FlowChannelBase::getHeatTransferNamesSuffix ( const std::string &  ht_name) const

Gets suffix to add to heat-transfer-related names in a heat transfer component.

This function is called from a heat transfer component to determine how to name its variables. If the flow channel has only one heat transfer coefficient, for example, then no suffix is returned. This function must be called after all of the heat transfer component names have been added to the flow channel's list (via addHeatTransferName()).

Parameters
[in]ht_namename of the heat transfer component
Returns
suffix to add to heat transfer variable names

Definition at line 364 of file FlowChannelBase.C.

365{
367
368 // if there is more than one connected heat transfer component, then number them
370 {
371 // determine index of heat transfer name based on when it was added
372 auto it = std::find(_heat_transfer_names.begin(), _heat_transfer_names.end(), ht_name);
373 if (it != _heat_transfer_names.end())
374 {
375 const unsigned int index = std::distance(_heat_transfer_names.begin(), it);
376
377 std::string suffix = ":";
378 if (getParam<bool>("name_multiple_ht_by_index"))
379 suffix += std::to_string(index + 1);
380 else
381 suffix += _heat_transfer_names[index];
382
383 return suffix;
384 }
385 else
387 "Heat transfer component '", ht_name, "' was not added to flow channel '", name(), "'");
388 }
389 // else, don't add a suffix; there is no need
390 else
391 return "";
392}

Referenced by HeatTransfer1PhaseBase::initSecondary(), HeatTransferBase::initSecondary(), and HeatTransferFromHeatStructure3D1Phase::initSecondary().

◆ getHeatTransferVariableNames()

void FlowChannelBase::getHeatTransferVariableNames ( )
protectedvirtual

Populates heat connection variable names lists.

Reimplemented in FlowChannel1PhaseBase.

Definition at line 349 of file FlowChannelBase.C.

350{
351 for (unsigned int i = 0; i < _n_heat_transfer_connections; i++)
352 {
353 const HeatTransferBase & heat_transfer =
354 getComponentByName<HeatTransferBase>(_heat_transfer_names[i]);
355
356 _P_hf_names.push_back(heat_transfer.getHeatedPerimeterName());
357 _T_wall_names.push_back(heat_transfer.getWallTemperatureName());
358 _T_wall_mat_names.push_back(heat_transfer.getWallTemperatureMatName());
359 _q_wall_names.push_back(heat_transfer.getWallHeatFluxName());
360 }
361}
std::vector< VariableName > _T_wall_names
wall temperature auxvariable names for connected heat transfers
std::vector< MaterialPropertyName > _T_wall_mat_names
wall temperature material names for connected heat transfers
const MaterialPropertyName & getWallHeatFluxName() const
Returns wall heat flux name.
const VariableName & getWallTemperatureName() const
Returns wall temperature name.
const VariableName & getHeatedPerimeterName() const
Returns heated perimeter name.
const MaterialPropertyName & getWallTemperatureMatName() const
Returns wall temperature name.

Referenced by addVariables(), and FlowChannel1PhaseBase::getHeatTransferVariableNames().

◆ getLength()

virtual Real DiscreteLineSegmentInterface::getLength ( ) const
inlinevirtualinherited

◆ getMinimumElemSize()

Real DiscreteLineSegmentInterface::getMinimumElemSize ( ) const
inlineinherited

Gets the minimum element size.

Definition at line 37 of file DiscreteLineSegmentInterface.h.

37{ return _dx_min; }

Referenced by FlowChannel1Phase::addNormalized1PhaseResidualNorm().

◆ getNodeIDs()

const std::vector< dof_id_type > & Component::getNodeIDs ( ) const
inherited

Gets the node IDs corresponding to this component.

Definition at line 329 of file Component.C.

330{
332
333 return _node_ids;
334}

◆ getNodesetID()

unsigned int Component1D::getNodesetID ( ) const
inherited

Gets the 1D component nodeset ID.

Definition at line 140 of file Component1D.C.

141{
143
144 return _nodeset_id;
145}

◆ getNodesetName()

const BoundaryName & Component1D::getNodesetName ( ) const
inherited

Gets the 1D component nodeset name.

Definition at line 148 of file Component1D.C.

149{
151
152 return _nodeset_name;
153}

Referenced by HeatTransferFromHeatStructure1Phase::getChannelSideName().

◆ getNonlinearConvergence()

Convergence * Component::getNonlinearConvergence ( ) const
virtualinherited

Gets the Component's nonlinear Convergence object if it has one.

Reimplemented in BoundaryBase, Component1DBoundary, FlowChannel1Phase, HeatSourceBase, HeatStructureBase, HeatTransferBase, JunctionOneToOne1Phase, and TotalPower.

Definition at line 361 of file Component.C.

362{
363 mooseError("getNonlinearConvergence() not implemented.");
364}

◆ getNumberOfHeatTransferConnections()

unsigned int FlowChannelBase::getNumberOfHeatTransferConnections ( ) const
inline

◆ getNumElems()

virtual Real DiscreteLineSegmentInterface::getNumElems ( ) const
inlinevirtualinherited

Definition at line 33 of file DiscreteLineSegmentInterface.h.

33{ return _n_elem; }

Referenced by HeatTransferFromHeatStructure3D1Phase::init().

◆ getPipeLocation() [1/2]

EPipeLocation FlowChannelBase::getPipeLocation ( ) const
inline

Gets the pipe location.

Definition at line 122 of file FlowChannelBase.h.

122{ return _pipe_location; }

Referenced by validParams().

◆ getPipeLocation() [2/2]

MooseEnum FlowChannelBase::getPipeLocation ( const std::string &  name)
static

Gets a MooseEnum for pipe location.

Parameters
[in]namedefault value
Returns
MooseEnum for pipe location

Definition at line 42 of file FlowChannelBase.C.

43{
44 return THM::getMooseEnum<EPipeLocation>(name, _pipe_location_to_enum);
45}
static const std::map< std::string, EPipeLocation > _pipe_location_to_enum
Map of pipe location to enum.

Referenced by Closures1PhaseTHM::addWallFFMaterial().

◆ getPipeType()

MooseEnum FlowChannelBase::getPipeType ( const std::string &  name)
static

Gets a MooseEnum for pipe type.

Parameters
[in]namedefault value
Returns
MooseEnum for pipe type

Definition at line 36 of file FlowChannelBase.C.

37{
38 return THM::getMooseEnum<EPipeType>(name, _pipe_type_to_enum);
39}
static const std::map< std::string, EPipeType > _pipe_type_to_enum
Map of pipe type to enum.

◆ getPosition()

virtual Point DiscreteLineSegmentInterface::getPosition ( ) const
inlinevirtualinherited

◆ getRotation()

virtual Real DiscreteLineSegmentInterface::getRotation ( ) const
inlinevirtualinherited

Definition at line 31 of file DiscreteLineSegmentInterface.h.

31{ return _rotation; }

◆ getStartPoint()

Point DiscreteLineSegmentInterface::getStartPoint ( ) const
inlineinherited

◆ getSubdomainNames()

const std::vector< SubdomainName > & Component::getSubdomainNames ( ) const
virtualinherited

Gets the subdomain names for this component.

Returns
vector of subdomain names for this component

Definition at line 345 of file Component.C.

346{
348
349 return _subdomain_names;
350}
std::vector< SubdomainName > _subdomain_names
List of subdomain names this components owns.
Definition Component.h:513

Referenced by Closures1PhaseBase::addAverageWallTemperatureMaterial(), FlowModel::addCommonInitialConditions(), FlowModel::addCommonMooseObjects(), addCommonObjects(), FlowModel::addCommonVariables(), HeatStructureBase::addConstantDensitySolidPropertiesMaterial(), FlowModel1PhaseBase::addDensityAux(), FlowModelGasMix::addDensityIC(), FlowModelSinglePhase::addDensityIC(), FlowModel1PhaseBase::addEnergyGravityKernel(), FlowChannel1Phase::addFlowChannel1PhaseFunctorMaterial(), FlowModelGasMix::addFluidPropertiesMaterials(), FlowModelSinglePhase::addFluidPropertiesMaterials(), FlowModel1PhaseBase::addFunctionIC(), FlowModel1PhaseBase::addHeatConductionDGKernel(), HeatConductionModel::addHeatEquationRZ(), HeatConductionModel::addHeatEquationXYZ(), FlowChannel1PhaseBase::addHydraulicDiameterMaterial(), HeatConductionModel::addInitialConditions(), VolumeJunction1Phase::addJunctionIC(), VolumeJunction1Phase::addJunctionVariable(), FlowModelGasMix::addMassDiffusionEnergyDGKernel(), FlowModelGasMix::addMassDiffusionSpeciesDGKernel(), FlowModelGasMix::addMassFractionAux(), FlowModel1PhaseBase::addMomentumAreaGradientKernel(), FlowModel1PhaseBase::addMomentumFrictionKernel(), FlowModel1PhaseBase::addMomentumGravityKernel(), FlowChannel1Phase::addMooseObjects(), addMooseObjects(), HeatSourceVolumetric1Phase::addMooseObjects(), HeatStructureBase::addMooseObjects(), HeatTransferFromHeatStructure1Phase::addMooseObjects(), ShaftConnectedCompressor1Phase::addMooseObjects(), ShaftConnectedPump1Phase::addMooseObjects(), ShaftConnectedTurbine1Phase::addMooseObjects(), SimpleTurbine1Phase::addMooseObjects(), VolumeJunction1Phase::addMooseObjects(), FunctorClosures::addMooseObjectsFlowChannel(), Closures1PhaseSimple::addMooseObjectsHeatTransfer(), Component::addNonlinearStepFunctorMaterial(), FlowChannel1Phase::addNormalized1PhaseResidualNorm(), FlowChannel1Phase::addNumericalFluxVectorPostprocessor(), FlowModelSinglePhase::addPassiveTransportIC(), FlowModelGasMix::addPressureAux(), FlowModelSinglePhase::addPressureAux(), FlowModelGasMix::addRDGAdvectionDGKernels(), FlowModelSinglePhase::addRDGAdvectionDGKernels(), FlowModel1PhaseBase::addRhoAIC(), FlowModelGasMix::addRhoEAIC(), FlowModelSinglePhase::addRhoEAIC(), FlowModel1PhaseBase::addRhoUAIC(), FlowModelGasMix::addSlopeReconstructionMaterial(), FlowModelSinglePhase::addSlopeReconstructionMaterial(), FlowModel1PhaseBase::addSpecificInternalEnergyAux(), FlowModel1PhaseBase::addSpecificInternalEnergyIC(), FlowModel1PhaseBase::addSpecificTotalEnthalpyAux(), FlowModel1PhaseBase::addSpecificTotalEnthalpyIC(), FlowModel1PhaseBase::addSpecificVolumeAux(), FlowModel1PhaseBase::addSpecificVolumeIC(), FlowModelGasMix::addTemperatureAux(), FlowModelSinglePhase::addTemperatureAux(), FlowModel1PhaseBase::addTimeDerivativeKernelIfTransient(), HeatConductionModel::addVariables(), FlowModel1PhaseBase::addVariables(), FlowModelGasMix::addVariables(), FlowModelSinglePhase::addVariables(), addVariables(), HSBoundaryExternalAppConvection::addVariables(), HSBoundaryExternalAppHeatFlux::addVariables(), HSBoundaryExternalAppTemperature::addVariables(), FlowModel1PhaseBase::addVelocityAux(), FlowModel1PhaseBase::addVelocityIC(), VolumeJunction1Phase::addVolumeJunctionIC(), Closures1PhaseTHM::addWallFFMaterial(), Closures1PhaseBase::addWallFrictionFunctionMaterial(), Closures1PhaseTHM::addWallHTCMaterial(), ClosuresBase::addWallTemperatureFromAuxMaterial(), Closures1PhaseSimple::addWallTemperatureFromHeatFluxMaterial(), ClosuresBase::addWeightedAverageMaterial(), FlowModelGasMix::addXiRhoAIC(), ClosuresBase::addZeroMaterial(), FileMeshPhysicsComponent::getBlocks(), Component1DConnection::init(), FileMeshPhysicsComponent::init(), FormLoss1PhaseBase::init(), HeatTransferBase::init(), and HeatTransferFromHeatStructure3D1Phase::init().

◆ getTemperatureMode()

bool FlowChannelBase::getTemperatureMode ( ) const
inline

◆ getTHMProblem()

THMProblem & Component::getTHMProblem ( ) const
inherited

Gets the THM problem.

Definition at line 135 of file Component.C.

136{
137 return _sim;
138}

Referenced by HeatStructureBase::addAverageElementSizePostprocessor(), addCommonObjects(), HeatStructureBase::addConstantDensitySolidPropertiesMaterial(), FlowChannel1Phase::addFlowChannel1PhaseFunctorMaterial(), VolumeJunctionCoupledFlux1Phase::addFluxPostprocessor(), VolumeJunctionCoupledFlux1Phase::addFluxTransfer(), HeatTransferBase::addHeatedPerimeter(), HeatTransferFromTemperature1Phase::addHeatTransferKernels(), FlowChannel1PhaseBase::addHydraulicDiameterMaterial(), VolumeJunction1Phase::addJunctionIC(), VolumeJunction1Phase::addJunctionVariable(), Component::addMaximumFunctorPostprocessor(), addMooseObjects(), FormLoss1PhaseBase::addMooseObjects(), FormLossFromExternalApp1Phase::addMooseObjects(), FormLossFromFunction1Phase::addMooseObjects(), FreeBoundary1Phase::addMooseObjects(), GateValve1Phase::addMooseObjects(), HeatSourceFromPowerDensity::addMooseObjects(), HeatSourceFromTotalPower::addMooseObjects(), HeatSourceVolumetric1Phase::addMooseObjects(), HeatStructure2DCoupler::addMooseObjects(), HeatStructure2DRadiationCouplerRZ::addMooseObjects(), HeatTransferBase::addMooseObjects(), HeatTransferFromExternalAppHeatFlux1Phase::addMooseObjects(), HeatTransferFromHeatFlux1Phase::addMooseObjects(), HeatTransferFromHeatStructure1Phase::addMooseObjects(), HeatTransferFromHeatStructure3D1Phase::addMooseObjects(), HeatTransferFromSpecifiedTemperature1Phase::addMooseObjects(), HSBoundaryAmbientConvection::addMooseObjects(), HSBoundaryExternalAppConvection::addMooseObjects(), HSBoundaryExternalAppHeatFlux::addMooseObjects(), HSBoundaryExternalAppTemperature::addMooseObjects(), HSBoundaryHeatFlux::addMooseObjects(), HSBoundaryRadiation::addMooseObjects(), HSBoundarySpecifiedTemperature::addMooseObjects(), HSCoupler2D2DRadiation::addMooseObjects(), HSCoupler2D3D::addMooseObjects(), InletDensityVelocity1Phase::addMooseObjects(), InletMassFlowRateTemperature1Phase::addMooseObjects(), InletStagnationPressureTemperature1Phase::addMooseObjects(), InletVelocityTemperature1Phase::addMooseObjects(), JunctionOneToOne1Phase::addMooseObjects(), Outlet1Phase::addMooseObjects(), Shaft::addMooseObjects(), ShaftConnectedCompressor1Phase::addMooseObjects(), ShaftConnectedMotor::addMooseObjects(), ShaftConnectedPump1Phase::addMooseObjects(), ShaftConnectedTurbine1Phase::addMooseObjects(), SimpleTurbine1Phase::addMooseObjects(), SolidWall1Phase::addMooseObjects(), SolidWallGasMix::addMooseObjects(), TotalPower::addMooseObjects(), VolumeJunction1Phase::addMooseObjects(), InletFunction1Phase::addMooseObjects(), Component::addMultiPostprocessorConvergence(), Component::addNonlinearStepFunctorMaterial(), FlowChannel1Phase::addNormalized1PhaseResidualNorm(), FlowChannel1Phase::addNumericalFluxVectorPostprocessor(), VolumeJunctionCoupledFlux1Phase::addPropertyPostprocessor(), VolumeJunctionCoupledFlux1Phase::addPropertyTransfer(), HeatStructureBase::addResidualNormPostprocessor(), addVariables(), FormLossFromExternalApp1Phase::addVariables(), HeatTransferFromExternalAppHeatFlux1Phase::addVariables(), HeatTransferFromExternalAppTemperature1Phase::addVariables(), HeatTransferFromHeatStructure1Phase::addVariables(), HeatTransferFromHeatStructure3D1Phase::addVariables(), HeatTransferFromSpecifiedTemperature1Phase::addVariables(), HeatTransferFromTemperature1Phase::addVariables(), HSBoundaryExternalAppConvection::addVariables(), HSBoundaryExternalAppHeatFlux::addVariables(), HSBoundaryExternalAppTemperature::addVariables(), Shaft::addVariables(), TotalPower::addVariables(), TotalPowerBase::addVariables(), VolumeJunction1Phase::addVolumeJunctionIC(), VolumeJunctionCoupledFlux1Phase::addVolumeJunctionKernel(), FlowBoundary1Phase::addWeakBCs(), FlowBoundaryGasMix::addWeakBCs(), FlowChannel1PhaseBase::buildFlowModel(), HeatStructureInterface::buildModel(), VolumeJunction1Phase::buildVolumeJunctionUserObject(), JunctionParallelChannels1Phase::buildVolumeJunctionUserObject(), Pump1Phase::buildVolumeJunctionUserObject(), ShaftConnectedCompressor1Phase::buildVolumeJunctionUserObject(), ShaftConnectedPump1Phase::buildVolumeJunctionUserObject(), ShaftConnectedTurbine1Phase::buildVolumeJunctionUserObject(), SimpleTurbine1Phase::buildVolumeJunctionUserObject(), HeatStructureInterface::check(), FlowChannel1PhaseBase::check(), Shaft::check(), VolumeJunction1Phase::check(), FlowChannel1Phase::checkFluidProperties(), FlowChannelGasMix::checkFluidProperties(), FlowChannel1Phase::getNonlinearConvergence(), HeatStructureBase::getNonlinearConvergence(), GeometricalComponent::getVariableFn(), Component1DConnection::init(), FlowBoundary::init(), FlowBoundary1PhaseBase::init(), init(), FlowJunction::init(), FlowJunction1Phase::init(), Component::problemIsTransient(), GateValve1Phase::setupMesh(), HeatStructure2DCouplerBase::setupMesh(), HeatTransferFromHeatStructure1Phase::setupMesh(), HeatTransferFromHeatStructure3D1Phase::setupMesh(), HSCoupler2D2DRadiation::setupMesh(), HSCoupler2D3D::setupMesh(), JunctionOneToOne1Phase::setupMesh(), and VolumeJunction1Phase::setupMesh().

◆ getUniformNodeLocations()

std::vector< Real > GeneratedMeshComponent::getUniformNodeLocations ( Real  length,
unsigned int  n_nodes 
)
privateinherited

Computes the local positions of axial nodes for an axial section.

Parameters
[in]lengthLength of the axial section
[in]n_nodesNumber of axial nodes in the axial section

Definition at line 100 of file GeneratedMeshComponent.C.

101{
102 std::vector<Real> node_locations(n_nodes);
103 Real dx = length / (n_nodes - 1);
104
105 node_locations[0] = 0.0;
106
107 for (unsigned int i = 1; i < (n_nodes - 1); ++i)
108 node_locations[i] = node_locations[i - 1] + dx;
109
110 node_locations[n_nodes - 1] = length;
111 return node_locations;
112}

Referenced by GeneratedMeshComponent::generateNodeLocations().

◆ getVariableFn()

const FunctionName & GeometricalComponent::getVariableFn ( const FunctionName &  fn_param_name)
protectedinherited

Makes a constant function parameter controllable and returns its name.

Parameters
[in]fn_param_nameFunctionName parameter

Definition at line 79 of file GeometricalComponent.C.

80{
81 const FunctionName & fn_name = getParam<FunctionName>(fn_param_name);
82 const Function & fn = getTHMProblem().getFunction(fn_name);
83
84 if (dynamic_cast<const ConstantFunction *>(&fn) != nullptr)
85 {
86 connectObject(fn.parameters(), fn_name, fn_param_name, "value");
87 }
88
89 return fn_name;
90}
virtual Function & getFunction(const std::string &name, const THREAD_ID tid=0)
const InputParameters & parameters() const

◆ getWallHeatFluxNames()

std::vector< MaterialPropertyName > FlowChannelBase::getWallHeatFluxNames ( ) const
inline

Gets wall heat flux names for connected heat transfers.

Definition at line 153 of file FlowChannelBase.h.

153{ return _q_wall_names; }

◆ getWallTemperatureMatNames()

std::vector< MaterialPropertyName > FlowChannelBase::getWallTemperatureMatNames ( ) const
inline

Definition at line 148 of file FlowChannelBase.h.

148{ return _T_wall_mat_names; }

◆ getWallTemperatureNames()

std::vector< VariableName > FlowChannelBase::getWallTemperatureNames ( ) const
inline

Gets wall temperature names for connected heat transfers.

Definition at line 147 of file FlowChannelBase.h.

147{ return _T_wall_names; }

Referenced by Closures1PhaseBase::addAverageWallTemperatureMaterial(), Closures1PhaseTHM::addWallHTCMaterial(), and ClosuresBase::addWallTemperatureFromAuxMaterial().

◆ hasComponent()

template<typename T >
bool Component::hasComponent ( const std::string &  name) const
inherited

Check the existence and type of a component via a parameter name.

Template Parameters
Tthe type of the component we are requesting
Parameters
nameThe parameter name that has the component name
Returns
true if the component with given name and type exists, otherwise false

Definition at line 572 of file Component.h.

573{
574 const std::string & comp_name = getParam<std::string>(pname);
575 return hasComponentByName<T>(comp_name);
576}

◆ hasComponentByName()

template<typename T >
bool Component::hasComponentByName ( const std::string &  cname) const
inherited

Check the existence and type of a component given its name.

Template Parameters
Tthe type of the component we are requesting
Parameters
cnameThe name of the component
Returns
true if the component with given name and type exists, otherwise false

Definition at line 580 of file Component.h.

581{
582 if (_sim.hasComponentOfType<T>(comp_name))
583 return true;
584 else
585 return false;
586}

◆ hasParam()

template<typename T >
bool Component::hasParam ( const std::string &  name) const
inherited

Test if a parameter exists in the object's input parameters.

Parameters
nameThe name of the parameter
Returns
true if the parameter exists, false otherwise

Definition at line 550 of file Component.h.

551{
552 return parameters().have_parameter<T>(name);
553}
bool have_parameter(std::string_view name) const

◆ init()

void FlowChannelBase::init ( )
overrideprotectedvirtual

Initializes the component.

The reason this function exists (as opposed to just having everything in the constructor) is because some initialization depends on all components existing, since many components couple to other components. Therefore, when deciding whether code should go into the constructor or this function, one should use the following reasoning: if an operation does not require the existence of other components, then put that operation in the constructor; otherwise, put it in this function.

Reimplemented from Component.

Reimplemented in FlowChannel1PhaseBase.

Definition at line 159 of file FlowChannelBase.C.

160{
162
164
166 if (_flow_model)
167 {
168 _flow_model->init();
169
170 const auto & closures_names = getParam<std::vector<std::string>>("closures");
171 for (const auto & closures_name : closures_names)
172 _closures_objects.push_back(getTHMProblem().getClosures(closures_name));
173 }
174}
virtual std::shared_ptr< FlowModel > buildFlowModel()=0
virtual FunctionName createAreaFunctionAndGetName()
Creates the area function if needed and then stores the name.

Referenced by FlowChannel1PhaseBase::init().

◆ initializeDirectionVector()

RealVectorValue DiscreteLineSegmentInterface::initializeDirectionVector ( const RealVectorValue &  dir_unnormalized)
staticprivateinherited

Computes a normalized direction vector or reports an error if the zero vector is provided.

Parameters
[in]dir_unnormalizedUnnormalized direction vector

Definition at line 76 of file DiscreteLineSegmentInterface.C.

77{
78 if (!MooseUtils::absoluteFuzzyEqual(dir_unnormalized.norm(), 0.0))
79 return dir_unnormalized / dir_unnormalized.norm();
80 else
81 mooseError("The parameter 'orientation' must not be the zero vector.");
82}

◆ initSecondary()

void FlowChannelBase::initSecondary ( )
overrideprotectedvirtual

Perform secondary initialization, which relies on init() being called for all components.

Reimplemented from Component.

Definition at line 177 of file FlowChannelBase.C.

178{
180
181 // Determine heat transfer mode based on connected heat transfer components;
182 // if at least one heat transfer component of temperature component is
183 // connected, then it's temperature mode. Otherwise, it's heat flux mode, even
184 // if no heat transfer components at all were provided - in that case, a zero
185 // heat flux is added.
186 for (unsigned int i = 0; i < _heat_transfer_names.size(); i++)
187 {
188 const HeatTransferBase & heat_transfer =
189 getComponentByName<HeatTransferBase>(_heat_transfer_names[i]);
190 if (heat_transfer.isTemperatureType())
191 _temperature_mode = true;
192 }
193}

◆ insistParameterExists()

template<typename T >
void Component::insistParameterExists ( const std::string &  function_name,
const std::string &  param_name 
) const
inherited

Runtime check to make sure that a parameter of specified type exists in the component's input parameters.

This is intended to help developers write code. The idea is to provide a useful message when developers make typos, etc. If this check fails, the code execution will be stopped.

Template Parameters
TThe type of the parameter to be checked
Parameters
function_nameThe name of the function calling this method
param_nameThe name of the parameter to be checked

Definition at line 621 of file Component.h.

623{
624 if (!hasParam<T>(param_name))
626 ": Calling ",
627 function_name,
628 " failed, parameter '",
629 param_name,
630 "' does not exist or does not have the type you requested. Double check your "
631 "spelling and/or type of the parameter.");
632}

◆ logComponentError()

template<typename... Args>
void LoggingInterface::logComponentError ( const std::string &  component_name,
Args &&...  args 
) const
inlineinherited

Logs an error for a component.

Parameters
[in]component_nameName of the component

Definition at line 47 of file LoggingInterface.h.

48 {
49 _log.add(Logger::ERROR, component_name, ": ", std::forward<Args>(args)...);
50 }
void add(EMessageType type, Args &&... args)
Add a message to the log.
Definition Logger.h:35
@ ERROR
Definition Logger.h:25

Referenced by Closures1PhaseSimple::checkFlowChannel(), Closures1PhaseSimple::checkHeatTransfer(), and Component::logError().

◆ logComponentWarning()

template<typename... Args>
void LoggingInterface::logComponentWarning ( const std::string &  component_name,
Args &&...  args 
) const
inlineinherited

Logs a warning for a component.

Parameters
[in]component_nameName of the component

Definition at line 67 of file LoggingInterface.h.

68 {
69 _log.add(Logger::WARNING, component_name, ": ", std::forward<Args>(args)...);
70 }
@ WARNING
Definition Logger.h:26

Referenced by Component::logWarning().

◆ logError()

template<typename... Args>
void Component::logError ( Args &&...  args) const
inlineinherited

Logs an error.

Definition at line 226 of file Component.h.

227 {
228 logComponentError(cname(), std::forward<Args>(args)...);
229 }
void logComponentError(const std::string &component_name, Args &&... args) const
Logs an error for a component.

Referenced by Component1DConnection::addConnection(), HeatStructureInterface::check(), Component1DJunction::check(), Component2D::check(), FlowBoundary1Phase::check(), FlowChannel1PhaseBase::check(), check(), FlowJunction1Phase::check(), GeneratedMeshComponent::check(), HeatSourceBase::check(), HeatStructure2DCoupler::check(), HeatStructure2DCouplerBase::check(), HeatStructure2DRadiationCouplerRZ::check(), HeatTransferFromExternalAppTemperature1Phase::check(), HeatTransferFromHeatStructure3D1Phase::check(), HSBoundary::check(), HSBoundaryExternalAppHeatFlux::check(), HSCoupler2D2DRadiation::check(), HSCoupler2D3D::check(), InletDensityVelocity1Phase::check(), InletMassFlowRateTemperature1Phase::check(), InletStagnationEnthalpyMomentum1Phase::check(), InletStagnationPressureTemperature1Phase::check(), InletVelocityTemperature1Phase::check(), Outlet1Phase::check(), Shaft::check(), VolumeJunction1Phase::check(), HSBoundary::checkAllComponent2DBoundariesAreExternal(), Component1DConnection::checkAllConnectionsHaveSame(), Component::checkComponentExistsByName(), Component::checkComponentOfTypeExistsByName(), Component::checkEqualSize(), FlowChannel1Phase::checkFluidProperties(), FlowChannelGasMix::checkFluidProperties(), Component::checkMutuallyExclusiveParameters(), Component1DConnection::checkNumberOfConnections(), Component::checkParameterValueLessThan(), Component1DConnection::checkSizeEqualsNumberOfConnections(), Component::checkSizeEqualsParameterValue(), Component::checkSizeEqualsValue(), Component::checkSizeEqualsValue(), Component::checkSizeGreaterThan(), Component::checkSizeLessThan(), ElbowPipe1Phase::ElbowPipe1Phase(), Component::getEnumParam(), HeatTransferFromHeatStructure3D1Phase::getFlowChannelAxisAlignment(), HeatStructureFromFile3D::HeatStructureFromFile3D(), Component1DConnection::init(), FlowJunction1Phase::init(), HeatTransferFromHeatStructure3D1Phase::init(), HeatTransfer1PhaseBase::initSecondary(), LoggerTestComponent::LoggerTestComponent(), Component1DConnection::setupMesh(), and HeatTransferFromHeatStructure1Phase::setupMesh().

◆ logWarning()

template<typename... Args>
void Component::logWarning ( Args &&...  args) const
inlineinherited

Logs a warning.

Definition at line 235 of file Component.h.

236 {
237 logComponentWarning(cname(), std::forward<Args>(args)...);
238 }
void logComponentWarning(const std::string &component_name, Args &&... args) const
Logs a warning for a component.

Referenced by GateValve1Phase::check(), LoggerTestComponent::LoggerTestComponent(), and VolumeJunction1Phase::VolumeJunction1Phase().

◆ mesh()

THMMesh & Component::mesh ( )
inherited

◆ nonlinearConvergenceName()

std::string Component::nonlinearConvergenceName ( ) const
inlineprotectedinherited

◆ parent()

Component * Component::parent ( )
inlineinherited

Definition at line 55 of file Component.h.

55{ return _parent; }

◆ passParameter() [1/2]

template<typename T >
void THMObject::passParameter ( const std::string &  name,
const std::string &  new_name,
InputParameters params 
) const
protectedinherited

Passes a parameter from this object's input parameters to another set of input parameters.

Template Parameters
Tthe type of the parameter to be passed
Parameters
name[in]name the name of this object's parameter
new_name[in]new_name the name of the corresponding parameters in params
params[in,out]params the parameters to which the parameter will be passed

Definition at line 54 of file THMObject.h.

57{
58 if (isParamValid(name))
59 params.set<T>(new_name) = _pars.get<T>(name);
60}
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
const InputParameters & _pars

◆ passParameter() [2/2]

template<typename T >
void THMObject::passParameter ( const std::string &  name,
InputParameters params 
) const
protectedinherited

Passes a parameter from this object's input parameters to another set of input parameters.

This version overloads the other by assuming that the parameter has the same name.

Template Parameters
Tthe type of the parameter to be passed
Parameters
name[in]name the name of the parameter
params[in,out]params the parameters to which the parameter will be passed

Definition at line 64 of file THMObject.h.

65{
66 passParameter<T>(name, name, params);
67}

◆ placeLocalNodeLocations()

void GeneratedMeshComponent::placeLocalNodeLocations ( Real  start_length,
unsigned int  start_node,
std::vector< Real > &  local_node_locations 
)
privateinherited

Puts local positions of axial nodes for an axial section into _node_locations.

Parameters
[in]start_lengthStart position for the axial section
[in]start_nodeStart node index for the axial section
[in]local_node_locationsLocal positions of axial nodes for the axial section

Definition at line 115 of file GeneratedMeshComponent.C.

118{
119 unsigned int n_nodes = local_node_locations.size();
120 for (unsigned int i = 1; i < n_nodes; ++i)
121 {
122 unsigned int global_i = i + start_node;
123 Real local_node_location = local_node_locations[i];
124 _node_locations[global_i] = start_length + local_node_location;
125 }
126}

Referenced by GeneratedMeshComponent::generateNodeLocations().

◆ problemIsTransient()

bool Component::problemIsTransient ( ) const
inlineinherited

Whether the problem is transient.

Definition at line 264 of file Component.h.

264{ return getTHMProblem().isTransient(); }
virtual bool isTransient() const override

Referenced by HeatConductionModel::addHeatEquationRZ(), HeatConductionModel::addHeatEquationXYZ(), and FlowModel1PhaseBase::addTimeDerivativeKernelIfTransient().

◆ setSubdomainInfo()

void Component::setSubdomainInfo ( SubdomainID  subdomain_id,
const std::string &  subdomain_name,
const Moose::CoordinateSystemType coord_system = Moose::COORD_XYZ 
)
protectedvirtualinherited

Sets the next subdomain ID, name, and coordinate system.

Parameters
[in]subdomain_idsubdomain index
[in]subdomain_namename of the new subdomain
[in]coord_systemtype of coordinate system

Definition at line 219 of file Component.C.

222{
223 _subdomain_ids.push_back(subdomain_id);
224 _subdomain_names.push_back(subdomain_name);
225 _coord_sys.push_back(coord_system);
226 if (_parent)
227 {
228 _parent->_subdomain_ids.push_back(subdomain_id);
229 _parent->_subdomain_names.push_back(subdomain_name);
230 _parent->_coord_sys.push_back(coord_system);
231 }
232 mesh().setSubdomainName(subdomain_id, subdomain_name);
233}
std::vector< SubdomainID > _subdomain_ids
List of subdomain IDs this components owns.
Definition Component.h:511
void setSubdomainName(SubdomainID subdomain_id, const SubdomainName &name)

Referenced by FileMeshComponent::buildMesh(), Component1D::buildMesh(), Component2D::buildMesh(), and VolumeJunction1Phase::setupMesh().

◆ setupMesh()

void GeneratedMeshComponent::setupMesh ( )
overrideprotectedvirtualinherited

Performs mesh setup such as creating mesh or naming mesh sets.

Reimplemented from Component.

Reimplemented in HeatStructureCylindricalBase.

Definition at line 38 of file GeneratedMeshComponent.C.

39{
41
42 buildMesh();
43
44 // displace nodes
45 for (auto && node_id : _node_ids)
46 {
47 Node & curr_node = mesh().nodeRef(node_id);
48 RealVectorValue p(curr_node(0), curr_node(1), curr_node(2));
50 }
51}
virtual void buildMesh()=0
void generateNodeLocations()
Generates axial node locations and stores in _node_locations.
virtual const Node & nodeRef(const dof_id_type i) const

◆ sortBy()

std::string Component1D::sortBy ( ) const
protectedinherited

Definition at line 169 of file Component1D.C.

170{
171 // choose the dominant direction
172 std::string dominant_direction = "x";
173 const Real x_abs = std::abs(_dir(0));
174 const Real y_abs = std::abs(_dir(1));
175 const Real z_abs = std::abs(_dir(2));
176 Real max_value = x_abs;
177 if (y_abs > max_value)
178 {
179 dominant_direction = "y";
180 max_value = y_abs;
181 }
182 if (z_abs > max_value)
183 {
184 dominant_direction = "z";
185 max_value = z_abs;
186 }
187 return dominant_direction;
188}

Referenced by addMooseObjects(), and FlowChannel1Phase::addNumericalFluxVectorPostprocessor().

◆ stringify()

std::string Component::stringify ( EComponentSetupStatus  status) const
inherited

Return a string for the setup status.

Definition at line 309 of file Component.C.

310{
311 switch (status)
312 {
313 case CREATED:
314 return "component created";
315 case MESH_PREPARED:
316 return "component mesh set up";
318 return "primary initialization completed";
320 return "secondary initialization completed";
321 case CHECKED:
322 return "component fully set up and checked";
323 default:
324 mooseError("Should not reach here");
325 }
326}

Referenced by Component::checkSetupStatus().

◆ usingSecondOrderMesh()

bool Component1D::usingSecondOrderMesh ( ) const
overrideprotectedvirtualinherited

Check if second order mesh is being used by this geometrical component.

Returns
true if second order mesh is being used, otherwise false

Implements GeneratedMeshComponent.

Definition at line 134 of file Component1D.C.

135{
136 return false;
137}

Referenced by Component1D::buildMesh().

◆ validParams()

InputParameters FlowChannelBase::validParams ( )
static

Definition at line 70 of file FlowChannelBase.C.

71{
74
75 params.addRequiredParam<UserObjectName>("fp", "Fluid properties user object");
76 params.addRequiredParam<FunctionName>(
77 "A", "Area of the flow channel, can be a constant or a function");
78 params.addParam<Real>("roughness", 0.0, "Roughness [m]");
79 params.addParam<FunctionName>("f", "Wall friction factor [-]");
80 params.addParam<MooseEnum>("heat_transfer_geom",
82 "Convective heat transfer geometry");
83 params.addParam<MooseEnum>("pipe_location",
85 "Pipe location within the bundle");
86 params.addParam<Real>("PoD", 1, "Pitch-to-diameter ratio for parallel bundle heat transfer [-]");
87 params.addParam<bool>(
88 "pipe_pars_transferred",
89 false,
90 "Set to true if Dh, P_hf and A are going to be transferred in from an external source");
91 params.addParam<std::vector<std::string>>(
92 "closures",
93 {},
94 "Closures object(s). This is optional since closure relations can be supplied directly by "
95 "Materials as well.");
96 params.addParam<bool>("name_multiple_ht_by_index",
97 true,
98 "If true, when there are multiple heat transfer components connected to "
99 "this flow channel, use their index for naming related quantities; "
100 "otherwise, use the name of the heat transfer component.");
101 params.addParam<std::vector<VariableName>>(
102 "vpp_vars", {}, "Variables to add in an ElementValueSampler");
103
104 params.setDocString(
105 "orientation",
106 "Direction of flow channel from start position to end position (no need to normalize). For "
107 "curved flow channels, it is the (tangent) direction at the start position.");
108
109 params.addPrivateParam<std::string>("component_type", "pipe");
110
111 return params;
112}
static InputParameters validParams()
Definition Component1D.C:14
static MooseEnum getConvHeatTransGeometry(const std::string &name)
Gets a MooseEnum for convective heat transfer geometry type.
EPipeLocation getPipeLocation() const
Gets the pipe location.
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
void setDocString(const std::string &name, const std::string &doc)
void addPrivateParam(const std::string &name, const T &value)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)

Referenced by FlowChannel1PhaseBase::validParams().

Member Data Documentation

◆ _area_function

FunctionName FlowChannelBase::_area_function
protected

Function describing the flow channel area.

Definition at line 216 of file FlowChannelBase.h.

Referenced by addCommonObjects(), getAreaFunctionName(), and init().

◆ _axial_region_names

const std::vector<std::string>& GeneratedMeshComponent::_axial_region_names
protectedinherited

◆ _closures_objects

std::vector<std::shared_ptr<ClosuresBase> > FlowChannelBase::_closures_objects
protected

Closures object(s)

Definition at line 219 of file FlowChannelBase.h.

Referenced by addMooseObjects(), check(), getClosuresObjects(), and init().

◆ _component_setup_status

EComponentSetupStatus Component::_component_setup_status
mutableprivateinherited

◆ _connections

std::map<Component1DConnection::EEndType, std::vector<Connection> > Component1D::_connections
protectedinherited

Map of end type to a list of connections.

Definition at line 79 of file Component1D.h.

Referenced by Component1D::buildMesh(), and Component1D::getConnections().

◆ _coord_sys

std::vector<Moose::CoordinateSystemType> Component::_coord_sys
protectedinherited

List of coordinate system for each subdomain.

Definition at line 515 of file Component.h.

Referenced by Component::getCoordSysTypes(), and Component::setSubdomainInfo().

◆ _dependencies

std::vector<std::string> Component::_dependencies
privateinherited

List of names of components that this component depends upon.

Definition at line 542 of file Component.h.

Referenced by Component::addDependency(), and Component::getDependencies().

◆ _dir

const RealVectorValue DiscreteLineSegmentInterface::_dir
protectedinherited

◆ _dir_unnormalized

const RealVectorValue& DiscreteLineSegmentInterface::_dir_unnormalized
protectedinherited

Unnormalized direction of axis from start position to end position.

Definition at line 98 of file DiscreteLineSegmentInterface.h.

◆ _dx_min

Real DiscreteLineSegmentInterface::_dx_min
inherited

◆ _elem_ids

std::vector<dof_id_type> Component::_elem_ids
protectedinherited

◆ _end_point

const Point DiscreteLineSegmentInterface::_end_point
protectedinherited

End point of line segment.

Definition at line 110 of file DiscreteLineSegmentInterface.h.

Referenced by DiscreteLineSegmentInterface::getEndPoint().

◆ _factory

Factory& Component::_factory
protectedinherited

The Factory associated with the MooseApp.

Definition at line 497 of file Component.h.

Referenced by HeatStructureBase::addAverageElementSizePostprocessor(), addCommonObjects(), HeatStructureBase::addConstantDensitySolidPropertiesMaterial(), FlowChannel1Phase::addFlowChannel1PhaseFunctorMaterial(), VolumeJunctionCoupledFlux1Phase::addFluxPostprocessor(), VolumeJunctionCoupledFlux1Phase::addFluxTransfer(), HeatTransferBase::addHeatedPerimeter(), HeatTransferFromTemperature1Phase::addHeatTransferKernels(), FlowChannel1PhaseBase::addHydraulicDiameterMaterial(), Component::addMaximumFunctorPostprocessor(), addMooseObjects(), FormLoss1PhaseBase::addMooseObjects(), FormLossFromExternalApp1Phase::addMooseObjects(), FormLossFromFunction1Phase::addMooseObjects(), FreeBoundary1Phase::addMooseObjects(), GateValve1Phase::addMooseObjects(), HeatSourceFromPowerDensity::addMooseObjects(), HeatSourceFromTotalPower::addMooseObjects(), HeatSourceVolumetric1Phase::addMooseObjects(), HeatStructure2DCoupler::addMooseObjects(), HeatStructure2DRadiationCouplerRZ::addMooseObjects(), HeatTransferBase::addMooseObjects(), HeatTransferFromExternalAppHeatFlux1Phase::addMooseObjects(), HeatTransferFromHeatFlux1Phase::addMooseObjects(), HeatTransferFromHeatStructure1Phase::addMooseObjects(), HeatTransferFromHeatStructure3D1Phase::addMooseObjects(), HeatTransferFromSpecifiedTemperature1Phase::addMooseObjects(), HSBoundaryAmbientConvection::addMooseObjects(), HSBoundaryExternalAppConvection::addMooseObjects(), HSBoundaryExternalAppHeatFlux::addMooseObjects(), HSBoundaryExternalAppTemperature::addMooseObjects(), HSBoundaryHeatFlux::addMooseObjects(), HSBoundaryRadiation::addMooseObjects(), HSBoundarySpecifiedTemperature::addMooseObjects(), HSCoupler2D2DRadiation::addMooseObjects(), HSCoupler2D3D::addMooseObjects(), InletDensityVelocity1Phase::addMooseObjects(), InletMassFlowRateTemperature1Phase::addMooseObjects(), InletStagnationPressureTemperature1Phase::addMooseObjects(), InletVelocityTemperature1Phase::addMooseObjects(), JunctionOneToOne1Phase::addMooseObjects(), Outlet1Phase::addMooseObjects(), Shaft::addMooseObjects(), ShaftConnectedCompressor1Phase::addMooseObjects(), ShaftConnectedMotor::addMooseObjects(), ShaftConnectedPump1Phase::addMooseObjects(), ShaftConnectedTurbine1Phase::addMooseObjects(), SimpleTurbine1Phase::addMooseObjects(), SolidWall1Phase::addMooseObjects(), SolidWallGasMix::addMooseObjects(), TotalPower::addMooseObjects(), VolumeJunction1Phase::addMooseObjects(), InletFunction1Phase::addMooseObjects(), Component::addMultiPostprocessorConvergence(), Component::addNonlinearStepFunctorMaterial(), FlowChannel1Phase::addNormalized1PhaseResidualNorm(), FlowChannel1Phase::addNumericalFluxVectorPostprocessor(), VolumeJunctionCoupledFlux1Phase::addPropertyPostprocessor(), VolumeJunctionCoupledFlux1Phase::addPropertyTransfer(), Component::addRelationshipManager(), HeatStructureBase::addResidualNormPostprocessor(), addVariables(), VolumeJunction1Phase::addVolumeJunctionIC(), VolumeJunctionCoupledFlux1Phase::addVolumeJunctionKernel(), FlowBoundary1Phase::addWeakBCs(), FlowBoundaryGasMix::addWeakBCs(), FlowChannel1PhaseBase::buildFlowModel(), VolumeJunction1Phase::buildVolumeJunctionUserObject(), JunctionParallelChannels1Phase::buildVolumeJunctionUserObject(), Pump1Phase::buildVolumeJunctionUserObject(), ShaftConnectedCompressor1Phase::buildVolumeJunctionUserObject(), ShaftConnectedPump1Phase::buildVolumeJunctionUserObject(), ShaftConnectedTurbine1Phase::buildVolumeJunctionUserObject(), and SimpleTurbine1Phase::buildVolumeJunctionUserObject().

◆ _flow_model

std::shared_ptr<FlowModel> FlowChannelBase::_flow_model
protected

The flow model used by this flow channel.

Definition at line 207 of file FlowChannelBase.h.

Referenced by addMooseObjects(), addVariables(), getFlowModel(), and init().

◆ _fp_name

const UserObjectName& FlowChannelBase::_fp_name
protected

◆ _gravity_angle

const Real FlowChannelBase::_gravity_angle
protected

Angle between orientation vector and gravity vector, in degrees.

Definition at line 213 of file FlowChannelBase.h.

Referenced by getGravityAngle().

◆ _gravity_direction

const RealVectorValue GravityInterface::_gravity_direction
protectedinherited

Gravitational acceleration unit direction.

Definition at line 36 of file GravityInterface.h.

◆ _gravity_is_zero

const bool GravityInterface::_gravity_is_zero
protectedinherited

Gravitational acceleration magnitude is zero?

Definition at line 34 of file GravityInterface.h.

◆ _gravity_magnitude

const Real GravityInterface::_gravity_magnitude
protectedinherited

Gravitational acceleration magnitude.

Definition at line 32 of file GravityInterface.h.

Referenced by GravityInterface::getGravityMagnitude().

◆ _gravity_vector

const RealVectorValue& GravityInterface::_gravity_vector
protectedinherited

Gravitational acceleration vector.

Definition at line 30 of file GravityInterface.h.

◆ _has_PoD

bool FlowChannelBase::_has_PoD
protected

True if user provides PoD.

Definition at line 233 of file FlowChannelBase.h.

◆ _heat_transfer_geom_to_enum

const std::map< std::string, FlowChannelBase::EConvHeatTransGeom > FlowChannelBase::_heat_transfer_geom_to_enum
static
Initial value:
{
{"PIPE", PIPE}, {"ROD_BUNDLE", ROD_BUNDLE}, {"HEX_ROD_BUNDLE", HEX_ROD_BUNDLE}}

Map of convective heat transfer geometry type to enum.

Definition at line 20 of file FlowChannelBase.h.

Referenced by getConvHeatTransGeometry().

◆ _heat_transfer_names

std::vector<std::string> FlowChannelBase::_heat_transfer_names
mutableprotected

◆ _HT_geometry

EConvHeatTransGeom FlowChannelBase::_HT_geometry
protected

Convective Heat transfer geometry.

Definition at line 227 of file FlowChannelBase.h.

Referenced by getHeatTransferGeometry().

◆ _Hw_1phase_names

std::vector<MaterialPropertyName> FlowChannelBase::_Hw_1phase_names
protected

1-phase wall heat transfer coefficient names for connected heat transfers

Definition at line 243 of file FlowChannelBase.h.

◆ _Hw_liquid_names

std::vector<MaterialPropertyName> FlowChannelBase::_Hw_liquid_names
protected

liquid wall heat transfer coefficient names for connected heat transfers

Definition at line 245 of file FlowChannelBase.h.

◆ _Hw_vapor_names

std::vector<MaterialPropertyName> FlowChannelBase::_Hw_vapor_names
protected

vapor wall heat transfer coefficient names for connected heat transfers

Definition at line 247 of file FlowChannelBase.h.

◆ _length

Real DiscreteLineSegmentInterface::_length
protectedinherited

◆ _lengths

std::vector<Real> DiscreteLineSegmentInterface::_lengths
protectedinherited

◆ _log

Logger& LoggingInterface::_log
protectedinherited

◆ _mesh

THMMesh& Component::_mesh
protectedinherited

The THM mesh TODO: make _mesh private (applications need to switch to getters to avoid breaking)

Definition at line 503 of file Component.h.

Referenced by Component::addRelationshipManager(), Component::constMesh(), and Component::mesh().

◆ _moose_object_name_dlsi

const std::string DiscreteLineSegmentInterface::_moose_object_name_dlsi
protectedinherited

Name of the MOOSE object.

Definition at line 136 of file DiscreteLineSegmentInterface.h.

Referenced by DiscreteLineSegmentInterface::computeAxialCoordinate().

◆ _n_elem

unsigned int DiscreteLineSegmentInterface::_n_elem
protectedinherited

◆ _n_elems

std::vector<unsigned int> DiscreteLineSegmentInterface::_n_elems
protectedinherited

◆ _n_heat_transfer_connections

unsigned int FlowChannelBase::_n_heat_transfer_connections
mutableprotected

◆ _n_sections

const unsigned int DiscreteLineSegmentInterface::_n_sections
protectedinherited

◆ _node_ids

std::vector<dof_id_type> Component::_node_ids
protectedinherited

◆ _node_locations

std::vector<Real> GeneratedMeshComponent::_node_locations
protectedinherited

◆ _nodeset_id

BoundaryID Component1D::_nodeset_id
privateinherited

Nodeset ID for all 1D component nodes.

Definition at line 85 of file Component1D.h.

Referenced by Component1D::buildMesh(), and Component1D::getNodesetID().

◆ _nodeset_name

BoundaryName Component1D::_nodeset_name
privateinherited

Nodeset name for all 1D component nodes.

Definition at line 87 of file Component1D.h.

Referenced by Component1D::buildMesh(), and Component1D::getNodesetName().

◆ _P_hf_names

std::vector<VariableName> FlowChannelBase::_P_hf_names
protected

heated perimeter names for connected heat transfers

Definition at line 249 of file FlowChannelBase.h.

Referenced by addMooseObjects(), addVariables(), getHeatedPerimeterNames(), and getHeatTransferVariableNames().

◆ _parent

Component* Component::_parent
protectedinherited

Pointer to a parent component (used in composed components)

Definition at line 489 of file Component.h.

Referenced by Component::cname(), Component::parent(), and Component::setSubdomainInfo().

◆ _pipe_location

EPipeLocation FlowChannelBase::_pipe_location
protected

Pipe location within the bundle.

Definition at line 229 of file FlowChannelBase.h.

Referenced by getPipeLocation().

◆ _pipe_location_to_enum

const std::map< std::string, FlowChannelBase::EPipeLocation > FlowChannelBase::_pipe_location_to_enum
static
Initial value:
{
{"INTERIOR", INTERIOR}, {"EDGE", EDGE}, {"CORNER", CORNER}}

Map of pipe location to enum.

Definition at line 26 of file FlowChannelBase.h.

Referenced by getPipeLocation().

◆ _pipe_pars_transferred

const bool& FlowChannelBase::_pipe_pars_transferred
protected

Definition at line 221 of file FlowChannelBase.h.

Referenced by addCommonObjects(), and FlowChannel1PhaseBase::addMooseObjects().

◆ _pipe_type_to_enum

const std::map< std::string, FlowChannelBase::EPipeType > FlowChannelBase::_pipe_type_to_enum
static
Initial value:
{
{"STRAIGHT", STRAIGHT}, {"CURVED", CURVED}, {"DOWNCOMER", DOWNCOMER}}

Map of pipe type to enum.

Definition at line 23 of file FlowChannelBase.h.

23{
24public:

Referenced by getPipeType().

◆ _PoD

const Real& FlowChannelBase::_PoD
protected

Pitch to diameter ratio for parallel bundle heat transfer.

Definition at line 231 of file FlowChannelBase.h.

◆ _position

const Point& DiscreteLineSegmentInterface::_position
protectedinherited

◆ _q_wall_names

std::vector<MaterialPropertyName> FlowChannelBase::_q_wall_names
protected

wall heat flux names for connected heat transfers

Definition at line 255 of file FlowChannelBase.h.

Referenced by addMooseObjects(), getHeatTransferVariableNames(), and getWallHeatFluxNames().

◆ _R

const RealTensorValue DiscreteLineSegmentInterface::_R
protectedinherited

Direction transformation tensor.

Definition at line 126 of file DiscreteLineSegmentInterface.h.

Referenced by DiscreteLineSegmentInterface::computeRealPointFromReferencePoint().

◆ _R_inv

const RealTensorValue DiscreteLineSegmentInterface::_R_inv
protectedinherited

Inverse direction transformation tensor.

Definition at line 131 of file DiscreteLineSegmentInterface.h.

Referenced by DiscreteLineSegmentInterface::computeReferencePointFromRealPoint().

◆ _rotation

const Real& DiscreteLineSegmentInterface::_rotation
protectedinherited

◆ _roughness

const Real& FlowChannelBase::_roughness
protected

Roughness of flow channel surface, [m].

Definition at line 224 of file FlowChannelBase.h.

◆ _Rx

const RealTensorValue DiscreteLineSegmentInterface::_Rx
protectedinherited

Rotational transformation tensor about x-axis.

Definition at line 128 of file DiscreteLineSegmentInterface.h.

Referenced by DiscreteLineSegmentInterface::computeRealPointFromReferencePoint().

◆ _Rx_inv

const RealTensorValue DiscreteLineSegmentInterface::_Rx_inv
protectedinherited

Inverse rotational transformation tensor about x-axis.

Definition at line 133 of file DiscreteLineSegmentInterface.h.

Referenced by DiscreteLineSegmentInterface::computeReferencePointFromRealPoint().

◆ _section_end

std::vector<Real> DiscreteLineSegmentInterface::_section_end
protectedinherited

Axial coordinate of the end of each axial section using the line 'position' as the origin.

Definition at line 120 of file DiscreteLineSegmentInterface.h.

Referenced by DiscreteLineSegmentInterface::DiscreteLineSegmentInterface(), and DiscreteLineSegmentInterface::getAxialSectionIndex().

◆ _sim

THMProblem& Component::_sim
protectedinherited

THM problem this component is part of TODO: make _sim private (applications need to switch to getters to avoid breaking).

Also, rename to "_thm_problem" at that point.

Definition at line 494 of file Component.h.

Referenced by Component::checkComponentExistsByName(), Component::checkComponentOfTypeExistsByName(), Component::getComponentByName(), Component::getTHMProblem(), and Component::hasComponentByName().

◆ _subdomain_ids

std::vector<SubdomainID> Component::_subdomain_ids
protectedinherited

List of subdomain IDs this components owns.

Definition at line 511 of file Component.h.

Referenced by Component2D::build2DMesh(), Component2D::build2DMesh2ndOrder(), and Component::setSubdomainInfo().

◆ _subdomain_names

std::vector<SubdomainName> Component::_subdomain_names
protectedinherited

List of subdomain names this components owns.

Definition at line 513 of file Component.h.

Referenced by Component::getSubdomainNames(), and Component::setSubdomainInfo().

◆ _T_wall_mat_names

std::vector<MaterialPropertyName> FlowChannelBase::_T_wall_mat_names
protected

wall temperature material names for connected heat transfers

Definition at line 253 of file FlowChannelBase.h.

Referenced by getHeatTransferVariableNames(), and getWallTemperatureMatNames().

◆ _T_wall_names

std::vector<VariableName> FlowChannelBase::_T_wall_names
protected

wall temperature auxvariable names for connected heat transfers

Definition at line 251 of file FlowChannelBase.h.

Referenced by getHeatTransferVariableNames(), and getWallTemperatureNames().

◆ _temperature_mode

bool FlowChannelBase::_temperature_mode
protected

True if there is one or more sources specified by wall temperature.

Definition at line 236 of file FlowChannelBase.h.

Referenced by addMooseObjects(), check(), getTemperatureMode(), and initSecondary().

◆ _x_centers

std::vector<Real> DiscreteLineSegmentInterface::_x_centers
protectedinherited

Center axial coordinate of each axial element.

Definition at line 123 of file DiscreteLineSegmentInterface.h.

Referenced by DiscreteLineSegmentInterface::DiscreteLineSegmentInterface(), and DiscreteLineSegmentInterface::getAxialElementIndex().

◆ _zero

const Real& Component::_zero
protectedinherited

Definition at line 499 of file Component.h.


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