Skip to content

Commit

Permalink
Merge pull request #1962 from NREL/csp-version-upgrade-fix
Browse files Browse the repository at this point in the history
Update version upgrade for CSP models.
  • Loading branch information
taylorbrown75 authored Dec 9, 2024
2 parents 59e91c5 + c6d8dbf commit aa89930
Showing 1 changed file with 40 additions and 4 deletions.
44 changes: 40 additions & 4 deletions deploy/runtime/versions.lk
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ version_upgrade{'2024.12.12'} = define() {
{
// Piston Cylinder TES is now tes_type == 3 (two tank == 1, packed bed == 2)
old_tes_type = value('tes_type');
if(old_tes_type == 1)
tes_type = old_tes_type;
if(old_tes_type == 0)
{
tes_type = 1;
}
else if(old_tes_type == 1)
{
tes_type = 3;
}
Expand Down Expand Up @@ -105,9 +110,40 @@ version_upgrade{'2024.12.12'} = define() {
' The default relative factors for minimum and maximum mass flow are 0.25 and 1.2, respectively.'
, 'warning');

value('use_abs_or_rel_mdot_limit', 0, 'Use relative minimum and maximum flow rate limits (fractions) by default');
value('f_htfmin', 0.25, 'Set default minimum mass flow rate fraction');
value('f_htfmax', 1.2, 'Set default maximum mass flow rate fraction');
value('use_abs_or_rel_mdot_limit', 0, 'Use relative minimum and maximum flow rate limits (fractions) by default');
value('f_htfmin', 0.25, 'Set default minimum mass flow rate fraction');
value('f_htfmax', 1.2, 'Set default maximum mass flow rate fraction');


message('We added an option on the Thermal Storage page to size the tank with either a fixed diameter or fixed height.', 'warning');
h_tank = oldvalue('h_tank');
if(h_tank != null)
{
variable_name_change('h_tank_in', 'h_tank');
value('is_h_tank_fixed', 1, 'Set default tank sizing to fixed height');
}

if(oldvalue('T_shutdown') == null)
{
message('We added the ability to set the field startup and shutdown temperatures, which were previously set internally by SAM.'
' The startup and shutdown temperatures will be set to the previous SAM-calculated value. ', 'warning');

T_loop_out = oldvalue('T_loop_out');
T_loop_in = oldvalue('T_loop_in_des');

T_startup_min = T_loop_in;
if(T_loop_out > 600)
{
T_startup_min = T_loop_out - 70.0;
}
T_startup = max(T_startup_min, 0.67 * T_loop_in + 0.33 * T_loop_out);
T_shutdown = T_startup;
value('T_startup', T_startup, 'Field startup temperature set using the previous SAM version method.');
value('T_shutdown', T_shutdown, 'Field shutdown temperature set equal to startup.');
}



}

// Linear Fresnel Model Changes
Expand Down

0 comments on commit aa89930

Please sign in to comment.