24 _junction_uo_name(genName(
name(),
"junction_uo"))
35 std::vector<UserObjectName> fp_names;
36 std::vector<THM::FlowModelID> flow_model_ids;
39 const std::string comp_name = connection._component_name;
40 if (hasComponentByName<FlowChannelBase>(comp_name))
50 if (fp_names.size() > 0)
52 checkAllConnectionsHaveSame<UserObjectName>(fp_names,
"fluid properties object");
55 checkAllConnectionsHaveSame<THM::FlowModelID>(flow_model_ids,
"flow model ID");
58 if (hasComponentByName<FlowChannelBase>(
_connections[0]._component_name))
61 getComponentByName<FlowChannelBase>(
_connections[0]._component_name);
74 checkComponentOfTypeExistsByName<FlowChannelBase>(comp_name);
std::vector< std::string > _connected_component_names
Vector of connected component names.
std::vector< Connection > _connections
Vector of connections of this component.
Base class for junctions of 1D components.
virtual void check() const override
Check the component integrity.
static InputParameters validParams()
virtual void init()
Initializes the component.
THMProblem & getTHMProblem() const
Gets the THM problem.
@ INITIALIZED_PRIMARY
mesh set up, called primary init
void checkSetupStatus(const EComponentSetupStatus &status) const
Throws an error if the supplied setup status of this component has not been reached.
A base class for flow channels.
const UserObjectName & getFluidPropertiesName() const
Gets the name of the fluid properties user object for this component.
virtual std::shared_ptr< const FlowModel > getFlowModel() const
virtual const THM::FlowModelID & getFlowModelID() const =0
Gets the flow model ID.
FlowJunction(const InputParameters ¶ms)
static InputParameters validParams()
virtual void init() override
Initializes the component.
THM::FlowModelID _flow_model_id
Flow model ID.
std::shared_ptr< const FlowModel > _flow_model
Flow model.
virtual void check() const override
Check the component integrity.
const UserObjectName & getFluidPropertiesName() const
Gets the name of fluid properties used in all flow connections.
UserObjectName _fp_name
Fluid property user object name.
const T & getComponentByName(const std::string &name) const
Get component by its name.