Skip to content

Commit

Permalink
Organize.
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Ahrenkiel authored and Phil Ahrenkiel committed Dec 22, 2023
1 parent 9f50c8f commit f26bdc7
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/HPWH.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2632,12 +2632,10 @@ void HPWH::updateTankTemps(double drawVolume_L,double inletT_C,double tankAmbien
remainingDrawVolume_N = 0.;
}

//double outletTotalNT_C = 0.;
while(remainingDrawVolume_N > 0.) {

// draw no more than one node at a time
double incrementalDrawVolume_N = remainingDrawVolume_N > 1. ? 1. : remainingDrawVolume_N;
//outletTotalNT_C += incrementalDrawVolume_N * tankTemps_C.back();

double cumulativeInletFraction = 1.;
for(int i = getNumNodes() - 1; i >= 0; --i) {
Expand Down Expand Up @@ -2672,14 +2670,7 @@ void HPWH::updateTankTemps(double drawVolume_L,double inletT_C,double tankAmbien
double C_draw_kJperC = CPWATER_kJperkgC * DENSITYWATER_kgperL * drawVolume_L;
double deltaT_C = heatExpelled_kJ / C_draw_kJperC;
double averageInletT_C = highInletFraction * highInletT_C + lowInletFraction * lowInletT_C;
outletTemp_C = averageInletT_C + deltaT_C;

/*
double expectedOutletTemp_C = outletTotalNT_C / drawVolume_N;
double expectedHeatExpelled_kJ = C_draw_kJperC * (expectedOutletTemp_C - averageInletT_C);
double expectedHeatContent_kJ = previousHeatContent_kJ - expectedHeatExpelled_kJ;
double qBal_kJ = expectedHeatContent_kJ - currentHeatContent_kJ;
*/
outletTemp_C = averageInletT_C + deltaT_C; // force rigid energy balance
}

// account for mixing at the bottom of the tank
Expand Down

0 comments on commit f26bdc7

Please sign in to comment.