Flat energy charge rate as an input variable in a parametric simulation

  • thomasjameson613
  • Topic Author
More
25 May 2021 09:49 #9630 by thomasjameson613
Hello,
I would like to run a parametric simulation to view how the net present value of a PV system changes as the price of electricity changes. I want my input variable to be a flat energy charge rate ranging from say, 8 cents to 15 cents per KWH, with increments of a tenth of a cent. I want my output to simply be the NPV of the system. I spent some time looking through the input options in parametrics, but I was unable to find what I was looking for. Is it possible to do what I want to do with SAM, without running 100 different individual simulations, changing the electricity rate each time?

Thanks,
Thomas
(Note: I thought that I submitted a ticket very similar to this one, but it is not tracked on my profile. If both of these go through, I apologize, and you may feel free to ignore one of them)

Please Log in or Create an account to join the conversation.

  • pgilman
More
26 May 2021 08:51 - 26 May 2021 08:53 #9632 by pgilman
Hi Thomas,

You can either set up a parametric simulation or write an LK script to do this.

First, you'll need to set up the inputs on the Electricity Rates page for a flat rate: The Rates for Energy Charges table (variable name ur_ec_tou_mat) should have one row, so set Number of entries to 1 and make sure the Weekday and Weekend schedule matrices are all set to 1:




Then, to set up a parametric simulation, click Parametrics, and at the top, click Inputs (Quick Setup does not work for inputs that are tables) to set up the parametric table like this:


For this example, I set up a range of flat rates from $0.08/kWh to $0.15/kWh increments of $0.01/kWh. You could use increments of $0.001/kWh, but I'm not sure it would give you better information and would take longer to set up.

Click the cell in the parametric table under "ur_ec_tou_mat" to edit the energy charge inputs for each row in the parametric table:


Another approach is to write an LK script to do this analysis. I wrote an example of how you could do this:

1. Download the electricity-rate-flat-rate-parametric.lk file from github.com/NREL/SAM/tree/develop/samples/LK%20Scripts%20for%20SAM .

2. Start SAM and open or create the file you want to use for the parametric study. Be sure the Rates for Energy Charge table has one row as described above.

3. On the File menu, click Open script and open the .lk file you downloaded in Step 1.

4. In the script editor, click Run.

Best regards,
Paul.
Last edit: 26 May 2021 08:53 by pgilman.

Please Log in or Create an account to join the conversation.

Moderators: pgilman
Powered by Kunena Forum