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

Sam 1064 correct monthly curtailment #1068

Merged
merged 4 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
1 change: 0 additions & 1 deletion ssc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ include_directories(. ../splinter ../shared ../nlopt ../lpsolve ../solarpilot ..

set(SSC_SRC
cmod_6parsolve.cpp
cmod_annualoutput.cpp
cmod_analysisperiodchange_eqns.cpp
cmod_analysisperiodchange_eqns.h
cmod_battery.cpp
Expand Down
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
2 changes: 0 additions & 2 deletions ssc/sscapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ extern module_entry_info
cm_entry_utilityrate4,
cm_entry_utilityrate5,
cm_entry_utilityrateforecast,
cm_entry_annualoutput,
cm_entry_cashloan,
cm_entry_thirdpartyownership,
cm_entry_ippppa,
Expand Down Expand Up @@ -186,7 +185,6 @@ static module_entry_info *module_table[] = {
&cm_entry_utilityrate4,
&cm_entry_utilityrate5,
&cm_entry_utilityrateforecast,
&cm_entry_annualoutput,
&cm_entry_cashloan,
&cm_entry_thirdpartyownership,
&cm_entry_ippppa,
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
Loading