LCOV - code coverage report
Current view: top level - src/postprocessors - GrayLambertSurfaceRadiationPP.C (source / functions) Hit Total Coverage
Test: idaholab/moose heat_transfer: #32971 (54bef8) with base c6cf66 Lines: 20 20 100.0 %
Date: 2026-05-29 20:37:03 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 "GrayLambertSurfaceRadiationPP.h"
      11             : 
      12             : registerMooseObject("HeatTransferApp", GrayLambertSurfaceRadiationPP);
      13             : 
      14             : InputParameters
      15         404 : GrayLambertSurfaceRadiationPP::validParams()
      16             : {
      17         404 :   InputParameters params = GeneralPostprocessor::validParams();
      18         808 :   MooseEnum return_type("RADIOSITY HEAT_FLUX_DENSITY TEMPERATURE", "HEAT_FLUX_DENSITY");
      19         808 :   params.addParam<MooseEnum>("return_type",
      20             :                              return_type,
      21             :                              "Requested return type: RADIOSITY | HEAT_FLUX_DENSITY | TEMPERATURE");
      22         808 :   params.addRequiredParam<UserObjectName>("surface_radiation_object_name",
      23             :                                           "Name of the GrayLambertSurfaceRadiationBase UO");
      24         808 :   params.addRequiredParam<BoundaryName>("boundary", "The boundary of interest.");
      25         404 :   params.addClassDescription("This postprocessor allows to extract radiosity, heat flux density, "
      26             :                              "and temperature from the GrayLambertSurfaceRadiationBase object.");
      27         404 :   return params;
      28         404 : }
      29             : 
      30         178 : GrayLambertSurfaceRadiationPP::GrayLambertSurfaceRadiationPP(const InputParameters & parameters)
      31             :   : GeneralPostprocessor(parameters),
      32         178 :     _glsr_uo(getUserObject<GrayLambertSurfaceRadiationBase>("surface_radiation_object_name")),
      33         356 :     _return_type(getParam<MooseEnum>("return_type")),
      34         534 :     _bnd_id(_fe_problem.mesh().getBoundaryID(getParam<BoundaryName>("boundary")))
      35             : {
      36         178 : }
      37             : 
      38             : PostprocessorValue
      39         170 : GrayLambertSurfaceRadiationPP::getValue() const
      40             : {
      41         170 :   if (_return_type == "RADIOSITY")
      42          37 :     return _glsr_uo.getSurfaceRadiosity(_bnd_id);
      43         133 :   else if (_return_type == "TEMPERATURE")
      44          46 :     return _glsr_uo.getSurfaceTemperature(_bnd_id);
      45          87 :   return _glsr_uo.getSurfaceHeatFluxDensity(_bnd_id);
      46             : }

Generated by: LCOV version 1.14