Skip to content

Commit

Permalink
Merge branch 'develop' into wind2024updates
Browse files Browse the repository at this point in the history
  • Loading branch information
janinefreeman committed Mar 28, 2024
2 parents a0958b1 + af06594 commit 7dcbd75
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 20 deletions.
10 changes: 5 additions & 5 deletions ssc/cmod_fresnel_physical.cpp
Expand Up @@ -58,9 +58,9 @@ static var_info _cm_vtab_fresnel_physical[] = {

// System Design

/*X*/ /*System Design*/{ SSC_INPUT, SSC_NUMBER, "solar_mult_in", "Solar multiple Input", "", "", "System_Design", "", "", "" },
/*X*/ /*System Design*/{ SSC_INPUT, SSC_NUMBER, "total_Ap_in", "Field aperture Input", "m3", "", "System_Design", "", "", "" },
/*X*/ /*System Design*/{ SSC_INPUT, SSC_NUMBER, "solar_mult_or_Ap", "Design using specified solar mult or field aperture", "m3", "", "System_Design", "", "", "" },
/*X*/ /*System Design*/{ SSC_INPUT, SSC_NUMBER, "solar_mult_in", "Solar multiple Input", "", "", "System_Design", "*", "", "" },
/*X*/ /*System Design*/{ SSC_INPUT, SSC_NUMBER, "total_Ap_in", "Field aperture Input", "m3", "", "System_Design", "*", "", "" },
/*X*/ /*System Design*/{ SSC_INPUT, SSC_NUMBER, "solar_mult_or_Ap", "Design using specified solar mult or field aperture", "m3", "", "System_Design", "*", "", "" },
/*X*/ /*System Design*/{ SSC_INPUT, SSC_NUMBER, "T_loop_in_des", "Design loop inlet temperature", "C", "", "System_Design", "*", "", "" },
/*X*/ /*System Design*/{ SSC_INPUT, SSC_NUMBER, "T_loop_out", "Target loop outlet temperature", "C", "", "System_Design", "*", "", "" },
/*X*/ /*System Design*/{ SSC_INPUT, SSC_NUMBER, "I_bn_des", "Solar irradiation at design", "W/m2", "", "System_Design", "*", "", "" },
Expand Down Expand Up @@ -158,7 +158,7 @@ static var_info _cm_vtab_fresnel_physical[] = {
/*X*/ /*Power Cycle*/{ SSC_INPUT, SSC_NUMBER, "pb_pump_coef", "Pumping power to move 1kg of HTF through PB loop", "kW/kg", "", "Powerblock", "*", "", "" },
/*X*/ /*Power Cycle*/{ SSC_INPUT, SSC_NUMBER, "cycle_max_frac", "Maximum turbine over design operation fraction", "", "", "Powerblock", "*", "", "" },
/*X*/ /*Power Cycle*/{ SSC_INPUT, SSC_NUMBER, "cycle_cutoff_frac", "Minimum turbine operation fraction before shutdown", "", "", "Powerblock", "*", "", "" },
/*X*/ /*startup script*/{ SSC_INPUT, SSC_NUMBER, "pc_config", "0: Steam Rankine (224), 1: user defined", "-", "", "Powerblock", "", "INTEGER", "" },
/*X*/ /*startup script*/{ SSC_INPUT, SSC_NUMBER, "pc_config", "0: Steam Rankine (224), 1: user defined", "-", "", "Powerblock", "*", "INTEGER", "" },



Expand Down Expand Up @@ -210,7 +210,7 @@ static var_info _cm_vtab_fresnel_physical[] = {

/*Sys Control*/{ SSC_INPUT, SSC_NUMBER, "is_dispatch", "Allow dispatch optimization?", /*TRUE=1*/ "-", "", "Sys_Control", "?=0", "", "" },
/*Sys Control*/{ SSC_INPUT, SSC_NUMBER, "is_dispatch_series", "Use time-series dispatch factors", "", "", "Sys_Control", "?=1", "", "" },
/*Sys Control*/{ SSC_INPUT, SSC_ARRAY, "dispatch_series", "Time series dispatch factors", "", "", "Sys_Control", "", "", "" },
/*Sys Control*/{ SSC_INPUT, SSC_ARRAY, "dispatch_series", "Time series dispatch factors", "", "", "Sys_Control", "*", "", "" },
/*Sys Control*/{ SSC_INPUT, SSC_NUMBER, "disp_frequency", "Frequency for dispatch optimization calculations", "hour", "", "Sys_Control", "is_dispatch=1", "", "" },
/*Sys Control*/{ SSC_INPUT, SSC_NUMBER, "disp_horizon", "Time horizon for dispatch optimization", "hour", "", "Sys_Control", "is_dispatch=1", "", "" },
/*Sys Control*/{ SSC_INPUT, SSC_NUMBER, "disp_max_iter", "Max. no. dispatch optimization iterations", "-", "", "Sys_Control", "is_dispatch=1", "", "" },
Expand Down
6 changes: 3 additions & 3 deletions ssc/cmod_fresnel_physical_iph.cpp
Expand Up @@ -57,9 +57,9 @@ static var_info _cm_vtab_fresnel_physical_iph[] = {

// System Design

/*System Design*/{ SSC_INPUT, SSC_NUMBER, "solar_mult_in", "Solar multiple Input", "", "", "System_Design", "", "", "" },
/*System Design*/{ SSC_INPUT, SSC_NUMBER, "total_Ap_in", "Field aperture Input", "m3", "", "System_Design", "", "", "" },
/*System Design*/{ SSC_INPUT, SSC_NUMBER, "solar_mult_or_Ap", "Design using specified solar mult or field aperture", "m3", "", "System_Design", "", "", "" },
/*System Design*/{ SSC_INPUT, SSC_NUMBER, "solar_mult_in", "Solar multiple Input", "", "", "System_Design", "*", "", "" },
/*System Design*/{ SSC_INPUT, SSC_NUMBER, "total_Ap_in", "Field aperture Input", "m3", "", "System_Design", "*", "", "" },
/*System Design*/{ SSC_INPUT, SSC_NUMBER, "solar_mult_or_Ap", "Design using specified solar mult or field aperture", "m3", "", "System_Design", "*", "", "" },
/*System Design*/{ SSC_INPUT, SSC_NUMBER, "T_loop_in_des", "Design loop inlet temperature", "C", "", "System_Design", "*", "", "" },
/*System Design*/{ SSC_INPUT, SSC_NUMBER, "T_loop_out", "Target loop outlet temperature", "C", "", "System_Design", "*", "", "" },
/*System Design*/{ SSC_INPUT, SSC_NUMBER, "I_bn_des", "Solar irradiation at design", "W/m2", "", "System_Design", "*", "", "" },
Expand Down
8 changes: 2 additions & 6 deletions ssc/cmod_trough_physical.cpp
Expand Up @@ -344,11 +344,6 @@ static var_info _cm_vtab_trough_physical[] = {
{ SSC_INPUT, SSC_NUMBER, "disp_pen_delta_w", "Dispatch cycle production change penalty", "$/kWe-change", "", "tou", "", "", "SIMULATION_PARAMETER" },
{ SSC_INPUT, SSC_NUMBER, "P_boil", "Boiler operating pressure", "bar", "", "powerblock", "", "", "SIMULATION_PARAMETER" },


// ADDED For Design Point
{ SSC_INPUT, SSC_NUMBER, "lat", "Latitude", "degree", "", "", "*", "", "" },


// Direct Capital Costs
{ SSC_INPUT, SSC_NUMBER, "csp.dtr.cost.site_improvements.cost_per_m2", "Site Improvement Cost per m2", "$/m2", "", "Capital_Costs", "?=0", "", "" },
{ SSC_INPUT, SSC_NUMBER, "csp.dtr.cost.solar_field.cost_per_m2", "Solar Field Cost per m2", "$/m2", "", "Capital_Costs", "?=0", "", "" },
Expand Down Expand Up @@ -813,6 +808,8 @@ class cm_trough_physical : public compute_module
weather_reader.init();
if (weather_reader.has_error()) throw exec_error("trough_physical", weather_reader.get_error());

double lat = weather_reader.ms_solved_params.m_lat; //[deg]

// Set up ssc output arrays
// Set steps per hour
C_csp_solver::S_sim_setup sim_setup;
Expand Down Expand Up @@ -1846,7 +1843,6 @@ class cm_trough_physical : public compute_module
vector<double> L_SCA = as_vector_double("L_SCA");
vector<double> ColperSCA = as_vector_double("ColperSCA");
vector<double> Ave_Focal_Length = as_vector_double("Ave_Focal_Length");
double lat = as_double("lat");

util::matrix_t<ssc_number_t> csp_dtr_sca_ap_lengths;
{
Expand Down
10 changes: 4 additions & 6 deletions ssc/cmod_trough_physical_iph.cpp
Expand Up @@ -278,10 +278,6 @@ static var_info _cm_vtab_trough_physical_iph[] = {
{ SSC_INPUT, SSC_NUMBER, "P_boil", "Boiler operating pressure", "bar", "", "powerblock", "", "", "SIMULATION_PARAMETER" },


// ADDED For Design Point
{ SSC_INPUT, SSC_NUMBER, "lat", "Latitude", "degree", "", "", "*", "", "" },


// Direct Capital Costs
{ SSC_INPUT, SSC_NUMBER, "csp.dtr.cost.site_improvements.cost_per_m2", "Site Improvement Cost per m2", "$/m2", "", "Capital_Costs", "?=0", "", "" },
{ SSC_INPUT, SSC_NUMBER, "csp.dtr.cost.solar_field.cost_per_m2", "Solar Field Cost per m2", "$/m2", "", "Capital_Costs", "?=0", "", "" },
Expand Down Expand Up @@ -692,6 +688,7 @@ class cm_trough_physical_iph : public compute_module
C_csp_weatherreader weather_reader;
C_csp_solver::S_sim_setup sim_setup;
int n_steps_fixed;
double lat = std::numeric_limits<double>::quiet_NaN();
int steps_per_hour;
{
if (is_assigned("file_name")) {
Expand Down Expand Up @@ -723,6 +720,8 @@ class cm_trough_physical_iph : public compute_module
int n_wf_records = (int)weather_reader.m_weather_data_provider->nrecords();
steps_per_hour = n_wf_records / 8760; //[-]

lat = weather_reader.ms_solved_params.m_lat; //[deg]

n_steps_fixed = steps_per_hour * 8760; //[-]
sim_setup.m_report_step = 3600.0 / (double)steps_per_hour; //[s]
}
Expand Down Expand Up @@ -1536,8 +1535,7 @@ class cm_trough_physical_iph : public compute_module
vector<double> L_SCA = as_vector_double("L_SCA");
vector<double> ColperSCA = as_vector_double("ColperSCA");
vector<double> Ave_Focal_Length = as_vector_double("Ave_Focal_Length");
double lat = as_double("lat");


util::matrix_t<ssc_number_t> csp_dtr_sca_ap_lengths;
{
size_t n = L_SCA.size();
Expand Down

0 comments on commit 7dcbd75

Please sign in to comment.