Skip to content

Commit

Permalink
Format.
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Ahrenkiel authored and Phil Ahrenkiel committed Jan 16, 2024
1 parent c58add0 commit 0c4e1b3
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/HPWHHeatingLogics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -269,18 +269,15 @@ double HPWH::TempBasedHeatingLogic::getFractToMeetComparisonExternal()
// if averageT_C > comparison then the shutoff condition is already true and you
// shouldn't be here. Will revaluate shut off condition at the end the do while loop of
// addHeatExternal, in the mean time lets not shift anything around.
// Then should shut off, 0 means shift no nodes

// Then should shut off
// 0 means shift no nodes

// if the difference in denominator is <= 0 then we aren't adding heat to the nodes we care
// If the difference in denominator is <= 0 then we aren't adding heat to the nodes we care
// about, so shift a whole node.
// factor of hpwh->nodeDensity converts logic nodes to tank nodes

// factor of nodeDensity converts logic-node fraction to tank-node fraction
double nodeFrac =
compare(averageT_C, comparisonT_C)
? 0.
: ((nodeDiffT_C > 0.) ? nodeDensity * totWeight * logicNodeDiffT_C / nodeDiffT_C : 1.);
: ((nodeDiffT_C > 0.) ? nodeDensity * logicNodeDiffT_C / nodeDiffT_C : 1.);

return nodeFrac;
}

0 comments on commit 0c4e1b3

Please sign in to comment.