There are a few tricks that aren't obvious, so should there be a tips section of the docs?
For example, it is usually faster to create a new PVsystem then change every single cell in the system to a new irradiance.
>>> %%timeit
... pvm = pvmodule.PVmodule(pvcells=pvcell.PVcell(Ee=0.88))
... pvsys = pvsystem.PVsystem(pvmods=pvm)
# 1 loop, best of 3: 486 ms per loop
>>> %timeit pvsys.setSuns(0.75)
# 1 loop, best of 3: 1.38 s per loop
For example if you are trying to do a full day simulation of a shadow passing over the array, then to set the ambient effective irradiance on the cells at each timestep, you should call pvsys = pvsystem.PVsystem() at each timestep instead of pvsys.setSuns().
I definitely think so. I actually hadn't even thought of this particular trick. I'll try to keep other tips in mind as I'm continuing to work on ShadeResearch.
There are a few tricks that aren't obvious, so should there be a tips section of the docs?
For example, it is usually faster to create a new
PVsystem
then change every single cell in the system to a new irradiance.For example if you are trying to do a full day simulation of a shadow passing over the array, then to set the ambient effective irradiance on the cells at each timestep, you should call
pvsys = pvsystem.PVsystem()
at each timestep instead ofpvsys.setSuns()
.