https://mooseframework.inl.gov
ConvectiveHeatFluxBC.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 
10 #include "ConvectiveHeatFluxBC.h"
11 
12 registerMooseObject("HeatTransferApp", ConvectiveHeatFluxBC);
13 
16 {
18  params.addClassDescription(
19  "Convective heat transfer boundary condition with temperature and heat "
20  "transfer coefficent given by material properties.");
21  params.addRequiredParam<MaterialPropertyName>("T_infinity",
22  "Material property for far-field temperature");
23  params.addRequiredParam<MaterialPropertyName>("heat_transfer_coefficient",
24  "Material property for heat transfer coefficient");
25  params.addParam<MaterialPropertyName>(
26  "heat_transfer_coefficient_dT",
27  "0",
28  "Material property for derivative of heat transfer coefficient with respect to temperature");
29 
30  return params;
31 }
32 
34  : IntegratedBC(parameters),
35  _T_infinity(getMaterialProperty<Real>("T_infinity")),
36  _htc(getMaterialProperty<Real>("heat_transfer_coefficient")),
37  _htc_dT(getMaterialProperty<Real>("heat_transfer_coefficient_dT"))
38 {
39 }
40 
41 Real
43 {
44  return -_test[_i][_qp] * _htc[_qp] * (_T_infinity[_qp] - _u[_qp]);
45 }
46 
47 Real
49 {
50  return -_test[_i][_qp] * _phi[_j][_qp] *
51  (-_htc[_qp] + _htc_dT[_qp] * (_T_infinity[_qp] - _u[_qp]));
52 }
const VariableTestValue & _test
unsigned int _j
const MaterialProperty< Real > & _T_infinity
Far-field temperature variable.
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
const MaterialProperty< Real > & _htc_dT
Derivative of convective heat transfer coefficient with respect to temperature.
virtual Real computeQpJacobian() override
static InputParameters validParams()
unsigned int _i
const VariablePhiValue & _phi
void addRequiredParam(const std::string &name, const std::string &doc_string)
unsigned int _qp
registerMooseObject("HeatTransferApp", ConvectiveHeatFluxBC)
static InputParameters validParams()
ConvectiveHeatFluxBC(const InputParameters &parameters)
const MaterialProperty< Real > & _htc
Convective heat transfer coefficient.
Boundary condition for convective heat flux where temperature and heat transfer coefficient are given...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
virtual Real computeQpResidual() override
const VariableValue & _u