Skip to main content

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. Triangle and rectangle configuration

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyviewfactor-0.0.3.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file pyviewfactor-0.0.3.tar.gz.

File metadata

  • Download URL: pyviewfactor-0.0.3.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for pyviewfactor-0.0.3.tar.gz
Algorithm Hash digest
SHA256 3afc5f1ff294065e570ee46cb07375601128cb2f1615b363e72e3a70e9d32fde
MD5 eef8f03f36c8361cd60b6240ff7df7dd
BLAKE2b-256 a46f9bb06ba4b075fb9dbc8792c374769c1715bfce6f110f8141d125957c10e5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page