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 "HeatStructure2DCouplerBC.h" 11 : #include "Function.h" 12 : 13 : registerMooseObject("ThermalHydraulicsApp", HeatStructure2DCouplerBC); 14 : 15 : InputParameters 16 170 : HeatStructure2DCouplerBC::validParams() 17 : { 18 170 : InputParameters params = HeatStructure2DCouplerBCBase::validParams(); 19 : 20 340 : params.addRequiredParam<FunctionName>("heat_transfer_coefficient", 21 : "Heat transfer coefficient function"); 22 340 : params.addRequiredParam<Real>("coupling_area_fraction", "Coupling area fraction"); 23 : 24 170 : params.addClassDescription("Applies BC for HeatStructure2DCoupler for plate heat structure"); 25 : 26 170 : return params; 27 0 : } 28 : 29 90 : HeatStructure2DCouplerBC::HeatStructure2DCouplerBC(const InputParameters & parameters) 30 : : HeatStructure2DCouplerBCBase(parameters), 31 : 32 90 : _htc(getFunction("heat_transfer_coefficient")), 33 270 : _coupling_area_fraction(getParam<Real>("coupling_area_fraction")) 34 : { 35 90 : } 36 : 37 : ADReal 38 100000 : HeatStructure2DCouplerBC::computeQpResidual() 39 : { 40 100000 : const auto T_coupled = computeCoupledTemperature(); 41 200000 : return _htc.value(_t, _q_point[_qp]) * (_u[_qp] - T_coupled) * _coupling_area_fraction * 42 100000 : _test[_i][_qp]; 43 : }