Skip to content

Commit

Permalink
Add check to IPH to ensure trough_loop_control and nSCA agree
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorbrown75 committed Jan 3, 2024
1 parent d26397a commit 281a4db
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions ssc/cmod_trough_physical_iph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,19 @@ class cm_trough_physical_iph : public compute_module
{
// Collect Inputs
{
// ADDED Trough Inputs (TMB 10/06/2023) for design point calculations
std::vector<double> trough_loop_vec = as_vector_double("trough_loop_control");
c_trough.m_trough_loop_control.assign(&trough_loop_vec[0], trough_loop_vec.size());

int actual_nSCA = trough_loop_vec[0];
int sca = as_integer("nSCA");

// Check if trough_loop_control number of sCA's matches the nSCA input
if (actual_nSCA != sca)
{
throw exec_error("trough_physical_iph", "Mismatch nSCA");
}

c_trough.m_use_solar_mult_or_aperture_area = as_number("use_solar_mult_or_aperture_area"); // Use specified solar mult (0) or total aperture (1)
c_trough.m_specified_solar_mult = as_number("specified_solar_multiple"); // User specified solar mult
c_trough.m_specified_total_aperture = as_number("specified_total_aperture"); //[m2] User specified total aperture
Expand Down Expand Up @@ -959,10 +972,6 @@ class cm_trough_physical_iph : public compute_module
c_trough.m_sf_hdr_wallthicks = as_matrix("sf_hdr_wallthicks"); //[m] Imported header wall thicknesses, used if custom_sf_pipe_sizes is true
c_trough.m_sf_hdr_lengths = as_matrix("sf_hdr_lengths"); //[m] Imported header lengths, used if custom_sf_pipe_sizes is true


// ADDED Trough Inputs (TMB 10/06/2023) for design point calculations
std::vector<double> trough_loop_vec = as_vector_double("trough_loop_control");
c_trough.m_trough_loop_control.assign(&trough_loop_vec[0], trough_loop_vec.size());
}

// Calculate solar multiple (needed for other component constructors)
Expand Down

0 comments on commit 281a4db

Please sign in to comment.