https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
14template <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
27template <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
36template <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
45template <>
46Real
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
53template <>
54Real
59
Moose::GenericType< Real, is_ad > GenericReal
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Boundary condition for radiative heat flux where temperature and the temperature of a body in radiati...
RadiativeHeatFluxBCBaseTempl(const InputParameters &parameters)
virtual Real computeQpJacobian()
virtual GenericReal< is_ad > computeQpResidual()
static InputParameters validParams()
T pow(T x, int e)