https://mooseframework.inl.gov
FlowBoundary1Phase.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 "FlowBoundary1Phase.h"
11 #include "FlowChannel1Phase.h"
12 #include "THMNames.h"
13 
16 {
18  return params;
19 }
20 
22  : FlowBoundary1PhaseBase(params)
23 {
24 }
25 
26 void
28 {
30 
31  checkComponentOfTypeExistsByName<FlowChannel1Phase>(_connected_component_name);
32 }
33 
34 void
36 {
37  const std::string class_name = "ADBoundaryFlux3EqnBC";
38  InputParameters params = _factory.getValidParams(class_name);
39  params.set<std::vector<BoundaryName>>("boundary") = getBoundaryNames();
40  params.set<Real>("normal") = _normal;
41  params.set<UserObjectName>("boundary_flux") = _boundary_uo_name;
42  params.set<std::vector<VariableName>>("A_linear") = {THM::AREA_LINEAR};
43  params.set<std::vector<VariableName>>("rhoA") = {THM::RHOA};
44  params.set<std::vector<VariableName>>("rhouA") = {THM::RHOUA};
45  params.set<std::vector<VariableName>>("rhoEA") = {THM::RHOEA};
46  params.set<bool>("implicit") = getTHMProblem().getImplicitTimeIntegrationFlag();
47 
48  const std::vector<NonlinearVariableName> variables{THM::RHOA, THM::RHOUA, THM::RHOEA};
49 
50  for (const auto & var : variables)
51  {
52  params.set<NonlinearVariableName>("variable") = var;
54  class_name, genName(name(), var, "bnd_flux_3eqn_bc"), params);
55  }
56 }
static InputParameters validParams()
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.
static const std::string RHOEA
Definition: THMNames.h:30
THMProblem & getTHMProblem() const
Gets the THM problem.
Definition: Component.C:135
T & set(const std::string &name, bool quiet_mode=false)
const std::vector< BoundaryName > & getBoundaryNames() const
Gets the boundary names for this component.
Real _normal
Outward normal on this boundary.
static InputParameters validParams()
InputParameters getValidParams(const std::string &name) const
virtual const std::string & name() const
virtual void addBoundaryCondition(const std::string &bc_name, const std::string &name, InputParameters &parameters)
static const std::string AREA_LINEAR
Definition: THMNames.h:15
const UserObjectName _boundary_uo_name
Name of boundary user object name.
virtual void check() const override
Check the component integrity.
Definition: FlowBoundary.C:43
FlowBoundary1Phase(const InputParameters &params)
std::string _connected_component_name
Name of the connected component.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Base class for boundary components connected to FlowChannel1PhaseBase components. ...
Factory & _factory
The Factory associated with the MooseApp.
Definition: Component.h:446
virtual void check() const override
Check the component integrity.
const bool & getImplicitTimeIntegrationFlag()
Gets the flag indicating whether an implicit time integration scheme is being used.
Definition: Simulation.h:329
static const std::string RHOUA
Definition: THMNames.h:31
virtual void addWeakBCs()
Creates the boundary condition objects for 1-phase flow.
static const std::string RHOA
Definition: THMNames.h:29