Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion documents/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ In _Figure 1_, the difference between the two types of geometries is shown. The

_Figure 1: Screenshot from openpv.de showing both simulation geometries (colored) and shading geometries (grey-brown)._

These geometries need to [Three.js Buffer Geometries](https://threejs.org/docs/#api/en/core/BufferGeometry). You can use a variety of [Three.js Loaders](https://threejs.org/manual/#en/loading-3d-models) to load different 3D file formats to BufferGeometries.
These geometries need to be [Three.js Buffer Geometries](https://threejs.org/docs/#api/en/core/BufferGeometry). You can use a variety of [Three.js Loaders](https://threejs.org/manual/#en/loading-3d-models) to load different 3D file formats into BufferGeometries.
<br/>
<br/>

Expand Down
2 changes: 1 addition & 1 deletion documents/how_does_simshady_work.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ There are two key reasons for using skydomes:

The process works as follows:

1. For each sky segment and each triangle of the simulation geometry, Simshady uses the Möller-Trumbore algorithm to check if the line of sight is obstructed by any shading geometry. The result is:
1. For each sky segment and each triangle of the simulation geometry, Simshady uses the [Möller-Trumbore algorithm](https://doi.org/10.1080%2F10867651.1997.10487468) to check if the line of sight is obstructed by any shading geometry. The result is:

- `0` if an intersection occurs.
- The dot product between the triangle normal and the vector to the sky segment if unshaded.
Expand Down
Binary file added joss-paper/funding_notice.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 20 additions & 1 deletion joss-paper/paper.bib
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,23 @@ @article{Górski_2005
title = {HEALPix: A Framework for High-Resolution Discretization and Fast Analysis of Data Distributed on the Sphere},
journal = {The Astrophysical Journal},
abstract = {HEALPix—the Hierarchical Equal Area isoLatitude Pixelization—is a versatile structure for the pixelization of data on the sphere. An associated library of computational algorithms and visualization software supports fast scientific applications executable directly on discretized spherical maps generated from very large volumes of astronomical data. Originally developed to address the data processing and analysis needs of the present generation of cosmic microwave background experiments (e.g., BOOMERANG, WMAP), HEALPix can be expanded to meet many of the profound challenges that will arise in confrontation with the observational output of future missions and experiments, including, e.g., Planck, Herschel, SAFIR, and the Beyond Einstein inflation probe. In this paper we consider the requirements and implementation constraints on a framework that simultaneously enables an efficient discretization with associated hierarchical indexation and fast analysis/synthesis of functions defined on the sphere. We demonstrate how these are explicitly satisfied by HEALPix.}
}
}

@article{Möller01011997,
author = {Möller, T. and Trumbore, B.},
title = {Fast, Minimum Storage Ray-Triangle Intersection},
journal = {Journal of Graphics Tools},
volume = {2},
number = {1},
pages = {21--28},
year = {1997},
publisher = {Taylor \& Francis},
doi = {10.1080/10867651.1997.10487468},
URL = {

https://doi.org/10.1080/10867651.1997.10487468
},
eprint = {
https://doi.org/10.1080/10867651.1997.10487468
}
}
15 changes: 11 additions & 4 deletions joss-paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ bibliography: paper.bib

# Summary

openpv/simshady is a JavaScript package for simulating photovoltaic (PV) energy yields. It integrates local climate data and 3D objects into its shading simulation, utilizing Three.js meshes for geometric modeling. The package performs shading analysis using a WebGL-parallelized implementation of the Möller-Trumbore intersection algorithm, producing color-coded Three.js meshes that represent the expected PV yield.
openpv/simshady is a JavaScript package for simulating photovoltaic (PV) energy yields. It integrates local climate data and 3D objects into its shading simulation, utilizing Three.js meshes for geometric modeling. The package performs shading analysis using a WebGL-parallelized implementation of the Möller-Trumbore intersection algorithm @Möller01011997], producing color-coded Three.js meshes that represent the expected PV yield.

# Statement of need

Expand All @@ -53,21 +53,28 @@ Web-based tools for solar panel simulations, such as PVGIS, PVWatts, and RETScre

`openpv/simshady` simulates the yield of photovoltaic (PV) systems by considering weather/climate data and shading from local 3D geometry. The model represents the environment through a 3D scene setup, comprising primary objects for simulation (e.g., PV panels or target buildings) and surrounding objects that may cast shadows (e.g., neighboring buildings, trees). Weather and climate data are integrated using Global Horizontal Irradiance (GHI) and Direct Normal Irradiance (DNI) datasets, which are reconstructed to include directional irradiance information using the HEALPix framework [@Górski_2005; @zonca2019healpy].

The simulation utilizes the Möller-Trumbore intersection algorithm to determine if any shading objects obstruct the view between a sky pixel and the main simulation geometry. For each triangle in the simulation geometry, a shading mask is generated, indicating whether an object blocks the line of sight from the sky pixel to the triangle. The shading mask values range from 0 to 1, where 0 indicates that an object shades the triangle, 1 signifies that there is no obstruction and the line of sight is perpendicular to the triangle, and values between 0 and 1 represent cases where there is no obstruction but the angle of incidence is not perpendicular. The aggregated radiance values from all sky dome pixels are then multiplied by the corresponding shading mask values and summed to calculate the total energy received by each triangle. This computation is fully parallelizable and has been implemented using WebGL, allowing for GPU acceleration.
The simulation utilizes the Möller-Trumbore intersection algorithm [@Möller01011997] to determine if any shading objects obstruct the view between a sky pixel and the main simulation geometry. For each triangle in the simulation geometry, a shading mask is generated, indicating whether an object blocks the line of sight from the sky pixel to the triangle. The shading mask values range from 0 to 1, where 0 indicates that an object shades the triangle, 1 signifies that there is no obstruction and the line of sight is perpendicular to the triangle, and values between 0 and 1 represent cases where there is no obstruction but the angle of incidence is not perpendicular. The aggregated radiance values from all sky dome pixels are then multiplied by the corresponding shading mask values and summed to calculate the total energy received by each triangle. This computation is fully parallelizable and has been implemented using WebGL, allowing for GPU acceleration.

# Conclusion

The `openpv/simshady` package serves two primary purposes: it provides a solution for scientific calculations of PV yield, while also facilitating science communication through interactive and user-friendly simulations that can be run directly within a web browser. This eliminates the need for specialized software or programming knowledge, making it accessible to a broader range of users. Furthermore, by implementing the main algorithm in WebGL, the package achieves higher performance than a pure Javascript implementation, and it offers a JavaScript wrapper around PV simulation in WebGL. This is particularly beneficial because WebGL is a language that is not widely known among scientists, and thus can be challenging for them to implement their own code, making the `openpv/simshady` package a valuable tool for simplifying this process.

# CRediT Authorship Statement
# Credit Authorship Statement

FK: Conceptualization, Software, Funding acquisition, Writing – original draft

MG: Conceptualization, Software, Funding acquisition, Writing – review & editing

KH: Conceptualization, Software, Funding acquisition, Writing – review & editing

KP: Conceptualization, Software, Funding acquisition, Writing – review & editing

# Acknowledgements

The authors acknowledge support by ... (how do we name Prototypefund here?)
The development of this software was funded by the German Federal Ministry of Research, Technology and Space within the Prototype fund project.

![Funded by BMBFT and Prototype Fund](./funding_notice.png){ width=30% }


# References

Binary file modified joss-paper/paper.pdf
Binary file not shown.