38 if (connected_elems.size() == 2)
51 bool slope_reconstruction_used =
false;
54 const std::string & comp_name = connection._component_name;
55 if (hasComponentByName<FlowChannel1Phase>(comp_name))
57 const FlowChannel1Phase & comp = getComponentByName<FlowChannel1Phase>(comp_name);
58 slope_reconstruction_used =
62 if (slope_reconstruction_used)
63 logWarning(
"Currently GateValve1Phase cannot perform slope reconstruction across the " 64 "junction, so the slopes on the adjacent elements will be zero.");
75 const std::string class_name =
"ADGateValve1PhaseUserObject";
78 params.
set<std::vector<Real>>(
"normals") =
_normals;
83 params.
set<
Real>(
"open_area_fraction") = getParam<Real>(
"open_area_fraction");
88 params.
set<std::string>(
"component_name") =
name();
95 const std::vector<NonlinearVariableName> var_names = {
100 for (std::size_t
j = 0;
j < var_names.size();
j++)
102 const std::string class_name =
"ADGateValve1PhaseBC";
106 params.
set<NonlinearVariableName>(
"variable") = var_names[
j];
108 params.
set<
unsigned int>(
"connection_index") = i;
116 class_name,
genName(
name(), i, var_names[
j] +
":" + class_name), params);
static const std::string AREA_LINEAR
GateValve1Phase(const InputParameters ¶ms)
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.
const std::vector< processor_id_type > & getConnectedProcessorIDs()
Gets the processor IDs of the connected 1D components.
static const std::string AREA
THMProblem & getTHMProblem() const
Gets the THM problem.
virtual void setupMesh() override
Performs mesh setup such as creating mesh or naming mesh sets.
const MooseEnum & getSlopeReconstruction() const
Gets the slope reconstruction option used.
InputParameters getValidParams(const std::string &name) const
void logWarning(Args &&... args) const
Logs a warning.
virtual void setupMesh() override
Performs mesh setup such as creating mesh or naming mesh sets.
Gate valve component for 1-phase flow.
std::vector< BoundaryName > _boundary_names
Boundary names of connected components.
static InputParameters validParams()
virtual const std::string & name() const
virtual void addBoundaryCondition(const std::string &bc_name, const std::string &name, InputParameters ¶meters)
registerMooseObject("ThermalHydraulicsApp", GateValve1Phase)
ExecFlagEnum getDefaultExecFlagEnum()
virtual void check() const override
Check the component integrity.
Single-component, single-phase flow channel.
const std::vector< dof_id_type > & getConnectedElementIDs()
Gets the element IDs of the connected 1D components.
static const std::string RHOUA
std::vector< UserObjectName > _numerical_flux_names
static const std::string RHOA
void checkNumberOfConnections(const unsigned int &n_connections) const
Checks that the number of connections is equal to the supplied value.
const ExecFlagType EXEC_LINEAR
const ExecFlagType EXEC_NONLINEAR
static InputParameters validParams()
virtual void check() const override
Check the component integrity.
const std::string _junction_uo_name
Name of junction user object name, if any.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Base class for 1-phase flow junctions.
Factory & _factory
The Factory associated with the MooseApp.
void connectObject(const InputParameters ¶ms, const std::string &mooseName, const std::string &name) const
Connect with control logic.
virtual std::vector< std::shared_ptr< UserObject > > addUserObject(const std::string &user_object_name, const std::string &name, InputParameters ¶meters)
const std::vector< Connection > & getConnections() const
Returns the vector of connections of this component.
const bool & getImplicitTimeIntegrationFlag()
Gets the flag indicating whether an implicit time integration scheme is being used.
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
static const std::string RHOEA
std::vector< Real > _normals
Outward normals associated with connected components.
virtual void augmentSparsity(const dof_id_type &elem_id1, const dof_id_type &elem_id2)
Hint how to augment sparsity pattern between two elements.
virtual void addMooseObjects() override
const ExecFlagType EXEC_INITIAL