A python library to calculate numerically exact radiation view factors between planar faces.
Project description
PyViewFactor
A python library to calculate exact view factors between planar faces.
This code computes the radiation view factor between polygons using the double contour integral method. It uses the handy Pyvista package to deal with geometrical aspects of such problems.
Minimum working example
Suppose we cant to compute the radiation view factor between a triangle and a rectangle.
pointa = [1, 0, 0]
pointb = [1, 1, 0]
pointc = [0, 1, 0]
pointd = [0, 0, 0]
rectangle = pv.Rectangle([pointa, pointb, pointc, pointd])
pointa = [1, 0, 1]
pointb = [1, 1, 1]
pointc = [0, 1, 1]
liste_pts=[pointa, pointb, pointc]
liste_pts.reverse() # let'us put the normel the other way around
triangle = pv.Triangle(liste_pts)
# preliminary check for visibility
if get_visibility(rectangle , triangle):
F=compute_viewfactor(rectangle, triangle)
print("View factor from triangle to rectangle = ", F)
else:
print("Not facing each other")
Example using a VTK
Installation
Copy the code/pyviewfactor.py
file to your working directory, import relevant functions.
Requirements:
numpy==1.17.4
pandas==1.4.2
pyvista==0.35.2
scipy==1.8.1
The code will probably work with lower versions of the required packages, but has not been tested.
Authors and acknowledgment
Mateusz BOGDAN, Edouard WALTHER, Marc ALECIAN, Mina CHAPON
Citation
There is a conference paper:
@Conference{pyViewFactor,
authors = "Mateusz BOGDAN, Edouard WALTHER, Marc ALECIAN, Mina CHAPON",
title = "Calcul des facteurs de forme entre polygones - Application à la thermique urbaine et aux études de confort",
year = "2022",
organization = "IBPSA 2022",
note = "IBPSA France 2022 : Châlons-en-Champagne",
}
License
MIT License - Copyright (c) AREP 2022
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.