Line data Source code
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 "HSBoundarySpecifiedTemperature.h" 11 : #include "HeatConductionModel.h" 12 : 13 : registerMooseObject("ThermalHydraulicsApp", HSBoundarySpecifiedTemperature); 14 : 15 : InputParameters 16 394 : HSBoundarySpecifiedTemperature::validParams() 17 : { 18 394 : InputParameters params = HSBoundary::validParams(); 19 : 20 788 : params.addRequiredParam<FunctionName>("T", "Prescribed temperature [K]"); 21 : 22 394 : params.addClassDescription("Applies Dirichlet boundary conditions on a heat structure"); 23 : 24 394 : return params; 25 0 : } 26 : 27 196 : HSBoundarySpecifiedTemperature::HSBoundarySpecifiedTemperature(const InputParameters & params) 28 : : HSBoundary(params), 29 : 30 392 : _T_func(getParam<FunctionName>("T")) 31 : { 32 196 : } 33 : 34 : void 35 178 : HSBoundarySpecifiedTemperature::addMooseObjects() 36 : { 37 : { 38 178 : std::string class_name = "ADFunctionDirichletBC"; 39 178 : InputParameters pars = _factory.getValidParams(class_name); 40 356 : pars.set<NonlinearVariableName>("variable") = HeatConductionModel::TEMPERATURE; 41 178 : pars.set<std::vector<BoundaryName>>("boundary") = _boundary; 42 178 : pars.set<FunctionName>("function") = _T_func; 43 356 : getTHMProblem().addBoundaryCondition(class_name, genName(name(), "bc"), pars); 44 178 : } 45 178 : }