Skip to content

Commit

Permalink
Clean tankTemp calc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Ahrenkiel authored and Phil Ahrenkiel committed Dec 26, 2023
1 parent ae1a729 commit 190c546
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/HPWH.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2856,12 +2856,12 @@ double HPWH::getTankHeatContent_kJ() const
// returns tank heat content relative to 0 C using kJ

// sum over nodes
double totalHeat_kJ = 0.;
double totalT_C = 0.;
for (int i = 0; i < getNumNodes(); i++)
{
totalHeat_kJ += nodeCp_kJperC * tankTemps_C[i];
totalT_C += tankTemps_C[i];
}
return totalHeat_kJ;
return nodeCp_kJperC * totalT_C;
}

double HPWH::getLocationTemp_C() const { return locationTemperature_C; }
Expand Down

0 comments on commit 190c546

Please sign in to comment.