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 "FVThermalRadiationSourceSink.h" 11 : #include "MathUtils.h" 12 : #include "HeatConductionNames.h" 13 : 14 : registerMooseObject("HeatTransferApp", FVThermalRadiationSourceSink); 15 : 16 : InputParameters 17 57 : FVThermalRadiationSourceSink::validParams() 18 : { 19 57 : InputParameters params = FVElementalKernel::validParams(); 20 : 21 57 : params.addClassDescription( 22 : "Implements the source and the sink terms for radiation heat transfer."); 23 114 : params.addRequiredParam<MooseFunctorName>("temperature_radiation", "The radiation temperature."); 24 114 : params.addParam<MooseFunctorName>("opacity", 1.0, "The opacity field."); 25 : 26 57 : return params; 27 0 : } 28 : 29 30 : FVThermalRadiationSourceSink::FVThermalRadiationSourceSink(const InputParameters & parameters) 30 : : FVElementalKernel(parameters), 31 30 : _temperature_radiation(getFunctor<ADReal>("temperature_radiation")), 32 90 : _opacity(getFunctor<ADReal>("opacity")) 33 : { 34 30 : } 35 : 36 : ADReal 37 9000 : FVThermalRadiationSourceSink::computeQpResidual() 38 : { 39 9000 : return _opacity(makeElemArg(_current_elem), determineState()) * 40 9000 : (_var(makeElemArg(_current_elem), determineState()) - 41 18000 : HeatConduction::Constants::sigma * Utility::pow<4>(_temperature_radiation( 42 18000 : makeElemArg(_current_elem), determineState()))); 43 : }