LCOV - code coverage report
Current view: top level - src/fvkernels - FVThermalRadiationSourceSink.C (source / functions) Hit Total Coverage
Test: idaholab/moose heat_transfer: #31405 (292dce) with base fef103 Lines: 15 16 93.8 %
Date: 2025-09-04 07:53:51 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          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         123 : FVThermalRadiationSourceSink::validParams()
      18             : {
      19         123 :   InputParameters params = FVElementalKernel::validParams();
      20             : 
      21         123 :   params.addClassDescription(
      22             :       "Implements the source and the sink terms for radiation heat transfer.");
      23         246 :   params.addRequiredParam<MooseFunctorName>("temperature_radiation", "The radiation temperature.");
      24         246 :   params.addParam<MooseFunctorName>("opacity", 1.0, "The opacity field.");
      25             : 
      26         123 :   return params;
      27           0 : }
      28             : 
      29          66 : FVThermalRadiationSourceSink::FVThermalRadiationSourceSink(const InputParameters & parameters)
      30             :   : FVElementalKernel(parameters),
      31          66 :     _temperature_radiation(getFunctor<ADReal>("temperature_radiation")),
      32         198 :     _opacity(getFunctor<ADReal>("opacity"))
      33             : {
      34          66 : }
      35             : 
      36             : ADReal
      37       13500 : FVThermalRadiationSourceSink::computeQpResidual()
      38             : {
      39       13500 :   return _opacity(makeElemArg(_current_elem), determineState()) *
      40       13500 :          (_var(makeElemArg(_current_elem), determineState()) -
      41       27000 :           HeatConduction::Constants::sigma * Utility::pow<4>(_temperature_radiation(
      42       27000 :                                                  makeElemArg(_current_elem), determineState())));
      43             : }

Generated by: LCOV version 1.14