Update design doc to 1.2notoc
by Chris Satterlee 4 years 8 months
Update design doc to 1.2notoc

This commit is for the Word version of the design doc only (no PDF). This version of the doc has no TOC, TOF or TOE. What it does have is change bars. The file is corrupted in a way that prevents a PDF from being generated from it. Even though the TOC/TOF/TOE are removed, some vestige of them remains that is "poisoning" the document. The only way (I have found) to fix it is to start with a new blank document and copy/paste everything from this one (up to the final paragraph mark) into the new one. Among other things, this loses the change bars. The only reason for comitting this version is to have a record of the change bars.
2f94085c
Fix typos in docstrings
by Chris Satterlee 4 years 8 months
Fix typos in docstrings

No issue filed. This commit just fixes some typos and other minor issues in doctrings for the IV_Swinger_PV_model.py module.
9f57093d
Move plot_and_view_modeled_curve() into main() (Is...
by Chris Satterlee 4 years 8 months
Move plot_and_view_modeled_curve() into main() (Issue #172)

The plot_and_view_modeled_curve() function is moved into main() as a local function. This makes the "boilerplate" main() call much closer to being boilerplate. It still has the import of IV_Swinger2. This isn't really necessary; it could be at the top of the file, as normal. However, pylint flags this as a cyclic import. The cyclic import doesn't appear to cause a problem, but just in case, it seems safer to not import IV_Swinger2 unless the module is being run standalone. The pylint warning is disabled.
4813b999
Add PV model test logging
by Chris Satterlee 4 years 8 months
Add PV model test logging

In IV_Swinger_PV_model.py, added eq<n>_result properties for logging. Also modified ideality_factor property so it approximates if the number of cells is not specified.

In IV_Swinger2.py, added logging of all of the interesting PV model properties in gen_pv_test_curve().
9286f970
Improve PV modeling success rate (Issue #170)
by Chris Satterlee 4 years 8 months
Improve PV modeling success rate (Issue #170)

- Change IDEALITY_FACTOR_GUESS from 1.5 to 1.0
- Scale a_guess based on temperature
- Add 1e-10 to DEFAULT_I0_GUESSES

Also rearrange DEFAULT_RS_GUESSES to prioritize most common "winners" and remove a couple that are never used.

Also change rsh = 0 avoidance.
d01b7cdc
Enhance PV model to use equation #5 (Issue #168)
by Chris Satterlee 4 years 8 months
Enhance PV model to use equation #5 (Issue #168)

IV_Swinger_PV_model.py is modified with the following:
- DEFAULT_RSH_GUESSES (formerly DEFAULT_RSH_VALS) now has a second value: 100 (ohms)
- The test_all_five_parms function is now just test_parms, and the former test_parms function is now test_first_four_parms
- An additional loop is added to the find_parms function to first try using equation 5 and only run without it if that fails
- Added a PV cell spec to create_pv_spec_file()
- Added measurement of time to execute run() method
- Removed use_eq5 property
- Updated all comments and docstrings to reflect the modifications

The reason that the find_parms function has the loop to not use equation #5 is that it was found that there are still some cases that coverge only when a hardcoded Rsh value is used (e.g. Canadian Solar CS3W-415P and Q.PEAK DUO-G5 330.)

The IV_Swinger2.py module has one small modification to include the model execution time in the plot legend, after the parameter values.
3b89a99a
Fix sign error in eq5_result (Issue #168)
by Chris Satterlee 4 years 8 months
Fix sign error in eq5_result (Issue #168)

Fixed the sign of the dI/dV part of equation #5.
7a6e3698
Fix huge PDF problem (Issue #152 reopen)
by Chris Satterlee 4 years 8 months
Fix huge PDF problem (Issue #152 reopen)

Issue #152 was reopened because it was noticed that with the previous fix, the PDF files are huge and take a long time to generate.

This commit removes the previous fix (matplotlib.rcParams['pdf.fonttype'] = 42) and instead adds a wrapper around the plot_with_pyplot() method. This wrapper catches the exception "RuntimeError: TrueType font is missing table" and retries the call to plot_with_pyplot() with the font changed to the default. It also filters the annoying warnings that are generated in this case.

Also modified the help text for the Plotting Preferences tab of the GUI to remove mention of some fonts (e.g. Wingdings) requiring the application to be restarted. Wingdings work now and I can't find others that require the app to be restarted. Strangely, this seems to have been something wrong with my computer that "got better". The v2.6.0 released app even works now.
0511809c
Add option to use equation #5 (Issue #167)
by Chris Satterlee 4 years 8 months
Add option to use equation #5 (Issue #167)

With equation #5 fixed, it raises the question: can it now be used?

This commit adds the option to use equation #5. The "use_eq5" property of the PV_model class defaults to False, but if it is set to True, then equation #5 is used.

The answer to the question is that it still causes some models to fail that work with the 4 equations, and it slows down modeling in all cases with no noticeable benefits. But it is nice to retain the ability to use all five equations for future experimentation.
e900039e
Correct bug in PV model equation #5 (Issue #167)
by Chris Satterlee 4 years 8 months
Correct bug in PV model equation #5 (Issue #167)

Fixed the typo in eq5_result in test_eq5 function.
b20158e4
Report a bug