From 8bb5807506b174175ff0c8537081e0d3fcf0cdcf Mon Sep 17 00:00:00 2001 From: Phil Ahrenkiel Date: Mon, 20 Nov 2023 08:54:10 -0700 Subject: [PATCH] Change hpwh model enum. --- src/HPWHMain.cc | 8 +- src/HPWHMain.hh | 5 +- src/HPWHPresets.hh | 218 +++++++++++++++++++-------------------- src/HPWHpresets.cc | 220 ++++++++++++++++++++-------------------- src/HPWHversion.in.hh | 12 --- test/main.cc | 6 +- test/testUtilityFcts.cc | 166 +++++++++++++++--------------- 7 files changed, 311 insertions(+), 324 deletions(-) diff --git a/src/HPWHMain.cc b/src/HPWHMain.cc index c697975d..1b4b40f2 100644 --- a/src/HPWHMain.cc +++ b/src/HPWHMain.cc @@ -862,7 +862,7 @@ bool HPWH::isNewSetpointPossible(double newSetpoint,double& maxAllowedSetpoint,s returnVal = true; } } else if(lowestElementIndex == -1 && !hasACompressor()) { // There are no heat sources here! - if(hpwhModel == MODELS_StorageTank) { + if(hpwhModel == MODELS::StorageTank) { returnVal = true; // The one pass the storage tank doesn't have any heating elements so sure change the setpoint it does nothing! } else { why = "There aren't any heat sources to check the new setpoint against!"; @@ -1977,7 +1977,7 @@ double HPWH::getLocationTemp_C() const { return locationTemperature_C; } -int HPWH::getHPWHModel() const { +HPWH::MODELS HPWH::getHPWHModel() const { return hpwhModel; } int HPWH::getCompressorCoilConfig() const { @@ -2811,7 +2811,7 @@ int HPWH::checkInputs() { int returnVal = 0; //use a returnVal so that all checks are processed and error messages written - if(getNumHeatSources() <= 0 && hpwhModel != MODELS_StorageTank) { + if(getNumHeatSources() <= 0 && hpwhModel != MODELS::StorageTank) { if(hpwhVerbosity >= VRB_reluctant) { msg("You must have at least one HeatSource.\n"); } @@ -3515,7 +3515,7 @@ int HPWH::HPWHinit_file(string configFile) { //take care of the non-input processing - hpwhModel = MODELS_CustomFile; + hpwhModel = MODELS::CustomFile; tankTemps_C.resize(num_nodes); resetTankToSetpoint(); diff --git a/src/HPWHMain.hh b/src/HPWHMain.hh index 0e579da3..730f674d 100644 --- a/src/HPWHMain.hh +++ b/src/HPWHMain.hh @@ -57,7 +57,7 @@ public: every x minutes, where x is defined by timer_TOT. */ }; - enum MODELS; + enum class MODELS; ///specifies the modes for writing output ///the specified values are used for >= comparisons, so the numerical order is relevant @@ -69,7 +69,6 @@ public: VRB_emetic = 30 /**< print all the things */ }; - enum UNITS{ UNITS_C, /**< celsius */ UNITS_F, /**< fahrenheit */ @@ -499,7 +498,7 @@ public: /**< get the heat content of the tank, relative to zero celsius * returns using kilojoules */ - int getHPWHModel() const; + MODELS getHPWHModel() const; /**< get the model number of the HPWHsim model number of the hpwh */ int getCompressorCoilConfig() const; diff --git a/src/HPWHPresets.hh b/src/HPWHPresets.hh index 628db30b..344d7ddf 100644 --- a/src/HPWHPresets.hh +++ b/src/HPWHPresets.hh @@ -22,157 +22,157 @@ ///specifies the allowable preset HPWH models ///values may vary - names should be used -enum HPWH::MODELS { +enum class HPWH::MODELS { // these models are used for testing purposes - MODELS_restankNoUA = 1, /**< a simple resistance tank, but with no tank losses */ - MODELS_restankHugeUA = 2, /**< a simple resistance tank, but with very large tank losses */ - MODELS_restankRealistic = 3, /**< a more-or-less realistic resistance tank */ - MODELS_basicIntegrated = 4, /**< a standard integrated HPWH */ - MODELS_externalTest = 5, /**< a single compressor tank, using "external" topology */ + restankNoUA = 1, /**< a simple resistance tank, but with no tank losses */ + restankHugeUA = 2, /**< a simple resistance tank, but with very large tank losses */ + restankRealistic = 3, /**< a more-or-less realistic resistance tank */ + basicIntegrated = 4, /**< a standard integrated HPWH */ + externalTest = 5, /**< a single compressor tank, using "external" topology */ // these models are based on real tanks and measured lab data // AO Smith models - MODELS_AOSmithPHPT60 = 102, /**< this is the Ecotope model for the 60 gallon Voltex HPWH */ - MODELS_AOSmithPHPT80 = 103, /**< Voltex 80 gallon tank */ - MODELS_AOSmithHPTU50 = 104, /**< 50 gallon AOSmith HPTU */ - MODELS_AOSmithHPTU66 = 105, /**< 66 gallon AOSmith HPTU */ - MODELS_AOSmithHPTU80 = 106, /**< 80 gallon AOSmith HPTU */ - MODELS_AOSmithHPTU80_DR = 107, /**< 80 gallon AOSmith HPTU */ - MODELS_AOSmithCAHP120 = 108, /**< 12 gallon AOSmith CAHP commercial grade */ - - MODELS_AOSmithHPTS50 = 1101, /**< 50 gallon, AOSmith HPTS */ - MODELS_AOSmithHPTS66 = 1102, /**< 66 gallon, AOSmith HPTS */ - MODELS_AOSmithHPTS80 = 1103, /**< 80 gallon, AOSmith HPTS */ + AOSmithPHPT60 = 102, /**< this is the Ecotope model for the 60 gallon Voltex HPWH */ + AOSmithPHPT80 = 103, /**< Voltex 80 gallon tank */ + AOSmithHPTU50 = 104, /**< 50 gallon AOSmith HPTU */ + AOSmithHPTU66 = 105, /**< 66 gallon AOSmith HPTU */ + AOSmithHPTU80 = 106, /**< 80 gallon AOSmith HPTU */ + AOSmithHPTU80_DR = 107, /**< 80 gallon AOSmith HPTU */ + AOSmithCAHP120 = 108, /**< 12 gallon AOSmith CAHP commercial grade */ + + AOSmithHPTS50 = 1101, /**< 50 gallon, AOSmith HPTS */ + AOSmithHPTS66 = 1102, /**< 66 gallon, AOSmith HPTS */ + AOSmithHPTS80 = 1103, /**< 80 gallon, AOSmith HPTS */ // GE Models - MODELS_GE2012 = 110, /**< The 2012 era GeoSpring */ - MODELS_GE2014STDMode = 111, /**< 2014 GE model run in standard mode */ - MODELS_GE2014STDMode_80 = 113, /**< 2014 GE model run in standard mode, 80 gallon unit */ - MODELS_GE2014 = 112, /**< 2014 GE model run in the efficiency mode */ - MODELS_GE2014_80 = 114, /**< 2014 GE model run in the efficiency mode, 80 gallon unit */ - MODELS_GE2014_80DR = 115, /**< 2014 GE model run in the efficiency mode, 80 gallon unit */ - MODELS_BWC2020_65 = 116, /**< The 2020 Bradford White 65 gallon unit */ + GE2012 = 110, /**< The 2012 era GeoSpring */ + GE2014STDMode = 111, /**< 2014 GE model run in standard mode */ + GE2014STDMode_80 = 113, /**< 2014 GE model run in standard mode, 80 gallon unit */ + GE2014 = 112, /**< 2014 GE model run in the efficiency mode */ + GE2014_80 = 114, /**< 2014 GE model run in the efficiency mode, 80 gallon unit */ + GE2014_80DR = 115, /**< 2014 GE model run in the efficiency mode, 80 gallon unit */ + BWC2020_65 = 116, /**< The 2020 Bradford White 65 gallon unit */ // SANCO2 CO2 transcritical heat pump water heaters // Rebranding Sanden -> SANCO2 5-23 - MODELS_SANCO2_43 = 120, /**< SANCO2 43 gallon CO2 external heat pump */ - MODELS_SANCO2_83 = 121, /**< SANCO2 83 gallon CO2 external heat pump */ - MODELS_SANCO2_GS3_45HPA_US_SP = 122, /**< SANCO2 80 gallon CO2 external heat pump used for MF */ - MODELS_SANCO2_119 = 123, /**< SANCO2 120 gallon CO2 external heat pump */ + SANCO2_43 = 120, /**< SANCO2 43 gallon CO2 external heat pump */ + SANCO2_83 = 121, /**< SANCO2 83 gallon CO2 external heat pump */ + SANCO2_GS3_45HPA_US_SP = 122, /**< SANCO2 80 gallon CO2 external heat pump used for MF */ + SANCO2_119 = 123, /**< SANCO2 120 gallon CO2 external heat pump */ // Sanden synomyms for backward compatability // allow unmodified code using HPWHsim to build - MODELS_Sanden40 = HPWH::MODELS_SANCO2_43, - MODELS_Sanden80 = HPWH::MODELS_SANCO2_83, - MODELS_Sanden_GS3_45HPA_US_SP = HPWH::MODELS_SANCO2_GS3_45HPA_US_SP, - MODELS_Sanden120 = HPWH::MODELS_SANCO2_119, + Sanden40 = SANCO2_43, + Sanden80 = SANCO2_83, + Sanden_GS3_45HPA_US_SP = SANCO2_GS3_45HPA_US_SP, + Sanden120 = SANCO2_119, // The new-ish Rheem - MODELS_RheemHB50 = 140, /**< Rheem 2014 (?) Model */ - MODELS_RheemHBDR2250 = 141, /**< 50 gallon, 2250 W resistance Rheem HB Duct Ready */ - MODELS_RheemHBDR4550 = 142, /**< 50 gallon, 4500 W resistance Rheem HB Duct Ready */ - MODELS_RheemHBDR2265 = 143, /**< 65 gallon, 2250 W resistance Rheem HB Duct Ready */ - MODELS_RheemHBDR4565 = 144, /**< 65 gallon, 4500 W resistance Rheem HB Duct Ready */ - MODELS_RheemHBDR2280 = 145, /**< 80 gallon, 2250 W resistance Rheem HB Duct Ready */ - MODELS_RheemHBDR4580 = 146, /**< 80 gallon, 4500 W resistance Rheem HB Duct Ready */ + RheemHB50 = 140, /**< Rheem 2014 (?) Model */ + RheemHBDR2250 = 141, /**< 50 gallon, 2250 W resistance Rheem HB Duct Ready */ + RheemHBDR4550 = 142, /**< 50 gallon, 4500 W resistance Rheem HB Duct Ready */ + RheemHBDR2265 = 143, /**< 65 gallon, 2250 W resistance Rheem HB Duct Ready */ + RheemHBDR4565 = 144, /**< 65 gallon, 4500 W resistance Rheem HB Duct Ready */ + RheemHBDR2280 = 145, /**< 80 gallon, 2250 W resistance Rheem HB Duct Ready */ + RheemHBDR4580 = 146, /**< 80 gallon, 4500 W resistance Rheem HB Duct Ready */ // The new new Rheem - MODELS_Rheem2020Prem40 = 151, /**< 40 gallon, Rheem 2020 Premium */ - MODELS_Rheem2020Prem50 = 152, /**< 50 gallon, Rheem 2020 Premium */ - MODELS_Rheem2020Prem65 = 153, /**< 65 gallon, Rheem 2020 Premium */ - MODELS_Rheem2020Prem80 = 154, /**< 80 gallon, Rheem 2020 Premium */ - MODELS_Rheem2020Build40 = 155, /**< 40 gallon, Rheem 2020 Builder */ - MODELS_Rheem2020Build50 = 156, /**< 50 gallon, Rheem 2020 Builder */ - MODELS_Rheem2020Build65 = 157, /**< 65 gallon, Rheem 2020 Builder */ - MODELS_Rheem2020Build80 = 158, /**< 80 gallon, Rheem 2020 Builder */ + Rheem2020Prem40 = 151, /**< 40 gallon, Rheem 2020 Premium */ + Rheem2020Prem50 = 152, /**< 50 gallon, Rheem 2020 Premium */ + Rheem2020Prem65 = 153, /**< 65 gallon, Rheem 2020 Premium */ + Rheem2020Prem80 = 154, /**< 80 gallon, Rheem 2020 Premium */ + Rheem2020Build40 = 155, /**< 40 gallon, Rheem 2020 Builder */ + Rheem2020Build50 = 156, /**< 50 gallon, Rheem 2020 Builder */ + Rheem2020Build65 = 157, /**< 65 gallon, Rheem 2020 Builder */ + Rheem2020Build80 = 158, /**< 80 gallon, Rheem 2020 Builder */ // Rheem 120V dedicated-circuit product, no resistance elements - MODELS_RheemPlugInDedicated40 = 1160, /**< 40 gallon, Rheem 120V dedicated-circuit */ - MODELS_RheemPlugInDedicated50 = 1161, /**< 50 gallon, Rheem 120V dedicated-circuit */ + RheemPlugInDedicated40 = 1160, /**< 40 gallon, Rheem 120V dedicated-circuit */ + RheemPlugInDedicated50 = 1161, /**< 50 gallon, Rheem 120V dedicated-circuit */ // Rheem 120V shared-circuit products, no resistance elements. - MODELS_RheemPlugInShared40 = 1150, /**< 40 gallon, Rheem 120V shared-circuit */ - MODELS_RheemPlugInShared50 = 1151, /**< 50 gallon, Rheem 120V shared-circuit */ - MODELS_RheemPlugInShared65 = 1152, /**< 65 gallon, Rheem 120V shared-circuit */ - MODELS_RheemPlugInShared80 = 1153, /**< 80 gallon, Rheem 120V shared-circuit */ + RheemPlugInShared40 = 1150, /**< 40 gallon, Rheem 120V shared-circuit */ + RheemPlugInShared50 = 1151, /**< 50 gallon, Rheem 120V shared-circuit */ + RheemPlugInShared65 = 1152, /**< 65 gallon, Rheem 120V shared-circuit */ + RheemPlugInShared80 = 1153, /**< 80 gallon, Rheem 120V shared-circuit */ // The new-ish Stiebel - MODELS_Stiebel220E = 160, /**< Stiebel Eltron (2014 model?) */ + Stiebel220E = 160, /**< Stiebel Eltron (2014 model?) */ // Generic water heaters, corresponding to the tiers 1, 2, and 3 - MODELS_Generic1 = 170, /**< Generic Tier 1 */ - MODELS_Generic2 = 171, /**< Generic Tier 2 */ - MODELS_Generic3 = 172, /**< Generic Tier 3 */ - MODELS_UEF2generic = 173, /**< UEF 2.0, modified GE2014STDMode case */ - MODELS_genericCustomUEF = 174, /**< used for creating "generic" model with custom uef*/ + Generic1 = 170, /**< Generic Tier 1 */ + Generic2 = 171, /**< Generic Tier 2 */ + Generic3 = 172, /**< Generic Tier 3 */ + UEF2generic = 173, /**< UEF 2.0, modified GE2014STDMode case */ + genericCustomUEF = 174, /**< used for creating "generic" model with custom uef*/ - MODELS_AWHSTier3Generic40 = 175, /**< Generic AWHS Tier 3 50 gallons*/ - MODELS_AWHSTier3Generic50 = 176, /**< Generic AWHS Tier 3 50 gallons*/ - MODELS_AWHSTier3Generic65 = 177, /**< Generic AWHS Tier 3 65 gallons*/ - MODELS_AWHSTier3Generic80 = 178, /**< Generic AWHS Tier 3 80 gallons*/ + AWHSTier3Generic40 = 175, /**< Generic AWHS Tier 3 50 gallons*/ + AWHSTier3Generic50 = 176, /**< Generic AWHS Tier 3 50 gallons*/ + AWHSTier3Generic65 = 177, /**< Generic AWHS Tier 3 65 gallons*/ + AWHSTier3Generic80 = 178, /**< Generic AWHS Tier 3 80 gallons*/ - MODELS_StorageTank = 180, /**< Generic Tank without heaters */ - MODELS_TamScalable_SP = 190, /** < HPWH input passed off a poor preforming SP model that has scalable input capacity and COP */ - MODELS_Scalable_MP = 191, /** < Lower performance MP model that has scalable input capacity and COP */ + StorageTank = 180, /**< Generic Tank without heaters */ + TamScalable_SP = 190, /** < HPWH input passed off a poor preforming SP model that has scalable input capacity and COP */ + Scalable_MP = 191, /** < Lower performance MP model that has scalable input capacity and COP */ // Non-preset models - MODELS_CustomFile = 200, /**< HPWH parameters were input via file */ - MODELS_CustomResTank = 201, /**< HPWH parameters were input via HPWHinit_resTank */ - MODELS_CustomResTankGeneric = 202, /**< HPWH parameters were input via HPWHinit_commercialResTank */ + CustomFile = 200, /**< HPWH parameters were input via file */ + CustomResTank = 201, /**< HPWH parameters were input via HPWHinit_resTank */ + CustomResTankGeneric = 202, /**< HPWH parameters were input via HPWHinit_commercialResTank */ // Larger Colmac models in single pass configuration - MODELS_ColmacCxV_5_SP = 210, /**< Colmac CxA_5 external heat pump in Single Pass Mode */ - MODELS_ColmacCxA_10_SP = 211, /**< Colmac CxA_10 external heat pump in Single Pass Mode */ - MODELS_ColmacCxA_15_SP = 212, /**< Colmac CxA_15 external heat pump in Single Pass Mode */ - MODELS_ColmacCxA_20_SP = 213, /**< Colmac CxA_20 external heat pump in Single Pass Mode */ - MODELS_ColmacCxA_25_SP = 214, /**< Colmac CxA_25 external heat pump in Single Pass Mode */ - MODELS_ColmacCxA_30_SP = 215, /**< Colmac CxA_30 external heat pump in Single Pass Mode */ + ColmacCxV_5_SP = 210, /**< Colmac CxA_5 external heat pump in Single Pass Mode */ + ColmacCxA_10_SP = 211, /**< Colmac CxA_10 external heat pump in Single Pass Mode */ + ColmacCxA_15_SP = 212, /**< Colmac CxA_15 external heat pump in Single Pass Mode */ + ColmacCxA_20_SP = 213, /**< Colmac CxA_20 external heat pump in Single Pass Mode */ + ColmacCxA_25_SP = 214, /**< Colmac CxA_25 external heat pump in Single Pass Mode */ + ColmacCxA_30_SP = 215, /**< Colmac CxA_30 external heat pump in Single Pass Mode */ // Larger Colmac models in multi pass configuration - MODELS_ColmacCxV_5_MP = 310, /**< Colmac CxA_5 external heat pump in Multi Pass Mode */ - MODELS_ColmacCxA_10_MP = 311, /**< Colmac CxA_10 external heat pump in Multi Pass Mode */ - MODELS_ColmacCxA_15_MP = 312, /**< Colmac CxA_15 external heat pump in Multi Pass Mode */ - MODELS_ColmacCxA_20_MP = 313, /**< Colmac CxA_20 external heat pump in Multi Pass Mode */ - MODELS_ColmacCxA_25_MP = 314, /**< Colmac CxA_25 external heat pump in Multi Pass Mode */ - MODELS_ColmacCxA_30_MP = 315, /**< Colmac CxA_30 external heat pump in Multi Pass Mode */ + ColmacCxV_5_MP = 310, /**< Colmac CxA_5 external heat pump in Multi Pass Mode */ + ColmacCxA_10_MP = 311, /**< Colmac CxA_10 external heat pump in Multi Pass Mode */ + ColmacCxA_15_MP = 312, /**< Colmac CxA_15 external heat pump in Multi Pass Mode */ + ColmacCxA_20_MP = 313, /**< Colmac CxA_20 external heat pump in Multi Pass Mode */ + ColmacCxA_25_MP = 314, /**< Colmac CxA_25 external heat pump in Multi Pass Mode */ + ColmacCxA_30_MP = 315, /**< Colmac CxA_30 external heat pump in Multi Pass Mode */ // Larger Nyle models in single pass configuration - MODELS_NyleC25A_SP = 230, /*< Nyle C25A external heat pump in Single Pass Mode */ - MODELS_NyleC60A_SP = 231, /*< Nyle C60A external heat pump in Single Pass Mode */ - MODELS_NyleC90A_SP = 232, /*< Nyle C90A external heat pump in Single Pass Mode */ - MODELS_NyleC125A_SP = 233, /*< Nyle C125A external heat pump in Single Pass Mode */ - MODELS_NyleC185A_SP = 234, /*< Nyle C185A external heat pump in Single Pass Mode */ - MODELS_NyleC250A_SP = 235, /*< Nyle C250A external heat pump in Single Pass Mode */ + NyleC25A_SP = 230, /*< Nyle C25A external heat pump in Single Pass Mode */ + NyleC60A_SP = 231, /*< Nyle C60A external heat pump in Single Pass Mode */ + NyleC90A_SP = 232, /*< Nyle C90A external heat pump in Single Pass Mode */ + NyleC125A_SP = 233, /*< Nyle C125A external heat pump in Single Pass Mode */ + NyleC185A_SP = 234, /*< Nyle C185A external heat pump in Single Pass Mode */ + NyleC250A_SP = 235, /*< Nyle C250A external heat pump in Single Pass Mode */ // Larger Nyle models with the cold weather package! - MODELS_NyleC60A_C_SP = 241, /*< Nyle C60A external heat pump in Single Pass Mode */ - MODELS_NyleC90A_C_SP = 242, /*< Nyle C90A external heat pump in Single Pass Mode */ - MODELS_NyleC125A_C_SP = 243, /*< Nyle C125A external heat pump in Single Pass Mode */ - MODELS_NyleC185A_C_SP = 244, /*< Nyle C185A external heat pump in Single Pass Mode */ - MODELS_NyleC250A_C_SP = 245, /*< Nyle C250A external heat pump in Single Pass Mode */ + NyleC60A_C_SP = 241, /*< Nyle C60A external heat pump in Single Pass Mode */ + NyleC90A_C_SP = 242, /*< Nyle C90A external heat pump in Single Pass Mode */ + NyleC125A_C_SP = 243, /*< Nyle C125A external heat pump in Single Pass Mode */ + NyleC185A_C_SP = 244, /*< Nyle C185A external heat pump in Single Pass Mode */ + NyleC250A_C_SP = 245, /*< Nyle C250A external heat pump in Single Pass Mode */ // Mitsubishi Electric Trane - MODELS_MITSUBISHI_QAHV_N136TAU_HPB_SP = 250, /*< Mitsubishi Electric Trane QAHV external CO2 heat pump */ + MITSUBISHI_QAHV_N136TAU_HPB_SP = 250, /*< Mitsubishi Electric Trane QAHV external CO2 heat pump */ // Larger Nyle models in multi pass configuration - //MODELS_NyleC25A_MP = 330, /*< Nyle C25A external heat pump in Multi Pass Mode */ - MODELS_NyleC60A_MP = 331, /*< Nyle C60A external heat pump in Multi Pass Mode */ - MODELS_NyleC90A_MP = 332, /*< Nyle C90A external heat pump in Multi Pass Mode */ - MODELS_NyleC125A_MP = 333, /*< Nyle C125A external heat pump in Multi Pass Mode */ - MODELS_NyleC185A_MP = 334, /*< Nyle C185A external heat pump in Multi Pass Mode */ - MODELS_NyleC250A_MP = 335, /*< Nyle C250A external heat pump in Multi Pass Mode */ - - MODELS_NyleC60A_C_MP = 341, /*< Nyle C60A external heat pump in Multi Pass Mode */ - MODELS_NyleC90A_C_MP = 342, /*< Nyle C90A external heat pump in Multi Pass Mode */ - MODELS_NyleC125A_C_MP = 343, /*< Nyle C125A external heat pump in Multi Pass Mode */ - MODELS_NyleC185A_C_MP = 344, /*< Nyle C185A external heat pump in Multi Pass Mode */ - MODELS_NyleC250A_C_MP = 345, /*< Nyle C250A external heat pump in Multi Pass Mode */ + //NyleC25A_MP = 330, /*< Nyle C25A external heat pump in Multi Pass Mode */ + NyleC60A_MP = 331, /*< Nyle C60A external heat pump in Multi Pass Mode */ + NyleC90A_MP = 332, /*< Nyle C90A external heat pump in Multi Pass Mode */ + NyleC125A_MP = 333, /*< Nyle C125A external heat pump in Multi Pass Mode */ + NyleC185A_MP = 334, /*< Nyle C185A external heat pump in Multi Pass Mode */ + NyleC250A_MP = 335, /*< Nyle C250A external heat pump in Multi Pass Mode */ + + NyleC60A_C_MP = 341, /*< Nyle C60A external heat pump in Multi Pass Mode */ + NyleC90A_C_MP = 342, /*< Nyle C90A external heat pump in Multi Pass Mode */ + NyleC125A_C_MP = 343, /*< Nyle C125A external heat pump in Multi Pass Mode */ + NyleC185A_C_MP = 344, /*< Nyle C185A external heat pump in Multi Pass Mode */ + NyleC250A_C_MP = 345, /*< Nyle C250A external heat pump in Multi Pass Mode */ // Large Rheem multi pass models - MODELS_RHEEM_HPHD60HNU_201_MP = 350, - MODELS_RHEEM_HPHD60VNU_201_MP = 351, - MODELS_RHEEM_HPHD135HNU_483_MP = 352, // really bad fit to data due to inconsistency in data - MODELS_RHEEM_HPHD135VNU_483_MP = 353 // really bad fit to data due to inconsistency in data + RHEEM_HPHD60HNU_201_MP = 350, + RHEEM_HPHD60VNU_201_MP = 351, + RHEEM_HPHD135HNU_483_MP = 352, // really bad fit to data due to inconsistency in data + RHEEM_HPHD135VNU_483_MP = 353 // really bad fit to data due to inconsistency in data }; #endif \ No newline at end of file diff --git a/src/HPWHpresets.cc b/src/HPWHpresets.cc index c5ae25f9..e4acf0f6 100644 --- a/src/HPWHpresets.cc +++ b/src/HPWHpresets.cc @@ -102,7 +102,7 @@ int HPWH::HPWHinit_resTank(double tankVol_L, double energyFactor, double upperPo tankUA_kJperHrC = 0.0; } - hpwhModel = MODELS_CustomResTank; + hpwhModel = MODELS::CustomResTank; //calculate oft-used derived values calcDerivedValues(); @@ -212,7 +212,7 @@ int HPWH::HPWHinit_resTankGeneric(double tankVol_L, double rValue_M2KperW, doubl tankUA_kJperHrC = 0.0; } - hpwhModel = HPWH::MODELS_CustomResTankGeneric; + hpwhModel = MODELS::CustomResTankGeneric; //calculate oft-used derived values calcDerivedValues(); @@ -245,7 +245,7 @@ int HPWH::HPWHinit_genericHPWH(double tankVol_L, double energyFactor, double res // return 0 on success, HPWH_ABORT for failure heatSources.clear(); - //except where noted, these values are taken from MODELS_GE2014STDMode on 5/17/16 + //except where noted, these values are taken from MODELS::GE2014STDMode on 5/17/16 setNumNodes(12); setpoint_C = F_TO_C(127.0); @@ -373,7 +373,7 @@ int HPWH::HPWHinit_genericHPWH(double tankVol_L, double energyFactor, double res //standard finishing up init, borrowed from init function - hpwhModel = MODELS_genericCustomUEF; + hpwhModel = MODELS::genericCustomUEF; //calculate oft-used derived values calcDerivedValues(); @@ -412,7 +412,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources.clear(); //resistive with no UA losses for testing - if (presetNum == MODELS_restankNoUA) { + if (presetNum == MODELS::restankNoUA) { setNumNodes(12); setpoint_C = F_TO_C(127.0); @@ -446,7 +446,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { } //resistive tank with massive UA loss for testing - else if (presetNum == MODELS_restankHugeUA) { + else if (presetNum == MODELS::restankHugeUA) { setNumNodes(12); setpoint_C = 50; @@ -480,7 +480,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { } //realistic resistive tank - else if (presetNum == MODELS_restankRealistic) { + else if (presetNum == MODELS::restankRealistic) { setNumNodes(12); setpoint_C = F_TO_C(127.0); @@ -513,7 +513,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[0].followedByHeatSource = &heatSources[1]; } - else if (presetNum == MODELS_StorageTank) { + else if (presetNum == MODELS::StorageTank) { setNumNodes(12); setpoint_C = 52; @@ -545,7 +545,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { } //basic compressor tank for testing - else if (presetNum == MODELS_basicIntegrated) { + else if (presetNum == MODELS::basicIntegrated) { setNumNodes(12); setpoint_C = 50; @@ -621,7 +621,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { } //simple external style for testing - else if (presetNum == MODELS_externalTest) { + else if (presetNum == MODELS::externalTest) { setNumNodes(96); setpoint_C = 50; @@ -673,7 +673,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[0] = compressor; } //voltex 60 gallon - else if (presetNum == MODELS_AOSmithPHPT60) { + else if (presetNum == MODELS::AOSmithPHPT60) { setNumNodes(12); setpoint_C = F_TO_C(127.0); @@ -749,7 +749,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[1].followedByHeatSource = &heatSources[2]; } - else if (presetNum == MODELS_AOSmithPHPT80) { + else if (presetNum == MODELS::AOSmithPHPT80) { setNumNodes(12); setpoint_C = F_TO_C(127.0); @@ -826,7 +826,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[1].followedByHeatSource = &heatSources[2]; } - else if (presetNum == MODELS_GE2012) { + else if (presetNum == MODELS::GE2012) { setNumNodes(12); setpoint_C = F_TO_C(127.0); @@ -908,7 +908,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[1].followedByHeatSource = &heatSources[2]; } // If a Colmac single pass preset cold weather or not - else if (MODELS_ColmacCxV_5_SP <= presetNum && presetNum <= MODELS_ColmacCxA_30_SP) { + else if (MODELS::ColmacCxV_5_SP <= presetNum && presetNum <= MODELS::ColmacCxA_30_SP) { setNumNodes(96); setpoint_C = F_TO_C(135.0); tankSizeFixed = false; @@ -948,7 +948,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { //Defrost Derate compressor.setupDefrostMap(); - if (presetNum == MODELS_ColmacCxV_5_SP) { + if (presetNum == MODELS::ColmacCxV_5_SP) { setTankSize_adjustUA(200., UNITS_GAL); //logic conditions compressor.minT = F_TO_C(-4.0); @@ -969,7 +969,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { compressor.minT = F_TO_C(40.); compressor.maxSetpoint_C = MAXOUTLET_R134A; - if (presetNum == MODELS_ColmacCxA_10_SP) { + if (presetNum == MODELS::ColmacCxA_10_SP) { setTankSize_adjustUA(500., UNITS_GAL); compressor.perfMap.push_back({ @@ -983,7 +983,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { }); } - else if (presetNum == MODELS_ColmacCxA_15_SP) { + else if (presetNum == MODELS::ColmacCxA_15_SP) { setTankSize_adjustUA(600., UNITS_GAL); compressor.perfMap.push_back({ @@ -997,7 +997,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { }); } - else if (presetNum == MODELS_ColmacCxA_20_SP) { + else if (presetNum == MODELS::ColmacCxA_20_SP) { setTankSize_adjustUA(800., UNITS_GAL); compressor.perfMap.push_back({ @@ -1011,7 +1011,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { }); } - else if (presetNum == MODELS_ColmacCxA_25_SP) { + else if (presetNum == MODELS::ColmacCxA_25_SP) { setTankSize_adjustUA(1000., UNITS_GAL); compressor.perfMap.push_back({ @@ -1025,7 +1025,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { }); } - else if (presetNum == MODELS_ColmacCxA_30_SP) { + else if (presetNum == MODELS::ColmacCxA_30_SP) { setTankSize_adjustUA(1200., UNITS_GAL); compressor.perfMap.push_back({ @@ -1038,7 +1038,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { -0.0000251665, -0.0003289731, -0.0000801823, 0.0000325972, 0.0000002705} // COP Coefficients (COP_coeffs) }); } - } //End if MODELS_ColmacCxV_5_SP + } //End if MODELS::ColmacCxV_5_SP //set everything in its places heatSources.resize(1); @@ -1047,7 +1047,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { // if colmac multipass - else if (MODELS_ColmacCxV_5_MP <= presetNum && presetNum <= MODELS_ColmacCxA_30_MP) { + else if (MODELS::ColmacCxV_5_MP <= presetNum && presetNum <= MODELS::ColmacCxA_30_MP) { setNumNodes(24); setpoint_C = F_TO_C(135.0); tankSizeFixed = false; @@ -1084,7 +1084,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { //Defrost Derate compressor.setupDefrostMap(); - if (presetNum == MODELS_ColmacCxV_5_MP) { + if (presetNum == MODELS::ColmacCxV_5_MP) { setTankSize_adjustUA(200., UNITS_GAL); compressor.mpFlowRate_LPS = GPM_TO_LPS(9.); //https://colmacwaterheat.com/wp-content/uploads/2020/10/Technical-Datasheet-Air-Source.pdf @@ -1106,7 +1106,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { compressor.maxT = F_TO_C(105.); compressor.maxSetpoint_C = MAXOUTLET_R134A; - if (presetNum == MODELS_ColmacCxA_10_MP) { + if (presetNum == MODELS::ColmacCxA_10_MP) { setTankSize_adjustUA(500., UNITS_GAL); compressor.mpFlowRate_LPS = GPM_TO_LPS(18.); compressor.perfMap.push_back({ @@ -1118,7 +1118,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { }); } - else if (presetNum == MODELS_ColmacCxA_15_MP) { + else if (presetNum == MODELS::ColmacCxA_15_MP) { setTankSize_adjustUA(600., UNITS_GAL); compressor.mpFlowRate_LPS = GPM_TO_LPS(26.); compressor.perfMap.push_back({ @@ -1131,7 +1131,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { }); } - else if (presetNum == MODELS_ColmacCxA_20_MP) { + else if (presetNum == MODELS::ColmacCxA_20_MP) { setTankSize_adjustUA(800., UNITS_GAL); compressor.mpFlowRate_LPS = GPM_TO_LPS(36.); //https://colmacwaterheat.com/wp-content/uploads/2020/10/Technical-Datasheet-Air-Source.pdf @@ -1144,7 +1144,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { }); } - else if (presetNum == MODELS_ColmacCxA_25_MP) { + else if (presetNum == MODELS::ColmacCxA_25_MP) { setTankSize_adjustUA(1000., UNITS_GAL); compressor.mpFlowRate_LPS = GPM_TO_LPS(32.); compressor.perfMap.push_back({ @@ -1156,7 +1156,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { }); } - else if (presetNum == MODELS_ColmacCxA_30_MP) { + else if (presetNum == MODELS::ColmacCxA_30_MP) { setTankSize_adjustUA(1200., UNITS_GAL); compressor.mpFlowRate_LPS = GPM_TO_LPS(41.); compressor.perfMap.push_back({ @@ -1174,7 +1174,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[0] = compressor; } // If Nyle single pass preset - else if (MODELS_NyleC25A_SP <= presetNum && presetNum <= MODELS_NyleC250A_C_SP) { + else if (MODELS::NyleC25A_SP <= presetNum && presetNum <= MODELS::NyleC250A_C_SP) { setNumNodes(96); setpoint_C = F_TO_C(135.0); tankSizeFixed = false; @@ -1199,7 +1199,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { compressor.externalInletHeight = getNumNodes() - 1; //logic conditions - if (MODELS_NyleC25A_SP <= presetNum && presetNum <= MODELS_NyleC250A_SP) {// If not cold weather package + if (MODELS::NyleC25A_SP <= presetNum && presetNum <= MODELS::NyleC250A_SP) {// If not cold weather package compressor.minT = F_TO_C(40.); // Min air temperature sans Cold Weather Package } else { @@ -1228,7 +1228,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { compressor.setupDefrostMap(); //Perfmaps for each compressor size - if (presetNum == MODELS_NyleC25A_SP) { + if (presetNum == MODELS::NyleC25A_SP) { setTankSize_adjustUA(200., UNITS_GAL); compressor.perfMap.push_back({ 90, // Temperature (T_F) @@ -1240,7 +1240,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { -0.000384778,-0.000404744,-0.000036277, 0.000001900 } // COP Coefficients (COP_coeffs) }); } - else if (presetNum == MODELS_NyleC60A_SP || presetNum == MODELS_NyleC60A_C_SP) { + else if (presetNum == MODELS::NyleC60A_SP || presetNum == MODELS::NyleC60A_C_SP) { setTankSize_adjustUA(300., UNITS_GAL); compressor.perfMap.push_back({ 90, // Temperature (T_F) @@ -1252,7 +1252,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { -0.0003311463,-0.0002154270,0.0001307922,0.0000005568} // COP Coefficients (COP_coeffs) }); } - else if (presetNum == MODELS_NyleC90A_SP || presetNum == MODELS_NyleC90A_C_SP) { + else if (presetNum == MODELS::NyleC90A_SP || presetNum == MODELS::NyleC90A_C_SP) { setTankSize_adjustUA(400., UNITS_GAL); compressor.perfMap.push_back({ 90, // Temperature (T_F) @@ -1264,7 +1264,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { 0.00006002498,-0.00045661397,-0.00034003896,-0.00004327766,0.00000176015} // COP Coefficients (COP_coeffs) }); } - else if (presetNum == MODELS_NyleC125A_SP || presetNum == MODELS_NyleC125A_C_SP) { + else if (presetNum == MODELS::NyleC125A_SP || presetNum == MODELS::NyleC125A_C_SP) { setTankSize_adjustUA(500., UNITS_GAL); compressor.perfMap.push_back({ 90, // Temperature (T_F) @@ -1276,7 +1276,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { -1.4452E-05, -0.000492486, -0.000376814, 7.85911E-05, 1.47884E-06}// COP Coefficients (COP_coeffs) }); } - else if (presetNum == MODELS_NyleC185A_SP || presetNum == MODELS_NyleC185A_C_SP) { + else if (presetNum == MODELS::NyleC185A_SP || presetNum == MODELS::NyleC185A_C_SP) { setTankSize_adjustUA(800., UNITS_GAL); compressor.perfMap.push_back({ 90, // Temperature (T_F) @@ -1288,7 +1288,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { 9.78042E-05, -0.000872708,-0.001013945, -0.00021852, 5.55444E-06}// COP Coefficients (COP_coeffs) }); } - else if (presetNum == MODELS_NyleC250A_SP || presetNum == MODELS_NyleC250A_C_SP) { + else if (presetNum == MODELS::NyleC250A_SP || presetNum == MODELS::NyleC250A_C_SP) { setTankSize_adjustUA(800., UNITS_GAL); compressor.perfMap.push_back({ @@ -1308,7 +1308,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { } // If Nyle multipass presets - else if (MODELS_NyleC60A_MP <= presetNum && presetNum <= MODELS_NyleC250A_C_MP) { + else if (MODELS::NyleC60A_MP <= presetNum && presetNum <= MODELS::NyleC250A_C_MP) { setNumNodes(24); setpoint_C = F_TO_C(135.0); tankSizeFixed = false; @@ -1332,7 +1332,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { compressor.externalInletHeight = static_cast(getNumNodes() / 3.) - 1; //logic conditions//logic conditions - if (MODELS_NyleC60A_MP <= presetNum && presetNum <= MODELS_NyleC250A_MP) {// If not cold weather package + if (MODELS::NyleC60A_MP <= presetNum && presetNum <= MODELS::NyleC250A_MP) {// If not cold weather package compressor.minT = F_TO_C(40.); // Min air temperature sans Cold Weather Package } else { @@ -1361,10 +1361,10 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { compressor.perfGrid.push_back({ 40., 60., 80., 90. }); // Grid Axis 1 Tair (F) compressor.perfGrid.push_back({ 40., 60., 80., 100., 130., 150. }); // Grid Axis 2 Tin (F) - if (presetNum == MODELS_NyleC60A_MP || presetNum == MODELS_NyleC60A_C_MP) { + if (presetNum == MODELS::NyleC60A_MP || presetNum == MODELS::NyleC60A_C_MP) { setTankSize_adjustUA(360., UNITS_GAL); compressor.mpFlowRate_LPS = GPM_TO_LPS(13.); - if (presetNum == MODELS_NyleC60A_C_MP) { + if (presetNum == MODELS::NyleC60A_C_MP) { compressor.resDefrost = { 4.5, // inputPwr_kW; 5.0, // constTempLift_dF; @@ -1381,10 +1381,10 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { 1.860732984, 5.512359551, 5.153846154, 4.290502793, 3.417981073, 2.272409779, 1.927748691 }); } - else if (presetNum == MODELS_NyleC90A_MP || presetNum == MODELS_NyleC90A_C_MP) { + else if (presetNum == MODELS::NyleC90A_MP || presetNum == MODELS::NyleC90A_C_MP) { setTankSize_adjustUA(480., UNITS_GAL); compressor.mpFlowRate_LPS = GPM_TO_LPS(20.); - if (presetNum == MODELS_NyleC90A_C_MP) { + if (presetNum == MODELS::NyleC90A_C_MP) { compressor.resDefrost = { 5.4, // inputPwr_kW; 5.0, // constTempLift_dF; @@ -1402,10 +1402,10 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { }); } - else if (presetNum == MODELS_NyleC125A_MP || presetNum == MODELS_NyleC125A_C_MP) { + else if (presetNum == MODELS::NyleC125A_MP || presetNum == MODELS::NyleC125A_C_MP) { setTankSize_adjustUA(600., UNITS_GAL); compressor.mpFlowRate_LPS = GPM_TO_LPS(28.); - if (presetNum == MODELS_NyleC125A_C_MP) { + if (presetNum == MODELS::NyleC125A_C_MP) { compressor.resDefrost = { 9.0, // inputPwr_kW; 5.0, // constTempLift_dF; @@ -1422,10 +1422,10 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { 3.27827381, 2.113821138, 1.770469799, 6.657342657, 5.749473684, 4.612244898, 3.542731921, 2.221095335, 1.816964286 }); } - else if (presetNum == MODELS_NyleC185A_MP || presetNum == MODELS_NyleC185A_C_MP) { + else if (presetNum == MODELS::NyleC185A_MP || presetNum == MODELS::NyleC185A_C_MP) { setTankSize_adjustUA(960., UNITS_GAL); compressor.mpFlowRate_LPS = GPM_TO_LPS(40.); - if (presetNum == MODELS_NyleC185A_C_MP) { + if (presetNum == MODELS::NyleC185A_C_MP) { compressor.resDefrost = { 7.2, // inputPwr_kW; 5.0, // constTempLift_dF; @@ -1442,10 +1442,10 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { 3.705475811, 2.561369758, 2.05950096, 10.26993865, 6.350722311, 5.04218853, 3.841688654, 2.574151735, 2.025616698 }); } - else if (presetNum == MODELS_NyleC250A_MP || presetNum == MODELS_NyleC250A_C_MP) { + else if (presetNum == MODELS::NyleC250A_MP || presetNum == MODELS::NyleC250A_C_MP) { setTankSize_adjustUA(960., UNITS_GAL); compressor.mpFlowRate_LPS = GPM_TO_LPS(50.); - if (presetNum == MODELS_NyleC250A_C_MP) { + if (presetNum == MODELS::NyleC250A_C_MP) { compressor.resDefrost = { 18.0, // inputPwr_kW; 5.0, // constTempLift_dF; @@ -1474,7 +1474,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[0] = compressor; } // if rheem multipass - else if (MODELS_RHEEM_HPHD60HNU_201_MP <= presetNum && presetNum <= MODELS_RHEEM_HPHD135VNU_483_MP) { + else if (MODELS::RHEEM_HPHD60HNU_201_MP <= presetNum && presetNum <= MODELS::RHEEM_HPHD135VNU_483_MP) { setNumNodes(24); setpoint_C = F_TO_C(135.0); tankSizeFixed = false; @@ -1515,7 +1515,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { compressor.maxT = F_TO_C(110.); compressor.maxSetpoint_C = MAXOUTLET_R134A; // data says 150... - if (presetNum == MODELS_RHEEM_HPHD60HNU_201_MP || presetNum == MODELS_RHEEM_HPHD60VNU_201_MP) { + if (presetNum == MODELS::RHEEM_HPHD60HNU_201_MP || presetNum == MODELS::RHEEM_HPHD60VNU_201_MP) { setTankSize_adjustUA(250., UNITS_GAL); compressor.mpFlowRate_LPS = GPM_TO_LPS(17.4); compressor.perfMap.push_back({ @@ -1526,7 +1526,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { { 3.6840046360, 0.0995685071, -0.0398107723, -0.0001903160, 0.0000980361, -0.0003469814} // COP Coefficients (COP_coeffs) }); } - else if (presetNum == MODELS_RHEEM_HPHD135HNU_483_MP || presetNum == MODELS_RHEEM_HPHD135VNU_483_MP) { + else if (presetNum == MODELS::RHEEM_HPHD135HNU_483_MP || presetNum == MODELS::RHEEM_HPHD135VNU_483_MP) { setTankSize_adjustUA(500., UNITS_GAL); compressor.mpFlowRate_LPS = GPM_TO_LPS(34.87); compressor.perfMap.push_back({ @@ -1543,7 +1543,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[0] = compressor; } - else if (presetNum == MODELS_MITSUBISHI_QAHV_N136TAU_HPB_SP) { + else if (presetNum == MODELS::MITSUBISHI_QAHV_N136TAU_HPB_SP) { setNumNodes(96); setpoint_C = 65; @@ -1676,19 +1676,19 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[0] = compressor; } - else if (presetNum == MODELS_SANCO2_83 || presetNum == MODELS_SANCO2_GS3_45HPA_US_SP || presetNum == MODELS_SANCO2_119) { + else if (presetNum == MODELS::SANCO2_83 || presetNum == MODELS::SANCO2_GS3_45HPA_US_SP || presetNum == MODELS::SANCO2_119) { setNumNodes(96); setpoint_C = 65; setpointFixed = true; - if (presetNum == MODELS_SANCO2_119) { + if (presetNum == MODELS::SANCO2_119) { tankVolume_L = GAL_TO_L(119); tankUA_kJperHrC = 9; } else { tankVolume_L = 315; tankUA_kJperHrC = 7; - if (presetNum == MODELS_SANCO2_GS3_45HPA_US_SP) { + if (presetNum == MODELS::SANCO2_GS3_45HPA_US_SP) { tankSizeFixed = false; } } @@ -1746,7 +1746,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { std::vector nodeWeights; nodeWeights.emplace_back(8); compressor.addTurnOnLogic(std::make_shared("eighth node absolute", nodeWeights, F_TO_C(113), this, true)); - if (presetNum == MODELS_SANCO2_83 || presetNum == MODELS_SANCO2_119) { + if (presetNum == MODELS::SANCO2_83 || presetNum == MODELS::SANCO2_119) { compressor.addTurnOnLogic(HPWH::standby(dF_TO_dC(8.2639))); // Adds a bonus standby logic so the external heater does not cycle, recommended for any external heater with standby std::vector nodeWeightStandby; @@ -1764,7 +1764,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources.resize(1); heatSources[0] = compressor; } - else if (presetNum == MODELS_SANCO2_43) { + else if (presetNum == MODELS::SANCO2_43) { setNumNodes(96); setpoint_C = 65; setpointFixed = true; @@ -1843,7 +1843,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources.resize(1); heatSources[0] = compressor; } - else if (presetNum == MODELS_AOSmithHPTU50 || presetNum == MODELS_RheemHBDR2250 || presetNum == MODELS_RheemHBDR4550) { + else if (presetNum == MODELS::AOSmithHPTU50 || presetNum == MODELS::RheemHBDR2250 || presetNum == MODELS::RheemHBDR4550) { setNumNodes(24); setpoint_C = F_TO_C(127.0); @@ -1893,7 +1893,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { compressor.maxSetpoint_C = MAXOUTLET_R134A; //top resistor values - if (presetNum == MODELS_RheemHBDR2250) { + if (presetNum == MODELS::RheemHBDR2250) { resistiveElementTop.setupAsResistiveElement(8, 2250); } else { @@ -1902,7 +1902,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { resistiveElementTop.isVIP = true; //bottom resistor values - if (presetNum == MODELS_RheemHBDR2250) { + if (presetNum == MODELS::RheemHBDR2250) { resistiveElementBottom.setupAsResistiveElement(0, 2250); } else { @@ -1941,11 +1941,11 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { } - else if (presetNum == MODELS_AOSmithHPTU66 || presetNum == MODELS_RheemHBDR2265 || presetNum == MODELS_RheemHBDR4565) { + else if (presetNum == MODELS::AOSmithHPTU66 || presetNum == MODELS::RheemHBDR2265 || presetNum == MODELS::RheemHBDR4565) { setNumNodes(24); setpoint_C = F_TO_C(127.0); - if (presetNum == MODELS_AOSmithHPTU66) { + if (presetNum == MODELS::AOSmithHPTU66) { tankVolume_L = 244.6; } else { @@ -1996,7 +1996,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { compressor.maxSetpoint_C = MAXOUTLET_R134A; //top resistor values - if (presetNum == MODELS_RheemHBDR2265) { + if (presetNum == MODELS::RheemHBDR2265) { resistiveElementTop.setupAsResistiveElement(8, 2250); } else { @@ -2005,7 +2005,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { resistiveElementTop.isVIP = true; //bottom resistor values - if (presetNum == MODELS_RheemHBDR2265) { + if (presetNum == MODELS::RheemHBDR2265) { resistiveElementBottom.setupAsResistiveElement(0, 2250); } else { @@ -2043,7 +2043,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[0].companionHeatSource = &heatSources[2]; } - else if (presetNum == MODELS_AOSmithHPTU80 || presetNum == MODELS_RheemHBDR2280 || presetNum == MODELS_RheemHBDR4580) { + else if (presetNum == MODELS::AOSmithHPTU80 || presetNum == MODELS::RheemHBDR2280 || presetNum == MODELS::RheemHBDR4580) { setNumNodes(24); setpoint_C = F_TO_C(127.0); @@ -2092,7 +2092,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { compressor.hysteresis_dC = dF_TO_dC(1); //top resistor values - if (presetNum == MODELS_RheemHBDR2280) { + if (presetNum == MODELS::RheemHBDR2280) { resistiveElementTop.setupAsResistiveElement(8, 2250); } else { @@ -2101,7 +2101,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { resistiveElementTop.isVIP = true; //bottom resistor values - if (presetNum == MODELS_RheemHBDR2280) { + if (presetNum == MODELS::RheemHBDR2280) { resistiveElementBottom.setupAsResistiveElement(0, 2250); } else { @@ -2140,7 +2140,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[0].companionHeatSource = &heatSources[2]; } - else if (presetNum == MODELS_AOSmithHPTU80_DR) { + else if (presetNum == MODELS::AOSmithHPTU80_DR) { setNumNodes(12); setpoint_C = F_TO_C(127.0); @@ -2216,7 +2216,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[1].followedByHeatSource = &heatSources[2]; } - else if (presetNum == MODELS_AOSmithCAHP120) { + else if (presetNum == MODELS::AOSmithCAHP120) { setNumNodes(24); setpoint_C = F_TO_C(150.0); @@ -2306,20 +2306,20 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[1].companionHeatSource = &heatSources[2]; } - else if (MODELS_AOSmithHPTS50 <= presetNum && presetNum <= MODELS_AOSmithHPTS80) + else if (MODELS::AOSmithHPTS50 <= presetNum && presetNum <= MODELS::AOSmithHPTS80) { setNumNodes(12); setpoint_C = F_TO_C(127.0); - if (presetNum == MODELS_AOSmithHPTS50) { + if (presetNum == MODELS::AOSmithHPTS50) { tankVolume_L = GAL_TO_L(45.6); tankUA_kJperHrC = 6.403; } - else if (presetNum == MODELS_AOSmithHPTS66) { + else if (presetNum == MODELS::AOSmithHPTS66) { tankVolume_L = GAL_TO_L(67.63); tankUA_kJperHrC = UAf_TO_UAc(1.5) * 6.403 / UAf_TO_UAc(1.16); } - else if (presetNum == MODELS_AOSmithHPTS80) { + else if (presetNum == MODELS::AOSmithHPTS80) { tankVolume_L = GAL_TO_L(81.94); tankUA_kJperHrC = UAf_TO_UAc(1.73) * 6.403 / UAf_TO_UAc(1.16); } @@ -2393,7 +2393,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[0].companionHeatSource = &heatSources[2]; } - else if (presetNum == MODELS_GE2014STDMode) { + else if (presetNum == MODELS::GE2014STDMode) { setNumNodes(12); setpoint_C = F_TO_C(127.0); @@ -2467,7 +2467,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[1].followedByHeatSource = &heatSources[2]; } - else if (presetNum == MODELS_GE2014STDMode_80) { + else if (presetNum == MODELS::GE2014STDMode_80) { setNumNodes(12); setpoint_C = F_TO_C(127.0); @@ -2537,7 +2537,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[1].followedByHeatSource = &heatSources[2]; } - else if (presetNum == MODELS_GE2014) { + else if (presetNum == MODELS::GE2014) { setNumNodes(12); setpoint_C = F_TO_C(127.0); @@ -2614,7 +2614,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[1].followedByHeatSource = &heatSources[2]; } - else if (presetNum == MODELS_GE2014_80) { + else if (presetNum == MODELS::GE2014_80) { setNumNodes(12); setpoint_C = F_TO_C(127.0); @@ -2691,7 +2691,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[1].followedByHeatSource = &heatSources[2]; } - else if (presetNum == MODELS_GE2014_80DR) { + else if (presetNum == MODELS::GE2014_80DR) { setNumNodes(12); setpoint_C = F_TO_C(127.0); @@ -2770,7 +2770,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { } // PRESET USING GE2014 DATA - else if (presetNum == MODELS_BWC2020_65) { + else if (presetNum == MODELS::BWC2020_65) { setNumNodes(12); setpoint_C = F_TO_C(127.0); @@ -2845,23 +2845,23 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { } // If Rheem Premium - else if (MODELS_Rheem2020Prem40 <= presetNum && presetNum <= MODELS_Rheem2020Prem80) { + else if (MODELS::Rheem2020Prem40 <= presetNum && presetNum <= MODELS::Rheem2020Prem80) { setNumNodes(12); setpoint_C = F_TO_C(127.0); - if (presetNum == MODELS_Rheem2020Prem40) { + if (presetNum == MODELS::Rheem2020Prem40) { tankVolume_L = GAL_TO_L(36.1); tankUA_kJperHrC = 9.5; } - else if (presetNum == MODELS_Rheem2020Prem50) { + else if (presetNum == MODELS::Rheem2020Prem50) { tankVolume_L = GAL_TO_L(45.1); tankUA_kJperHrC = 8.55; } - else if (presetNum == MODELS_Rheem2020Prem65) { + else if (presetNum == MODELS::Rheem2020Prem65) { tankVolume_L = GAL_TO_L(58.5); tankUA_kJperHrC = 10.64; } - else if (presetNum == MODELS_Rheem2020Prem80) { + else if (presetNum == MODELS::Rheem2020Prem80) { tankVolume_L = GAL_TO_L(72.0); tankUA_kJperHrC = 10.83; } @@ -2935,23 +2935,23 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { } // If Rheem Build - else if (MODELS_Rheem2020Build40 <= presetNum && presetNum <= MODELS_Rheem2020Build80) { + else if (MODELS::Rheem2020Build40 <= presetNum && presetNum <= MODELS::Rheem2020Build80) { setNumNodes(12); setpoint_C = F_TO_C(127.0); - if (presetNum == MODELS_Rheem2020Build40) { + if (presetNum == MODELS::Rheem2020Build40) { tankVolume_L = GAL_TO_L(36.1); tankUA_kJperHrC = 9.5; } - else if (presetNum == MODELS_Rheem2020Build50) { + else if (presetNum == MODELS::Rheem2020Build50) { tankVolume_L = GAL_TO_L(45.1); tankUA_kJperHrC = 8.55; } - else if (presetNum == MODELS_Rheem2020Build65) { + else if (presetNum == MODELS::Rheem2020Build65) { tankVolume_L = GAL_TO_L(58.5); tankUA_kJperHrC = 10.64; } - else if (presetNum == MODELS_Rheem2020Build80) { + else if (presetNum == MODELS::Rheem2020Build80) { tankVolume_L = GAL_TO_L(72.0); tankUA_kJperHrC = 10.83; } @@ -3023,25 +3023,25 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[0].companionHeatSource = &heatSources[2]; } - else if (MODELS_RheemPlugInShared40 <= presetNum && presetNum <= MODELS_RheemPlugInShared80) { + else if (MODELS::RheemPlugInShared40 <= presetNum && presetNum <= MODELS::RheemPlugInShared80) { setNumNodes(12); - if (presetNum == MODELS_RheemPlugInShared40) { + if (presetNum == MODELS::RheemPlugInShared40) { tankVolume_L = GAL_TO_L(36.0); tankUA_kJperHrC = 9.5; setpoint_C = F_TO_C(140.0); } - else if (presetNum == MODELS_RheemPlugInShared50) { + else if (presetNum == MODELS::RheemPlugInShared50) { tankVolume_L = GAL_TO_L(45.0); tankUA_kJperHrC = 8.55; setpoint_C = F_TO_C(140.0); } - else if (presetNum == MODELS_RheemPlugInShared65) { + else if (presetNum == MODELS::RheemPlugInShared65) { tankVolume_L = GAL_TO_L(58.5); tankUA_kJperHrC = 10.64; setpoint_C = F_TO_C(127.0); } - else if (presetNum == MODELS_RheemPlugInShared80) { + else if (presetNum == MODELS::RheemPlugInShared80) { tankVolume_L = GAL_TO_L(72.0); tankUA_kJperHrC = 10.83; setpoint_C = F_TO_C(127.0); @@ -3088,14 +3088,14 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources.resize(1); heatSources[0] = compressor; } - else if (presetNum == MODELS_RheemPlugInDedicated40 || presetNum == MODELS_RheemPlugInDedicated50) { + else if (presetNum == MODELS::RheemPlugInDedicated40 || presetNum == MODELS::RheemPlugInDedicated50) { setNumNodes(12); setpoint_C = F_TO_C(127.0); - if (presetNum == MODELS_RheemPlugInDedicated40) { + if (presetNum == MODELS::RheemPlugInDedicated40) { tankVolume_L = GAL_TO_L(36); tankUA_kJperHrC = 5.5; } - else if (presetNum == MODELS_RheemPlugInDedicated50) { + else if (presetNum == MODELS::RheemPlugInDedicated50) { tankVolume_L = GAL_TO_L(45); tankUA_kJperHrC = 6.33; } @@ -3140,7 +3140,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources.resize(1); heatSources[0] = compressor; } - else if (presetNum == MODELS_RheemHB50) { + else if (presetNum == MODELS::RheemHB50) { setNumNodes(12); setpoint_C = F_TO_C(127.0); @@ -3216,7 +3216,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[1].followedByHeatSource = &heatSources[2]; } - else if (presetNum == MODELS_Stiebel220E) { + else if (presetNum == MODELS::Stiebel220E) { setNumNodes(12); setpoint_C = F_TO_C(127); @@ -3274,7 +3274,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[0].backupHeatSource = &heatSources[1]; } - else if (presetNum == MODELS_Generic1) { + else if (presetNum == MODELS::Generic1) { setNumNodes(12); setpoint_C = F_TO_C(127.0); @@ -3344,7 +3344,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[1].followedByHeatSource = &heatSources[2]; } - else if (presetNum == MODELS_Generic2) { + else if (presetNum == MODELS::Generic2) { setNumNodes(12); setpoint_C = F_TO_C(127.0); @@ -3418,7 +3418,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[1].followedByHeatSource = &heatSources[2]; } - else if (presetNum == MODELS_Generic3) { + else if (presetNum == MODELS::Generic3) { setNumNodes(12); setpoint_C = F_TO_C(127.0); @@ -3494,7 +3494,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[1].followedByHeatSource = &heatSources[2]; } - else if (presetNum == MODELS_UEF2generic) { + else if (presetNum == MODELS::UEF2generic) { setNumNodes(12); setpoint_C = F_TO_C(127.0); @@ -3567,23 +3567,23 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[1].followedByHeatSource = &heatSources[2]; } - else if (MODELS_AWHSTier3Generic40 <= presetNum && presetNum <= MODELS_AWHSTier3Generic80) { + else if (MODELS::AWHSTier3Generic40 <= presetNum && presetNum <= MODELS::AWHSTier3Generic80) { setNumNodes(12); setpoint_C = F_TO_C(127.0); - if (presetNum == MODELS_AWHSTier3Generic40) { + if (presetNum == MODELS::AWHSTier3Generic40) { tankVolume_L = GAL_TO_L(36.1); tankUA_kJperHrC = 5; } - else if (presetNum == MODELS_AWHSTier3Generic50) { + else if (presetNum == MODELS::AWHSTier3Generic50) { tankVolume_L = GAL_TO_L(45); tankUA_kJperHrC = 6.5; } - else if (presetNum == MODELS_AWHSTier3Generic65) { + else if (presetNum == MODELS::AWHSTier3Generic65) { tankVolume_L = GAL_TO_L(64); tankUA_kJperHrC = 7.6; } - else if (presetNum == MODELS_AWHSTier3Generic80) { + else if (presetNum == MODELS::AWHSTier3Generic80) { tankVolume_L = GAL_TO_L(75.4); tankUA_kJperHrC = 10.; } @@ -3663,7 +3663,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[1].followedByHeatSource = &heatSources[2]; } // If a the model is the TamOMatic, HotTam, Generic... This model is scalable. - else if (presetNum == MODELS_TamScalable_SP) { + else if (presetNum == MODELS::TamScalable_SP) { setNumNodes(24); setpoint_C = F_TO_C(135.0); tankSizeFixed = false; @@ -3744,7 +3744,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { heatSources[0].companionHeatSource = &heatSources[2]; } - else if (presetNum == MODELS_Scalable_MP) { + else if (presetNum == MODELS::Scalable_MP) { setNumNodes(24); setpoint_C = F_TO_C(135.0); tankSizeFixed = false; diff --git a/src/HPWHversion.in.hh b/src/HPWHversion.in.hh index ab5bcbb4..69f2b899 100644 --- a/src/HPWHversion.in.hh +++ b/src/HPWHversion.in.hh @@ -1,18 +1,6 @@ #ifndef HPWHversion_hh #define HPWHversion_hh -#include -#include -#include -#include -#include -#include -#include - -#include -#include //for exit -#include - #define HPWHVRSN_MAJOR @HPWHsim_VRSN_MAJOR@ #define HPWHVRSN_MINOR @HPWHsim_VRSN_MINOR@ #define HPWHVRSN_PATCH @HPWHsim_VRSN_PATCH@ diff --git a/test/main.cc b/test/main.cc index 34817e9e..bf868b5b 100644 --- a/test/main.cc +++ b/test/main.cc @@ -125,9 +125,9 @@ int main(int argc, char *argv[]) exit(1); } - model = static_cast (hpwh.getHPWHModel()); + model = hpwh.getHPWHModel(); - if(model == HPWH::MODELS_Sanden80 || model == HPWH::MODELS_Sanden40) { + if(model == HPWH::MODELS::Sanden80 || model == HPWH::MODELS::Sanden40) { newSetpoint = (149 - 32) / 1.8; } } else if (input1 == "File") { @@ -327,7 +327,7 @@ int main(int argc, char *argv[]) } // Mix down for yearly tests with large compressors - if (hpwh.getHPWHModel() >= 210 && minutesToRun > 500000.) { + if (static_cast(hpwh.getHPWHModel()) >= 210 && minutesToRun > 500000.) { //Do a simple mix down of the draw for the cold water temperature if (hpwh.getSetpoint() <= 125.) { allSchedules[1][i] *= (125. - allSchedules[0][i]) / (hpwh.getTankNodeTemp(hpwh.getNumNodes() - 1, HPWH::UNITS_F) - allSchedules[0][i]); diff --git a/test/testUtilityFcts.cc b/test/testUtilityFcts.cc index e46b797e..d6440cec 100644 --- a/test/testUtilityFcts.cc +++ b/test/testUtilityFcts.cc @@ -45,260 +45,260 @@ HPWH::MODELS mapStringToPreset(string modelName) { HPWH::MODELS hpwhModel; if(modelName == "Voltex60" || modelName == "AOSmithPHPT60") { - hpwhModel = HPWH::MODELS_AOSmithPHPT60; + hpwhModel = HPWH::MODELS::AOSmithPHPT60; } else if (modelName == "Voltex80" || modelName == "AOSmith80") { - hpwhModel = HPWH::MODELS_AOSmithPHPT80; + hpwhModel = HPWH::MODELS::AOSmithPHPT80; } else if (modelName == "GEred" || modelName == "GE") { - hpwhModel = HPWH::MODELS_GE2012; + hpwhModel = HPWH::MODELS::GE2012; } else if (modelName == "SandenGAU" || modelName == "Sanden80" || modelName == "SandenGen3") { - hpwhModel = HPWH::MODELS_Sanden80; + hpwhModel = HPWH::MODELS::Sanden80; } else if (modelName == "Sanden120") { - hpwhModel = HPWH::MODELS_Sanden120; + hpwhModel = HPWH::MODELS::Sanden120; } else if (modelName == "SandenGES" || modelName == "Sanden40") { - hpwhModel = HPWH::MODELS_Sanden40; + hpwhModel = HPWH::MODELS::Sanden40; } else if (modelName == "AOSmithHPTU50") { - hpwhModel = HPWH::MODELS_AOSmithHPTU50; + hpwhModel = HPWH::MODELS::AOSmithHPTU50; } else if (modelName == "AOSmithHPTU66") { - hpwhModel = HPWH::MODELS_AOSmithHPTU66; + hpwhModel = HPWH::MODELS::AOSmithHPTU66; } else if (modelName == "AOSmithHPTU80") { - hpwhModel = HPWH::MODELS_AOSmithHPTU80; + hpwhModel = HPWH::MODELS::AOSmithHPTU80; } else if (modelName == "AOSmithHPTS50") { - hpwhModel = HPWH::MODELS_AOSmithHPTS50; + hpwhModel = HPWH::MODELS::AOSmithHPTS50; } else if (modelName == "AOSmithHPTS66") { - hpwhModel = HPWH::MODELS_AOSmithHPTS66; + hpwhModel = HPWH::MODELS::AOSmithHPTS66; } else if (modelName == "AOSmithHPTS80") { - hpwhModel = HPWH::MODELS_AOSmithHPTS80; + hpwhModel = HPWH::MODELS::AOSmithHPTS80; } else if (modelName == "AOSmithHPTU80DR") { - hpwhModel = HPWH::MODELS_AOSmithHPTU80_DR; + hpwhModel = HPWH::MODELS::AOSmithHPTU80_DR; } else if (modelName == "GE502014STDMode" || modelName == "GE2014STDMode") { - hpwhModel = HPWH::MODELS_GE2014STDMode; + hpwhModel = HPWH::MODELS::GE2014STDMode; } else if (modelName == "GE502014" || modelName == "GE2014") { - hpwhModel = HPWH::MODELS_GE2014; + hpwhModel = HPWH::MODELS::GE2014; } else if (modelName == "GE802014") { - hpwhModel = HPWH::MODELS_GE2014_80DR; + hpwhModel = HPWH::MODELS::GE2014_80DR; } else if (modelName == "RheemHB50") { - hpwhModel = HPWH::MODELS_RheemHB50; + hpwhModel = HPWH::MODELS::RheemHB50; } else if (modelName == "Stiebel220e" || modelName == "Stiebel220E") { - hpwhModel = HPWH::MODELS_Stiebel220E; + hpwhModel = HPWH::MODELS::Stiebel220E; } else if (modelName == "Generic1") { - hpwhModel = HPWH::MODELS_Generic1; + hpwhModel = HPWH::MODELS::Generic1; } else if (modelName == "Generic2") { - hpwhModel = HPWH::MODELS_Generic2; + hpwhModel = HPWH::MODELS::Generic2; } else if (modelName == "Generic3") { - hpwhModel = HPWH::MODELS_Generic3; + hpwhModel = HPWH::MODELS::Generic3; } else if (modelName == "custom") { - hpwhModel = HPWH::MODELS_CustomFile; + hpwhModel = HPWH::MODELS::CustomFile; } else if (modelName == "restankRealistic") { - hpwhModel = HPWH::MODELS_restankRealistic; + hpwhModel = HPWH::MODELS::restankRealistic; } else if (modelName == "StorageTank") { - hpwhModel = HPWH::MODELS_StorageTank; + hpwhModel = HPWH::MODELS::StorageTank; } else if (modelName == "BWC2020_65") { - hpwhModel = HPWH::MODELS_BWC2020_65; + hpwhModel = HPWH::MODELS::BWC2020_65; } // New Rheems else if (modelName == "Rheem2020Prem40") { - hpwhModel = HPWH::MODELS_Rheem2020Prem40; + hpwhModel = HPWH::MODELS::Rheem2020Prem40; } else if (modelName == "Rheem2020Prem50") { - hpwhModel = HPWH::MODELS_Rheem2020Prem50; + hpwhModel = HPWH::MODELS::Rheem2020Prem50; } else if (modelName == "Rheem2020Prem65") { - hpwhModel = HPWH::MODELS_Rheem2020Prem65; + hpwhModel = HPWH::MODELS::Rheem2020Prem65; } else if (modelName == "Rheem2020Prem80") { - hpwhModel = HPWH::MODELS_Rheem2020Prem80; + hpwhModel = HPWH::MODELS::Rheem2020Prem80; } else if (modelName == "Rheem2020Build40") { - hpwhModel = HPWH::MODELS_Rheem2020Build40; + hpwhModel = HPWH::MODELS::Rheem2020Build40; } else if (modelName == "Rheem2020Build50") { - hpwhModel = HPWH::MODELS_Rheem2020Build50; + hpwhModel = HPWH::MODELS::Rheem2020Build50; } else if (modelName == "Rheem2020Build65") { - hpwhModel = HPWH::MODELS_Rheem2020Build65; + hpwhModel = HPWH::MODELS::Rheem2020Build65; } else if (modelName == "Rheem2020Build80") { - hpwhModel = HPWH::MODELS_Rheem2020Build80; + hpwhModel = HPWH::MODELS::Rheem2020Build80; } else if (modelName == "RheemPlugInDedicated40") { - hpwhModel = HPWH::MODELS_RheemPlugInDedicated40; + hpwhModel = HPWH::MODELS::RheemPlugInDedicated40; } else if (modelName == "RheemPlugInDedicated50") { - hpwhModel = HPWH::MODELS_RheemPlugInDedicated50; + hpwhModel = HPWH::MODELS::RheemPlugInDedicated50; } else if (modelName == "RheemPlugInShared40") { - hpwhModel = HPWH::MODELS_RheemPlugInShared40; + hpwhModel = HPWH::MODELS::RheemPlugInShared40; } else if (modelName == "RheemPlugInShared50") { - hpwhModel = HPWH::MODELS_RheemPlugInShared50; + hpwhModel = HPWH::MODELS::RheemPlugInShared50; } else if (modelName == "RheemPlugInShared65") { - hpwhModel = HPWH::MODELS_RheemPlugInShared65; + hpwhModel = HPWH::MODELS::RheemPlugInShared65; } else if (modelName == "RheemPlugInShared80") { - hpwhModel = HPWH::MODELS_RheemPlugInShared80; + hpwhModel = HPWH::MODELS::RheemPlugInShared80; } // Large HPWH's else if (modelName == "AOSmithCAHP120") { - hpwhModel = HPWH::MODELS_AOSmithCAHP120; + hpwhModel = HPWH::MODELS::AOSmithCAHP120; } else if (modelName == "ColmacCxV_5_SP") { - hpwhModel = HPWH::MODELS_ColmacCxV_5_SP; + hpwhModel = HPWH::MODELS::ColmacCxV_5_SP; } else if (modelName == "ColmacCxA_10_SP") { - hpwhModel = HPWH::MODELS_ColmacCxA_10_SP; + hpwhModel = HPWH::MODELS::ColmacCxA_10_SP; } else if (modelName == "ColmacCxA_15_SP") { - hpwhModel = HPWH::MODELS_ColmacCxA_15_SP; + hpwhModel = HPWH::MODELS::ColmacCxA_15_SP; } else if (modelName == "ColmacCxA_20_SP") { - hpwhModel = HPWH::MODELS_ColmacCxA_20_SP; + hpwhModel = HPWH::MODELS::ColmacCxA_20_SP; } else if (modelName == "ColmacCxA_25_SP") { - hpwhModel = HPWH::MODELS_ColmacCxA_25_SP; + hpwhModel = HPWH::MODELS::ColmacCxA_25_SP; } else if (modelName == "ColmacCxA_30_SP") { - hpwhModel = HPWH::MODELS_ColmacCxA_30_SP; + hpwhModel = HPWH::MODELS::ColmacCxA_30_SP; } else if (modelName == "ColmacCxV_5_MP") { - hpwhModel = HPWH::MODELS_ColmacCxV_5_MP; + hpwhModel = HPWH::MODELS::ColmacCxV_5_MP; } else if (modelName == "ColmacCxA_10_MP") { - hpwhModel = HPWH::MODELS_ColmacCxA_10_MP; + hpwhModel = HPWH::MODELS::ColmacCxA_10_MP; } else if (modelName == "ColmacCxA_15_MP") { - hpwhModel = HPWH::MODELS_ColmacCxA_15_MP; + hpwhModel = HPWH::MODELS::ColmacCxA_15_MP; } else if (modelName == "ColmacCxA_20_MP") { - hpwhModel = HPWH::MODELS_ColmacCxA_20_MP; + hpwhModel = HPWH::MODELS::ColmacCxA_20_MP; } else if (modelName == "ColmacCxA_25_MP") { - hpwhModel = HPWH::MODELS_ColmacCxA_25_MP; + hpwhModel = HPWH::MODELS::ColmacCxA_25_MP; } else if (modelName == "ColmacCxA_30_MP") { - hpwhModel = HPWH::MODELS_ColmacCxA_30_MP; + hpwhModel = HPWH::MODELS::ColmacCxA_30_MP; } else if (modelName == "RheemHPHD60") { - hpwhModel = HPWH::MODELS_RHEEM_HPHD60VNU_201_MP; + hpwhModel = HPWH::MODELS::RHEEM_HPHD60VNU_201_MP; } else if (modelName == "RheemHPHD135") { - hpwhModel = HPWH::MODELS_RHEEM_HPHD135VNU_483_MP; + hpwhModel = HPWH::MODELS::RHEEM_HPHD135VNU_483_MP; } //Nyle Single pass models else if (modelName == "NyleC25A_SP") { - hpwhModel = HPWH::MODELS_NyleC25A_SP; + hpwhModel = HPWH::MODELS::NyleC25A_SP; } else if (modelName == "NyleC60A_SP") { - hpwhModel = HPWH::MODELS_NyleC60A_SP; + hpwhModel = HPWH::MODELS::NyleC60A_SP; } else if (modelName == "NyleC90A_SP") { - hpwhModel = HPWH::MODELS_NyleC90A_SP; + hpwhModel = HPWH::MODELS::NyleC90A_SP; } else if (modelName == "NyleC185A_SP") { - hpwhModel = HPWH::MODELS_NyleC185A_SP; + hpwhModel = HPWH::MODELS::NyleC185A_SP; } else if (modelName == "NyleC250A_SP") { - hpwhModel = HPWH::MODELS_NyleC250A_SP; + hpwhModel = HPWH::MODELS::NyleC250A_SP; } else if (modelName == "NyleC60A_C_SP") { - hpwhModel = HPWH::MODELS_NyleC60A_C_SP; + hpwhModel = HPWH::MODELS::NyleC60A_C_SP; } else if (modelName == "NyleC90A_C_SP") { - hpwhModel = HPWH::MODELS_NyleC90A_C_SP; + hpwhModel = HPWH::MODELS::NyleC90A_C_SP; } else if (modelName == "NyleC185A_C_SP") { - hpwhModel = HPWH::MODELS_NyleC185A_C_SP; + hpwhModel = HPWH::MODELS::NyleC185A_C_SP; } else if (modelName == "NyleC250A_C_SP") { - hpwhModel = HPWH::MODELS_NyleC250A_C_SP; + hpwhModel = HPWH::MODELS::NyleC250A_C_SP; } // Nyle MP models else if (modelName == "NyleC60A_MP") { - hpwhModel = HPWH::MODELS_NyleC60A_MP; + hpwhModel = HPWH::MODELS::NyleC60A_MP; } else if (modelName == "NyleC90A_MP") { - hpwhModel = HPWH::MODELS_NyleC90A_MP; + hpwhModel = HPWH::MODELS::NyleC90A_MP; } else if (modelName == "NyleC125A_MP") { - hpwhModel = HPWH::MODELS_NyleC125A_MP; + hpwhModel = HPWH::MODELS::NyleC125A_MP; } else if (modelName == "NyleC185A_MP") { - hpwhModel = HPWH::MODELS_NyleC185A_MP; + hpwhModel = HPWH::MODELS::NyleC185A_MP; } else if (modelName == "NyleC250A_MP") { - hpwhModel = HPWH::MODELS_NyleC250A_MP; + hpwhModel = HPWH::MODELS::NyleC250A_MP; } else if (modelName == "NyleC60A_C_MP") { - hpwhModel = HPWH::MODELS_NyleC60A_C_MP; + hpwhModel = HPWH::MODELS::NyleC60A_C_MP; } else if (modelName == "NyleC90A_C_MP") { - hpwhModel = HPWH::MODELS_NyleC90A_C_MP; + hpwhModel = HPWH::MODELS::NyleC90A_C_MP; } else if (modelName == "NyleC125A_C_MP") { - hpwhModel = HPWH::MODELS_NyleC125A_C_MP; + hpwhModel = HPWH::MODELS::NyleC125A_C_MP; } else if (modelName == "NyleC185A_C_MP") { - hpwhModel = HPWH::MODELS_NyleC185A_C_MP; + hpwhModel = HPWH::MODELS::NyleC185A_C_MP; } else if (modelName == "NyleC250A_C_MP") { - hpwhModel = HPWH::MODELS_NyleC250A_C_MP; + hpwhModel = HPWH::MODELS::NyleC250A_C_MP; } else if (modelName == "QAHV_N136TAU_HPB_SP") { - hpwhModel = HPWH::MODELS_MITSUBISHI_QAHV_N136TAU_HPB_SP; + hpwhModel = HPWH::MODELS::MITSUBISHI_QAHV_N136TAU_HPB_SP; } // Stack in a couple scalable models else if (modelName == "TamScalable_SP") { - hpwhModel = HPWH::MODELS_TamScalable_SP; + hpwhModel = HPWH::MODELS::TamScalable_SP; } else if (modelName == "TamScalable_SP_2X") { - hpwhModel = HPWH::MODELS_TamScalable_SP; + hpwhModel = HPWH::MODELS::TamScalable_SP; } else if (modelName == "TamScalable_SP_Half") { - hpwhModel = HPWH::MODELS_TamScalable_SP; + hpwhModel = HPWH::MODELS::TamScalable_SP; } else if (modelName == "Scalable_MP") { - hpwhModel = HPWH::MODELS_Scalable_MP; + hpwhModel = HPWH::MODELS::Scalable_MP; } else if (modelName == "AWHSTier3Generic40") { - hpwhModel = HPWH::MODELS_AWHSTier3Generic40; + hpwhModel = HPWH::MODELS::AWHSTier3Generic40; } else if (modelName == "AWHSTier3Generic50") { - hpwhModel = HPWH::MODELS_AWHSTier3Generic50; + hpwhModel = HPWH::MODELS::AWHSTier3Generic50; } else if (modelName == "AWHSTier3Generic65") { - hpwhModel = HPWH::MODELS_AWHSTier3Generic65; + hpwhModel = HPWH::MODELS::AWHSTier3Generic65; } else if (modelName == "AWHSTier3Generic80") { - hpwhModel = HPWH::MODELS_AWHSTier3Generic80; + hpwhModel = HPWH::MODELS::AWHSTier3Generic80; } else { - hpwhModel = HPWH::MODELS_basicIntegrated; + hpwhModel = HPWH::MODELS::basicIntegrated; cout << "Couldn't find model " << modelName << ". Exiting...\n"; exit(1); }