From 90922f07452c116d630d1eddefc2c70355a48b44 Mon Sep 17 00:00:00 2001 From: Brian Mirletz Date: Wed, 18 Oct 2023 16:27:07 -0600 Subject: [PATCH] Apply curtailment to monthly outputs --- ssc/cmod_grid.cpp | 3 +++ test/input_cases/grid_common_data.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ssc/cmod_grid.cpp b/ssc/cmod_grid.cpp index a75c381e6..105920954 100644 --- a/ssc/cmod_grid.cpp +++ b/ssc/cmod_grid.cpp @@ -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 }; @@ -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) diff --git a/test/input_cases/grid_common_data.h b/test/input_cases/grid_common_data.h index e8c460fd9..5dbe072a1 100644 --- a/test/input_cases/grid_common_data.h +++ b/test/input_cases/grid_common_data.h @@ -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 #include "code_generator_utilities.h"