https://mooseframework.inl.gov
Loading...
Searching...
No Matches
InletFunction1Phase.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 "InletFunction1Phase.h"
11
12registerMooseObject("ThermalHydraulicsTestApp", InletFunction1Phase);
13
16{
18
19 params.addClassDescription("1-phase inlet with all variables prescribed by functions.");
20
21 params.addRequiredParam<FunctionName>("rho", "Prescribed density [kg/m^3]");
22 params.addRequiredParam<FunctionName>("vel", "Prescribed velocity [m/s]");
23 params.addRequiredParam<FunctionName>("p", "Prescribed pressure [Pa]");
24
25 return params;
26}
27
32
33void
35{
38
39 // boundary flux user object
40 {
41 const std::string class_name = "BoundaryFlux3EqnFunction";
42 InputParameters params = _factory.getValidParams(class_name);
43 params.set<FunctionName>("rho") = getParam<FunctionName>("rho");
44 params.set<FunctionName>("vel") = getParam<FunctionName>("vel");
45 params.set<FunctionName>("p") = getParam<FunctionName>("p");
46 params.set<UserObjectName>("fluid_properties") = _fp_name;
47 params.set<ExecFlagEnum>("execute_on") = execute_on;
48 getTHMProblem().addUserObject(class_name, _boundary_uo_name, params);
49 }
50
51 // BCs
52 addWeakBCs();
53}
registerMooseObject("ThermalHydraulicsTestApp", InletFunction1Phase)
const ExecFlagType EXEC_INITIAL
const ExecFlagType EXEC_LINEAR
const ExecFlagType EXEC_NONLINEAR
THMProblem & getTHMProblem() const
Gets the THM problem.
Definition Component.C:135
Factory & _factory
The Factory associated with the MooseApp.
Definition Component.h:497
virtual std::vector< std::shared_ptr< UserObject > > addUserObject(const std::string &user_object_name, const std::string &name, InputParameters &parameters)
InputParameters getValidParams(const std::string &name) const
const UserObjectName _boundary_uo_name
Name of boundary user object name.
Base class for boundary components connected to FlowChannel1Phase components.
static InputParameters validParams()
virtual void addWeakBCs()
Creates the boundary condition objects for 1-phase flow.
UserObjectName _fp_name
Fluid property user object name.
1-phase inlet with all variables prescribed by functions.
virtual void addMooseObjects() override
InletFunction1Phase(const InputParameters &params)
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
ExecFlagEnum getDefaultExecFlagEnum()