www.mooseframework.org
SurfaceRadiationVectorPostprocessor.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
12 #include <limits>
13 #include "libmesh/utility.h"
14 
16 
17 template <>
18 InputParameters
20 {
21  InputParameters params = validParams<GeneralVectorPostprocessor>();
22  params.addClassDescription(
23  "VectorPostprocessor for accessing information stored in surface radiation user object");
24  params.addRequiredParam<UserObjectName>("surface_radiation_object_name",
25  "Name of the GrayLambertSurfaceRadiationBase UO");
26  MultiMooseEnum information_type("temperature=0 heat_flux_density=1 radiosity=2 emissivity=3",
27  "temperature");
28  params.addParam<MultiMooseEnum>(
29  "information",
30  information_type,
31  "The type of information to obtain from surface radiation user object");
32  return params;
33 }
34 
36  const InputParameters & parameters)
37  : GeneralVectorPostprocessor(parameters),
38  _glsr_uo(getUserObject<GrayLambertSurfaceRadiationBase>("surface_radiation_object_name")),
39  _information_types(getParam<MultiMooseEnum>("information")),
40  _n_data(_information_types.size()),
41  _data(_n_data),
42  _surface_ids(declareVector("subdomain_id"))
43 {
44  for (unsigned int j = 0; j < _n_data; ++j)
45  _data[j] = &declareVector(_information_types[j]);
46 }
47 
48 void
50 {
51  std::set<BoundaryID> bids = _glsr_uo.getSurfaceIDs();
52  _surface_ids.resize(bids.size());
53  for (unsigned int j = 0; j < _n_data; ++j)
54  _data[j]->resize(bids.size());
55  unsigned int j = 0;
56  for (auto & bid : bids)
57  {
58  _surface_ids[j] = bid;
59  ++j;
60  }
61 }
62 
63 void
65 {
66  for (unsigned int i = 0; i < _n_data; ++i)
67  {
68  switch (_information_types.get(i))
69  {
70  case 0:
71  for (unsigned int j = 0; j < _surface_ids.size(); ++j)
73  break;
74  case 1:
75  for (unsigned int j = 0; j < _surface_ids.size(); ++j)
77  break;
78  case 2:
79  for (unsigned int j = 0; j < _surface_ids.size(); ++j)
81  break;
82  case 3:
83  for (unsigned int j = 0; j < _surface_ids.size(); ++j)
85  break;
86  default:
87  mooseError("Unrecognized information type. This should never happen");
88  break;
89  }
90  }
91 }
SurfaceRadiationVectorPostprocessor::_surface_ids
VectorPostprocessorValue & _surface_ids
The surface ids of the data.
Definition: SurfaceRadiationVectorPostprocessor.h:43
SurfaceRadiationVectorPostprocessor::_n_data
unsigned int _n_data
number of data types
Definition: SurfaceRadiationVectorPostprocessor.h:37
SurfaceRadiationVectorPostprocessor::_data
std::vector< VectorPostprocessorValue * > _data
The data that this VPP harvests off the surface radiation userobject.
Definition: SurfaceRadiationVectorPostprocessor.h:40
GrayLambertSurfaceRadiationBase.h
SurfaceRadiationVectorPostprocessor.h
validParams< SurfaceRadiationVectorPostprocessor >
InputParameters validParams< SurfaceRadiationVectorPostprocessor >()
Definition: SurfaceRadiationVectorPostprocessor.C:19
GrayLambertSurfaceRadiationBase::getSurfaceEmissivity
Real getSurfaceEmissivity(BoundaryID id) const
Definition: GrayLambertSurfaceRadiationBase.C:301
SurfaceRadiationVectorPostprocessor::initialize
void initialize() override
Definition: SurfaceRadiationVectorPostprocessor.C:49
SurfaceRadiationVectorPostprocessor::_information_types
MultiMooseEnum _information_types
Type of information that is retrieved.
Definition: SurfaceRadiationVectorPostprocessor.h:34
SurfaceRadiationVectorPostprocessor
Definition: SurfaceRadiationVectorPostprocessor.h:21
GrayLambertSurfaceRadiationBase::getSurfaceRadiosity
Real getSurfaceRadiosity(BoundaryID id) const
Definition: GrayLambertSurfaceRadiationBase.C:293
SurfaceRadiationVectorPostprocessor::SurfaceRadiationVectorPostprocessor
SurfaceRadiationVectorPostprocessor(const InputParameters &parameters)
Definition: SurfaceRadiationVectorPostprocessor.C:35
registerMooseObject
registerMooseObject("HeatConductionApp", SurfaceRadiationVectorPostprocessor)
GrayLambertSurfaceRadiationBase::getSurfaceIDs
std::set< BoundaryID > getSurfaceIDs() const
Definition: GrayLambertSurfaceRadiationBase.C:260
SurfaceRadiationVectorPostprocessor::execute
void execute() override
Definition: SurfaceRadiationVectorPostprocessor.C:64
SurfaceRadiationVectorPostprocessor::_glsr_uo
const GrayLambertSurfaceRadiationBase & _glsr_uo
the surface radiation user object
Definition: SurfaceRadiationVectorPostprocessor.h:31
GrayLambertSurfaceRadiationBase::getSurfaceHeatFluxDensity
Real getSurfaceHeatFluxDensity(BoundaryID id) const
Definition: GrayLambertSurfaceRadiationBase.C:277
GrayLambertSurfaceRadiationBase::getSurfaceTemperature
Real getSurfaceTemperature(BoundaryID id) const
Definition: GrayLambertSurfaceRadiationBase.C:285
GrayLambertSurfaceRadiationBase
GrayLambertSurfaceRadiationBase computes the heat flux on a set of surfaces in radiative heat transfe...
Definition: GrayLambertSurfaceRadiationBase.h:25