https://mooseframework.inl.gov
SurfaceRadiationVectorPostprocessor.C
Go to the documentation of this file.
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 
12 #include <limits>
13 #include "libmesh/utility.h"
14 
16 
19 {
21  params.addClassDescription(
22  "VectorPostprocessor for accessing information stored in surface radiation user object");
23  params.addRequiredParam<UserObjectName>("surface_radiation_object_name",
24  "Name of the GrayLambertSurfaceRadiationBase UO");
25  MultiMooseEnum information_type("temperature=0 heat_flux_density=1 radiosity=2 emissivity=3",
26  "temperature");
27  params.addParam<MultiMooseEnum>(
28  "information",
29  information_type,
30  "The type of information to obtain from surface radiation user object");
31  return params;
32 }
33 
35  const InputParameters & parameters)
36  : GeneralVectorPostprocessor(parameters),
37  _glsr_uo(getUserObject<GrayLambertSurfaceRadiationBase>("surface_radiation_object_name")),
38  _information_types(getParam<MultiMooseEnum>("information")),
39  _n_data(_information_types.size()),
40  _data(_n_data),
41  _surface_ids(declareVector("subdomain_id"))
42 {
43  for (unsigned int j = 0; j < _n_data; ++j)
45 }
46 
47 void
49 {
50  std::set<BoundaryID> bids = _glsr_uo.getSurfaceIDs();
51  _surface_ids.resize(bids.size());
52  for (unsigned int j = 0; j < _n_data; ++j)
53  _data[j]->resize(bids.size());
54  unsigned int j = 0;
55  for (auto & bid : bids)
56  {
57  _surface_ids[j] = bid;
58  ++j;
59  }
60 }
61 
62 void
64 {
65  for (unsigned int i = 0; i < _n_data; ++i)
66  {
67  switch (_information_types.get(i))
68  {
69  case 0:
70  for (unsigned int j = 0; j < _surface_ids.size(); ++j)
72  break;
73  case 1:
74  for (unsigned int j = 0; j < _surface_ids.size(); ++j)
76  break;
77  case 2:
78  for (unsigned int j = 0; j < _surface_ids.size(); ++j)
80  break;
81  case 3:
82  for (unsigned int j = 0; j < _surface_ids.size(); ++j)
84  break;
85  default:
86  mooseError("Unrecognized information type. This should never happen");
87  break;
88  }
89  }
90 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
std::vector< VectorPostprocessorValue * > _data
The data that this VPP harvests off the surface radiation userobject.
VectorPostprocessorValue & _surface_ids
The surface ids of the data.
GrayLambertSurfaceRadiationBase computes the heat flux on a set of surfaces in radiative heat transfe...
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
VectorPostprocessorValue & declareVector(const std::string &vector_name)
std::set< BoundaryID > getSurfaceIDs() const
MultiMooseEnum _information_types
Type of information that is retrieved.
unsigned int get(unsigned int i) const
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
const GrayLambertSurfaceRadiationBase & _glsr_uo
the surface radiation user object
SurfaceRadiationVectorPostprocessor(const InputParameters &parameters)
registerMooseObject("HeatTransferApp", SurfaceRadiationVectorPostprocessor)