LCOV - code coverage report
Current view: top level - include/userobjects - GrayLambertSurfaceRadiationBase.h (source / functions) Hit Total Coverage
Test: idaholab/moose heat_transfer: #31405 (292dce) with base fef103 Lines: 1 1 100.0 %
Date: 2025-09-04 07:53:51 Functions: 1 1 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             : #pragma once
      11             : 
      12             : #include "SideUserObject.h"
      13             : 
      14             : // Forward Declarations
      15             : class Function;
      16             : 
      17             : /**
      18             :  * GrayLambertSurfaceRadiationBase computes the heat flux on a set of surfaces
      19             :  * in radiative heat transfer with each other.
      20             :  */
      21             : class GrayLambertSurfaceRadiationBase : public SideUserObject
      22             : {
      23             : public:
      24             :   static InputParameters validParams();
      25             : 
      26             :   GrayLambertSurfaceRadiationBase(const InputParameters & parameters);
      27             : 
      28             :   virtual void execute() override;
      29             :   virtual void initialize() override;
      30             :   virtual void finalize() override;
      31        2831 :   bool checkVariableBoundaryIntegrity() const override { return false; }
      32             : 
      33             :   /// Define enum for boundary type
      34             :   enum RAD_BND_TYPE
      35             :   {
      36             :     VARIABLE_TEMPERATURE = 0,
      37             :     FIXED_TEMPERATURE = 4,
      38             :     ADIABATIC = 8
      39             :   };
      40             : 
      41             :   ///@{ public interface of this UserObject
      42             :   Real getSurfaceIrradiation(BoundaryID id) const;
      43             :   Real getSurfaceHeatFluxDensity(BoundaryID id) const;
      44             :   Real getSurfaceTemperature(BoundaryID id) const;
      45             :   Real getSurfaceRadiosity(BoundaryID id) const;
      46             :   Real getSurfaceEmissivity(BoundaryID id) const;
      47             :   Real getViewFactor(BoundaryID from_id, BoundaryID to_id) const;
      48             :   std::set<BoundaryID> getSurfaceIDs() const;
      49             :   ///@}
      50             : 
      51             : protected:
      52             :   virtual void threadJoin(const UserObject & y) override;
      53             : 
      54             :   /// a purely virtual function that defines where view factors come from
      55             :   virtual std::vector<std::vector<Real>> setViewFactors() = 0;
      56             : 
      57             :   /// Stefan-Boltzmann constant
      58             :   const Real _sigma_stefan_boltzmann;
      59             : 
      60             :   /// number of active boundary ids
      61             :   unsigned int _n_sides;
      62             : 
      63             :   /// the coupled temperature variable
      64             :   const VariableValue & _temperature;
      65             : 
      66             :   /// side id to index map, side ids can have holes or be out of order
      67             :   std::vector<const Function *> _fixed_side_temperature;
      68             : 
      69             :   /// the radiosity of each surface
      70             :   std::vector<Real> _radiosity;
      71             : 
      72             :   /// the heat flux density qdot
      73             :   std::vector<Real> _heat_flux_density;
      74             : 
      75             :   /// the average temperature: this could be important for adiabatic walls
      76             :   std::vector<Real> _side_temperature;
      77             : 
      78             :   /// the type of the side, allows lookup index -> type
      79             :   std::vector<enum RAD_BND_TYPE> _side_type;
      80             : 
      81             :   /// side id to index map, side ids can have holes or be out of order
      82             :   std::map<BoundaryID, unsigned int> _side_id_index;
      83             : 
      84             :   /// the area by participating side set
      85             :   std::vector<Real> _areas;
      86             : 
      87             :   /// the average value of sigma * eps * T^4
      88             :   std::vector<Real> _beta;
      89             : 
      90             :   /// the irradiation into each surface
      91             :   std::vector<Real> _surface_irradiation;
      92             : 
      93             :   /// constant emissivity for each boundary
      94             :   std::vector<const Function *> _emissivity;
      95             : 
      96             :   /// side id to index map for isothermal boundaries, side ids can have holes or be out of order
      97             :   std::map<unsigned int, unsigned int> _fixed_side_id_index;
      98             : 
      99             :   /// the set of adiabatic boundaries
     100             :   std::set<unsigned int> _adiabatic_side_ids;
     101             : 
     102             :   /// the view factors which are set by setViewFactors by derived classes
     103             :   std::vector<std::vector<Real>> _view_factors;
     104             : };

Generated by: LCOV version 1.14