Skip to content

Commit d2fe451

Browse files
committed
DHW instantaneous heater fixes
1 parent ec9d373 commit d2fe451

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

doc/src/records/dhwmeter.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# DHWMETER
22

3-
A DHWMETER object is a user-defined "device" that records water consumption as simulated by CSE. The data accumulated by DHWMETERs can be reported at hourly, daily, monthly, and annual (run) intervals by using REPORTs and EXPORTs of type DHWMTR.
3+
A DHWMETER object is a user-defined "device" that records water consumption as simulated by CSE. The data accumulated by DHWMETERs can be reported at hourly, daily, monthly, and annual (run) intervals by using REPORTs and EXPORTs of type DHWMTR. Water use is reported in gallons.
44

5-
DHWMETERs account for water use in the following pre-defined end uses. The abbreviations in parentheses are used in DHWMTR report headings.
65

6+
DHWMETERs account for water use in the following pre-defined end uses. The abbreviations in parentheses are used in DHWMTR report headings.
7+
78
- Total water use (Total)
89
- Unknown end use (Unknown)
910
- Miscellaneous draws (Faucet)

src/CNRECS.DEF

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3433,8 +3433,8 @@ RECORD DHWHEATER "DHWHeater" *RAT // input / runtime DHW heater
34333433
*h FLOAT wh_mixDownF; // factor for draw adjustment re HPWH setpoint > DHWSYS::ws_tUse
34343434
// Some HPWHs (e.g. Sanden) have fixed (high) setpoints
34353435
// draws are reduced to balance load at ws_tUse.
3436-
*s INt wh_drawTicks; // duration of current draw, for HPWH and INSTUEF, ticks
3437-
// allows detection of startup event
3436+
*s INT wh_stbyTicks; // time since last draw, for HPWH and INSTUEF, ticks
3437+
// re startup (cyclic) loss model
34383438

34393439
*i TI wh_elecMtri // meter for system electricity use (default = parent ws_elecMtri)
34403440
*i TI wh_fuelMtri // meter for system fuel use (default = parent ws_electMtri)

src/DHWCalc.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ RC DHWHEATER::wh_Init() // init for run
10931093
wh_totOut = 0.;
10941094
wh_unMetHrs = 0;
10951095
wh_balErrCount = 0;
1096-
wh_drawTicks = 0;
1096+
wh_stbyTicks = 0;
10971097

10981098
DHWSYS* pWS = wh_GetDHWSYS();
10991099

@@ -1578,15 +1578,16 @@ RC DHWHEATER::wh_HPWHDoSubhr( // HPWH subhour
15781578
DHWMix( pWS->ws_tUse, tOF, pWS->ws_tInlet, wh_mixDownF);
15791579
tHWOutF += tOF; // note tOF may have changed (but not tO)
15801580
nTickNZDraw++; // this tick has draw
1581-
wh_drawTicks++; // track draw duration (info only)
1581+
wh_stbyTicks = 0; // reset standby duration
15821582
qHW += KJ_TO_KWH(
15831583
GAL_TO_L( drawForTick)
15841584
* HPWH::DENSITYWATER_kgperL
15851585
* HPWH::CPWATER_kJperkgC
15861586
* (tO - DegFtoC( pWS->ws_tInlet)));
15871587
}
15881588
else
1589-
wh_drawTicks = 0; // no draw: reset current duration
1589+
wh_stbyTicks++; // no draw: accum duration
1590+
// (info only)
15901591

15911592
// energy use by heat source, kWh
15921593
// accumulate by backup resistance [ 0] vs primary (= compressor or all resistance) [ 1]
@@ -1804,12 +1805,12 @@ RC DHWHEATER::wh_InstUEFDoSubhr(
18041805
}
18051806
else
18061807
nTickFullLoad += drawForTick / drawFullLoad;
1807-
if (!wh_drawTicks++) // if no draw in prior tick
1808+
if (wh_stbyTicks) // if no draw in prior tick
18081809
nTickStart++; // count start
18091810
}
18101811
else
18111812
// standby
1812-
wh_drawTicks = 0; // reset draw duration
1813+
wh_stbyTicks++; // reset draw duration
18131814
}
18141815

18151816
double tickDurHr = Top.tp_subhrTickDur / 60.; // tick duration, hr

0 commit comments

Comments
 (0)