View Factor

Defines view factor computation helper functions used in the project

  • This file is a part of the coursework module Personal Programming Project (PPP) in M.Sc. Computational Materials Science, Technische Universität Bergakademie Freiberg.

  • This file is a part of the project Modeling of radiative heat-exchange using finite element method

This file defines ViewFactor that parses the view factors file used in the project.

class viewFactor.ViewFactor(mesh: Mesh, boundary_groups: list = None)

Bases: object

Class to handle view factor computations.

Parameters:
  • mesh (parser.Mesh) – Mesh object consisting of all the information from the mesh file.

  • boundary_groups (list) – List of tags of boundaries for which the view factor computations must be done. Typically, consists of two values. First being source and the second being the destination in that order.

vf_data

Dictionary consisting of view factors for the elements belonging to source surface. Keys are the element numbers as seen in the mesh. Values are the view factors.

Type:

collections.defaultdict

compute_vf(gauss_points)

Method that evaluates the double area integral to present the view factors in an element. The elements to be considered in source and destination categories are determined using Embree binaries present in viewFactor/ directory. This method uses data imported by the method :meth:`read_embree_output().

export_mesh_1d()

Function to export the coordinates and centroids of boundary edges of a 2-d mesh. The boundary edges of such meshes would be 1-d line segments. The values are exported to viewFactor/ directory to be used by embree computations.

export_mesh_2d()

Function to export coordinates and centroids of elements on a boundary’s surface. The boundary_groups determines which of the surfaces are being exported. The numpy binaries are exported to viewFactor/ directory.

read_embree_output()

Method to import the data generated by the Embree computation. The resultant data from C++ executable is numpy binary archive in the format *.npz. The archive is found in viewFactor/ directory.