Skip to content

Commit

Permalink
Merge pull request #80 from EcotopeResearch/New_NEEA_Presets
Browse files Browse the repository at this point in the history
Update Rheem Premium and Builder
  • Loading branch information
chipbarnaby authored Jul 17, 2020
2 parents c3d684c + 66969f0 commit 329d359
Show file tree
Hide file tree
Showing 58 changed files with 154,863 additions and 21,279 deletions.
67 changes: 25 additions & 42 deletions src/HPWHpresets.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2187,19 +2187,19 @@ int HPWH::HPWHinit_presets(MODELS presetNum) {
}
else if (presetNum == MODELS_Rheem2020Prem50) {
tankVolume_L = GAL_TO_L(45.1);
tankUA_kJperHrC = 9;
tankUA_kJperHrC = 8.55;
}
else if (presetNum == MODELS_Rheem2020Prem65) {
tankVolume_L = GAL_TO_L(58.5);
tankVolume_L = GAL_TO_L(58.5);
tankUA_kJperHrC = 10.64;
}
else if (presetNum == MODELS_Rheem2020Prem80) {
tankVolume_L = GAL_TO_L(72);
tankVolume_L = GAL_TO_L(72.0);
tankUA_kJperHrC = 10.83;
}

doTempDepression = false;
tankMixesOnDraw = false;
tankMixesOnDraw = true;

