Skip to content

Commit

Permalink
Restore performance map limits.
Browse files Browse the repository at this point in the history
  • Loading branch information
spahrenk committed Jan 7, 2025
1 parent 5a11bb2 commit 91dfc7a
Show file tree
Hide file tree
Showing 31 changed files with 3,712 additions and 43,881 deletions.
23 changes: 13 additions & 10 deletions src/Condenser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1197,24 +1197,27 @@ void HPWH::Condenser::makeGridFromMap(std::vector<std::vector<double>>& tempGrid
if (nEnvTempsOrig == 1) // uses regression or regressionMP methods
{
{ // env
envTemps_K = {0., 0.5, 1., 1.5, 2., 2.5, 3., 3.5, 4., 4.5, 5., 5.5,
6., 6.5, 7., 7.2223, 7.5, 8., 8.5, 9., 9.5, 10., 10.5, 11.,
11.5, 12., 12.5, 13., 13.5, 14., 14.5, 15., 15.5, 15.5555556};
for (auto& T_K : envTemps_K)
T_K = C_TO_K(T_K);
std::vector<double> testEnvTemps_C = {
0., 0.5, 1., 1.5, 2., 2.5, 3., 3.5, 4., 4.5, 5., 5.5,
6., 6.5, 7., 7.2223, 7.5, 8., 8.5, 9., 9.5, 10., 10.5, 11.,
11.5, 12., 12.5, 13., 13.5, 14., 14.5, 15., 15.5, 15.5555556};

if (C_TO_K(minT) < envTemps_K.front())
envTemps_K.push_back(C_TO_K(minT));
if (C_TO_K(maxT) > envTemps_K.back())
envTemps_K.push_back(C_TO_K(maxT));
envTemps_K.push_back(C_TO_K(minT));
for (auto& T_C : testEnvTemps_C)
{
if ((T_C > minT) && (T_C < maxT))
envTemps_K.push_back(C_TO_K(T_C));
}
envTemps_K.push_back(C_TO_K(maxT));

std::sort(
envTemps_K.begin(), envTemps_K.end(), [](double a, double b) { return a < b; });
}

{ // HeatSource
const double highestTestSetpoint_C = 65.;
const double minTemp_C = 0.;
const double maxTemp_C = std::max(maxSetpoint_C, 65.);
const double maxTemp_C = std::max(maxSetpoint_C, highestTestSetpoint_C);
auto tempRange_dC = maxTemp_C - minTemp_C;
auto nHeatSourceTs = static_cast<std::size_t>(std::max(51. * tempRange_dC / 100., 3.));
auto dHeatSourceT_dC = tempRange_dC / static_cast<double>(nHeatSourceTs);
Expand Down
Loading

0 comments on commit 91dfc7a

Please sign in to comment.