From 2f962147a58224d7bc257fe8d4652c7cc6f9611a Mon Sep 17 00:00:00 2001 From: Taylor Brown <60201147+taylorbrown75@users.noreply.github.com> Date: Fri, 8 Nov 2024 13:31:39 -0700 Subject: [PATCH] Squashed commit of the following: commit b5f47632e89bcd97887b031eb9dd26b0b2a46ebe Author: Taylor Brown <60201147+taylorbrown75@users.noreply.github.com> Date: Thu Nov 7 16:16:05 2024 -0700 Change tes_type starting integer to 1 --- ssc/cmod_csp_subcomponent.cpp | 85 +++++++++++------------ ssc/cmod_trough_physical.cpp | 114 +++++++++++++++---------------- ssc/cmod_trough_physical_iph.cpp | 114 +++++++++++++++---------------- tcs/csp_solver_core.h | 2 +- 4 files changed, 158 insertions(+), 157 deletions(-) diff --git a/ssc/cmod_csp_subcomponent.cpp b/ssc/cmod_csp_subcomponent.cpp index 12cffd4da..a348af8bc 100644 --- a/ssc/cmod_csp_subcomponent.cpp +++ b/ssc/cmod_csp_subcomponent.cpp @@ -62,22 +62,23 @@ static var_info _cm_vtab_csp_subcomponent[] = { { SSC_INPUT, SSC_NUMBER, "pb_pump_coef", "Pumping power to move 1kg of HTF through PB loop", "kW/kg", "", "powerblock", "*", "", "" }, // General TES Parameters - { SSC_INPUT, SSC_NUMBER, "tes_type", "Standard two tank (0), Packed Bed (1), Piston Cylinder (2)", "-", "", "TES", "?=0", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_type", "Standard two tank (1), Packed Bed (2), Piston Cylinder (3)", "-", "", "TES", "?=1", "", "" }, { SSC_INPUT, SSC_NUMBER, "Fluid", "Field HTF fluid ID number", "-", "", "solar_field", "*", "", "" }, { SSC_INPUT, SSC_MATRIX, "field_fl_props", "User defined field fluid property data", "-", "", "solar_field", "*", "", "" }, { SSC_INPUT, SSC_NUMBER, "tshours", "Equivalent full-load thermal storage hours", "hr", "", "TES", "*", "", "" }, { SSC_INPUT, SSC_NUMBER, "is_h_tank_fixed", "[1] Use fixed height (calculate diameter) [0] Use fixed diameter [2] Use fixed d and h (for packed bed)", "-", "", "TES", "?=1", "", "" }, { SSC_INPUT, SSC_NUMBER, "h_tank_in", "Total height of tank input (height of HTF when tank is full", "m", "", "TES", "is_h_tank_fixed=1", "", "" }, { SSC_INPUT, SSC_NUMBER, "d_tank_in", "Tank diameter input", "m", "", "TES", "is_h_tank_fixed=0|is_h_tank_fixed=2", "", "" }, - { SSC_INPUT, SSC_NUMBER, "u_tank", "Loss coefficient from the tank", "W/m2-K", "", "TES", "tes_type=0|tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "u_tank", "Loss coefficient from the tank", "W/m2-K", "", "TES", "tes_type=1|tes_type=3", "", "" }, { SSC_INPUT, SSC_NUMBER, "tank_pairs", "Number of equivalent tank pairs", "-", "", "TES", "*", "INTEGER", "" }, - { SSC_INPUT, SSC_NUMBER, "hot_tank_Thtr", "Minimum allowable hot tank HTF temp", "C", "", "TES", "tes_type=0|tes_type=2", "", "" }, - { SSC_INPUT, SSC_NUMBER, "hot_tank_max_heat", "Rated heater capacity for hot tank heating", "MWe", "", "TES", "tes_type=0|tes_type=2", "", "" }, - { SSC_INPUT, SSC_NUMBER, "cold_tank_Thtr", "Minimum allowable cold tank HTF temp", "C", "", "TES", "tes_type=0|tes_type=2", "", "" }, - { SSC_INPUT, SSC_NUMBER, "cold_tank_max_heat", "Rated heater capacity for cold tank heating", "MWe", "", "TES", "tes_type=0|tes_type=2", "", "" }, { SSC_INPUT, SSC_NUMBER, "h_tank_min", "Minimum allowable HTF height in storage tank", "m", "", "TES", "tes_type=0|tes_type=2", "", "" }, - { SSC_INPUT, SSC_NUMBER, "h_tank_min", "Minimum allowable HTF height in storage tank", "m", "", "TES", "tes_type=0|tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "hot_tank_Thtr", "Minimum allowable hot tank HTF temp", "C", "", "TES", "tes_type=1|tes_type=3", "", "" }, + { SSC_INPUT, SSC_NUMBER, "hot_tank_max_heat", "Rated heater capacity for hot tank heating", "MWe", "", "TES", "tes_type=1|tes_type=3", "", "" }, + { SSC_INPUT, SSC_NUMBER, "cold_tank_Thtr", "Minimum allowable cold tank HTF temp", "C", "", "TES", "tes_type=1|tes_type=3", "", "" }, + { SSC_INPUT, SSC_NUMBER, "cold_tank_max_heat", "Rated heater capacity for cold tank heating", "MWe", "", "TES", "tes_type=1|tes_type=3", "", "" }, + { SSC_INPUT, SSC_NUMBER, "h_tank_min", "Minimum allowable HTF height in storage tank", "m", "", "TES", "tes_type=1|tes_type=3", "", "" }, + { SSC_INPUT, SSC_NUMBER, "h_tank_min", "Minimum allowable HTF height in storage tank", "m", "", "TES", "tes_type=1|tes_type=3", "", "" }, { SSC_INPUT, SSC_NUMBER, "init_hot_htf_percent", "Initial fraction of avail. vol that is hot", "%", "", "TES", "*", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_n_tsteps", "Number of subtimesteps (for NT and packed bed)", "", "", "TES", "tes_type>0", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_n_tsteps", "Number of subtimesteps (for NT and packed bed)", "", "", "TES", "tes_type>1", "", "" }, // TES { SSC_INPUT, SSC_NUMBER, "V_tes_des", "Design-point velocity to size the TES pipe diameters", "m/s", "", "controller", "*", "", "" }, @@ -96,29 +97,29 @@ static var_info _cm_vtab_csp_subcomponent[] = { { SSC_INPUT, SSC_NUMBER, "DP_SGS", "Pressure drop within the steam generator", "bar", "", "controller", "*", "", "" }, // TES Two Tank Specific - { SSC_INPUT, SSC_NUMBER, "store_fluid", "Material number for storage fluid", "-", "", "TES", "tes_type=0", "", "" }, - { SSC_INPUT, SSC_MATRIX, "store_fl_props", "User defined storage fluid property data", "-", "", "TES", "tes_type=0", "", "" }, - { SSC_INPUT, SSC_NUMBER, "dt_hot", "Hot side HX approach temp", "C", "", "TES", "tes_type=0", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tanks_in_parallel", "Tanks are in parallel, not in series, with solar field", "-", "", "controller", "tes_type=0", "", "" }, + { SSC_INPUT, SSC_NUMBER, "store_fluid", "Material number for storage fluid", "-", "", "TES", "tes_type=1", "", "" }, + { SSC_INPUT, SSC_MATRIX, "store_fl_props", "User defined storage fluid property data", "-", "", "TES", "tes_type=1", "", "" }, + { SSC_INPUT, SSC_NUMBER, "dt_hot", "Hot side HX approach temp", "C", "", "TES", "tes_type=1", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tanks_in_parallel", "Tanks are in parallel, not in series, with solar field", "-", "", "controller", "tes_type=1", "", "" }, // TES Packed Bed - { SSC_INPUT, SSC_NUMBER, "tes_pb_n_xsteps", "Number of spatial segments", "", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_k_eff", "TES packed bed effective conductivity", "W/m K", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_void_frac", "TES packed bed void fraction", "", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_dens_solid", "TES packed bed media density", "kg/m3", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_cp_solid", "TES particle specific heat", "kJ/kg K", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_T_hot_delta", "Max allowable decrease in hot discharge temp", "C", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_T_cold_delta", "Max allowable increase in cold discharge temp", "C", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_T_charge_min", "Min charge temp", "C", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_f_oversize", "Packed bed oversize factor", "", "", "TES", "tes_type=1", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_n_xsteps", "Number of spatial segments", "", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_k_eff", "TES packed bed effective conductivity", "W/m K", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_void_frac", "TES packed bed void fraction", "", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_dens_solid", "TES packed bed media density", "kg/m3", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_cp_solid", "TES particle specific heat", "kJ/kg K", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_T_hot_delta", "Max allowable decrease in hot discharge temp", "C", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_T_cold_delta", "Max allowable increase in cold discharge temp", "C", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_T_charge_min", "Min charge temp", "C", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_f_oversize", "Packed bed oversize factor", "", "", "TES", "tes_type=2", "", "" }, { SSC_INPUT, SSC_ARRAY, "tes_pb_T_grad_ini", "TES Temperature gradient at beginning of timestep", "C", "", "TES", "?=[-274]", "", "" }, // TES Piston Cylinder - { SSC_INPUT, SSC_NUMBER, "tes_cyl_tank_thick", "Tank wall thickness (used for Piston Cylinder)", "m", "", "TES", "tes_type=2", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_cyl_tank_cp", "Tank wall cp (used for Piston Cylinder)", "kJ/kg-K", "", "TES", "tes_type=2", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_cyl_tank_dens", "Tank wall thickness (used for Piston Cylinder)", "kg/m3", "", "TES", "tes_type=2", "", "" }, - { SSC_INPUT, SSC_ARRAY, "tes_cyl_piston_loss_poly", "Polynomial coefficients describing piston heat loss function (f(kg/s)=%)", "", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_cyl_tank_thick", "Tank wall thickness (used for Piston Cylinder)", "m", "", "TES", "tes_type=3", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_cyl_tank_cp", "Tank wall cp (used for Piston Cylinder)", "kJ/kg-K", "", "TES", "tes_type=3", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_cyl_tank_dens", "Tank wall thickness (used for Piston Cylinder)", "kg/m3", "", "TES", "tes_type=3", "", "" }, + { SSC_INPUT, SSC_ARRAY, "tes_cyl_piston_loss_poly", "Polynomial coefficients describing piston heat loss function (f(kg/s)=%)", "", "", "TES", "tes_type=3", "", "" }, { SSC_INPUT, SSC_NUMBER, "tes_cyl_tank_insul_percent", "Percent additional wall mass due to insulation (used for Piston Cylinder)", "%", "", "TES", "?=0", "", "" }, // Outputs @@ -137,25 +138,25 @@ static var_info _cm_vtab_csp_subcomponent[] = { - { SSC_OUTPUT, SSC_ARRAY, "tes_error", "TES energy balance error", "MW", "", "TES", "tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_error_percent", "TES energy balance error percent", "%", "", "TES", "tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "piston_loc", "Piston Location (distance from left cold side)", "m", "", "TES", "tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "piston_frac", "Piston Fraction (distance from left cold side)", "", "", "TES", "tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_leak_error", "TES energy balance error due to leakage assumption", "MWt", "", "TES", "tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_E_hot", "TES hot side internal energy", "MJ", "", "TES", "tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_E_cold", "TES cold side internal energy", "MJ", "", "TES", "tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_wall_error", "TES energy balance error due to wall temperature assumption", "MWt", "", "TES", "tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_error_corrected", "TES energy balance error, accounting for wall and temperature assumption error", "MWt", "", "TES", "tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_error", "TES energy balance error", "MW", "", "TES", "tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_error_percent", "TES energy balance error percent", "%", "", "TES", "tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "piston_loc", "Piston Location (distance from left cold side)", "m", "", "TES", "tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "piston_frac", "Piston Fraction (distance from left cold side)", "", "", "TES", "tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_leak_error", "TES energy balance error due to leakage assumption", "MWt", "", "TES", "tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_E_hot", "TES hot side internal energy", "MJ", "", "TES", "tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_E_cold", "TES cold side internal energy", "MJ", "", "TES", "tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_wall_error", "TES energy balance error due to wall temperature assumption", "MWt", "", "TES", "tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_error_corrected", "TES energy balance error, accounting for wall and temperature assumption error", "MWt", "", "TES", "tes_type=3", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_exp_wall_mass", "TES expansion tank effective wall mass", "kg", "", "TES", "tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_exp_length", "TES expansion tank effective length", "m", "", "TES", "tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_mass_cold", "TES cold fluid mass", "kg", "", "TES", "tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_mass_hot", "TES hot fluid mass", "kg", "", "TES", "tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_V_cold", "TES cold fluid volume", "kg", "", "TES", "tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_V_hot", "TES hot fluid volume", "kg", "", "TES", "tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_exp_wall_mass", "TES expansion tank effective wall mass", "kg", "", "TES", "tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_exp_length", "TES expansion tank effective length", "m", "", "TES", "tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_mass_cold", "TES cold fluid mass", "kg", "", "TES", "tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_mass_hot", "TES hot fluid mass", "kg", "", "TES", "tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_V_cold", "TES cold fluid volume", "kg", "", "TES", "tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_V_hot", "TES hot fluid volume", "kg", "", "TES", "tes_type=3", "", "" }, { SSC_OUTPUT, SSC_ARRAY, "hot_tank_mass_perc", "TES hot tank mass percent of total (end)", "kg", "", "TES", "*", "", "" }, - { SSC_OUTPUT, SSC_MATRIX, "T_grad_final", "TES Temperature gradient at end of timestep", "C", "", "TES", "tes_type=1", "", "" }, + { SSC_OUTPUT, SSC_MATRIX, "T_grad_final", "TES Temperature gradient at end of timestep", "C", "", "TES", "tes_type=2", "", "" }, var_info_invalid }; @@ -384,7 +385,7 @@ class cm_csp_subcomponent : public compute_module } else { - throw exec_error("csp_subcomponent", "tes_type must be 0-2"); + throw exec_error("csp_subcomponent", "tes_type must be 1-3"); } // Initialization -> this is necessary to fully instantiate the TES diff --git a/ssc/cmod_trough_physical.cpp b/ssc/cmod_trough_physical.cpp index 7fbc29194..611e555e5 100644 --- a/ssc/cmod_trough_physical.cpp +++ b/ssc/cmod_trough_physical.cpp @@ -202,47 +202,47 @@ static var_info _cm_vtab_trough_physical[] = { { SSC_INPUT, SSC_MATRIX, "ud_ind_od", "Off design user-defined power cycle performance as function of T_htf, m_dot_htf [ND], and T_amb", "", "", "powerblock", "pc_config=1", "", "" }, // General TES Parameters - { SSC_INPUT, SSC_NUMBER, "tes_type", "Standard two tank (0), Packed Bed (1), Piston Cylinder (2)", "-", "", "TES", "?=0", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_type", "Standard two tank (1), Packed Bed (2), Piston Cylinder (3)", "-", "", "TES", "?=1", "", "" }, { SSC_INPUT, SSC_NUMBER, "tshours", "Equivalent full-load thermal storage hours", "hr", "", "TES", "*", "", "" }, { SSC_INPUT, SSC_NUMBER, "is_h_tank_fixed", "[1] Use fixed height (calculate diameter) [0] Use fixed diameter [2] Use fixed d and h (for packed bed)", "-", "", "TES", "?=1", "", "" }, { SSC_INPUT, SSC_NUMBER, "h_tank_in", "Total height of tank input (height of HTF when tank is full", "m", "", "TES", "is_h_tank_fixed=1", "", "" }, { SSC_INPUT, SSC_NUMBER, "d_tank_in", "Tank diameter input", "m", "", "TES", "is_h_tank_fixed=0|is_h_tank_fixed=2", "", "" }, - { SSC_INPUT, SSC_NUMBER, "u_tank", "Loss coefficient from the tank", "W/m2-K", "", "TES", "tes_type=0|tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "u_tank", "Loss coefficient from the tank", "W/m2-K", "", "TES", "tes_type=1|tes_type=3", "", "" }, { SSC_INPUT, SSC_NUMBER, "tank_pairs", "Number of equivalent tank pairs", "-", "", "TES", "*", "INTEGER", "" }, - { SSC_INPUT, SSC_NUMBER, "hot_tank_Thtr", "Minimum allowable hot tank HTF temp", "C", "", "TES", "tes_type=0|tes_type=2", "", "" }, - { SSC_INPUT, SSC_NUMBER, "hot_tank_max_heat", "Rated heater capacity for hot tank heating", "MWe", "", "TES", "tes_type=0|tes_type=2", "", "" }, - { SSC_INPUT, SSC_NUMBER, "cold_tank_Thtr", "Minimum allowable cold tank HTF temp", "C", "", "TES", "tes_type=0|tes_type=2", "", "" }, - { SSC_INPUT, SSC_NUMBER, "cold_tank_max_heat", "Rated heater capacity for cold tank heating", "MWe", "", "TES", "tes_type=0|tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "hot_tank_Thtr", "Minimum allowable hot tank HTF temp", "C", "", "TES", "tes_type=1|tes_type=3", "", "" }, + { SSC_INPUT, SSC_NUMBER, "hot_tank_max_heat", "Rated heater capacity for hot tank heating", "MWe", "", "TES", "tes_type=1|tes_type=3", "", "" }, + { SSC_INPUT, SSC_NUMBER, "cold_tank_Thtr", "Minimum allowable cold tank HTF temp", "C", "", "TES", "tes_type=1|tes_type=3", "", "" }, + { SSC_INPUT, SSC_NUMBER, "cold_tank_max_heat", "Rated heater capacity for cold tank heating", "MWe", "", "TES", "tes_type=1|tes_type=3", "", "" }, //{ SSC_INPUT, SSC_NUMBER, "dt_cold", "Cold side HX approach temp", "C", "", "TES", "*", "", "" }, //{ SSC_INPUT, SSC_NUMBER, "T_tank_hot_ini", "Initial hot tank fluid temperature", "C", "", "TES", "*", "", "" }, //{ SSC_INPUT, SSC_NUMBER, "T_tank_cold_ini", "Initial cold tank fluid temperature", "C", "", "TES", "*", "", "" }, - { SSC_INPUT, SSC_NUMBER, "h_tank_min", "Minimum allowable HTF height in storage tank", "m", "", "TES", "tes_type=0|tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "h_tank_min", "Minimum allowable HTF height in storage tank", "m", "", "TES", "tes_type=1|tes_type=3", "", "" }, { SSC_INPUT, SSC_NUMBER, "init_hot_htf_percent", "Initial fraction of avail. vol that is hot", "%", "", "TES", "*", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_n_tsteps", "Number of subtimesteps (for NT and packed bed)", "", "", "TES", "tes_type>0", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_n_tsteps", "Number of subtimesteps (for NT and packed bed)", "", "", "TES", "tes_type>1", "", "" }, // TES Two Tank Specific - { SSC_INPUT, SSC_NUMBER, "store_fluid", "Material number for storage fluid", "-", "", "TES", "tes_type=0", "", "" }, - { SSC_INPUT, SSC_MATRIX, "store_fl_props", "User defined storage fluid property data", "-", "", "TES", "tes_type=0", "", "" }, - { SSC_INPUT, SSC_NUMBER, "dt_hot", "Hot side HX approach temp", "C", "", "TES", "tes_type=0", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tanks_in_parallel", "Tanks are in parallel, not in series, with solar field", "-", "", "controller", "tes_type=0", "", "" }, + { SSC_INPUT, SSC_NUMBER, "store_fluid", "Material number for storage fluid", "-", "", "TES", "tes_type=1", "", "" }, + { SSC_INPUT, SSC_MATRIX, "store_fl_props", "User defined storage fluid property data", "-", "", "TES", "tes_type=1", "", "" }, + { SSC_INPUT, SSC_NUMBER, "dt_hot", "Hot side HX approach temp", "C", "", "TES", "tes_type=1", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tanks_in_parallel", "Tanks are in parallel, not in series, with solar field", "-", "", "controller", "tes_type=1", "", "" }, // TES Piston Cylinder - { SSC_INPUT, SSC_NUMBER, "tes_cyl_tank_thick", "Tank wall thickness (used for Piston Cylinder)", "m", "", "TES", "tes_type=2", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_cyl_tank_cp", "Tank wall cp (used for Piston Cylinder)", "kJ/kg-K", "", "TES", "tes_type=2", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_cyl_tank_dens", "Tank wall thickness (used for Piston Cylinder)", "kg/m3", "", "TES", "tes_type=2", "", "" }, - { SSC_INPUT, SSC_ARRAY, "tes_cyl_piston_loss_poly", "Polynomial coefficients describing piston heat loss function (f(kg/s)=%)", "", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_cyl_tank_thick", "Tank wall thickness (used for Piston Cylinder)", "m", "", "TES", "tes_type=3", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_cyl_tank_cp", "Tank wall cp (used for Piston Cylinder)", "kJ/kg-K", "", "TES", "tes_type=3", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_cyl_tank_dens", "Tank wall thickness (used for Piston Cylinder)", "kg/m3", "", "TES", "tes_type=3", "", "" }, + { SSC_INPUT, SSC_ARRAY, "tes_cyl_piston_loss_poly", "Polynomial coefficients describing piston heat loss function (f(kg/s)=%)", "", "", "TES", "tes_type=3", "", "" }, { SSC_INPUT, SSC_NUMBER, "tes_cyl_tank_insul_percent", "Percent additional wall mass due to insulation (used for Piston Cylinder)", "%", "", "TES", "?=0", "", "" }, // TES Packed Bed - { SSC_INPUT, SSC_NUMBER, "tes_pb_n_xsteps", "Number of spatial segments", "", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_k_eff", "TES packed bed effective conductivity", "W/m K", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_void_frac", "TES packed bed void fraction", "", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_dens_solid", "TES packed bed media density", "kg/m3", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_cp_solid", "TES particle specific heat", "kJ/kg K", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_T_hot_delta", "Max allowable decrease in hot discharge temp", "C", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_T_cold_delta", "Max allowable increase in cold discharge temp", "C", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_T_charge_min", "Min charge temp", "C", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_f_oversize", "Packed bed oversize factor", "", "", "TES", "tes_type=1", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_n_xsteps", "Number of spatial segments", "", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_k_eff", "TES packed bed effective conductivity", "W/m K", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_void_frac", "TES packed bed void fraction", "", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_dens_solid", "TES packed bed media density", "kg/m3", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_cp_solid", "TES particle specific heat", "kJ/kg K", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_T_hot_delta", "Max allowable decrease in hot discharge temp", "C", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_T_cold_delta", "Max allowable increase in cold discharge temp", "C", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_T_charge_min", "Min charge temp", "C", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_f_oversize", "Packed bed oversize factor", "", "", "TES", "tes_type=2", "", "" }, // Optional Component Initialization (state at start of first timestep) @@ -628,33 +628,33 @@ static var_info _cm_vtab_trough_physical[] = { { SSC_OUTPUT, SSC_ARRAY, "tes_htf_pump_power", "TES HTF pump power", "MWe", "", "TES", "sim_type=1", "", "" }, // NT TES - { SSC_OUTPUT, SSC_ARRAY, "vol_tes_cold", "TES cold fluid volume", "m3", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "vol_tes_hot", "TES hot fluid volume", "m3" , "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "vol_tes_cold", "TES cold fluid volume", "m3", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "vol_tes_hot", "TES hot fluid volume", "m3" , "", "TES", "sim_type=1&tes_type=3", "", "" }, { SSC_OUTPUT, SSC_ARRAY, "vol_tes_tot", "TES total fluid volume", "m3", "", "TES", "sim_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_piston_loc", "TES piston distance from left (cold) side", "m", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_piston_frac", "TES piston fraction of cold distance over total", "", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_cold_vol_frac", "TES volume fraction of cold over total", "", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_mass_tot", "TES total fluid mass", "kg", "", "TES", "tes_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_SA_cold", "TES cold side surface area", "m2", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_SA_hot", "TES hot side surface area", "m2", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_SA_tot", "TES total surface area", "m2", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_error", "TES energy balance error", "MWt", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_error_percent", "TES energy balance error percent", "%", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_leak_error", "TES energy balance error due to leakage assumption", "MWt", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_wall_error", "TES energy balance error due to wall temperature assumption", "MWt", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_error_corrected", "TES energy balance error, accounting for wall and temperature assumption error", "MWt", "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_piston_loc", "TES piston distance from left (cold) side", "m", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_piston_frac", "TES piston fraction of cold distance over total", "", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_cold_vol_frac", "TES volume fraction of cold over total", "", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_mass_tot", "TES total fluid mass", "kg", "", "TES", "sim_type=1", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_SA_cold", "TES cold side surface area", "m2", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_SA_hot", "TES hot side surface area", "m2", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_SA_tot", "TES total surface area", "m2", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_error", "TES energy balance error", "MWt", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_error_percent", "TES energy balance error percent", "%", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_leak_error", "TES energy balance error due to leakage assumption", "MWt", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_wall_error", "TES energy balance error due to wall temperature assumption", "MWt", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_error_corrected", "TES energy balance error, accounting for wall and temperature assumption error", "MWt", "", "TES", "sim_type=1&tes_type=3", "", "" }, // Packed Bed TES - { SSC_OUTPUT, SSC_ARRAY, "T_grad_0", "TES Temperature gradient 0 indice", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "T_grad_1", "TES Temperature gradient 1 indice", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "T_grad_2", "TES Temperature gradient 2 indice", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "T_grad_3", "TES Temperature gradient 3 indice", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "T_grad_4", "TES Temperature gradient 4 indice", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "T_grad_5", "TES Temperature gradient 5 indice", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "T_grad_6", "TES Temperature gradient 6 indice", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "T_grad_7", "TES Temperature gradient 7 indice", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "T_grad_8", "TES Temperature gradient 8 indice", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "T_grad_9", "TES Temperature gradient 9 indice", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "T_grad_0", "TES Temperature gradient 0 indice", "C", "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "T_grad_1", "TES Temperature gradient 1 indice", "C", "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "T_grad_2", "TES Temperature gradient 2 indice", "C", "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "T_grad_3", "TES Temperature gradient 3 indice", "C", "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "T_grad_4", "TES Temperature gradient 4 indice", "C", "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "T_grad_5", "TES Temperature gradient 5 indice", "C", "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "T_grad_6", "TES Temperature gradient 6 indice", "C", "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "T_grad_7", "TES Temperature gradient 7 indice", "C", "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "T_grad_8", "TES Temperature gradient 8 indice", "C", "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "T_grad_9", "TES Temperature gradient 9 indice", "C", "", "TES", "sim_type=1&tes_type=2", "", "" }, //{ SSC_OUTPUT, SSC_ARRAY, "m_dot_tes_dc", "TES discharge mass flow rate", "kg/s", "", "TES", "*", "", "" }, @@ -732,13 +732,13 @@ static var_info _cm_vtab_trough_physical[] = { { SSC_OUTPUT, SSC_NUMBER, "sim_duration", "Computational time of timeseries simulation", "s", "", "system", "sim_type=1", "", "" }, { SSC_OUTPUT, SSC_ARRAY, "recirculating", "Field recirculating (bypass valve open)", "-", "", "solar_field", "sim_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_diams", "Pipe diameters in TES", "m", "", "TES", "sim_type=1&tes_type=0", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_wallthk", "Pipe wall thickness in TES", "m", "", "TES", "sim_type=1&tes_type=0", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_lengths", "Pipe lengths in TES", "m", "", "TES", "sim_type=1&tes_type=0", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_mdot_dsn", "Mass flow TES pipes at design conditions", "kg/s", "", "TES", "sim_type=1&tes_type=0", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_vel_dsn", "Velocity in TES pipes at design conditions", "m/s", "", "TES", "sim_type=1&tes_type=0", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_T_dsn", "Temperature in TES pipes at design conditions", "C", "", "TES", "sim_type=1&tes_type=0", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_P_dsn", "Pressure in TES pipes at design conditions", "bar", "", "TES", "sim_type=1&tes_type=0", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_diams", "Pipe diameters in TES", "m", "", "TES", "sim_type=1&tes_type=1", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_wallthk", "Pipe wall thickness in TES", "m", "", "TES", "sim_type=1&tes_type=1", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_lengths", "Pipe lengths in TES", "m", "", "TES", "sim_type=1&tes_type=1", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_mdot_dsn", "Mass flow TES pipes at design conditions", "kg/s", "", "TES", "sim_type=1&tes_type=1", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_vel_dsn", "Velocity in TES pipes at design conditions", "m/s", "", "TES", "sim_type=1&tes_type=1", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_T_dsn", "Temperature in TES pipes at design conditions", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_P_dsn", "Pressure in TES pipes at design conditions", "bar", "", "TES", "sim_type=1&tes_type=1", "", "" }, //{ SSC_OUTPUT, SSC_ARRAY, "defocus", "Field optical focus fraction", "", "", "solver", "*", "", "" }, @@ -1604,7 +1604,7 @@ class cm_trough_physical : public compute_module } else { - throw exec_error("trough_physical", "tes_type must be 0-2"); + throw exec_error("trough_physical", "tes_type must be 1-3"); } // ************************************************************************* diff --git a/ssc/cmod_trough_physical_iph.cpp b/ssc/cmod_trough_physical_iph.cpp index a27754620..5af75bc61 100644 --- a/ssc/cmod_trough_physical_iph.cpp +++ b/ssc/cmod_trough_physical_iph.cpp @@ -185,44 +185,44 @@ static var_info _cm_vtab_trough_physical_iph[] = { { SSC_INPUT, SSC_NUMBER, "allow_heater_no_dispatch_opt","Allow heater with no dispatch optimization? SAM UI relies on cmod default", "", "", "System Costs", "?=0", "", "SIMULATION_PARAMETER" }, // General TES Parameters - { SSC_INPUT, SSC_NUMBER, "tes_type", "Standard two tank (0), Packed Bed (1), Piston Cylinder (2)", "-", "", "TES", "?=0", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_type", "Standard two tank (1), Packed Bed (2), Piston Cylinder (3)", "-", "", "TES", "?=1", "", "" }, { SSC_INPUT, SSC_NUMBER, "tshours", "Equivalent full-load thermal storage hours", "hr", "", "TES", "*", "", "" }, { SSC_INPUT, SSC_NUMBER, "is_h_tank_fixed", "[1] Use fixed height (calculate diameter) [0] Use fixed diameter [2] Use fixed d and h (for packed bed)", "-", "", "TES", "?=1", "", "" }, { SSC_INPUT, SSC_NUMBER, "h_tank_in", "Total height of tank input (height of HTF when tank is full", "m", "", "TES", "is_h_tank_fixed=1", "", "" }, { SSC_INPUT, SSC_NUMBER, "d_tank_in", "Tank diameter input", "m", "", "TES", "is_h_tank_fixed=0|is_h_tank_fixed=2", "", "" }, - { SSC_INPUT, SSC_NUMBER, "u_tank", "Loss coefficient from the tank", "W/m2-K", "", "TES", "tes_type=0|tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "u_tank", "Loss coefficient from the tank", "W/m2-K", "", "TES", "tes_type=1|tes_type=3", "", "" }, { SSC_INPUT, SSC_NUMBER, "tank_pairs", "Number of equivalent tank pairs", "-", "", "TES", "*", "INTEGER", "" }, - { SSC_INPUT, SSC_NUMBER, "hot_tank_Thtr", "Minimum allowable hot tank HTF temp", "C", "", "TES", "tes_type=0|tes_type=2", "", "" }, - { SSC_INPUT, SSC_NUMBER, "hot_tank_max_heat", "Rated heater capacity for hot tank heating", "MWe", "", "TES", "tes_type=0|tes_type=2", "", "" }, - { SSC_INPUT, SSC_NUMBER, "cold_tank_Thtr", "Minimum allowable cold tank HTF temp", "C", "", "TES", "tes_type=0|tes_type=2", "", "" }, - { SSC_INPUT, SSC_NUMBER, "cold_tank_max_heat", "Rated heater capacity for cold tank heating", "MWe", "", "TES", "tes_type=0|tes_type=2", "", "" }, - { SSC_INPUT, SSC_NUMBER, "h_tank_min", "Minimum allowable HTF height in storage tank", "m", "", "TES", "tes_type=0|tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "hot_tank_Thtr", "Minimum allowable hot tank HTF temp", "C", "", "TES", "tes_type=1|tes_type=3", "", "" }, + { SSC_INPUT, SSC_NUMBER, "hot_tank_max_heat", "Rated heater capacity for hot tank heating", "MWe", "", "TES", "tes_type=1|tes_type=3", "", "" }, + { SSC_INPUT, SSC_NUMBER, "cold_tank_Thtr", "Minimum allowable cold tank HTF temp", "C", "", "TES", "tes_type=1|tes_type=3", "", "" }, + { SSC_INPUT, SSC_NUMBER, "cold_tank_max_heat", "Rated heater capacity for cold tank heating", "MWe", "", "TES", "tes_type=1|tes_type=3", "", "" }, + { SSC_INPUT, SSC_NUMBER, "h_tank_min", "Minimum allowable HTF height in storage tank", "m", "", "TES", "tes_type=1|tes_type=3", "", "" }, { SSC_INPUT, SSC_NUMBER, "init_hot_htf_percent", "Initial fraction of avail. vol that is hot", "%", "", "TES", "*", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_n_tsteps", "Number of subtimesteps (for NT and packed bed)", "", "", "TES", "tes_type>0", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_n_tsteps", "Number of subtimesteps (for NT and packed bed)", "", "", "TES", "tes_type>1", "", "" }, // TES Two Tank Specific - { SSC_INPUT, SSC_NUMBER, "store_fluid", "Material number for storage fluid", "-", "", "TES", "tes_type=0", "", "" }, - { SSC_INPUT, SSC_MATRIX, "store_fl_props", "User defined storage fluid property data", "-", "", "TES", "tes_type=0", "", "" }, - { SSC_INPUT, SSC_NUMBER, "dt_hot", "Hot side HX approach temp", "C", "", "TES", "tes_type=0", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tanks_in_parallel", "Tanks are in parallel, not in series, with solar field", "-", "", "controller", "tes_type=0", "", "" }, + { SSC_INPUT, SSC_NUMBER, "store_fluid", "Material number for storage fluid", "-", "", "TES", "tes_type=1", "", "" }, + { SSC_INPUT, SSC_MATRIX, "store_fl_props", "User defined storage fluid property data", "-", "", "TES", "tes_type=1", "", "" }, + { SSC_INPUT, SSC_NUMBER, "dt_hot", "Hot side HX approach temp", "C", "", "TES", "tes_type=1", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tanks_in_parallel", "Tanks are in parallel, not in series, with solar field", "-", "", "controller", "tes_type=1", "", "" }, // TES Piston Cylinder - { SSC_INPUT, SSC_NUMBER, "tes_cyl_tank_thick", "Tank wall thickness (used for Piston Cylinder)", "m", "", "TES", "tes_type=2", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_cyl_tank_cp", "Tank wall cp (used for Piston Cylinder)", "kJ/kg-K", "", "TES", "tes_type=2", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_cyl_tank_dens", "Tank wall thickness (used for Piston Cylinder)", "kg/m3", "", "TES", "tes_type=2", "", "" }, - { SSC_INPUT, SSC_ARRAY, "tes_cyl_piston_loss_poly", "Polynomial coefficients describing piston heat loss function (f(kg/s)=%)", "", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_cyl_tank_thick", "Tank wall thickness (used for Piston Cylinder)", "m", "", "TES", "tes_type=3", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_cyl_tank_cp", "Tank wall cp (used for Piston Cylinder)", "kJ/kg-K", "", "TES", "tes_type=3", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_cyl_tank_dens", "Tank wall thickness (used for Piston Cylinder)", "kg/m3", "", "TES", "tes_type=3", "", "" }, + { SSC_INPUT, SSC_ARRAY, "tes_cyl_piston_loss_poly", "Polynomial coefficients describing piston heat loss function (f(kg/s)=%)", "", "", "TES", "tes_type=3", "", "" }, { SSC_INPUT, SSC_NUMBER, "tes_cyl_tank_insul_percent", "Percent additional wall mass due to insulation (used for Piston Cylinder)", "%", "", "TES", "?=0", "", "" }, // TES Packed Bed - { SSC_INPUT, SSC_NUMBER, "tes_pb_n_xsteps", "Number of spatial segments", "", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_k_eff", "TES packed bed effective conductivity", "W/m K", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_void_frac", "TES packed bed void fraction", "", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_dens_solid", "TES packed bed media density", "kg/m3", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_cp_solid", "TES particle specific heat", "kJ/kg K", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_T_hot_delta", "Max allowable decrease in hot discharge temp", "C", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_T_cold_delta", "Max allowable increase in cold discharge temp", "C", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_T_charge_min", "Min charge temp", "C", "", "TES", "tes_type=1", "", "" }, - { SSC_INPUT, SSC_NUMBER, "tes_pb_f_oversize", "Packed bed oversize factor", "", "", "TES", "tes_type=1", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_n_xsteps", "Number of spatial segments", "", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_k_eff", "TES packed bed effective conductivity", "W/m K", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_void_frac", "TES packed bed void fraction", "", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_dens_solid", "TES packed bed media density", "kg/m3", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_cp_solid", "TES particle specific heat", "kJ/kg K", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_T_hot_delta", "Max allowable decrease in hot discharge temp", "C", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_T_cold_delta", "Max allowable increase in cold discharge temp", "C", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_T_charge_min", "Min charge temp", "C", "", "TES", "tes_type=2", "", "" }, + { SSC_INPUT, SSC_NUMBER, "tes_pb_f_oversize", "Packed bed oversize factor", "", "", "TES", "tes_type=2", "", "" }, // Dispatch optimization @@ -597,33 +597,33 @@ static var_info _cm_vtab_trough_physical_iph[] = { { SSC_OUTPUT, SSC_ARRAY, "tes_htf_pump_power", "TES HTF pump power", "MWe", "", "TES", "sim_type=1", "", "" }, // NT TES - { SSC_OUTPUT, SSC_ARRAY, "vol_tes_cold", "TES cold fluid volume", "m3", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "vol_tes_hot", "TES hot fluid volume", "m3" , "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "vol_tes_cold", "TES cold fluid volume", "m3", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "vol_tes_hot", "TES hot fluid volume", "m3" , "", "TES", "sim_type=1&tes_type=3", "", "" }, { SSC_OUTPUT, SSC_ARRAY, "vol_tes_tot", "TES total fluid volume", "m3", "", "TES", "sim_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_piston_loc", "TES piston distance from left (cold) side", "m", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_piston_frac", "TES piston fraction of cold distance over total", "", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_cold_vol_frac", "TES volume fraction of cold over total", "", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_mass_tot", "TES total fluid mass", "kg", "", "TES", "tes_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_SA_cold", "TES cold side surface area", "m2", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_SA_hot", "TES hot side surface area", "m2", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_SA_tot", "TES total surface area", "m2", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_error", "TES energy balance error", "MWt", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_error_percent", "TES energy balance error percent", "%", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_leak_error", "TES energy balance error due to leakage assumption", "MWt", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_wall_error", "TES energy balance error due to wall temperature assumption", "MWt", "", "TES", "sim_type=1&tes_type=2", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "tes_error_corrected", "TES energy balance error, accounting for wall and temperature assumption error", "MWt", "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_piston_loc", "TES piston distance from left (cold) side", "m", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_piston_frac", "TES piston fraction of cold distance over total", "", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_cold_vol_frac", "TES volume fraction of cold over total", "", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_mass_tot", "TES total fluid mass", "kg", "", "TES", "sim_type=1", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_SA_cold", "TES cold side surface area", "m2", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_SA_hot", "TES hot side surface area", "m2", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_SA_tot", "TES total surface area", "m2", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_error", "TES energy balance error", "MWt", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_error_percent", "TES energy balance error percent", "%", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_leak_error", "TES energy balance error due to leakage assumption", "MWt", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_wall_error", "TES energy balance error due to wall temperature assumption", "MWt", "", "TES", "sim_type=1&tes_type=3", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "tes_error_corrected", "TES energy balance error, accounting for wall and temperature assumption error", "MWt", "", "TES", "sim_type=1&tes_type=3", "", "" }, // Packed Bed TES - { SSC_OUTPUT, SSC_ARRAY, "T_grad_0", "TES Temperature gradient 0 indice", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "T_grad_1", "TES Temperature gradient 1 indice", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "T_grad_2", "TES Temperature gradient 2 indice", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "T_grad_3", "TES Temperature gradient 3 indice", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "T_grad_4", "TES Temperature gradient 4 indice", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "T_grad_5", "TES Temperature gradient 5 indice", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "T_grad_6", "TES Temperature gradient 6 indice", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "T_grad_7", "TES Temperature gradient 7 indice", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "T_grad_8", "TES Temperature gradient 8 indice", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "T_grad_9", "TES Temperature gradient 9 indice", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "T_grad_0", "TES Temperature gradient 0 indice", "C", "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "T_grad_1", "TES Temperature gradient 1 indice", "C", "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "T_grad_2", "TES Temperature gradient 2 indice", "C", "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "T_grad_3", "TES Temperature gradient 3 indice", "C", "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "T_grad_4", "TES Temperature gradient 4 indice", "C", "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "T_grad_5", "TES Temperature gradient 5 indice", "C", "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "T_grad_6", "TES Temperature gradient 6 indice", "C", "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "T_grad_7", "TES Temperature gradient 7 indice", "C", "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "T_grad_8", "TES Temperature gradient 8 indice", "C", "", "TES", "sim_type=1&tes_type=2", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "T_grad_9", "TES Temperature gradient 9 indice", "C", "", "TES", "sim_type=1&tes_type=2", "", "" }, //{ SSC_OUTPUT, SSC_ARRAY, "m_dot_tes_dc", "TES discharge mass flow rate", "kg/s", "", "TES", "*", "", "" }, //{ SSC_OUTPUT, SSC_ARRAY, "m_dot_tes_ch", "TES charge mass flow rate", "kg/s", "", "TES", "*", "", "" }, @@ -721,13 +721,13 @@ static var_info _cm_vtab_trough_physical_iph[] = { { SSC_OUTPUT, SSC_NUMBER, "heat_load_capacity_factor", "Percentage of heat load met", "%", "", "system", "sim_type=1", "", "" }, { SSC_OUTPUT, SSC_ARRAY, "recirculating", "Field recirculating (bypass valve open)", "-", "", "solar_field", "sim_type=1", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_diams", "Pipe diameters in TES", "m", "", "TES", "sim_type=1&tes_type=0", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_wallthk", "Pipe wall thickness in TES", "m", "", "TES", "sim_type=1&tes_type=0", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_lengths", "Pipe lengths in TES", "m", "", "TES", "sim_type=1&tes_type=0", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_mdot_dsn", "Mass flow TES pipes at design conditions", "kg/s", "", "TES", "sim_type=1&tes_type=0", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_vel_dsn", "Velocity in TES pipes at design conditions", "m/s", "", "TES", "sim_type=1&tes_type=0", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_T_dsn", "Temperature in TES pipes at design conditions", "C", "", "TES", "sim_type=1&tes_type=0", "", "" }, - { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_P_dsn", "Pressure in TES pipes at design conditions", "bar", "", "TES", "sim_type=1&tes_type=0", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_diams", "Pipe diameters in TES", "m", "", "TES", "sim_type=1&tes_type=1", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_wallthk", "Pipe wall thickness in TES", "m", "", "TES", "sim_type=1&tes_type=1", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_lengths", "Pipe lengths in TES", "m", "", "TES", "sim_type=1&tes_type=1", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_mdot_dsn", "Mass flow TES pipes at design conditions", "kg/s", "", "TES", "sim_type=1&tes_type=1", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_vel_dsn", "Velocity in TES pipes at design conditions", "m/s", "", "TES", "sim_type=1&tes_type=1", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_T_dsn", "Temperature in TES pipes at design conditions", "C", "", "TES", "sim_type=1&tes_type=1", "", "" }, + { SSC_OUTPUT, SSC_ARRAY, "pipe_tes_P_dsn", "Pressure in TES pipes at design conditions", "bar", "", "TES", "sim_type=1&tes_type=1", "", "" }, //{ SSC_OUTPUT, SSC_ARRAY, "defocus", "Field optical focus fraction", "", "", "solver", "*", "", "" }, @@ -1469,7 +1469,7 @@ class cm_trough_physical_iph : public compute_module } else { - throw exec_error("trough_physical", "tes_type must be 0-2"); + throw exec_error("trough_physical", "tes_type must be 1-3"); } diff --git a/tcs/csp_solver_core.h b/tcs/csp_solver_core.h index 6710693b2..0469d5cf9 100644 --- a/tcs/csp_solver_core.h +++ b/tcs/csp_solver_core.h @@ -730,7 +730,7 @@ class C_csp_tes enum csp_tes_types { - E_TES_TWO_TANK, + E_TES_TWO_TANK = 1, E_TES_PACKED_BED, E_TES_CYL };