https://mooseframework.inl.gov
RadiativeHeatFluxBCBase.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 "Function.h"
12 #include "MathUtils.h"
13 
14 template <bool is_ad>
17 {
19  params.addParam<Real>("stefan_boltzmann_constant", 5.670367e-8, "The Stefan-Boltzmann constant.");
20  params.addRequiredParam<FunctionName>("Tinfinity",
21  "Temperature of the body in radiative heat transfer.");
22  params.addClassDescription("Boundary condition for radiative heat flux where temperature and the"
23  "temperature of a body in radiative heat transfer are specified.");
24  return params;
25 }
26 
27 template <bool is_ad>
29  const InputParameters & parameters)
30  : GenericIntegratedBC<is_ad>(parameters),
31  _sigma_stefan_boltzmann(this->template getParam<Real>("stefan_boltzmann_constant")),
32  _tinf(getFunction("Tinfinity"))
33 {
34 }
35 
36 template <bool is_ad>
39 {
40  GenericReal<is_ad> T4 = MathUtils::pow(_u[_qp], 4);
41  GenericReal<is_ad> T4inf = MathUtils::pow(_tinf.value(_t, _q_point[_qp]), 4);
42  return _test[_i][_qp] * _sigma_stefan_boltzmann * coefficient() * (T4 - T4inf);
43 }
44 
45 template <>
46 Real
48 {
49  Real T3 = MathUtils::pow(_u[_qp], 3);
50  return 4 * _sigma_stefan_boltzmann * _test[_i][_qp] * coefficient() * T3 * _phi[_j][_qp];
51 }
52 
53 template <>
54 Real
56 {
57  return 0;
58 }
59 
Moose::GenericType< Real, is_ad > GenericReal
virtual Real computeQpJacobian()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
RadiativeHeatFluxBCBaseTempl(const InputParameters &parameters)
static InputParameters validParams()
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
virtual GenericReal< is_ad > computeQpResidual()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
T pow(T x, int e)
Boundary condition for radiative heat flux where temperature and the temperature of a body in radiati...