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

Running the MJ Solar Cell Tutorial.py program has some problems #164

Closed
canns99 opened this issue Jul 17, 2021 · 5 comments
Closed

Running the MJ Solar Cell Tutorial.py program has some problems #164

canns99 opened this issue Jul 17, 2021 · 5 comments
Assignees
Labels

Comments

@canns99
Copy link

canns99 commented Jul 17, 2021

I am a novice. After the MJ Solar Cell Tutorial.py program runs,figure shows the summary of the efficiency, Isc, Voc and fill factor (FF) versus concentration but goes wrong.
I didn't change any code, but as the figure shows, the result is completely incorrect.
image

•The correct answer would be
image

Is there a problem with the FORTRAN file or something?
Another problem is that programs often take hours to run,unavoidably let a person sad.
Any help would be greatly appreciated.

@canns99 canns99 added the bug label Jul 17, 2021
@phoebe-p phoebe-p self-assigned this Jul 28, 2021
@phoebe-p
Copy link
Member

Indeed, this is the wrong result -- I am looking into it to see if I can find where the problem is.
Just a note on the running time: the MJ_solar_cell_tutorial.py does say in a comment:

# NOTE: Due to the presence of QWs and the fact we calculate things a 19 different
# concentrations, this might take a while (~4 hours).
# Remove the QWs as indicated above to test the code much faster.

If you comment out the + QW_list line in the solar cell definition (so not including the quantum wells), as indicated, this will run much faster. Of course you can also reduce the number of concentrations to reduce the runtime.

@phoebe-p
Copy link
Member

The issue seems to be with this line in the for loop:

light_source.options["concentration"] = c

As it turns out, this does not actually change the concentration in the calculations. Changing it to:

light_source.concentration = c

gives the expected results. @canns99 thank you for flagging this, obviously we will update it in the example! @dalonsoa do you think this is due to a recent change in light_source? As far as I can tell the light_source.options construction is used only in MJ_solar_cell_tutorial.py and it's ipynb equivalent, no other examples.

@dalonsoa
Copy link
Collaborator

dalonsoa commented Jul 29, 2021 via email

@dalonsoa
Copy link
Collaborator

dalonsoa commented Oct 5, 2021

@all-contributors please add @canns99 for bug

@allcontributors
Copy link
Contributor

@dalonsoa

I've put up a pull request to add @canns99! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants