Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebuild simshady around shaded Scenes from single sky segments #46

Open
3 tasks
FlorianK13 opened this issue Oct 25, 2024 · 2 comments
Open
3 tasks

Rebuild simshady around shaded Scenes from single sky segments #46

FlorianK13 opened this issue Oct 25, 2024 · 2 comments

Comments

@FlorianK13
Copy link
Member

FlorianK13 commented Oct 25, 2024

The idea is to change the internal processing in simshady. It should be possible to return shaded scenes from single sky segments.

What do I mean by that

  • sky segment is one direction of incoming radiance with a given (altitude, azimuth)
  • a shaded scene is the returned intensities for one simulation. It is comparable for what you get on openpv.de when you set numberSimulations = 1

RAM calculation

If we save one shaded scene per sky segment, we would have the following amount of data in the RAM:

3000 Points per average Building * 100 Sky Segments * 8 byte per irradiance value = 2.4 MB
Here we use 8 byte for the boolean value (shaded or not shaded) multiplied with the dot product of radiance vector and normal of the area.

Benefit: Accurately simulate Time Series

The ultimate goal is to simulate accurate time series of electricity production!
When we have those shaded sky segment scenes, we can scale them individually with timeseries. Let's assume we have a timeseries of sky domes, ie a value Irradiance(altitude, azimuth, t), we can use this timeseries together with the shaded sky segment scenes to get actual timeseries of electricity production of the specific PV system.

Relevant Steps

@FlorianK13
Copy link
Member Author

FlorianK13 commented Nov 7, 2024

A private method scene._createShadedScene should:

  1. Verify that there is a shadingGeometry, simulationGeometry, and IrradianceData present
  2. Use the skyDome format (number of altitutes and azimutes) from IrradianceData and raytrace against each of the sky segments
  3. Create a private attribute self._shadedScene that saves the N different shaded scenes.

Two public methods should exist and replace the scene.calculate:

scene.simulateMesh

This returns the colored Three.js mesh, just like the existing method

In future, a scene.simulateTimeSeries

This method uses the self._shadedScene and a time series of skyDomes to simulate a time series of Energy yield of a given triangle m at a given duration in time t+ $\Delta t$:

$$E(m,t + \Delta t) = \sum_{\phi, \theta} SkyDome(t + \Delta t, \phi, \theta) * \Delta t * ShadingScene(m, \phi, \theta)$$

For simplicity, the actual saved data of SkyDome will already be for a chosen time interval $\Delta t = 1hour$ and the factor $SkyDome(t + \Delta t, \phi, \theta) * \Delta t$ is already available via API. The ShadingScene is the boolean value of shading multiplied with the dot product of incidence angle and normal angle of the mesh.

@FlorianK13
Copy link
Member Author

@MartGro do you agree with this formula of scene.simulateTimeSeries?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant