https://mooseframework.inl.gov
FlowBoundary.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "FlowBoundary.h"
11 #include "FlowChannelBase.h"
12 
15 {
17  return params;
18 }
19 
21  : Component1DBoundary(params), _flow_model_id(THM::FM_INVALID)
22 {
23 }
24 
25 void
27 {
29 
30  if (_connections.size() == 1)
31  if (hasComponentByName<FlowChannelBase>(_connected_component_name))
32  {
33  const FlowChannelBase & comp =
35 
38  _flow_model = comp.getFlowModel();
39  }
40 }
41 
42 void
44 {
46 
47  checkComponentOfTypeExistsByName<FlowChannelBase>(_connected_component_name);
48 }
49 
50 const UserObjectName &
52 {
54 
55  return _fp_name;
56 }
virtual void init() override
Initializes the component.
static InputParameters validParams()
static InputParameters validParams()
Definition: FlowBoundary.C:14
THMProblem & getTHMProblem() const
Gets the THM problem.
Definition: Component.C:135
std::vector< Connection > _connections
Vector of connections of this component.
A base class for flow channels.
THM::FlowModelID _flow_model_id
Flow model ID.
Definition: FlowBoundary.h:34
virtual std::shared_ptr< const FlowModel > getFlowModel() const
virtual void check() const override
Check the component integrity.
Definition: FlowBoundary.C:43
mesh set up, called primary init
Definition: Component.h:40
FlowModelID FM_INVALID
virtual void check() const override
Check the component integrity.
std::string _connected_component_name
Name of the connected component.
const T & getComponentByName(const std::string &name) const
Get component by its name.
Definition: Simulation.h:504
const UserObjectName & getFluidPropertiesName() const
Gets the name of fluid properties used in all flow connections.
Definition: FlowBoundary.C:51
std::shared_ptr< const FlowModel > _flow_model
Flow model.
Definition: FlowBoundary.h:36
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
Base class for boundary components connected to 1D components.
UserObjectName _fp_name
Fluid property user object name.
Definition: FlowBoundary.h:38
FlowBoundary(const InputParameters &params)
Definition: FlowBoundary.C:20
virtual const THM::FlowModelID & getFlowModelID() const =0
Gets the flow model ID.
virtual void init() override
Initializes the component.
Definition: FlowBoundary.C:26
const UserObjectName & getFluidPropertiesName() const
Gets the name of the fluid properties user object for this component.