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 "ExternalAppConvectionHeatTransferBC.h" 11 : 12 : registerMooseObject("ThermalHydraulicsApp", ExternalAppConvectionHeatTransferBC); 13 : 14 : InputParameters 15 20 : ExternalAppConvectionHeatTransferBC::validParams() 16 : { 17 20 : InputParameters params = IntegratedBC::validParams(); 18 : 19 40 : params.addRequiredCoupledVar("T_ext", "Temperature from external application"); 20 40 : params.addRequiredCoupledVar("htc_ext", "Heat transfer coefficient from external application"); 21 40 : params.addParam<PostprocessorName>( 22 40 : "scale_pp", 1.0, "Post-processor by which to scale boundary condition"); 23 : 24 20 : params.addClassDescription("Convection BC from an external application"); 25 : 26 20 : return params; 27 0 : } 28 : 29 10 : ExternalAppConvectionHeatTransferBC::ExternalAppConvectionHeatTransferBC( 30 10 : const InputParameters & parameters) 31 : : IntegratedBC(parameters), 32 : 33 10 : _T_ext(coupledValue("T_ext")), 34 10 : _htc_ext(coupledValue("htc_ext")), 35 20 : _scale_pp(getPostprocessorValue("scale_pp")) 36 : { 37 10 : } 38 : 39 : Real 40 720 : ExternalAppConvectionHeatTransferBC::computeQpResidual() 41 : { 42 720 : return _scale_pp * _htc_ext[_qp] * (_u[_qp] - _T_ext[_qp]) * _test[_i][_qp]; 43 : } 44 : 45 : Real 46 320 : ExternalAppConvectionHeatTransferBC::computeQpJacobian() 47 : { 48 320 : return _scale_pp * _htc_ext[_qp] * _phi[_j][_qp] * _test[_i][_qp]; 49 : }