SunPower / PVMismatch

An explicit Python PV system IV & PV curve trace calculator which can also calculate mismatch.
http://sunpower.github.io/PVMismatch/
BSD 3-Clause "New" or "Revised" License
79 stars 30 forks source link

tips and tricks section #40

Open mikofski opened 7 years ago

mikofski commented 7 years ago

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().

bmeyers commented 7 years ago

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.

mikofski commented 7 years ago

I think we can collect tips on the wiki and transfer the best tricks to the docs with each release.