14#include "libmesh/quadrature.h"
15#include "libmesh/fe_base.h"
16#include "libmesh/mesh_generation.h"
17#include "libmesh/mesh.h"
18#include "libmesh/string_to_enum.h"
19#include "libmesh/quadrature_gauss.h"
20#include "libmesh/point_locator_base.h"
21#include "libmesh/elem.h"
30 "Computes the view factors for planar faces in unubstructed radiative heat transfer.");
36 _boundary_info(nullptr),
37 _current_remote_side(nullptr),
38 _current_remote_fe(nullptr),
39 _current_remote_JxW(nullptr),
40 _current_remote_xyz(nullptr),
41 _current_remote_normals(nullptr)
46 mooseError(
"View factor calculations for 1D geometry makes no sense");
67 current_boundary_name,
70 " not in boundary parameter.");
80 unsigned int remote_index =
_side_name_index.find(remote_boundary_name)->second;
84 reinitFace(std::get<0>(side), std::get<1>(side));
87 for (
unsigned int qp = 0; qp <
_qrule->n_points(); ++qp)
92 Point r2r = (
_q_point[qp] - (*_current_remote_xyz)[r_qp]);
95 Real cos2 = r2r * (*_current_remote_normals)[r_qp] /
distance;
117 for (
unsigned int j = 0; j <
_n_sides; ++j)
128 for (
unsigned int i = 0; i <
_n_sides; ++i)
129 for (
unsigned int j = 0; j <
_n_sides; ++j)
136 for (
unsigned int i = 0; i <
_n_sides; ++i)
149 const Elem * current_remote_elem =
_mesh.
getMesh().elem_ptr(elem_id);
153 Order order = current_remote_elem->default_order();
172 for (
unsigned int qp = 0; qp < n_points; qp++)
177 for (
unsigned int qp = 0; qp < n_points; qp++)
182 for (
unsigned int qp = 0; qp < n_points; qp++)
const std::vector< double > y
registerMooseObject("HeatTransferApp", UnobstructedPlanarViewFactor)
Real elementVolume(const Elem *elem) const
const Moose::CoordinateSystemType & coordSystem() const
void mooseError(Args &&... args) const
virtual unsigned int dimension() const
const std::string & getBoundaryName(const BoundaryID boundary_id) const
void errorIfDistributedMesh(std::string name) const
const MooseArray< Real > & _coord
const QBase *const & _qrule
const MooseArray< Real > & _JxW
const MooseArray< Point > & _q_point
const MooseArray< Point > & _normals
const BoundaryID & _current_boundary_id
unsigned int getAxisymmetricRadialCoord() const
Computes the view factors for planar faces in unobstructed radiative heat transfer.
const std::vector< Real > * _current_remote_JxW
BoundaryInfo * _boundary_info
void reinitFace(dof_id_type elem_id, unsigned int side)
helper function that reinits an element face
virtual void finalizeViewFactor() override
a purely virtural function called in finalize, must be overriden by derived class
virtual void threadJoinViewFactor(const UserObject &y) override
a purely virtual function called in finalize, must be overriden by derived class
std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > _side_list
const std::vector< Point > * _current_remote_xyz
virtual void initialize() override
virtual void execute() override
std::unique_ptr< const Elem > _current_remote_side
data of the to_elem side being initialized
const std::vector< Point > * _current_remote_normals
UnobstructedPlanarViewFactor(const InputParameters ¶meters)
static InputParameters validParams()
Real _current_remote_side_volume
std::unique_ptr< libMesh::FEBase > _current_remote_fe
std::vector< Real > _current_remote_coord
A base class for automatic computation of view factors between sidesets.
virtual void execute() override
std::vector< std::vector< Real > > _view_factors
the view factor from side i to side j
std::unordered_map< std::string, unsigned int > _side_name_index
boundary name to index map
virtual void initialize() override
unsigned int _n_sides
number of boundaries of this side uo
std::vector< Real > _areas
area of the sides i
static InputParameters validParams()
Real distance(const Point &p)