www.mooseframework.org
ViewfactorVectorPostprocessor.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 
14 
15 template <>
16 InputParameters
18 {
19  InputParameters params = validParams<GeneralVectorPostprocessor>();
20  params.addClassDescription(
21  "VectorPostprocessor for accessing view factors from GrayLambertSurfaceRadiationBase UO");
22  params.addRequiredParam<UserObjectName>("surface_radiation_object_name",
23  "Name of the GrayLambertSurfaceRadiationBase UO");
24  return params;
25 }
26 
28  : GeneralVectorPostprocessor(parameters),
29  _glsr_uo(getUserObject<GrayLambertSurfaceRadiationBase>("surface_radiation_object_name")),
30  _surface_ids(declareVector("subdomain_id"))
31 {
32 }
33 
34 void
36 {
37  // setup of surface_id arrays
38  std::set<BoundaryID> bids = _glsr_uo.getSurfaceIDs();
39  unsigned int ns = bids.size();
40  _surface_ids.resize(ns);
41  unsigned int j = 0;
42  for (auto & bid : bids)
43  {
44  _surface_ids[j] = bid;
45  ++j;
46  }
47 
48  // setup of view factors
49  _vf.resize(ns);
50  for (unsigned int j = 0; j < ns; ++j)
51  {
52  std::stringstream ss;
53  ss << "vf_to_" << _surface_ids[j];
54  _vf[j] = &declareVector(ss.str());
55  _vf[j]->resize(ns);
56  }
57 }
58 
59 void
61 {
62  for (unsigned int i = 0; i < _surface_ids.size(); ++i)
63  for (unsigned int j = 0; j < _surface_ids.size(); ++j)
65 }
registerMooseObject
registerMooseObject("HeatConductionApp", ViewfactorVectorPostprocessor)
GrayLambertSurfaceRadiationBase.h
validParams< ViewfactorVectorPostprocessor >
InputParameters validParams< ViewfactorVectorPostprocessor >()
Definition: ViewfactorVectorPostprocessor.C:17
ViewfactorVectorPostprocessor::_vf
std::vector< VectorPostprocessorValue * > _vf
The data that this VPP harvests off the surface radiation userobject.
Definition: ViewfactorVectorPostprocessor.h:37
ViewfactorVectorPostprocessor::_glsr_uo
const GrayLambertSurfaceRadiationBase & _glsr_uo
the surface radiation user object
Definition: ViewfactorVectorPostprocessor.h:31
ViewfactorVectorPostprocessor.h
ViewfactorVectorPostprocessor::initialize
void initialize() override
Definition: ViewfactorVectorPostprocessor.C:35
ViewfactorVectorPostprocessor::execute
void execute() override
Definition: ViewfactorVectorPostprocessor.C:60
ViewfactorVectorPostprocessor
Definition: ViewfactorVectorPostprocessor.h:21
GrayLambertSurfaceRadiationBase::getSurfaceIDs
std::set< BoundaryID > getSurfaceIDs() const
Definition: GrayLambertSurfaceRadiationBase.C:260
ViewfactorVectorPostprocessor::ViewfactorVectorPostprocessor
ViewfactorVectorPostprocessor(const InputParameters &parameters)
Definition: ViewfactorVectorPostprocessor.C:27
GrayLambertSurfaceRadiationBase
GrayLambertSurfaceRadiationBase computes the heat flux on a set of surfaces in radiative heat transfe...
Definition: GrayLambertSurfaceRadiationBase.h:25
ViewfactorVectorPostprocessor::_surface_ids
VectorPostprocessorValue & _surface_ids
The surface ids of the data.
Definition: ViewfactorVectorPostprocessor.h:34
GrayLambertSurfaceRadiationBase::getViewFactor
Real getViewFactor(BoundaryID from_id, BoundaryID to_id) const
Definition: GrayLambertSurfaceRadiationBase.C:309