https://mooseframework.inl.gov
HSBoundaryExternalAppTemperature.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 
11 #include "HeatConductionModel.h"
12 #include "HeatStructureInterface.h"
13 #include "GeometricalComponent.h"
14 
16 
19 {
21  params.addParam<VariableName>(
22  "T_ext",
23  "T_ext",
24  "Name of the variable that will store the values computed by the external application");
25  params.addClassDescription("Heat structure boundary condition to set temperature values computed "
26  "by an external application");
27  return params;
28 }
29 
31  : HSBoundary(params), _T_ext_var_name(getParam<VariableName>("T_ext"))
32 {
33 }
34 
35 void
37 {
38  const HeatStructureInterface & hs = getComponent<HeatStructureInterface>("hs");
39  const std::vector<SubdomainName> & subdomain_names =
41 
43  false, _T_ext_var_name, HeatConductionModel::feType(), subdomain_names);
44 }
45 
46 void
48 {
49  {
50  std::string class_name = "ADMatchedValueBC";
51  InputParameters pars = _factory.getValidParams(class_name);
52  pars.set<NonlinearVariableName>("variable") = HeatConductionModel::TEMPERATURE;
53  pars.set<std::vector<BoundaryName>>("boundary") = _boundary;
54  pars.set<std::vector<VariableName>>("v") = {_T_ext_var_name};
55  getTHMProblem().addBoundaryCondition(class_name, genName(name(), "bc"), pars);
56  }
57 }
Heat structure boundary condition to set temperature values computed by an external application...
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.
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
THMProblem & getTHMProblem() const
Gets the THM problem.
Definition: Component.C:135
T & set(const std::string &name, bool quiet_mode=false)
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)
void addSimVariable(bool nl, const VariableName &name, libMesh::FEType fe_type, Real scaling_factor=1.0)
Queues a variable of type MooseVariableScalar to be added to the nonlinear or aux system...
Definition: Simulation.C:271
HSBoundaryExternalAppTemperature(const InputParameters &params)
const std::vector< BoundaryName > & _boundary
Boundary names for which the boundary component applies.
Definition: HSBoundary.h:56
static const std::string TEMPERATURE
registerMooseObject("ThermalHydraulicsApp", HSBoundaryExternalAppTemperature)
Interface class for heat structure components.
const VariableName & _T_ext_var_name
The variable name that stores the values of temperature computed by an external application.
static const libMesh::FEType & feType()
Get the FE type used for heat conduction.
static InputParameters validParams()
Definition: HSBoundary.C:15
Factory & _factory
The Factory associated with the MooseApp.
Definition: Component.h:446
const GeometricalComponent & getGeometricalComponent() const
Gets the geometrical component inheriting from this interface.
void addClassDescription(const std::string &doc_string)
virtual const std::vector< SubdomainName > & getSubdomainNames() const
Gets the subdomain names for this component.
Definition: Component.C:307
Base class for heat structure boundary components.
Definition: HSBoundary.h:18