www.mooseframework.org
RadiativeHeatFluxBCBase.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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.addParam<FunctionName>(
21  "Tinfinity", "0", "Temperature of the body in radiative heat transfer.");
22  params.addParam<Real>("boundary_emissivity", 1, "Emissivity of the boundary.");
23  params.addClassDescription("Boundary condition for radiative heat flux where temperature and the"
24  "temperature of a body in radiative heat transfer are specified.");
25  return params;
26 }
27 
28 template <bool is_ad>
30  const InputParameters & parameters)
31  : GenericIntegratedBC<is_ad>(parameters),
32  _sigma_stefan_boltzmann(this->template getParam<Real>("stefan_boltzmann_constant")),
33  _tinf(getFunction("Tinfinity")),
34  _eps_boundary(this->template getParam<Real>("boundary_emissivity"))
35 {
36 }
37 
38 template <bool is_ad>
41 {
42  GenericReal<is_ad> T4 = MathUtils::pow(_u[_qp], 4);
43  GenericReal<is_ad> T4inf = MathUtils::pow(_tinf.value(_t, _q_point[_qp]), 4);
44  return _test[_i][_qp] * _sigma_stefan_boltzmann * coefficient() * (T4 - T4inf);
45 }
46 
47 template <>
48 Real
50 {
51  Real T3 = MathUtils::pow(_u[_qp], 3);
52  return 4 * _sigma_stefan_boltzmann * _test[_i][_qp] * coefficient() * T3 * _phi[_j][_qp];
53 }
54 
55 template <>
56 Real
58 {
59  return 0;
60 }
61 
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()
virtual GenericReal< is_ad > computeQpResidual()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
typename Moose::GenericType< Real, is_ad > GenericReal
T pow(T x, int e)
Boundary condition for radiative heat flux where temperature and the temperature of a body in radiati...