- Posts: 22
Central tower CSP plant in PySAM (TcsmoltenSalt)
- franmoraga
- Topic Author
Less
More
30 Apr 2021 08:38 #9539
by franmoraga
Central tower CSP plant in PySAM (TcsmoltenSalt) was created by franmoraga
Hello to the whole community,
In SAM GIU there is the possibility of optimizing the heliostat field, when other parameters are modified. Is that possible to do in PySAM? Or would I have to do the simulation in SAM GIU and later add those parameters already optimized, for example, geometric to my code? I have looked for information, but I think only the second option is possible. But I would like to confirm it, please, since PySAM does not have all the features.
Thanks in advance,
Best regards,
Francisco
In SAM GIU there is the possibility of optimizing the heliostat field, when other parameters are modified. Is that possible to do in PySAM? Or would I have to do the simulation in SAM GIU and later add those parameters already optimized, for example, geometric to my code? I have looked for information, but I think only the second option is possible. But I would like to confirm it, please, since PySAM does not have all the features.
Thanks in advance,
Best regards,
Francisco
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5447
03 May 2021 15:12 #9548
by pgilman
Replied by pgilman on topic Central tower CSP plant in PySAM (TcsmoltenSalt)
Hi Francisco,
Here is a code snippet that shows how to optimize the heliostat field for the Power Tower model from PySAM:
Best regards,
Paul.
Here is a code snippet that shows how to optimize the heliostat field for the Power Tower model from PySAM:
Code:
import PySAM.TcsmoltenSalt as t
tech_model = t.default("MSPTSingleOwner")
tech_model.HeliostatField.field_model_type = 2 # generate flux maps
tech_model.SystemControl.time_stop = tech_model.SystemControl.time_start
tech_model.execute(1)
tech_model.HeliostatField.eta_map = tech_outputs["eta_map_out"] # get maps and set for subsequent runs
tech_model.HeliostatField.flux_maps = [r[2:] for r in tech_outputs['flux_maps_for_import']] # Don't include first two columns
tech_model.HeliostatField.A_sf_in = tech_outputs["A_sf"]
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
- franmoraga
- Topic Author
Less
More
- Posts: 22
04 May 2021 05:01 #9549
by franmoraga
Replied by franmoraga on topic Central tower CSP plant in PySAM (TcsmoltenSalt)
Dear Paul,
Thank you very much for your always valuable help. I have tried to implement the code that you indicate, but without success.
I get responses like "WARNING | No such comm: 8411a2ddacc411eb84260045e231bbc6".
or also that "The kernel stopped working, restarting it".
Does the code work fine for you?
Do you think it is because of my computational capacity? Is it because I need some permission? or maybe there is something I need to modify in the code?
I have checked many times and have tried different ways, but cannot find the error.
Thank you very much in advance, Paul.
Best regards,
Francisco
Thank you very much for your always valuable help. I have tried to implement the code that you indicate, but without success.
I get responses like "WARNING | No such comm: 8411a2ddacc411eb84260045e231bbc6".
or also that "The kernel stopped working, restarting it".
Does the code work fine for you?
Do you think it is because of my computational capacity? Is it because I need some permission? or maybe there is something I need to modify in the code?
I have checked many times and have tried different ways, but cannot find the error.
Thank you very much in advance, Paul.
Best regards,
Francisco
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5447
04 May 2021 14:00 #9551
by pgilman
Replied by pgilman on topic Central tower CSP plant in PySAM (TcsmoltenSalt)
Hi Francisco,
Please see the following resources for information about how to run PySAM:
sam.nrel.gov/software-development-kit-sdk.html
nrel-pysam.readthedocs.io/en/master/
You may want to start with a simple project first to make sure you have PySAM set up correctly before you try the more complicated power tower model with heliostat field optimization.
Best regards,
Paul.
Please see the following resources for information about how to run PySAM:
sam.nrel.gov/software-development-kit-sdk.html
nrel-pysam.readthedocs.io/en/master/
You may want to start with a simple project first to make sure you have PySAM set up correctly before you try the more complicated power tower model with heliostat field optimization.
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
- Johannes1
Less
More
- Posts: 3
10 May 2021 10:17 #9571
by Johannes1
Replied by Johannes1 on topic Central tower CSP plant in PySAM (TcsmoltenSalt)
Dear Paul, I have the same question. I already know how to work with simple examples, but I have not been able to optimize my configuration. Do you know how I could learn solar field optimization in detail? If there is any material or tutorial, because I have read what you recommended to Francisco, but I cannot connect it with the code that you put above.
Any recommendation please? The code didn't work for me either.
Thank you very much Paul
Any recommendation please? The code didn't work for me either.
Thank you very much Paul
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5447
10 May 2021 12:35 #9575
by pgilman
Replied by pgilman on topic Central tower CSP plant in PySAM (TcsmoltenSalt)
Hi Johannes,
One way to familiarize yourself with the inputs required to run models in PySAM is to use the code generator described on the SAM SDK page to export your inputs from SAM to Python. The code generator exports a complete set of inputs to the Python file so you can see how you will need to set things up for PySAM.
SAM's user interface manages the inputs for SolarPILOT to make it easier to run the field optimizations. If you want to do that in PySAM, you will have to familiarize yourself with the inputs.
Best regards,
Paul.
One way to familiarize yourself with the inputs required to run models in PySAM is to use the code generator described on the SAM SDK page to export your inputs from SAM to Python. The code generator exports a complete set of inputs to the Python file so you can see how you will need to set things up for PySAM.
SAM's user interface manages the inputs for SolarPILOT to make it easier to run the field optimizations. If you want to do that in PySAM, you will have to familiarize yourself with the inputs.
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
Moderators: pgilman