Skip to content

Commit d37f2e7

Browse files
authored
Merge pull request #158 from EcotopeResearch/add_hpts_preset
Add HPTS presets
2 parents b1bd7aa + a407678 commit d37f2e7

29 files changed

+16870
-2
lines changed

src/HPWH.in.hh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ class HPWH {
8888
MODELS_AOSmithHPTU80_DR = 107, /**< 80 gallon AOSmith HPTU */
8989
MODELS_AOSmithCAHP120 = 108, /**< 12 gallon AOSmith CAHP commercial grade */
9090

91+
MODELS_AOSmithHPTS50 = 1101, /**< 50 gallon, AOSmith HPTS */
92+
MODELS_AOSmithHPTS66 = 1102, /**< 66 gallon, AOSmith HPTS */
93+
MODELS_AOSmithHPTS80 = 1103, /**< 80 gallon, AOSmith HPTS */
94+
9195
// GE Models
9296
MODELS_GE2012 = 110, /**< The 2012 era GeoSpring */
9397
MODELS_GE2014STDMode = 111, /**< 2014 GE model run in standard mode */

src/HPWHpresets.cc

Lines changed: 91 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2405,7 +2405,97 @@ int HPWH::HPWHinit_presets(MODELS presetNum) {
24052405
setOfSources[1].companionHeatSource = &setOfSources[2];
24062406

24072407
}
2408-
else if (presetNum == MODELS_GE2014STDMode) {
2408+
else if (MODELS_AOSmithHPTS50 <= presetNum && presetNum <= MODELS_AOSmithHPTS80)
2409+
{
2410+
numNodes = 12;
2411+
tankTemps_C = new double[numNodes];
2412+
setpoint_C = F_TO_C(127.0);
2413+
2414+
if (presetNum == MODELS_AOSmithHPTS50) {
2415+
tankVolume_L = GAL_TO_L(45.6);
2416+
tankUA_kJperHrC = 6.403;
2417+
}
2418+
else if (presetNum == MODELS_AOSmithHPTS66) {
2419+
tankVolume_L = GAL_TO_L(67.63);
2420+
tankUA_kJperHrC = UAf_TO_UAc(1.5) * 6.403 / UAf_TO_UAc(1.16);
2421+
}
2422+
else if (presetNum == MODELS_AOSmithHPTS80) {
2423+
tankVolume_L = GAL_TO_L(81.94);
2424+
tankUA_kJperHrC = UAf_TO_UAc(1.73) * 6.403 / UAf_TO_UAc(1.16);
2425+
}
2426+
doTempDepression = false;
2427+
tankMixesOnDraw = true;
2428+
2429+
numHeatSources = 3;
2430+
setOfSources = new HeatSource[numHeatSources];
2431+
2432+
HeatSource compressor(this);
2433+
HeatSource resistiveElementTop(this);
2434+
HeatSource resistiveElementBottom(this);
2435+
2436+
compressor.isOn = false;
2437+
compressor.isVIP = false;
2438+
compressor.typeOfHeatSource = TYPE_compressor;
2439+
compressor.setCondensity(0, 0.2, 0.2, 0.2, 0.2, 0.2, 0, 0, 0, 0, 0, 0);
2440+
2441+
// performance map
2442+
compressor.perfMap.reserve(3);
2443+
2444+
compressor.perfMap.push_back({
2445+
50, // Temperature (T_F)
2446+
{66.82, 2.49, 0.0}, // Input Power Coefficients (inputPower_coeffs)
2447+
{8.64, -0.0436, 0.0} // COP Coefficients (COP_coeffs)
2448+
});
2449+
2450+
compressor.perfMap.push_back({
2451+
67.5, // Temperature (T_F)
2452+
{85.1, 2.38, 0.0}, // Input Power Coefficients (inputPower_coeffs)
2453+
{10.82, -0.0551, 0.0} // COP Coefficients (COP_coeffs)
2454+
});
2455+
2456+
compressor.perfMap.push_back({
2457+
95, // Temperature (T_F)
2458+
{89, 2.62, 0.0}, // Input Power Coefficients (inputPower_coeffs)
2459+
{12.52, -0.0534, 0.0} // COP Coefficients (COP_coeffs)
2460+
});
2461+
2462+
compressor.minT = F_TO_C(37.);
2463+
compressor.maxT = F_TO_C(120.);
2464+
compressor.hysteresis_dC = dF_TO_dC(1.);
2465+
compressor.configuration = HeatSource::CONFIG_WRAPPED;
2466+
compressor.maxSetpoint_C = MAXOUTLET_R134A;
2467+
2468+
resistiveElementTop.setupAsResistiveElement(8, 4500);
2469+
resistiveElementTop.isVIP = true;
2470+
2471+
resistiveElementBottom.setupAsResistiveElement(0, 4500);
2472+
resistiveElementBottom.hysteresis_dC = dF_TO_dC(2);
2473+
2474+
//logic conditions
2475+
double compStart = dF_TO_dC(30.2);
2476+
double standbyT = dF_TO_dC(9);
2477+
compressor.addTurnOnLogic(HPWH::bottomThird(compStart));
2478+
compressor.addTurnOnLogic(HPWH::standby(standbyT));
2479+
2480+
resistiveElementTop.addTurnOnLogic(HPWH::topThird(dF_TO_dC(11.87)));
2481+
2482+
//set everything in its places
2483+
setOfSources[0] = resistiveElementTop;
2484+
setOfSources[1] = resistiveElementBottom;
2485+
setOfSources[2] = compressor;
2486+
2487+
//and you have to do this after putting them into setOfSources, otherwise
2488+
//you don't get the right pointers
2489+
setOfSources[2].backupHeatSource = &setOfSources[1];
2490+
setOfSources[1].backupHeatSource = &setOfSources[2];
2491+
2492+
setOfSources[0].followedByHeatSource = &setOfSources[2];
2493+
setOfSources[1].followedByHeatSource = &setOfSources[2];
2494+
2495+
setOfSources[0].companionHeatSource = &setOfSources[2];
2496+
}
2497+
2498+
else if (presetNum == MODELS_GE2014STDMode) {
24092499
numNodes = 12;
24102500
tankTemps_C = new double[numNodes];
24112501
setpoint_C = F_TO_C(127.0);

test/AOSmithHPTS50.txt

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
numNodes 12 #number of nodes
2+
setpoint 127 F
3+
volume 45.6 gal
4+
UA 6.403 kJperHrC
5+
depressTemp false
6+
mixOnDraw true
7+
8+
numHeatSources 3
9+
10+
heatsource 2 isVIP false
11+
heatsource 2 isOn false
12+
heatsource 2 type compressor
13+
heatsource 2 condensity 0 0.2 0.2 0.2 0.2 0.2 0 0 0 0 0
14+
15+
16+
heatsource 2 nTemps 3
17+
heatsource 2 T1 50 F
18+
heatsource 2 T2 67.5 F
19+
heatsource 2 T3 95 F
20+
heatsource 2 inPowT1const 66.82
21+
heatsource 2 inPowT1lin 2.49
22+
heatsource 2 inPowT1quad 0
23+
heatsource 2 inPowT2const 85.1
24+
heatsource 2 inPowT2lin 2.38
25+
heatsource 2 inPowT2quad 0
26+
heatsource 2 inPowT3const 89
27+
heatsource 2 inPowT3lin 2.62
28+
heatsource 2 inPowT3quad 0
29+
heatsource 2 copT1const 8.64
30+
heatsource 2 copT1lin -0.0436
31+
heatsource 2 copT1quad 0
32+
heatsource 2 copT2const 10.82
33+
heatsource 2 copT2lin -0.0551
34+
heatsource 2 copT2quad 0.0
35+
heatsource 2 copT3const 12.52
36+
heatsource 2 copT3lin -0.0534
37+
heatsource 2 copT3quad 0.0
38+
heatsource 2 minT 37 F
39+
heatsource 2 maxT 120 F
40+
heatsource 2 hysteresis 1 F
41+
heatsource 2 coilConfig wrapped
42+
43+
44+
heatsource 0 isVIP true
45+
heatsource 0 isOn false
46+
heatsource 0 type resistor
47+
heatsource 0 condensity 0 0 0 0 0 0 0 0 1 0 0 0
48+
heatsource 0 nTemps 2
49+
heatsource 0 T1 50 F
50+
heatsource 0 T2 67 F
51+
heatsource 0 inPowT1const 4500
52+
heatsource 0 inPowT1lin 0.0
53+
heatsource 0 inPowT1quad 0.0
54+
heatsource 0 inPowT2const 4500
55+
heatsource 0 inPowT2lin 0.0
56+
heatsource 0 inPowT2quad 0.0
57+
heatsource 0 copT1const 1.0
58+
heatsource 0 copT1lin 0.0
59+
heatsource 0 copT1quad 0.0
60+
heatsource 0 copT2const 1.0
61+
heatsource 0 copT2lin 0.0
62+
heatsource 0 copT2quad 0.0
63+
heatsource 0 hysteresis 0 F
64+
heatsource 0 coilConfig submerged
65+
66+
67+
heatsource 1 isVIP false
68+
heatsource 1 isOn false
69+
heatsource 1 type resistor
70+
heatsource 1 condensity 1 0 0 0 0 0 0 0 0 0 0 0
71+
heatsource 1 nTemps 2
72+
heatsource 1 T1 47 F
73+
heatsource 1 T2 67 F
74+
heatsource 1 inPowT1const 4500
75+
heatsource 1 inPowT1lin 0.0
76+
heatsource 1 inPowT1quad 0.0
77+
heatsource 1 inPowT2const 4500
78+
heatsource 1 inPowT2lin 0.0
79+
heatsource 1 inPowT2quad 0.0
80+
heatsource 1 copT1const 1.0
81+
heatsource 1 copT1lin 0.0
82+
heatsource 1 copT1quad 0.0
83+
heatsource 1 copT2const 1.0
84+
heatsource 1 copT2lin 0.0
85+
heatsource 1 copT2quad 0.0
86+
heatsource 1 hysteresis 2 F
87+
heatsource 1 coilConfig submerged
88+
89+
90+
heatsource 0 onlogic topThird 11.87 F
91+
92+
heatsource 2 onlogic bottomThird 30.2 F
93+
heatsource 2 onlogic standby 9 F
94+
95+
heatsource 1 backupSource 2
96+
heatsource 2 backupSource 1
97+
98+
heatsource 0 followedBySource 2
99+
heatsource 1 followedBySource 2
100+
101+
heatsource 0 companionSource 2

test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ set(testNames
6565
)
6666
set(modelNames
6767
# StorageTank
68+
AOSmithHPTS50
6869
AOSmithPHPT60
6970
AOSmithHPTU80
7071
Sanden80

test/main.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ int main(int argc, char *argv[])
333333
allSchedules[1][i] *= (125. - allSchedules[0][i]) / (hpwh.getTankNodeTemp(hpwh.getNumNodes() - 1, HPWH::UNITS_F) - allSchedules[0][i]);
334334
}
335335
}
336-
cout << i << std::endl;
336+
337337
// Run the step
338338
hpwh.runOneStep(allSchedules[0][i], // Inlet water temperature (C)
339339
GAL_TO_L(allSchedules[1][i]), // Flow in gallons

0 commit comments

Comments
 (0)