numHeatSources = 3;
setOfSources = new HeatSource[numHeatSources];
Expand All @@ -2213,27 +2213,25 @@ int HPWH::HPWHinit_presets(MODELS presetNum) {
compressor.isVIP = false;
compressor.typeOfHeatSource = TYPE_compressor;

compressor.setCondensity(.167, .167, .167, .167, .167, .165, 0, 0, 0, 0, 0, 0);
compressor.setCondensity(0.2, 0.2, 0.2, 0.2, 0.2, 0, 0, 0, 0, 0, 0, 0);

//voltex60 tier 1 values
compressor.perfMap.reserve(2);

compressor.perfMap.push_back({
50, // Temperature (T_F)
{219.870877, 1.3516, 0.0}, // Input Power Coefficients (inputPower_coeffs)
{7.0, -0.034543, 0.0} // COP Coefficients (COP_coeffs)
{250, -1.0883, 0.0176}, // Input Power Coefficients (inputPower_coeffs)
{6.7, -0.0087, -0.0002} // COP Coefficients (COP_coeffs)
});

compressor.perfMap.push_back({
67, // Temperature (T_F)
{143.943813, 2.04082, 0.0}, // Input Power Coefficients (inputPower_coeffs)
{8.0, -0.038308, 0.0} // COP Coefficients (COP_coeffs)
{275.0, -0.6631, 0.01571}, // Input Power Coefficients (inputPower_coeffs)
{7.0, -0.0168, -0.0001} // COP Coefficients (COP_coeffs)
});

compressor.hysteresis_dC = dF_TO_dC(1);
compressor.minT = F_TO_C(37.0);
compressor.maxT = F_TO_C(120.0);

compressor.hysteresis_dC = dF_TO_dC(1);
compressor.configuration = HPWH::HeatSource::CONFIG_WRAPPED;

//top resistor values
Expand All @@ -2245,19 +2243,12 @@ int HPWH::HPWHinit_presets(MODELS presetNum) {
resistiveElementBottom.hysteresis_dC = dF_TO_dC(4);

//logic conditions
double compStart;
if (presetNum == MODELS_Rheem2020Prem40) {
compStart = dF_TO_dC(26);
}
else {
compStart = dF_TO_dC(36);
}
double compStart = dF_TO_dC(32);
double standbyT = dF_TO_dC(9);
compressor.addTurnOnLogic(HPWH::bottomThird(compStart));
compressor.addTurnOnLogic(HPWH::standby(standbyT));

resistiveElementBottom.addShutOffLogic(HPWH::bottomTwelthMaxTemp(F_TO_C(100)));

resistiveElementTop.addTurnOnLogic(HPWH::topSixth(dF_TO_dC(20.4167)));

//set everything in its places
Expand All @@ -2267,15 +2258,15 @@ int HPWH::HPWHinit_presets(MODELS presetNum) {

//and you have to do this after putting them into setOfSources, otherwise
//you don't get the right pointers
setOfSources[2].backupHeatSource = &setOfSources[1];
setOfSources[1].backupHeatSource = &setOfSources[2];
setOfSources[2].backupHeatSource = &setOfSources[1];

setOfSources[0].followedByHeatSource = &setOfSources[2];
setOfSources[1].followedByHeatSource = &setOfSources[2];

setOfSources[0].companionHeatSource = &setOfSources[2];

}

// If Rheem Build
else if (MODELS_Rheem2020Build40 <= presetNum && presetNum <= MODELS_Rheem2020Build80) {
numNodes = 12;
Expand All @@ -2291,19 +2282,19 @@ int HPWH::HPWHinit_presets(MODELS presetNum) {
}
else if (presetNum == MODELS_Rheem2020Build50) {
tankVolume_L = GAL_TO_L(45.1);
tankUA_kJperHrC = 9;
tankUA_kJperHrC = 8.55;
}
else if (presetNum == MODELS_Rheem2020Build65) {
tankVolume_L = GAL_TO_L(58.5);
tankUA_kJperHrC = 10.64;
}
else if (presetNum == MODELS_Rheem2020Build80) {
tankVolume_L = GAL_TO_L(72.);
tankVolume_L = GAL_TO_L(72.0);
tankUA_kJperHrC = 10.83;
}

doTempDepression = false;
tankMixesOnDraw = false;
tankMixesOnDraw = true;

numHeatSources = 3;
setOfSources = new HeatSource[numHeatSources];
Expand All @@ -2317,20 +2308,18 @@ int HPWH::HPWHinit_presets(MODELS presetNum) {
compressor.isVIP = false;
compressor.typeOfHeatSource = TYPE_compressor;

compressor.setCondensity(.167, .167, .167, .167, .167, .165, 0, 0, 0, 0, 0, 0);
compressor.setCondensity(0.2, 0.2, 0.2, 0.2, 0.2, 0, 0, 0, 0, 0, 0, 0);

//voltex60 tier 1 values
compressor.perfMap.reserve(2);

compressor.perfMap.push_back({
50, // Temperature (T_F)
{172.8000173, 1.80873, 0.0}, // Input Power Coefficients (inputPower_coeffs)
{7.96064, -0.0448, 0.0} // COP Coefficients (COP_coeffs)
{220.0, 0.8743, 0.00454}, // Input Power Coefficients (inputPower_coeffs)
{ 7.96064, -0.0448, 0.0} // COP Coefficients (COP_coeffs)
});

compressor.perfMap.push_back({
67, // Temperature (T_F)
{121.83263, 2.47317, 0.0}, // Input Power Coefficients (inputPower_coeffs)
{275.0, -0.6631, 0.01571}, // Input Power Coefficients (inputPower_coeffs)
{8.45936, -0.04539, 0.0} // COP Coefficients (COP_coeffs)
});

Expand All @@ -2349,20 +2338,13 @@ int HPWH::HPWHinit_presets(MODELS presetNum) {
resistiveElementBottom.hysteresis_dC = dF_TO_dC(4);

//logic conditions
resistiveElementTop.addTurnOnLogic(HPWH::topSixth(dF_TO_dC(20.4167)));

double compStart;
if (presetNum == MODELS_Rheem2020Prem40) {
compStart = dF_TO_dC(26);
}
else {
compStart = dF_TO_dC(36);
}
double compStart = dF_TO_dC(30);
double standbyT = dF_TO_dC(9);
compressor.addTurnOnLogic(HPWH::bottomThird(compStart));
compressor.addTurnOnLogic(HPWH::standby(standbyT));

resistiveElementBottom.addShutOffLogic(HPWH::bottomTwelthMaxTemp(F_TO_C(100)));
resistiveElementTop.addTurnOnLogic(HPWH::topSixth(dF_TO_dC(20.4167)));


//set everything in its places
Expand All @@ -2372,14 +2354,15 @@ int HPWH::HPWHinit_presets(MODELS presetNum) {

//and you have to do this after putting them into setOfSources, otherwise
//you don't get the right pointers
setOfSources[2].backupHeatSource = &setOfSources[1];
setOfSources[1].backupHeatSource = &setOfSources[2];
setOfSources[2].backupHeatSource = &setOfSources[1];

setOfSources[0].followedByHeatSource = &setOfSources[2];
setOfSources[1].followedByHeatSource = &setOfSources[2];

setOfSources[0].companionHeatSource = &setOfSources[2];
}
}

else if (presetNum == MODELS_RheemHB50) {
numNodes = 12;
tankTemps_C = new double[numNodes];
Expand Down
34 changes: 32 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ target_link_libraries(testTool libHPWHsim)
# Add output directory for test results
add_custom_target(results_directory ALL COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/output")

# Clear output file for yearly tests
#add_custom_target(do_always ALL COMMAND ${CMAKE_COMMAND} file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/output/DHW_YRLY.csv") )
add_test(NAME "Ready.Output.Files" COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_CURRENT_BINARY_DIR}/output/DHW_YRLY.csv")

# Run tests
set(testNames
test30
Expand Down Expand Up @@ -40,6 +44,19 @@ set(lockoutTestModels
GE502014
)

set(yearTestsModels
AOSmithHPTU80
Sanden80
GE502014
Rheem2020Prem40
Rheem2020Prem50
Rheem2020Build50
)
set(yearTests
testCA_3BR_CTZ15
testCA_3BR_CTZ16
)

set(largeCompressorTests
testLargeComp45
testLargeComp60
Expand All @@ -60,7 +77,9 @@ set(largeCompressorNames
NyleC185A_C_SP
NyleC250A_C_SP
)
#Tests for succssful runs


#Tests for successful runs
function( add_model_test )
set(options)
set(oneValueArgs INP_SOURCE MODEL_NAME TEST_NAME)
Expand Down Expand Up @@ -109,6 +128,14 @@ foreach(test ${largeCompressorTests})
endforeach(model)
endforeach(test)

#Add small compressor yearly tests to the list
foreach(test ${yearTests})
foreach(model ${yearTestsModels})
add_model_test( TEST_NAME "${test}" MODEL_NAME "${model}" INP_SOURCE "Preset")
endforeach(model)
endforeach(test)


# Tests for differences between File and Preset versions
function( add_file_test )
set(options)
Expand Down Expand Up @@ -160,11 +187,14 @@ foreach(test ${testNames})
endforeach(model)
endforeach(test)

#Add large compressor tests to the list
#Add large compressor tests to the regression list
foreach(test ${largeCompressorTests})
foreach(model ${largeCompressorNames})
add_regression_test( TEST_NAME "${test}" MODEL_NAME "${model}" INP_SOURCE "Preset")
#No files for these yet
#add_regression_test( TEST_NAME "${test}" MODEL_NAME "${model}" INP_SOURCE "File")
endforeach(model)
endforeach(test)

#Add regression test for yearly file
add_test(NAME "RegressionTest.YearRuns" COMMAND ${CMAKE_COMMAND} -E compare_files "${CMAKE_CURRENT_BINARY_DIR}/output/DHW_YRLY.csv" "${CMAKE_CURRENT_SOURCE_DIR}/ref/DHW_YRLY.csv")
25 changes: 10 additions & 15 deletions test/Rheem2020Build50.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ verbosity silent
numNodes 12
setpoint 127 F
volume 45.1 gal
UA 9 kJperHrC
UA 8.55 kJperHrC
depressTemp false
mixOnDraw false
mixOnDraw true

#a test comment
numHeatSources 3
Expand All @@ -13,16 +13,16 @@ numHeatSources 3
heatsource 2 isVIP false
heatsource 2 isOn false
heatsource 2 type compressor
heatsource 2 condensity .167 .167 .167 .167 .167 .165 0 0 0 0 0 0
heatsource 2 condensity .2 .2 .2 .2 .2 0 0 0 0 0 0 0
heatsource 2 nTemps 2
heatsource 2 T1 50 F
heatsource 2 T2 67 F
heatsource 2 inPowT1const 172.8000173
heatsource 2 inPowT1lin 1.80873
heatsource 2 inPowT1quad 0
heatsource 2 inPowT2const 121.83263
heatsource 2 inPowT2lin 2.47317
heatsource 2 inPowT2quad 0
heatsource 2 inPowT1const 220.0
heatsource 2 inPowT1lin 0.8743
heatsource 2 inPowT1quad 0.00454
heatsource 2 inPowT2const 275.0
heatsource 2 inPowT2lin -0.6631
heatsource 2 inPowT2quad 0.01571
heatsource 2 copT1const 7.96064
heatsource 2 copT1lin -0.0448
heatsource 2 copT1quad 0.0
Expand All @@ -34,15 +34,12 @@ heatsource 2 maxT 120 F
heatsource 2 hysteresis 1 F
heatsource 2 coilConfig wrapped


heatsource 0 isVIP true
heatsource 0 isOn false
heatsource 0 type resistor
heatsource 0 condensity 0 0 0 0 0 0 0 0 1 0 0 0
heatsource 0 nTemps 2
heatsource 0 T1 50 C
heatsource 0 T1 50 F
heatsource 0 T2 67 C
heatsource 0 T2 67 F
heatsource 0 inPowT1const 4500
heatsource 0 inPowT1lin 0.0
Expand Down Expand Up @@ -82,11 +79,9 @@ heatsource 1 copT2quad 0.0
heatsource 1 hysteresis 4 F
heatsource 1 coilConfig submerged


heatsource 0 onlogic topSixth 20.4167 F


heatsource 2 onlogic bottomThird 36 F
heatsource 2 onlogic bottomThird 30 F
heatsource 2 onlogic standby 9 F

heatsource 1 offlogic bottomTwelthMaxTemp 100 F
Expand Down
39 changes: 17 additions & 22 deletions test/Rheem2020Prem40.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,31 @@ setpoint 127 F
volume 36.1 gal
UA 9.5 kJperHrC
depressTemp false
mixOnDraw false
mixOnDraw true

#a test comment
numHeatSources 3


heatsource 2 isVIP false
heatsource 2 isOn false
heatsource 2 type compressor
heatsource 2 condensity .167 .167 .167 .167 .167 .165 0 0 0 0 0 0
heatsource 2 condensity .2 .2 .2 .2 .2 0 0 0 0 0 0 0
heatsource 2 nTemps 2
heatsource 2 T1 50F
heatsource 2 T1 50 F
heatsource 2 T2 67 F
heatsource 2 inPowT1const 219.870877
heatsource 2 inPowT1lin 1.3516
heatsource 2 inPowT1quad 0
heatsource 2 inPowT2const 143.943813
heatsource 2 inPowT2lin 2.04082
heatsource 2 inPowT2quad 0
heatsource 2 copT1const 7.
heatsource 2 copT1lin -0.034543
heatsource 2 copT1quad 0.0
heatsource 2 copT2const 8.
heatsource 2 copT2lin -0.038308
heatsource 2 copT2quad 0.0
heatsource 2 minT 37F
heatsource 2 inPowT1const 250
heatsource 2 inPowT1lin -1.0883
heatsource 2 inPowT1quad 0.0176
heatsource 2 inPowT2const 275.0
heatsource 2 inPowT2lin -0.6631
heatsource 2 inPowT2quad 0.01571
heatsource 2 copT1const 6.7
heatsource 2 copT1lin -0.0087
heatsource 2 copT1quad -0.0002
heatsource 2 copT2const 7.0
heatsource 2 copT2lin -0.0168
heatsource 2 copT2quad -0.0001
heatsource 2 minT 37 F
heatsource 2 maxT 120 F
heatsource 2 hysteresis 1 F
heatsource 2 coilConfig wrapped
Expand All @@ -40,9 +39,7 @@ heatsource 0 isOn false
heatsource 0 type resistor
heatsource 0 condensity 0 0 0 0 0 0 0 0 1 0 0 0
heatsource 0 nTemps 2
heatsource 0 T1 50 C
heatsource 0 T1 50 F
heatsource 0 T2 67 C
heatsource 0 T2 67 F
heatsource 0 inPowT1const 4500
heatsource 0 inPowT1lin 0.0
Expand Down Expand Up @@ -82,10 +79,8 @@ heatsource 1 copT2quad 0.0
heatsource 1 hysteresis 4 F
heatsource 1 coilConfig submerged


heatsource 0 onlogic topSixth 20.4167 F

heatsource 2 onlogic bottomThird 26 F
heatsource 2 onlogic bottomThird 32 F
heatsource 2 onlogic standby 9 F

heatsource 1 offlogic bottomTwelthMaxTemp 100 F
Expand Down
Loading

0 comments on commit 329d359

Please sign in to comment.