Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update version upgrade for CSP models. #1962

Merged
merged 4 commits into from
Dec 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading