Line data Source code
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 : 10 : #include "FVRadiativeHeatFluxBCBase.h" 11 : #include "MathUtils.h" 12 : 13 : InputParameters 14 38 : FVRadiativeHeatFluxBCBase::validParams() 15 : { 16 38 : InputParameters params = FVQpFluxBC::validParams(); 17 76 : params.addCoupledVar("temperature", "temperature variable"); 18 76 : params.addParam<Real>("stefan_boltzmann_constant", 5.670367e-8, "The Stefan-Boltzmann constant."); 19 76 : params.addRequiredParam<MooseFunctorName>("Tinfinity", 20 : "Temperature of the body in radiative heat transfer."); 21 38 : params.addClassDescription("Boundary condition for radiative heat flux where temperature and the" 22 : "temperature of a body in radiative heat transfer are specified."); 23 38 : return params; 24 0 : } 25 : 26 20 : FVRadiativeHeatFluxBCBase::FVRadiativeHeatFluxBCBase(const InputParameters & parameters) 27 : : FVQpFluxBC(parameters), 28 30 : _T(isParamValid("temperature") ? adCoupledValue("temperature") : _u), 29 40 : _sigma_stefan_boltzmann(getParam<Real>("stefan_boltzmann_constant")), 30 60 : _tinf(getFunctor<ADReal>("Tinfinity")) 31 : { 32 20 : } 33 : 34 : ADReal 35 300 : FVRadiativeHeatFluxBCBase::computeQpResidual() 36 : { 37 300 : const auto T4 = Utility::pow<4>(_T[_qp]); 38 600 : const auto T4inf = Utility::pow<4>(_tinf(singleSidedFaceArg(_face_info), determineState())); 39 600 : return _sigma_stefan_boltzmann * coefficient() * (T4 - T4inf); 40 : }