https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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"
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
35void
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
46void
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}
registerMooseObject("ThermalHydraulicsApp", HSBoundaryExternalAppTemperature)
const std::string name
Definition Setup.h:21
virtual const std::vector< SubdomainName > & getSubdomainNames() const
Gets the subdomain names for this component.
Definition Component.C:345
THMProblem & getTHMProblem() const
Gets the THM problem.
Definition Component.C:135
Factory & _factory
The Factory associated with the MooseApp.
Definition Component.h:497
virtual void addBoundaryCondition(const std::string &bc_name, const std::string &name, InputParameters &parameters)
InputParameters getValidParams(const std::string &name) const
Heat structure boundary condition to set temperature values computed by an external application.
HSBoundaryExternalAppTemperature(const InputParameters &params)
const VariableName & _T_ext_var_name
The variable name that stores the values of temperature computed by an external application.
Base class for heat structure boundary components.
Definition HSBoundary.h:19
const std::vector< BoundaryName > & _boundary
Boundary names for which the boundary component applies.
Definition HSBoundary.h:56
static InputParameters validParams()
Definition HSBoundary.C:15
static const libMesh::FEType & feType()
Get the FE type used for heat conduction.
static const std::string TEMPERATURE
Interface class for heat structure components.
const GeometricalComponent & getGeometricalComponent() const
Gets the geometrical component inheriting from this interface.
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
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 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