Skip to content

Commit

Permalink
Change needed by cse.
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Ahrenkiel authored and Phil Ahrenkiel committed Nov 6, 2023
1 parent 665a614 commit d5530b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/HPWHHeatSources.cc
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ void HPWH::HeatSource::addHeat(double externalT_C,double minutesToRun) {
case CONFIG_SUBMERGED:
case CONFIG_WRAPPED:
{
static std::vector<double> heatDistribution(hpwh->getNumNodes());
std::vector<double> heatDistribution(hpwh->getNumNodes());
//calcHeatDist takes care of the swooping for wrapped configurations
calcHeatDist(heatDistribution);

Expand Down
6 changes: 4 additions & 2 deletions src/HPWHpresets.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,15 @@ int HPWH::HPWHinit_resTank(double tankVol_L, double energyFactor, double upperPo
return HPWH_ABORT;
}

setNumNodes(12);

//use tank size setting function since it has bounds checking
tankSizeFixed = false;
int failure = this->setTankSize(tankVol_L);
if (failure == HPWH_ABORT) {
return failure;
}

setNumNodes(12);
setpoint_C = F_TO_C(127.0);

//start tank off at setpoint
Expand Down Expand Up @@ -155,14 +156,15 @@ int HPWH::HPWHinit_resTankGeneric(double tankVol_L, double rValue_M2KperW, doubl
return HPWH_ABORT;
}

setNumNodes(12);

//set tank size function has bounds checking
tankSizeFixed = false;
if (this->setTankSize(tankVol_L) == HPWH_ABORT) {
return HPWH_ABORT;
}
canScale = true;

setNumNodes(12);
setpoint_C = F_TO_C(127.0);
resetTankToSetpoint(); //start tank off at setpoint

Expand Down

0 comments on commit d5530b0

Please sign in to comment.