https://mooseframework.inl.gov
ViewfactorVectorPostprocessor.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 
14 
17 {
19  params.addClassDescription(
20  "VectorPostprocessor for accessing view factors from GrayLambertSurfaceRadiationBase UO");
21  params.addRequiredParam<UserObjectName>("surface_radiation_object_name",
22  "Name of the GrayLambertSurfaceRadiationBase UO");
23  return params;
24 }
25 
27  : GeneralVectorPostprocessor(parameters),
28  _glsr_uo(getUserObject<GrayLambertSurfaceRadiationBase>("surface_radiation_object_name")),
29  _surface_ids(declareVector("subdomain_id"))
30 {
31 }
32 
33 void
35 {
36  // setup of surface_id arrays
37  std::set<BoundaryID> bids = _glsr_uo.getSurfaceIDs();
38  unsigned int ns = bids.size();
39  _surface_ids.resize(ns);
40  unsigned int j = 0;
41  for (auto & bid : bids)
42  {
43  _surface_ids[j] = bid;
44  ++j;
45  }
46 
47  // setup of view factors
48  _vf.resize(ns);
49  for (unsigned int j = 0; j < ns; ++j)
50  {
51  std::stringstream ss;
52  ss << "vf_to_" << _surface_ids[j];
53  _vf[j] = &declareVector(ss.str());
54  _vf[j]->resize(ns);
55  }
56 }
57 
58 void
60 {
61  for (unsigned int i = 0; i < _surface_ids.size(); ++i)
62  for (unsigned int j = 0; j < _surface_ids.size(); ++j)
64 }
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()
std::vector< VectorPostprocessorValue * > _vf
The data that this VPP harvests off the surface radiation userobject.
VectorPostprocessorValue & declareVector(const std::string &vector_name)
std::set< BoundaryID > getSurfaceIDs() const
const GrayLambertSurfaceRadiationBase & _glsr_uo
the surface radiation user object
void addClassDescription(const std::string &doc_string)
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
Real getViewFactor(BoundaryID from_id, BoundaryID to_id) const
VectorPostprocessorValue & _surface_ids
The surface ids of the data.
registerMooseObject("HeatTransferApp", ViewfactorVectorPostprocessor)
ViewfactorVectorPostprocessor(const InputParameters &parameters)