- This example code uses PyVista package to compute geometric parameters and visualize surfaces, normals, etc.
- Numba JIT compiler is used to improve the performance
- An example taken from A Frank, et. al.1. Details of which are shown in the below figure
- The output of the computed view factors is shown below. We can observe that with 10^6 rays, view factors closely match with the analytical results
view factor from surface 1 to 2 is:
0.04186
time taken is: 1.880399465560913
view factor matrix:
[[0. 0.043045 0.294282 0.294431 0.183543 0.184128]
[0.042769 0. 0.293895 0.295199 0.183512 0.184435]
[0.088093 0.087932 0. 0.452062 0.186441 0.186915]
[0.087756 0.087865 0.451547 0. 0.185911 0.186542]
[0.091866 0.091742 0.312041 0.312048 0. 0.192414]
[0.091341 0.092327 0.311122 0.311516 0.19291 0. ]]
time taken is: 44.51021385192871
with compute_vf function time taken is: 31.963478088378906
- The geometry considered in the above example is
- The random ray on surface 1 and the normals of surfaces 1 and 2 are shown below
Footnotes
-
A Frank, W Heidemann and K Spindler, Modeling of the surface-to-surface radiation exchange using a Monte Carlo method, Journal of Physics: Conference Series 745 (2016) 032143 ↩