Skip to content

Commit 49c67a9

Browse files
authored
Merge pull request #358 from cse-sim/dhw-whfeff
Add DHWHEATER whFEff efficiency modifier
2 parents a3ae303 + d51b5e0 commit 49c67a9

File tree

8 files changed

+2788
-2761
lines changed

8 files changed

+2788
-2761
lines changed

doc/src/records/dhwheater-doc.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,18 @@ Number of storage tanks per DHWHEATER, re built-up whType=Builtup, does *not* re
487487
required: "No",
488488
variability: "constant") %>
489489

490+
**whfEff=*float***
491+
492+
Water heating efficiency modifier. Applied to calculated primary heating effiency when electricity and fuel use results are finalized. WhfEff greater than 1 result in decreased reported fuel or electricity use and whFEff less than 1 result in increased reported fuel or electricity use. Parasitic, standby usage, and backup energy usages are not adjusted. For types using the detailed HPWH model, the adjustment is (slightly) approximate because it is applied to the results returned from the detailed model rather than actually altering the efficiency used within the calculation.
493+
494+
<%= member_table(
495+
units: "",
496+
legal_range: "$>$ 0",
497+
default: "1",
498+
required: "No",
499+
variability: "subhourly")
500+
%>
501+
490502
**whEff=*float***
491503

492504
Water heating efficiency, used in modeling whType=LARGESTORAGE and whType=LARGEINSTANTANEOUS.

src/CNRECS.DEF

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4537,7 +4537,7 @@ RECORD DHWHEATER "DHWHeater" *RAT // input / runtime DHW heater
45374537
*s *e FLOAT wh_nTickFullLoad; // INSTUEF: current subhour equiv full load ticks (fractional)
45384538
*s DBL wh_nColdStarts; // INSTUEF: current subhour # of cold startups
45394539

4540-
*s *e FLOAT wh_effSh; // current subhour efficiency, used to support former hourly
4540+
*s *e FLOAT_GZ wh_effSh; // current subhour efficiency, used to support former hourly
45414541
// models within tick calcs
45424542
// unset (= 0) for full tick models (HPWH and INSTUEF)
45434543

@@ -4580,6 +4580,11 @@ RECORD DHWHEATER "DHWHeater" *RAT // input / runtime DHW heater
45804580
*h *e DBL wh_totOut; // cumulative (year to date) total heat delivered to hot water, Btu
45814581
// includes wh_qXBU
45824582

4583+
*s FLOAT_GEZ wh_fEff; // primary efficiency adjustment factor
4584+
// modifies efficiency in wh_inElecSh / wh_inFuelSh calc
4585+
// for HPWH, applied after-the-fact to calc'd electricity
4586+
// use (does not modify efficiency within HPWH model).
4587+
// default = 1
45834588

45844589
// energy inputs for current subhour, Btu
45854590
// subhour results accumulated here

src/cncult.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,6 +1836,7 @@ CULT( "whResHtPwr", DAT, DHWHEATER_RESHTPWR,0, 0, VEOI, TYFL, 0, 4
18361836
CULT( "whResHtPwr2", DAT, DHWHEATER_RESHTPWR2,0, 0, VEOI, TYFL, 0, 0.f, N, N),
18371837
CULT( "whLDEF", DAT, DHWHEATER_LDEF, 0, 0, VEOI, TYFL, 0, 1.0f, N, N),
18381838
CULT( "whEff", DAT, DHWHEATER_EFF, 0, 0, VEOI, TYFL, 0, 1.0f, N, N),
1839+
CULT( "whFEff", DAT, DHWHEATER_FEFF, 0, 0, VSUBHRLY,TYFL, 0, 1.0f, N, N),
18391840
CULT( "whSBL", DAT, DHWHEATER_SBL, 0, 0, VEOI, TYFL, 0, 0.f, N, N),
18401841
CULT( "whPilotPwr", DAT, DHWHEATER_PILOTPWR,0, 0, VHRLY, TYFL, 0, 0.f, N, N),
18411842
CULT( "whParElec", DAT, DHWHEATER_PARELEC, 0, 0, VHRLY, TYFL, 0, 0.f, N, N),

src/dhwcalc.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4359,6 +4359,9 @@ RC DHWHEATER::wh_DoSubhrStart()
43594359
: wh_type == C_WHTYPECH_STRGLRG ? wh_eff
43604360
: -1.f;
43614361

4362+
wh_effSh *= wh_fEff; // adjust efficiency per user input
4363+
// default 1
4364+
43624365
if (wh_effSh <= 0.f)
43634366
rc |= err("%s, %s: Invalid water heater efficiency %0.3f",
43644367
objIdTx(), Top.When(C_IVLCH_S), wh_effSh);
@@ -4448,6 +4451,7 @@ RC DHWHEATER::wh_DoSubhrTick( // DHWHEATER energy use for 1 tick
44484451

44494452
wh_qHW += HARL; // output = load
44504453

4454+
// note: wh_fEff applied elsewhere
44514455
float WHEU = HARL / wh_effSh + wh_SBL * Top.tp_tickDurHr; // current tick energy use, Btu
44524456

44534457
// electricity / fuel consumption for this DHWHEATER (no multipliers)
@@ -4523,7 +4527,8 @@ RC DHWHEATER::wh_DoSubhrEnd( // end-of-subhour
45234527
wh_qHW = KWH_TO_BTU(wh_HPWH.hw_qHW); // hot water heating, Btu
45244528
wh_inElecXBUSh = wh_qXBU; // add'l backup heating, Btu
45254529

4526-
wh_inElecSh = wh_HPWH.hw_inElec[1] * BtuperkWh + wh_parElec * BtuperWh*Top.tp_subhrDur;
4530+
// electricity use (apply wh_fEff efficiency adjustment to primary only)
4531+
wh_inElecSh = (wh_HPWH.hw_inElec[1] / wh_fEff) * BtuperkWh + wh_parElec * BtuperWh*Top.tp_subhrDur;
45274532
wh_inElecBUSh = wh_HPWH.hw_inElec[0] * BtuperkWh;
45284533
}
45294534
else if (wh_IsInstUEFModel())
@@ -4537,8 +4542,8 @@ RC DHWHEATER::wh_DoSubhrEnd( // end-of-subhour
45374542
// wh_qHW and wh_qXBU accum'd in wh_InstUEFDoSubhrTick()
45384543

45394544
// energy use accounting, Btu
4540-
wh_inElecSh += rcovElec /*+ startElec*/ + (stbyElec + wh_parElec * Top.tp_tickDurHr) * BtuperWh;
4541-
wh_inFuelSh += rcovFuel + startFuel;
4545+
wh_inElecSh += (rcovElec/wh_fEff) /*+ startElec*/ + (stbyElec + wh_parElec * Top.tp_tickDurHr) * BtuperWh;
4546+
wh_inFuelSh += (rcovFuel + startFuel) / wh_fEff;
45424547
}
45434548
// else
45444549
// { efficiency model (nothing add'l required)

test/DHWDU.cse

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2206,6 +2206,7 @@ DHWHEATER "dhwhtr1-HPWH"
22062206
ALTER DHWSYS "dhwsys-DHW"
22072207
ALTER DHWHEATER "dhwhtr1-HPWH"
22082208
whZone = "Garage-grg"
2209+
whfEff = choose1( $month, .9, .95, 1., 1.02, 1.04, 1.06, 1.08, 1.05, 1.03, 1., .95, .91)
22092210

22102211
IZXFER "Ceiling (below attic) 1-BypassxA"
22112212
izNVType = "NONE"

test/DHW_C.cse

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,6 +1208,7 @@ DHWHEATER "WH1"
12081208
whASHPType = GE2014
12091209
whASHPSrcT = $TDbO
12101210
whParElec = $month
1211+
whfEff = choose1( $month, .9, .95, 1., 1.02, 1.04, 1.06, 1.08, 1.05, 1.03, 1., .95, .91)
12111212

12121213
endDHWSYS
12131214

0 commit comments

Comments
 (0)