Skip to content

Commit

Permalink
check temp limits for nan
Browse files Browse the repository at this point in the history
  • Loading branch information
tyneises committed Apr 16, 2023
1 parent c59af71 commit b6cc35b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tcs/htf_props.cpp
Expand Up @@ -123,6 +123,13 @@ void HTFProperties::set_temp_enth_lookup()
double T_low = this->min_temp();
double T_high = this->max_temp();

if (!std::isfinite(T_low)) {
T_low = 270.0 + 273.15;
}
if (!std::isfinite(T_high)) {
T_high = 720.0 + 273.15;
}

double delta_T_target = 1.0;

int n_rows = (int)(ceil((T_high - T_low)/delta_T_target) + 1.0);
Expand Down

0 comments on commit b6cc35b

Please sign in to comment.