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");
65 current_boundary_name,
68 " 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;
129 for (
unsigned int i = 0; i <
_n_sides; ++i)
138 for (
unsigned int i = 0; i <
_n_sides; ++i)
139 _areas[i] += pps._areas[i];
145 const Elem * current_remote_elem =
_mesh.
getMesh().elem_ptr(elem_id);
149 Order order = current_remote_elem->default_order();
168 for (
unsigned int qp = 0; qp < n_points; qp++)
173 for (
unsigned int qp = 0; qp < n_points; qp++)
178 for (
unsigned int qp = 0; qp < n_points; qp++)
virtual void initialize() override
unsigned int getAxisymmetricRadialCoord() const
void reinitFace(dof_id_type elem_id, unsigned int side)
helper function that reinits an element face
std::vector< Real > _current_remote_coord
std::vector< Real > _areas
area of the sides i
virtual void finalizeViewFactor() override
a purely virtural function called in finalize, must be overriden by derived class ...
std::unordered_map< std::string, unsigned int > _side_name_index
boundary name to index map
unsigned int _n_sides
number of boundaries of this side uo
const std::string & getBoundaryName(BoundaryID boundary_id)
const std::vector< Point > * _current_remote_normals
const MooseArray< Point > & _q_point
const std::vector< double > y
Real distance(const Point &p)
A base class for automatic computation of view factors between sidesets.
const MooseArray< Real > & _JxW
const Real & _current_side_volume
void errorIfDistributedMesh(std::string name) const
const BoundaryID & _current_boundary_id
registerMooseObject("HeatTransferApp", UnobstructedPlanarViewFactor)
std::unique_ptr< libMesh::FEBase > _current_remote_fe
std::vector< std::vector< Real > > _view_factors
the view factor from side i to side j
UnobstructedPlanarViewFactor(const InputParameters ¶meters)
virtual unsigned int dimension() const
Real elementVolume(const Elem *elem) const
const MooseArray< Real > & _coord
Computes the view factors for planar faces in unobstructed radiative heat transfer.
static InputParameters validParams()
const Moose::CoordinateSystemType & coordSystem() const
BoundaryInfo * _boundary_info
virtual void threadJoinViewFactor(const UserObject &y) override
a purely virtual function called in finalize, must be overriden by derived class
std::unique_ptr< const Elem > _current_remote_side
data of the to_elem side being initialized
virtual void execute() override
Real _current_remote_side_volume
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const QBase *const & _qrule
const std::vector< Real > * _current_remote_JxW
const MooseArray< Point > & _normals
void mooseError(Args &&... args) const
const std::vector< Point > * _current_remote_xyz
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > _side_list