https://mooseframework.inl.gov
FVRadiativeHeatFluxBCBase.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 "MathUtils.h"
12 
15 {
17  params.addCoupledVar("temperature", "temperature variable");
18  params.addParam<Real>("stefan_boltzmann_constant", 5.670367e-8, "The Stefan-Boltzmann constant.");
19  params.addRequiredParam<MooseFunctorName>("Tinfinity",
20  "Temperature of the body in radiative heat transfer.");
21  params.addClassDescription("Boundary condition for radiative heat flux where temperature and the"
22  "temperature of a body in radiative heat transfer are specified.");
23  return params;
24 }
25 
27  : FVFluxBC(parameters),
28  _T(isParamValid("temperature") ? adCoupledValue("temperature") : _u),
29  _sigma_stefan_boltzmann(getParam<Real>("stefan_boltzmann_constant")),
30  _tinf(getFunctor<ADReal>("Tinfinity"))
31 {
32  if (!isParamValid("temperature"))
34 }
35 
36 ADReal
38 {
39  const auto T4 = Utility::pow<4>(_T[_qp]);
40  const auto T4inf = Utility::pow<4>(_tinf(singleSidedFaceArg(_face_info), determineState()));
41  return _sigma_stefan_boltzmann * coefficient() * (T4 - T4inf);
42 }
const ADVariableValue & _T
temperature variable
const FaceInfo * _face_info
FVRadiativeHeatFluxBCBase(const InputParameters &parameters)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static InputParameters validParams()
Moose::StateArg determineState() const
Moose::FaceArg singleSidedFaceArg(const FaceInfo *fi=nullptr, Moose::FV::LimiterType limiter_type=Moose::FV::LimiterType::CentralDifference, bool correct_skewness=false, const Moose::StateArg *state_limiter=nullptr) const
MooseVariableFV< Real > & _var
DualNumber< Real, DNDerivativeType, true > ADReal
void addRequiredParam(const std::string &name, const std::string &doc_string)
bool isParamValid(const std::string &name) const
const unsigned int _qp
void addCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real _sigma_stefan_boltzmann
Stefan-Boltzmann constant.
const Moose::Functor< ADReal > & _tinf
Function describing the temperature of the body completely surrounding the surface, e.g.
void addClassDescription(const std::string &doc_string)
virtual Real coefficient() const =0
qdot = sigma * coeff * (T^4 - Tinf^4 ) sigma: _sigma_stefan_boltzmann coeff: coefficient() coefficien...
static InputParameters validParams()
virtual void requireQpComputations() const