LCOV - code coverage report
Current view: top level - src/userobjects - GapFluxModelRadiative.C (source / functions) Hit Total Coverage
Test: idaholab/moose heat_transfer: #31405 (292dce) with base fef103 Lines: 18 19 94.7 %
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 "GapFluxModelRadiative.h"
      11             : #include "libmesh/utility.h"
      12             : 
      13             : registerMooseObject("HeatTransferApp", GapFluxModelRadiative);
      14             : 
      15             : InputParameters
      16          41 : GapFluxModelRadiative::validParams()
      17             : {
      18          41 :   InputParameters params = GapFluxModelBase::validParams();
      19          41 :   params.addClassDescription("Gap flux demonstration model for radiative heat conductance");
      20          82 :   params.addRequiredCoupledVar("temperature", "The name of the temperature variable");
      21          82 :   params.addParam<Real>("sigma", 5.670373e-8, "Stefan-Boltzmann constant");
      22          82 :   params.addRequiredRangeCheckedParam<MaterialPropertyName>(
      23             :       "primary_emissivity",
      24             :       "primary_emissivity>0 && primary_emissivity<=1",
      25             :       "Primary surface emissivity");
      26          82 :   params.addRequiredRangeCheckedParam<MaterialPropertyName>(
      27             :       "secondary_emissivity",
      28             :       "secondary_emissivity>0 && secondary_emissivity<=1",
      29             :       "Secondary surface emissivity");
      30          41 :   return params;
      31           0 : }
      32             : 
      33          22 : GapFluxModelRadiative::GapFluxModelRadiative(const InputParameters & parameters)
      34             :   : GapFluxModelBase(parameters),
      35          22 :     _primary_T(adCoupledNeighborValue("temperature")),
      36          22 :     _secondary_T(adCoupledValue("temperature")),
      37          44 :     _sigma(getParam<Real>("sigma")),
      38          44 :     _primary_emissivity(getNeighborADMaterialProperty<Real>("primary_emissivity")),
      39          66 :     _secondary_emissivity(getADMaterialProperty<Real>("secondary_emissivity"))
      40             : {
      41          22 : }
      42             : 
      43             : ADReal
      44        7360 : GapFluxModelRadiative::computeFlux() const
      45             : {
      46       29440 :   const auto Fe = 1.0 / (1.0 / _primary_emissivity[_qp] + 1.0 / _secondary_emissivity[_qp] - 1.0);
      47       14720 :   return _sigma * Fe * (Utility::pow<4>(_primary_T[_qp]) - Utility::pow<4>(_secondary_T[_qp]));
      48             : }

Generated by: LCOV version 1.14