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 "FVMarshakRadiativeBC.h" 11 : #include "MathUtils.h" 12 : #include "HeatConductionNames.h" 13 : 14 : registerMooseObject("HeatTransferApp", FVMarshakRadiativeBC); 15 : 16 : InputParameters 17 38 : FVMarshakRadiativeBC::validParams() 18 : { 19 38 : InputParameters params = FVFluxBC::validParams(); 20 38 : params.addClassDescription("Marshak boundary condition for radiative heat flux."); 21 76 : params.addRequiredParam<MooseFunctorName>("temperature_radiation", "The radiation temperature."); 22 76 : params.addRequiredParam<MooseFunctorName>("coeff_diffusion", 23 : "Radiative heat flux P1 diffusion coefficient."); 24 76 : params.addParam<Real>("boundary_emissivity", 1.0, "Emissivity of the boundary."); 25 38 : return params; 26 0 : } 27 : 28 20 : FVMarshakRadiativeBC::FVMarshakRadiativeBC(const InputParameters & parameters) 29 : : FVFluxBC(parameters), 30 20 : _temperature_radiation(getFunctor<ADReal>("temperature_radiation")), 31 40 : _coeff_diffusion(getFunctor<ADReal>("coeff_diffusion")), 32 60 : _eps_boundary(getParam<Real>("boundary_emissivity")) 33 : { 34 20 : } 35 : 36 : ADReal 37 738 : FVMarshakRadiativeBC::computeQpResidual() 38 : { 39 : const auto corrected_diff_coef = 40 1476 : _eps_boundary / (2.0 * _coeff_diffusion(singleSidedFaceArg(_face_info), determineState()) * 41 738 : (2.0 - _eps_boundary)); 42 : const auto ground_flux = 43 1476 : 4.0 * HeatConduction::Constants::sigma * 44 738 : Utility::pow<4>(_temperature_radiation(singleSidedFaceArg(_face_info), determineState())); 45 738 : return -corrected_diff_coef * 46 1476 : (_var(singleSidedFaceArg(_face_info), determineState()) - ground_flux); 47 : }