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

Implementation of the Mermoud/Lejeune module model #26

Closed
timorichert opened this issue Aug 31, 2017 · 11 comments
Closed

Implementation of the Mermoud/Lejeune module model #26

timorichert opened this issue Aug 31, 2017 · 11 comments
Assignees
Milestone

Comments

@timorichert
Copy link

timorichert commented Aug 31, 2017

Due to its wide application in the solar industry and its use as the de-facto standard in bankable yield assessment of solar power plants, the Mermoud/Lejeune module model could be a valuable addition for SAM/SSC.

The governing equations are published in "Performance assessment of a simulation model for PV modules of any available technology", André Mermoud and Thibault Lejeune, 2010. A summary can be found on the PVPMC website as well.

One advantage is that module manufacturers typically make their module data available in the PAN format, which contains parameters fit for use with this module models' governing equations. Examples for PAN files can be found for First Solar modules for the older PAN format or from Astroenergy for the more recent format. Thus, implementing this model would allow to import and use manufacturer data easily in SAM.

The model has already been implemented in the CanadianSolar/CASSYS open source simulation tool in C#. This code could serve as a reference in the development. Its licensing terms can be found here. On the other hand, I assume that the existing SAM code base could be easily adapted to use these governing equations in addition to the ones currently implemented.

@timorichert
Copy link
Author

timorichert commented Sep 3, 2017

FYI: I have started to implement the governing equations in a new and separate module model that can be used next to the other modules types in the SSC. You can find the code in the pvyield/ssc fork. The code is derived from the lib_cec6par-model and makes use of the already implemented SSC-functionality of determining V_oc and P_mp. The model will generally allow the consideration of different types of IAM-definition, AirMass-Modifiers, temperature models etc., even though not all options have been implemented at this point.

The code compiles well for x64 systems, the input parameters can be viewed in the SDKtool as they should, and some hourly simulation runs done for testing work fine. The results of the equations have been checked in Debug mode for some states and they agree with a benchmark model setup in Excel in parallel.

I advise that this is beta code not be used in any live simulations until sufficient testing of the code has been conducted.

In case there is interest in merging this functionality into the SSC main branch I would create a pull request. Any advisable changes and tasks to be performed before the implementation (i.e. change of variable names, change of the model prefix, tests to be run before merging the code, etc.) could be discussed there.

Commit history/updates:
2b18e02 (2017-09-03): Initial commit
4856919 (2017-09-04): Differentiation of IAM by beam/diffuse/ground irradiance
d8107ab (2017-09-05): Added extended Faiman temperature model and a spline-defined IAM definition
13aa33d (2017-09-08): Fixed errors in I_L and I_0 equations, added possibility of not using AirMass-correction at all (i.e., modifier of 1 is applied)

nickdiorio pushed a commit that referenced this issue Mar 5, 2018
@cwhanse
Copy link
Contributor

cwhanse commented Jul 27, 2018

It doesn't appear that this code is merged yet. The current version of the PVsyst model is different from that described in the Mermoud 2010 paper and coded in these commits, specifically, the equation for Rsh. The description at PVPMC is up to date.

@janinefreeman
Copy link
Collaborator

We are planning to merge this code in the next month or two. The model will not immediately be made available in the UI, but will be available via the SDK.

@cwhanse
Copy link
Contributor

cwhanse commented Jul 27, 2018

I'd recommend that the equations for Rsh be updated to PVsyst v6. The difference is on this line:

R_sh = R_shref + (R_sh0 - R_shref) * exp(-R_shexp * (S / S_ref));

should be (I'm sure I'll get the syntax wrong)

R_shbase = max( (Rsh_ref - R_sh0 * exp(-R_shexp) / (1 - exp(-R_shexp)), 0);
R_sh = R_shbase + (R_sh0 - R_shref) * exp(-R_shexp * (S / S_ref));

@sjanzou
Copy link
Collaborator

sjanzou commented Oct 18, 2018

Working in the release branch with spline.cpp. Soon to be replaced with SPLINTER for cubic spline implementation

@timorichert
Copy link
Author

It doesn't appear that this code is merged yet. The current version of the PVsyst model is different from that described in the Mermoud 2010 paper and coded in these commits, specifically, the equation for Rsh. The description at PVPMC is up to date.

Thanks for checking and for the insight, @cwhanse!

@timorichert
Copy link
Author

Working in the release branch with spline.cpp. Soon to be replaced with SPLINTER for cubic spline implementation

Great, @sjanzou, thanks for finding a license-compatible spline interpolator!

@sjanzou
Copy link
Collaborator

sjanzou commented Oct 27, 2018

Completed and tests set up in release branch

@sjanzou sjanzou closed this as completed Oct 27, 2018
mjwagner2 added a commit that referenced this issue Mar 14, 2019
Improved multiple receiver support and user-defined aim profiles
@allenlawrence94
Copy link
Contributor

Is this model able to model bifacial modules?

@janinefreeman
Copy link
Collaborator

Unfortunately this model currently doesn't have a bifacial option implemented, although it is a wishlist item that has been noted in #241 . This model was contributed externally and is currently available through the SDK/PySAM only. At one point @caseyzak24 was interested in adding the bifaciality capability to this model, although I don't know if he's had time to do so. If any external contributors were interested in adding that functionality, we'd be happy to help provide guidance as we know lots of users would appreciate it!

@allenlawrence94
Copy link
Contributor

allenlawrence94 commented Oct 5, 2021

@janinefreeman - I adapted one commit from @caseyzak24's work and opened a PR here: #622. This PR simply exposes bifaciality as an option in the mermoud module model. Thanks for your guidance! Let me know if/when this can be reviewed.

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

5 participants