Skip to content

Commit

Permalink
Apply curtailment to monthly outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
brtietz committed Oct 18, 2023
1 parent d8e8135 commit 90922f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ssc/cmod_grid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ var_info vtab_grid_input[] = {
{ SSC_INPUT, SSC_ARRAY, "crit_load", "Critical electricity load (year 1)", "kW", "", "Load", "", "", "" },
{ SSC_INOUT, SSC_ARRAY, "grid_outage", "Grid outage in this time step", "0/1", "0=GridAvailable,1=GridUnavailable,Length=load", "Load", "", "", "" },
{ SSC_INPUT, SSC_ARRAY, "load_escalation", "Annual load escalation", "%/year", "", "Load", "?=0", "", "" },
{ SSC_INOUT, SSC_ARRAY, "monthly_energy", "AC energy gross", "kWh/mo", "", "Monthly", "", "LENGTH=12", "" },


var_info_invalid };

Expand Down Expand Up @@ -233,6 +235,7 @@ void cm_grid::exec()
annual_energy_pre_interconnect *= gridVars->dt_hour_gen;
annual_energy *= gridVars->dt_hour_gen;

accumulate_monthly_for_year("gen", "monthly_energy", gridVars->dt_hour_gen, num_steps_per_hour);

// annual_energy_interconnect = std::accumulate(gridVars->systemGenerationLifetime_kW.begin(), gridVars->systemGenerationLifetime_kW.begin() + gridVars->numberOfSingleYearRecords, (double)0.0)*gridVars->dt_hour_gen;
if (gridVars->enable_interconnection_limit)
Expand Down
4 changes: 2 additions & 2 deletions test/input_cases/grid_common_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.



#ifndef _FUELCELL_COMMON_DATA_H_
#define _FUELCELL_COMMON_DATA_H_
#ifndef _GRID_COMMON_DATA_H_
#define _GRID_COMMON_DATA_H_

#include <stdio.h>
#include "code_generator_utilities.h"
Expand Down

0 comments on commit 90922f0

Please sign in to comment.