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 740 : GrayLambertSurfaceRadiationPP::validParams() 16 : { 17 740 : InputParameters params = GeneralPostprocessor::validParams(); 18 1480 : MooseEnum return_type("RADIOSITY HEAT_FLUX_DENSITY TEMPERATURE", "HEAT_FLUX_DENSITY"); 19 1480 : params.addParam<MooseEnum>("return_type", 20 : return_type, 21 : "Requested return type: RADIOSITY | HEAT_FLUX_DENSITY | TEMPERATURE"); 22 1480 : params.addRequiredParam<UserObjectName>("surface_radiation_object_name", 23 : "Name of the GrayLambertSurfaceRadiationBase UO"); 24 1480 : params.addRequiredParam<BoundaryName>("boundary", "The boundary of interest."); 25 740 : params.addClassDescription("This postprocessor allows to extract radiosity, heat flux density, " 26 : "and temperature from the GrayLambertSurfaceRadiationBase object."); 27 740 : return params; 28 740 : } 29 : 30 354 : GrayLambertSurfaceRadiationPP::GrayLambertSurfaceRadiationPP(const InputParameters & parameters) 31 : : GeneralPostprocessor(parameters), 32 354 : _glsr_uo(getUserObject<GrayLambertSurfaceRadiationBase>("surface_radiation_object_name")), 33 708 : _return_type(getParam<MooseEnum>("return_type")), 34 1062 : _bnd_id(_fe_problem.mesh().getBoundaryID(getParam<BoundaryName>("boundary"))) 35 : { 36 354 : } 37 : 38 : PostprocessorValue 39 262 : GrayLambertSurfaceRadiationPP::getValue() const 40 : { 41 262 : if (_return_type == "RADIOSITY") 42 51 : return _glsr_uo.getSurfaceRadiosity(_bnd_id); 43 211 : else if (_return_type == "TEMPERATURE") 44 66 : return _glsr_uo.getSurfaceTemperature(_bnd_id); 45 145 : return _glsr_uo.getSurfaceHeatFluxDensity(_bnd_id); 46 : }