https://mooseframework.inl.gov
LinearFVFunctorRadiativeBC.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 
14 
17 {
19  params.addClassDescription(
20  "Boundary condition for radiative heat flux in a linear finite volume system. "
21  "The nonlinear radiative flux q = sigma * emissivity * (T^4 - Tinfinity^4) is "
22  "linearized via first-order Taylor expansion around the extrapolated boundary face "
23  "temperature from the previous iteration, yielding a Robin-type condition with "
24  "second-order spatial accuracy. The lagged coefficients are updated on every linear system "
25  "assembly. Fixed point iterations can be used to converge the nonlinear problem every time "
26  "step.");
27  params.addRequiredParam<MooseFunctorName>(
28  "emissivity",
29  "Functor describing the surface emissivity for the radiative boundary condition");
30  params.addRequiredParam<MooseFunctorName>(
31  "Tinfinity", "Functor for the far-field temperature of the body in radiative heat transfer");
32  params.addParam<Real>(
33  "stefan_boltzmann_constant", 5.670374419e-8, "The Stefan-Boltzmann constant");
34  params.addRequiredParam<MooseFunctorName>(
35  "diffusion_coeff",
36  "Functor for the thermal conductivity. Must match the diffusion_coeff used in "
37  "LinearFVDiffusion, as it serves as the alpha coefficient in the Robin formulation.");
38  return params;
39 }
40 
43  _emissivity(getFunctor<Real>("emissivity")),
44  _tinf(getFunctor<Real>("Tinfinity")),
45  _sigma(getParam<Real>("stefan_boltzmann_constant")),
46  _diffusion_coeff(getFunctor<Real>("diffusion_coeff"))
47 {
49 }
50 
51 Real
53 {
54  const auto & elem_info = (_current_face_type == FaceInfo::VarFaceNeighbors::ELEM)
57  return _var.getElemValue(*elem_info, state) +
58  _var.gradSln(*elem_info, state) * computeCellToFaceVector();
59 }
60 
61 Real
63 {
64  return _diffusion_coeff(face, state);
65 }
66 
67 Real
69 {
70  const Real T_b_old = extrapolateFaceTemperature(state);
71  return 4.0 * _sigma * _emissivity(face, state) * Utility::pow<3>(T_b_old);
72 }
73 
74 Real
76 {
77  const Real T_b_old = extrapolateFaceTemperature(state);
78  return _sigma * _emissivity(face, state) *
79  (3.0 * Utility::pow<4>(T_b_old) + Utility::pow<4>(_tinf(face, state)));
80 }
RealVectorValue computeCellToFaceVector() const
virtual Real getAlpha(Moose::FaceArg face, Moose::StateArg state) const override
static InputParameters validParams()
virtual Real getGamma(Moose::FaceArg face, Moose::StateArg state) const override
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
const Moose::Functor< Real > & _tinf
Far-field temperature functor (T_infinity)
const ElemInfo * neighborInfo() const
const Moose::Functor< Real > & _emissivity
Emissivity functor (epsilon)
const ElemInfo * elemInfo() const
void addRequiredParam(const std::string &name, const std::string &doc_string)
VectorValue< Real > gradSln(const ElemInfo &elem_info, const StateArg &state) const
registerMooseObject("HeatTransferApp", LinearFVFunctorRadiativeBC)
FaceInfo::VarFaceNeighbors _current_face_type
const Real _sigma
Stefan-Boltzmann constant (sigma)
MooseLinearVariableFV< Real > & _var
const Moose::Functor< Real > & _diffusion_coeff
Thermal conductivity functor; must match the diffusion_coeff in LinearFVDiffusion.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real extrapolateFaceTemperature(Moose::StateArg state) const
Extrapolates the boundary face temperature from the previous iteration.
LinearFVFunctorRadiativeBC(const InputParameters &parameters)
Real getElemValue(const ElemInfo &elem_info, const StateArg &state) const
void addClassDescription(const std::string &doc_string)
virtual Real getBeta(Moose::FaceArg face, Moose::StateArg state) const override
Boundary condition for radiative heat flux in a linear finite volume system.