From cb77d6105662d907b9c544d0b2702c6cca73c7f6 Mon Sep 17 00:00:00 2001 From: qualand <34353104+qualand@users.noreply.github.com> Date: Fri, 15 Nov 2024 10:41:00 -0700 Subject: [PATCH] fixing MSLF tests --- ssc/cmod_etes_electric_resistance.cpp | 2 +- ssc/cmod_etes_ptes.cpp | 4 ++-- ssc/cmod_fresnel_physical.cpp | 1 + ssc/cmod_fresnel_physical_iph.cpp | 1 + ssc/cmod_mspt_iph.cpp | 3 ++- ssc/cmod_tcsmolten_salt.cpp | 2 +- tcs/csp_solver_two_tank_tes.cpp | 1 - 7 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ssc/cmod_etes_electric_resistance.cpp b/ssc/cmod_etes_electric_resistance.cpp index 144ba0eec..f44c75c46 100644 --- a/ssc/cmod_etes_electric_resistance.cpp +++ b/ssc/cmod_etes_electric_resistance.cpp @@ -624,7 +624,7 @@ class cm_etes_electric_resistance : public compute_module as_double("tes_init_hot_htf_percent"), as_double("pb_pump_coef"), false, //[-] False: Field HTF always goes to TES. PC HTF always comes from TES. ETES should not simultaneously operate heater and cycle - 1.0, + 1.0, // Packed volume fraction 1.85, //[m/s] false // for now, to get 'tanks_in_parallel' to work ); diff --git a/ssc/cmod_etes_ptes.cpp b/ssc/cmod_etes_ptes.cpp index 9552aa292..f8ac56087 100644 --- a/ssc/cmod_etes_ptes.cpp +++ b/ssc/cmod_etes_ptes.cpp @@ -665,7 +665,7 @@ class cm_etes_ptes : public compute_module as_double("tes_init_hot_htf_percent"), 0.0, //[kW/kg/s] No htf pump losses in direct TES false, //[-] False: Field HTF always goes to TES. PC HTF always comes from TES. ETES should not simultaneously operate heater and cycle - 1.0, //[-] + 1.0, //[-] packed volume fraction 1.85, //[m/s] false // for now, to get 'tanks_in_parallel' to work ); @@ -722,7 +722,7 @@ class cm_etes_ptes : public compute_module 100.0 - as_double("tes_init_hot_htf_percent"), //[-] Cold storage is charged when cold tank is full 0.0, //[kW/kg/s] No htf pump losses in direct TES false, //[-] False: Field HTF always goes to TES. PC HTF always comes from TES. ETES should not simultaneously operate heater and cycle - 1.0, //[-] + 1.0, //[-] packed volume fraction 1.85, //[m/s] false // for now, to get 'tanks_in_parallel' to work )); diff --git a/ssc/cmod_fresnel_physical.cpp b/ssc/cmod_fresnel_physical.cpp index 2ff3ddc48..293cd183a 100644 --- a/ssc/cmod_fresnel_physical.cpp +++ b/ssc/cmod_fresnel_physical.cpp @@ -985,6 +985,7 @@ class cm_fresnel_physical : public compute_module as_double("init_hot_htf_percent"), as_double("pb_pump_coef"), as_boolean("tanks_in_parallel"), + 1.0, // packed volume fraction V_tes_des, false, as_double("tes_pump_coef") diff --git a/ssc/cmod_fresnel_physical_iph.cpp b/ssc/cmod_fresnel_physical_iph.cpp index 1cff8ef5e..cef5ff6d0 100644 --- a/ssc/cmod_fresnel_physical_iph.cpp +++ b/ssc/cmod_fresnel_physical_iph.cpp @@ -845,6 +845,7 @@ class cm_fresnel_physical_iph : public compute_module as_double("init_hot_htf_percent"), as_double("pb_pump_coef"), as_boolean("tanks_in_parallel"), + 1.0, // packed volume fraction V_tes_des, false, as_double("tes_pump_coef") diff --git a/ssc/cmod_mspt_iph.cpp b/ssc/cmod_mspt_iph.cpp index 3924e6f20..1334ef9d4 100644 --- a/ssc/cmod_mspt_iph.cpp +++ b/ssc/cmod_mspt_iph.cpp @@ -1383,7 +1383,8 @@ class cm_mspt_iph : public compute_module as_double("h_tank_min"), as_double("tes_init_hot_htf_percent"), as_double("pb_pump_coef"), - as_boolean("tanks_in_parallel"), //[-] + as_boolean("tanks_in_parallel"), //[-] + 1.0, // Packed volume fraction 1.85, //[m/s] false // for now, to get 'tanks_in_parallel' to work ); diff --git a/ssc/cmod_tcsmolten_salt.cpp b/ssc/cmod_tcsmolten_salt.cpp index c3f6a9691..ff31430b0 100644 --- a/ssc/cmod_tcsmolten_salt.cpp +++ b/ssc/cmod_tcsmolten_salt.cpp @@ -1843,7 +1843,7 @@ class cm_tcsmolten_salt : public compute_module as_double("tes_init_hot_htf_percent"), as_double("pb_pump_coef"), as_boolean("tanks_in_parallel"), //[-] - 1.0, //[-] + 1.0, //[-] packed volume fraction 1.85, //[m/s] false // for now, to get 'tanks_in_parallel' to work ); diff --git a/tcs/csp_solver_two_tank_tes.cpp b/tcs/csp_solver_two_tank_tes.cpp index d7e2649d7..f1a9c4900 100644 --- a/tcs/csp_solver_two_tank_tes.cpp +++ b/tcs/csp_solver_two_tank_tes.cpp @@ -879,7 +879,6 @@ void C_csp_two_tank_tes::init(const C_csp_tes::S_csp_tes_init_inputs init_inputs double rho_cold_des = mc_store_htfProps.dens(T_tes_cold_des, 1.0); double rho_hot = mc_store_htfProps.dens(m_T_tank_hot_ini, 1.0); double rho_cold = mc_store_htfProps.dens(m_T_tank_cold_ini, 1.0); - //TODO (Bill): volume fraction needs to be used here double m_hot_ini = m_f_V_hot_ini * 0.01 * m_mass_total_active + V_inactive * rho_hot_des * tes_packed_vol_frac; // Updating initial storage charge calculation to avoid variation in total mass with specified initial T double m_cold_ini = (1.0 - m_f_V_hot_ini * 0.01) * m_mass_total_active + V_inactive * rho_cold_des * tes_packed_vol_frac; double V_hot_ini = m_hot_ini / (rho_hot * tes_packed_vol_frac);