LCOV - code coverage report
Current view: top level - src/fvbcs - FVMarshakRadiativeBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose heat_transfer: #31405 (292dce) with base fef103 Lines: 19 20 95.0 %
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 "FVMarshakRadiativeBC.h"
      11             : #include "MathUtils.h"
      12             : #include "HeatConductionNames.h"
      13             : 
      14             : registerMooseObject("HeatTransferApp", FVMarshakRadiativeBC);
      15             : 
      16             : InputParameters
      17          82 : FVMarshakRadiativeBC::validParams()
      18             : {
      19          82 :   InputParameters params = FVFluxBC::validParams();
      20          82 :   params.addClassDescription("Marshak boundary condition for radiative heat flux.");
      21         164 :   params.addRequiredParam<MooseFunctorName>("temperature_radiation", "The radiation temperature.");
      22         164 :   params.addRequiredParam<MooseFunctorName>("coeff_diffusion",
      23             :                                             "Radiative heat flux P1 diffusion coefficient.");
      24         164 :   params.addParam<Real>("boundary_emissivity", 1.0, "Emissivity of the boundary.");
      25          82 :   return params;
      26           0 : }
      27             : 
      28          44 : FVMarshakRadiativeBC::FVMarshakRadiativeBC(const InputParameters & parameters)
      29             :   : FVFluxBC(parameters),
      30          44 :     _temperature_radiation(getFunctor<ADReal>("temperature_radiation")),
      31          88 :     _coeff_diffusion(getFunctor<ADReal>("coeff_diffusion")),
      32         132 :     _eps_boundary(getParam<Real>("boundary_emissivity"))
      33             : {
      34          44 : }
      35             : 
      36             : ADReal
      37        1107 : FVMarshakRadiativeBC::computeQpResidual()
      38             : {
      39             :   const auto corrected_diff_coef =
      40        2214 :       _eps_boundary / (2.0 * _coeff_diffusion(singleSidedFaceArg(_face_info), determineState()) *
      41        1107 :                        (2.0 - _eps_boundary));
      42             :   const auto ground_flux =
      43        2214 :       4.0 * HeatConduction::Constants::sigma *
      44        1107 :       Utility::pow<4>(_temperature_radiation(singleSidedFaceArg(_face_info), determineState()));
      45        1107 :   return -corrected_diff_coef *
      46        2214 :          (_var(singleSidedFaceArg(_face_info), determineState()) - ground_flux);
      47             : }

Generated by: LCOV version 1.14