Institute-for-Future-Intelligence / multiphysics

Interactive Multiphysics Simulation for Everyone
https://intofuture.org/energy2d.html
GNU Lesser General Public License v3.0
58 stars 29 forks source link

Photons shot vs grid size #4

Open rozos opened 8 years ago

rozos commented 8 years ago

I think there is a bug in either sunShine or shootAtAngle functions (PhotonSolver2D.java). Specifically, the number of photons shot in shootAtAngle is not taking into account changes of lx or ly.

For example, if sunAngle is 90 degrees then in sunShine, spacing = lx/1/rayCount in shootAtAngle, dx = lx/rayCount and m=rayCount

This means that the number of photons shot is constant. On the other hand, rayPower does not depend on the grid size either. Therefore, the greater the grid size the lower the effect of the same amount of solar power density, which is not reasonable.