diff --git a/src/HPWH.cc b/src/HPWH.cc index 7d2d31c2..bd5f3363 100644 --- a/src/HPWH.cc +++ b/src/HPWH.cc @@ -368,8 +368,8 @@ void HPWH::setAllDefaults() mixBelowFractionOnDraw = 1. / 3.; doInversionMixing = true; doConduction = true; - inletHeight = 0; - inlet2Height = 0; + inletIndex = 0; + inlet2Index = 0; fittingsUA_kJperHrC = 0.; prevDRstatus = DR_ALLOW; timerLimitTOT = 60.; @@ -414,8 +414,8 @@ HPWH& HPWH::operator=(const HPWH& hpwh) tankT_C = hpwh.tankT_C; nextTankT_C = hpwh.nextTankT_C; - inletHeight = hpwh.inletHeight; - inlet2Height = hpwh.inlet2Height; + inletIndex = hpwh.inletIndex; + inlet2Index = hpwh.inlet2Index; outletT_C = hpwh.outletT_C; condenserInletT_C = hpwh.condenserInletT_C; @@ -514,7 +514,7 @@ int HPWH::runOneStep(double drawVolume_L, heatSources[i].energyOutput_kJ = 0.; heatSources[i].energyRemovedFromEnvironment_kJ = 0.; } - extraEnergyInput_kWh = 0.; + extraEnergyInput_kJ = 0.; // if you are doing temp. depression, set tank and heatSource ambient temps // to the tracked locationTemperature @@ -1332,7 +1332,7 @@ bool HPWH::isNewSetpointPossible(double newSetpoint, maxAllowedSetpoint_C = heatSources[compressorIndex].maxSetpointT_C - - heatSources[compressorIndex].secondaryHeatExchanger.hotSideTemperatureOffset_dC; + heatSources[compressorIndex].secondaryHeatExchanger.hotSideOffsetT_C; if (newSetpoint_C > maxAllowedSetpoint_C && lowestElementIndex == -1) { @@ -1797,11 +1797,11 @@ int HPWH::getFittingsUA(double& UA, UNITS units /*=UNITS_kJperHrC*/) const int HPWH::setInletByFraction(double fractionalHeight) { - return setNodeNumFromFractionalHeight(fractionalHeight, inletHeight); + return setNodeNumFromFractionalHeight(fractionalHeight, inletIndex); } int HPWH::setInlet2ByFraction(double fractionalHeight) { - return setNodeNumFromFractionalHeight(fractionalHeight, inlet2Height); + return setNodeNumFromFractionalHeight(fractionalHeight, inlet2Index); } int HPWH::setExternalInletHeightByFraction(double fractionalHeight) @@ -1832,12 +1832,12 @@ int HPWH::setExternalPortHeightByFraction(double fractionalHeight, int whichExte if (whichExternalPort == 1) { returnVal = setNodeNumFromFractionalHeight(fractionalHeight, - heatSources[i].externalInletHeight); + heatSources[i].externalInletNodeIndex); } else { returnVal = setNodeNumFromFractionalHeight(fractionalHeight, - heatSources[i].externalOutletHeight); + heatSources[i].externalOutletNodeIndex); } if (returnVal == HPWH_ABORT) @@ -1880,8 +1880,8 @@ int HPWH::getExternalInletHeight() const { if (heatSources[i].configuration == HeatSource::CONFIG_EXTERNAL) { - return heatSources[i].externalInletHeight; // Return the first one since all - // external sources have some ports + return heatSources[i].externalInletNodeIndex; // Return the first one since all + // external sources have some ports } } return HPWH_ABORT; @@ -1900,8 +1900,8 @@ int HPWH::getExternalOutletHeight() const { if (heatSources[i].configuration == HeatSource::CONFIG_EXTERNAL) { - return heatSources[i].externalOutletHeight; // Return the first one since all - // external sources have some ports + return heatSources[i].externalOutletNodeIndex; // Return the first one since all + // external sources have some ports } } return HPWH_ABORT; @@ -1929,11 +1929,11 @@ int HPWH::getInletHeight(int whichInlet) const { if (whichInlet == 1) { - return inletHeight; + return inletIndex; } else if (whichInlet == 2) { - return inlet2Height; + return inlet2Index; } else { @@ -2570,7 +2570,7 @@ double HPWH::getCompressorCapacity(double airTemp /*=19.722*/, double maxAllowedSetpoint_C = heatSources[compressorIndex].maxSetpointT_C - - heatSources[compressorIndex].secondaryHeatExchanger.hotSideTemperatureOffset_dC; + heatSources[compressorIndex].secondaryHeatExchanger.hotSideOffsetT_C; if (outTemp_C > maxAllowedSetpoint_C) { if (hpwhVerbosity >= VRB_reluctant) @@ -3304,21 +3304,21 @@ void HPWH::updateTankTemps(double drawVolume_L, double lowInletT_C; double lowInletFraction; // fraction of draw from low inlet - if (inletHeight > inlet2Height) + if (inletIndex > inlet2Index) { - highInletNodeIndex = inletHeight; + highInletNodeIndex = inletIndex; highInletFraction = 1. - inletVol2_L / drawVolume_L; highInletT_C = inletT_C; - lowInletNodeIndex = inlet2Height; + lowInletNodeIndex = inlet2Index; lowInletT_C = inletT2_C; lowInletFraction = inletVol2_L / drawVolume_L; } else { - highInletNodeIndex = inlet2Height; + highInletNodeIndex = inlet2Index; highInletFraction = inletVol2_L / drawVolume_L; highInletT_C = inletT2_C; - lowInletNodeIndex = inletHeight; + lowInletNodeIndex = inletIndex; lowInletT_C = inletT_C; lowInletFraction = 1. - inletVol2_L / drawVolume_L; } @@ -3746,7 +3746,7 @@ void HPWH::addExtraHeat(std::vector& extraHeatDist_W) } } // Write the input & output energy - extraEnergyInput_kWh = BTU_TO_KWH(tot_qAdded_BTUperHr * minutesPerStep / min_per_hr); + extraEnergyInput_kJ = BTU_TO_KJ(tot_qAdded_BTUperHr * minutesPerStep / min_per_hr); } /////////////////////////////////////////////////////////////////////////////////// @@ -3876,12 +3876,12 @@ void HPWH::calcDerivedHeatingValues() // find condentropy/shrinkage for (int i = 0; i < getNumHeatSources(); ++i) { - heatSources[i].Tshrinkage_C = findShrinkageT_C(heatSources[i].condensity); + heatSources[i].shrinkageT_C = findShrinkageT_C(heatSources[i].condensity); if (hpwhVerbosity >= VRB_emetic) { msg(outputString, "Heat Source %d \n", i); - msg(outputString, "shrinkage %.2lf \n\n", heatSources[i].Tshrinkage_C); + msg(outputString, "shrinkage %.2lf \n\n", heatSources[i].shrinkageT_C); } } @@ -4116,8 +4116,8 @@ int HPWH::checkInputs() } returnVal = HPWH_ABORT; } - if (0 > heatSources[i].externalOutletHeight || - heatSources[i].externalOutletHeight > getNumNodes() - 1) + if (0 > heatSources[i].externalOutletNodeIndex || + heatSources[i].externalOutletNodeIndex > getNumNodes() - 1) { if (hpwhVerbosity >= VRB_reluctant) { @@ -4127,8 +4127,8 @@ int HPWH::checkInputs() } returnVal = HPWH_ABORT; } - if (0 > heatSources[i].externalInletHeight || - heatSources[i].externalInletHeight > getNumNodes() - 1) + if (0 > heatSources[i].externalInletNodeIndex || + heatSources[i].externalInletNodeIndex > getNumNodes() - 1) { if (hpwhVerbosity >= VRB_reluctant) { @@ -4302,7 +4302,7 @@ bool HPWH::isEnergyBalanced(const double drawVol_L, { // Check energy balancing. double qInElectrical_kJ = getInputEnergy_kJ(); - double qInExtra_kJ = KWH_TO_KJ(extraEnergyInput_kWh); + double qInExtra_kJ = extraEnergyInput_kJ; double qInHeatSourceEnviron_kJ = getEnergyRemovedFromEnvironment_kJ(); double qOutStandbyLosses_kJ = standbyLosses_kJ; double qOutWater_kJ = drawVol_L * (outletT_C - member_inletT_C) * DENSITYWATER_kgperL * @@ -5027,7 +5027,7 @@ int HPWH::HPWHinit_file(string configFile) line_ss >> tempInt; if (tempInt < num_nodes) { - heatSources[heatsource].externalInletHeight = static_cast(tempInt); + heatSources[heatsource].externalInletNodeIndex = static_cast(tempInt); } else { @@ -5043,7 +5043,7 @@ int HPWH::HPWHinit_file(string configFile) line_ss >> tempInt; if (tempInt < num_nodes) { - heatSources[heatsource].externalOutletHeight = static_cast(tempInt); + heatSources[heatsource].externalOutletNodeIndex = static_cast(tempInt); } else { @@ -5217,7 +5217,7 @@ int HPWH::HPWHinit_file(string configFile) } return HPWH_ABORT; } - heatSources[heatsource].hysteresis_dC = tempDouble; + heatSources[heatsource].hysteresisOffsetT_C = tempDouble; } else if (token == "backupSource") { diff --git a/src/HPWH.hh b/src/HPWH.hh index cbac25d6..93d82cd6 100644 --- a/src/HPWH.hh +++ b/src/HPWH.hh @@ -1006,7 +1006,7 @@ class HPWH void addExtraHeat(std::vector& extraHeatDist_W); /// "extra" heat added during a simulation step - double extraEnergyInput_kWh; + double extraEnergyInput_kJ; double tankAvg_C(const std::vector nodeWeights) const; /**< functions to calculate what the temperature in a portion of the tank is */ @@ -1086,11 +1086,11 @@ class HPWH /// index of the tank node where the inlet water enters /// must be between 0 and numNodes-1 - int inletHeight; + int inletIndex; /// index of the tank node where the water from a 2nd inlet enters /// must be between 0 and numNodes-1 - int inlet2Height; + int inlet2Index; /// the volume (L) of the tank double tankVolume_L; @@ -1366,11 +1366,11 @@ class HPWH::HeatSource /// by specifying the entire condensity in one node. std::vector condensity; - /// Tshrinkage_C is a derived from the condentropy (conditional entropy), + /// shrinkageT_C is a derived from the condentropy (conditional entropy), /// using the condensity and fixed parameters Talpha_C and Tbeta_C. /// Talpha_C and Tbeta_C are not intended to be settable /// see the hpwh_init functions for calculation of shrinkage. - double Tshrinkage_C; + double shrinkageT_C; struct perfPoint { @@ -1437,8 +1437,8 @@ class HPWH::HeatSource /// incoming waater temperature to the heatpump struct SecondaryHeatExchanger { - double coldSideTemperatureOffest_dC; - double hotSideTemperatureOffset_dC; + double coldSideOffsetT_C; + double hotSideOffsetT_C; double extraPumpPower_W; } secondaryHeatExchanger; @@ -1473,7 +1473,7 @@ class HPWH::HeatSource /// a hysteresis term that prevents short cycling due to heat pump self-interaction /// when the heat source is engaged, it is subtracted from lowT cutoffs and /// added to lowTreheat cutoffs - double hysteresis_dC; + double hysteresisOffsetT_C; /// heat pumps can depress the temperature of their space in certain instances - /// whether or not this occurs is a bool in HPWH, but a heat source must @@ -1488,11 +1488,11 @@ class HPWH::HeatSource /// The node height at which the external HPWH adds heated water to the storage tank. /// Defaults to top for single pass. - int externalInletHeight; + int externalInletNodeIndex; /// The node height at which the external HPWH takes cold water out of the storage tank. /// Defaults to bottom for single pass. - int externalOutletHeight; + int externalOutletNodeIndex; /// number of the first non-zero condensity entry int lowestNode; diff --git a/src/HPWHHeatSources.cc b/src/HPWHHeatSources.cc index 166904cb..4627d133 100644 --- a/src/HPWHHeatSources.cc +++ b/src/HPWHHeatSources.cc @@ -29,7 +29,7 @@ HPWH::HeatSource::HeatSource(HPWH* hpwh_in /* = nullptr */) , backupHeatSource(NULL) , companionHeatSource(NULL) , followedByHeatSource(NULL) - , Tshrinkage_C(1.) + , shrinkageT_C(1.) , useBtwxtGrid(false) , extrapolationMethod(EXTRAP_LINEAR) , standbyLogic(NULL) @@ -38,11 +38,11 @@ HPWH::HeatSource::HeatSource(HPWH* hpwh_in /* = nullptr */) , minT_C(-273.15) , maxT_C(100) , maxSetpointT_C(100.) - , hysteresis_dC(0) + , hysteresisOffsetT_C(0) , depressesTemperature(false) , airflowFreedom(1.) - , externalInletHeight(-1) - , externalOutletHeight(-1) + , externalInletNodeIndex(-1) + , externalOutletNodeIndex(-1) , lowestNode(0) , mpFlowRate_LPS(0.) , isMultipass(true) @@ -90,7 +90,7 @@ HPWH::HeatSource& HPWH::HeatSource::operator=(const HeatSource& hSource) condensity = hSource.condensity; - Tshrinkage_C = hSource.Tshrinkage_C; + shrinkageT_C = hSource.shrinkageT_C; perfMap = hSource.perfMap; @@ -110,7 +110,7 @@ HPWH::HeatSource& HPWH::HeatSource::operator=(const HeatSource& hSource) minT_C = hSource.minT_C; maxT_C = hSource.maxT_C; maxOut_at_LowT = hSource.maxOut_at_LowT; - hysteresis_dC = hSource.hysteresis_dC; + hysteresisOffsetT_C = hSource.hysteresisOffsetT_C; maxSetpointT_C = hSource.maxSetpointT_C; depressesTemperature = hSource.depressesTemperature; @@ -121,8 +121,8 @@ HPWH::HeatSource& HPWH::HeatSource::operator=(const HeatSource& hSource) isMultipass = hSource.isMultipass; mpFlowRate_LPS = hSource.mpFlowRate_LPS; - externalInletHeight = hSource.externalInletHeight; - externalOutletHeight = hSource.externalOutletHeight; + externalInletNodeIndex = hSource.externalInletNodeIndex; + externalOutletNodeIndex = hSource.externalOutletNodeIndex; lowestNode = hSource.lowestNode; extrapolationMethod = hSource.extrapolationMethod; @@ -171,7 +171,7 @@ bool HPWH::HeatSource::shouldLockOut(double heatSourceAmbientT_C) const // when the "external" temperature is too cold - typically used for compressor low temp. // cutoffs when running, use hysteresis bool lock = false; - if (isEngaged() == true && heatSourceAmbientT_C < minT_C - hysteresis_dC) + if (isEngaged() == true && heatSourceAmbientT_C < minT_C - hysteresisOffsetT_C) { lock = true; if (hpwh->hpwhVerbosity >= HPWH::VRB_emetic) @@ -195,7 +195,7 @@ bool HPWH::HeatSource::shouldLockOut(double heatSourceAmbientT_C) const // when the "external" temperature is too warm - typically used for resistance lockout // when running, use hysteresis - if (isEngaged() == true && heatSourceAmbientT_C > maxT_C + hysteresis_dC) + if (isEngaged() == true && heatSourceAmbientT_C > maxT_C + hysteresisOffsetT_C) { lock = true; if (hpwh->hpwhVerbosity >= HPWH::VRB_emetic) @@ -258,19 +258,19 @@ bool HPWH::HeatSource::shouldUnlock(double heatSourceAmbientT_C) const // when the "external" temperature is no longer too cold or too warm // when running, use hysteresis bool unlock = false; - if (isEngaged() == true && heatSourceAmbientT_C > minT_C + hysteresis_dC && - heatSourceAmbientT_C < maxT_C - hysteresis_dC) + if (isEngaged() == true && heatSourceAmbientT_C > minT_C + hysteresisOffsetT_C && + heatSourceAmbientT_C < maxT_C - hysteresisOffsetT_C) { unlock = true; if (hpwh->hpwhVerbosity >= HPWH::VRB_emetic && - heatSourceAmbientT_C > minT_C + hysteresis_dC) + heatSourceAmbientT_C > minT_C + hysteresisOffsetT_C) { hpwh->msg("\tunlock: running above minT\tambient: %.2f\tminT: %.2f", heatSourceAmbientT_C, minT_C); } if (hpwh->hpwhVerbosity >= HPWH::VRB_emetic && - heatSourceAmbientT_C < maxT_C - hysteresis_dC) + heatSourceAmbientT_C < maxT_C - hysteresisOffsetT_C) { hpwh->msg("\tunlock: running below maxT\tambient: %.2f\tmaxT: %.2f", heatSourceAmbientT_C, @@ -649,14 +649,14 @@ void HPWH::HeatSource::getCapacity(double externalT_C, // Add an offset to the condenser temperature (or incoming coldwater temperature) to approximate // a secondary heat exchange in line with the compressor - condenserTemp_F = C_TO_F(condenserTemp_C + secondaryHeatExchanger.coldSideTemperatureOffest_dC); + condenserTemp_F = C_TO_F(condenserTemp_C + secondaryHeatExchanger.coldSideOffsetT_C); externalT_F = C_TO_F(externalT_C); // Get bounding performance map points for interpolation/extrapolation bool extrapolate = false; size_t i_prev = 0; size_t i_next = 1; - double Tout_F = C_TO_F(setpointTemp_C + secondaryHeatExchanger.hotSideTemperatureOffset_dC); + double Tout_F = C_TO_F(setpointTemp_C + secondaryHeatExchanger.hotSideOffsetT_C); if (useBtwxtGrid) { @@ -835,7 +835,7 @@ void HPWH::HeatSource::getCapacityMP(double externalT_C, double externalT_F, condenserTemp_F; bool resDefrostHeatingOn = false; // Convert Celsius to Fahrenheit for the curve fits - condenserTemp_F = C_TO_F(condenserTemp_C + secondaryHeatExchanger.coldSideTemperatureOffest_dC); + condenserTemp_F = C_TO_F(condenserTemp_C + secondaryHeatExchanger.coldSideOffsetT_C); externalT_F = C_TO_F(externalT_C); // Check if we have resistance elements to turn on for defrost and add the constant lift. @@ -977,7 +977,7 @@ void HPWH::HeatSource::calcHeatDist(std::vector& heatDistribution) case CONFIG_WRAPPED: { // Wrapped around the tank, send through the logistic function calcThermalDist( - heatDistribution, Tshrinkage_C, lowestNode, hpwh->tankT_C, hpwh->setpointT_C); + heatDistribution, shrinkageT_C, lowestNode, hpwh->tankT_C, hpwh->setpointT_C); break; } } @@ -1015,7 +1015,7 @@ double HPWH::HeatSource::addHeatExternal(double externalT_C, do { double tempInput_BTUperHr = 0., tempCap_BTUperHr = 0., temp_cop = 0.; - double& externalOutletT_C = hpwh->tankT_C[externalOutletHeight]; + double& externalOutletT_C = hpwh->tankT_C[externalOutletNodeIndex]; // how much heat is available in remaining time getCapacity(externalT_C, externalOutletT_C, tempInput_BTUperHr, tempCap_BTUperHr, temp_cop); @@ -1076,11 +1076,11 @@ double HPWH::HeatSource::addHeatExternal(double externalT_C, // mix with node above from outlet to inlet // mix inlet water at target temperature with inlet node - for (std::size_t nodeIndex = externalOutletHeight; - static_cast(nodeIndex) <= externalInletHeight; + for (std::size_t nodeIndex = externalOutletNodeIndex; + static_cast(nodeIndex) <= externalInletNodeIndex; ++nodeIndex) { - double& mixT_C = (static_cast(nodeIndex) == externalInletHeight) + double& mixT_C = (static_cast(nodeIndex) == externalInletNodeIndex) ? targetT_C : hpwh->tankT_C[nodeIndex + 1]; hpwh->tankT_C[nodeIndex] = @@ -1160,7 +1160,7 @@ double HPWH::HeatSource::addHeatExternalMP(double externalT_C, hpwh->mixTankNodes(0, hpwh->getNumNodes(), nodeFrac); double tempInput_BTUperHr = 0., tempCap_BTUperHr = 0., temp_cop = 0.; - double& externalOutletT_C = hpwh->tankT_C[externalOutletHeight]; + double& externalOutletT_C = hpwh->tankT_C[externalOutletNodeIndex]; // find heating capacity getCapacityMP( @@ -1202,11 +1202,11 @@ double HPWH::HeatSource::addHeatExternalMP(double externalT_C, // mix with node above from outlet to inlet // mix inlet water at target temperature with inlet node - for (std::size_t nodeIndex = externalOutletHeight; - static_cast(nodeIndex) <= externalInletHeight; + for (std::size_t nodeIndex = externalOutletNodeIndex; + static_cast(nodeIndex) <= externalInletNodeIndex; ++nodeIndex) { - double& mixT_C = (static_cast(nodeIndex) == externalInletHeight) + double& mixT_C = (static_cast(nodeIndex) == externalInletNodeIndex) ? targetT_C : hpwh->tankT_C[nodeIndex + 1]; hpwh->tankT_C[nodeIndex] = diff --git a/src/HPWHHeatingLogics.cc b/src/HPWHHeatingLogics.cc index 8f7b58b3..9ea702af 100644 --- a/src/HPWHHeatingLogics.cc +++ b/src/HPWHHeatingLogics.cc @@ -94,9 +94,9 @@ double HPWH::SoCBasedHeatingLogic::getFractToMeetComparisonExternal() // node below up to tempMinUseful. double maxSoC = hpwh->getNumNodes() * hpwh->getChargePerNode(getMainsT_C(), tempMinUseful_C, hpwh->setpointT_C); - double targetTemp = deltaSoCFraction * maxSoC + (hpwh->tankT_C[calcNode] - getMainsT_C()) / - (tempMinUseful_C - getMainsT_C()); - targetTemp = targetTemp * (tempMinUseful_C - getMainsT_C()) + getMainsT_C(); + double targetT_C = deltaSoCFraction * maxSoC + (hpwh->tankT_C[calcNode] - getMainsT_C()) / + (tempMinUseful_C - getMainsT_C()); + targetT_C = targetT_C * (tempMinUseful_C - getMainsT_C()) + getMainsT_C(); // Catch case where node temperature == setpoint double fractCalcNode; @@ -107,7 +107,7 @@ double HPWH::SoCBasedHeatingLogic::getFractToMeetComparisonExternal() else { fractCalcNode = - (targetTemp - hpwh->tankT_C[calcNode]) / (hpwh->setpointT_C - hpwh->tankT_C[calcNode]); + (targetT_C - hpwh->tankT_C[calcNode]) / (hpwh->setpointT_C - hpwh->tankT_C[calcNode]); } // If we're at the bottom node there's not another node to heat so case 2 doesn't apply. diff --git a/src/HPWHpresets.cc b/src/HPWHpresets.cc index 4adfa018..56bd7633 100644 --- a/src/HPWHpresets.cc +++ b/src/HPWHpresets.cc @@ -330,7 +330,7 @@ int HPWH::HPWHinit_genericHPWH(double tankVol_L, double energyFactor, double res compressor.minT_C = F_TO_C(45.); compressor.maxT_C = F_TO_C(120.); - compressor.hysteresis_dC = dF_TO_dC(2); + compressor.hysteresisOffsetT_C = dF_TO_dC(2); compressor.configuration = HeatSource::CONFIG_WRAPPED; compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -341,7 +341,7 @@ int HPWH::HPWHinit_genericHPWH(double tankVol_L, double energyFactor, double res // bottom resistor values resistiveElementBottom.setupAsResistiveElement(0, 4000); resistiveElementBottom.setCondensity({0, 0.2, 0.8, 0, 0, 0, 0, 0, 0, 0, 0, 0}); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(2); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(2); // logic conditions // this is set customly, from input @@ -605,7 +605,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) resistiveElementBottom.setupAsResistiveElement(0, 4500); resistiveElementTop.setupAsResistiveElement(9, 4500); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(4); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(4); // standard logic conditions resistiveElementBottom.addTurnOnLogic(HPWH::bottomThird(20)); @@ -642,7 +642,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = 0; compressor.maxT_C = F_TO_C(120.); - compressor.hysteresis_dC = dF_TO_dC(4); + compressor.hysteresisOffsetT_C = dF_TO_dC(4); compressor.configuration = HeatSource::CONFIG_WRAPPED; // wrapped around tank compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -706,7 +706,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) }); compressor.maxT_C = F_TO_C(120.); - compressor.hysteresis_dC = 0; // no hysteresis + compressor.hysteresisOffsetT_C = 0; // no hysteresis compressor.configuration = HeatSource::CONFIG_EXTERNAL; compressor.isMultipass = false; compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -766,7 +766,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(45.0); compressor.maxT_C = F_TO_C(120.); - compressor.hysteresis_dC = dF_TO_dC(4); + compressor.hysteresisOffsetT_C = dF_TO_dC(4); compressor.configuration = HeatSource::CONFIG_WRAPPED; compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -776,7 +776,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) // bottom resistor values resistiveElementBottom.setupAsResistiveElement(0, 2000); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(4); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(4); // logic conditions double compStart = dF_TO_dC(43.6); @@ -846,7 +846,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(45.0); compressor.maxT_C = F_TO_C(120.); - compressor.hysteresis_dC = dF_TO_dC(4); + compressor.hysteresisOffsetT_C = dF_TO_dC(4); compressor.configuration = HeatSource::CONFIG_WRAPPED; compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -856,7 +856,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) // bottom resistor values resistiveElementBottom.setupAsResistiveElement(0, 2000); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(4); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(4); // logic conditions double compStart = dF_TO_dC(43.6); @@ -925,7 +925,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(45.0); compressor.maxT_C = F_TO_C(120.); - compressor.hysteresis_dC = dF_TO_dC(4); + compressor.hysteresisOffsetT_C = dF_TO_dC(4); compressor.configuration = HeatSource::CONFIG_WRAPPED; compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -935,7 +935,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) // bottom resistor values resistiveElementBottom.setupAsResistiveElement(0, 4200); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(4); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(4); // logic conditions // double compStart = dF_TO_dC(24.4); @@ -989,10 +989,10 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.configuration = HeatSource::CONFIG_EXTERNAL; compressor.isMultipass = false; compressor.perfMap.reserve(1); - compressor.hysteresis_dC = 0; + compressor.hysteresisOffsetT_C = 0; - compressor.externalOutletHeight = 0; - compressor.externalInletHeight = getNumNodes() - 1; + compressor.externalOutletNodeIndex = 0; + compressor.externalInletNodeIndex = getNumNodes() - 1; // logic conditions std::vector nodeWeights; @@ -1239,9 +1239,9 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.setCondensity({0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0}); compressor.configuration = HeatSource::CONFIG_EXTERNAL; compressor.perfMap.reserve(1); - compressor.hysteresis_dC = 0; - compressor.externalOutletHeight = 0; - compressor.externalInletHeight = static_cast(getNumNodes() / 3) - 1; + compressor.hysteresisOffsetT_C = 0; + compressor.externalOutletNodeIndex = 0; + compressor.externalInletNodeIndex = static_cast(getNumNodes() / 3) - 1; // logic conditions std::vector nodeWeights; @@ -1436,8 +1436,8 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.configuration = HeatSource::CONFIG_EXTERNAL; compressor.isMultipass = false; compressor.perfMap.reserve(1); - compressor.externalOutletHeight = 0; - compressor.externalInletHeight = getNumNodes() - 1; + compressor.externalOutletNodeIndex = 0; + compressor.externalInletNodeIndex = getNumNodes() - 1; // logic conditions if (MODELS_NyleC25A_SP <= presetNum && presetNum <= MODELS_NyleC250A_SP) @@ -1449,7 +1449,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(35.); // Min air temperature WITH Cold Weather Package } compressor.maxT_C = F_TO_C(120.0); // Max air temperature - compressor.hysteresis_dC = 0; + compressor.hysteresisOffsetT_C = 0; compressor.maxSetpointT_C = MAXOUTLET_R134A; // Defines the maximum outlet temperature at the a low air temperature @@ -1686,9 +1686,9 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.setCondensity({0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0}); compressor.extrapolationMethod = EXTRAP_NEAREST; compressor.configuration = HeatSource::CONFIG_EXTERNAL; - compressor.hysteresis_dC = 0; - compressor.externalOutletHeight = 0; - compressor.externalInletHeight = static_cast(getNumNodes() / 3.) - 1; + compressor.hysteresisOffsetT_C = 0; + compressor.externalOutletNodeIndex = 0; + compressor.externalInletNodeIndex = static_cast(getNumNodes() / 3.) - 1; // logic conditions//logic conditions if (MODELS_NyleC60A_MP <= presetNum && presetNum <= MODELS_NyleC250A_MP) @@ -1873,9 +1873,9 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.setCondensity({0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0}); compressor.configuration = HeatSource::CONFIG_EXTERNAL; compressor.perfMap.reserve(1); - compressor.hysteresis_dC = 0; - compressor.externalOutletHeight = 0; - compressor.externalInletHeight = static_cast(getNumNodes() / 3.) - 1; + compressor.hysteresisOffsetT_C = 0; + compressor.externalOutletNodeIndex = 0; + compressor.externalInletNodeIndex = static_cast(getNumNodes() / 3.) - 1; // logic conditions std::vector nodeWeights; @@ -1968,11 +1968,11 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.typeOfHeatSource = TYPE_compressor; compressor.minT_C = F_TO_C(-13.); compressor.setCondensity({1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}); - compressor.externalOutletHeight = 0; - compressor.externalInletHeight = getNumNodes() - 1; + compressor.externalOutletNodeIndex = 0; + compressor.externalInletNodeIndex = getNumNodes() - 1; // What to do about these?! - compressor.hysteresis_dC = 4; + compressor.hysteresisOffsetT_C = 4; compressor.configuration = HeatSource::CONFIG_EXTERNAL; compressor.isMultipass = false; compressor.maxSetpointT_C = F_TO_C(176.1); @@ -2258,8 +2258,8 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.typeOfHeatSource = TYPE_compressor; compressor.minT_C = F_TO_C(-25.); compressor.setCondensity({1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}); - compressor.externalOutletHeight = 0; - compressor.externalInletHeight = getNumNodes() - 1; + compressor.externalOutletNodeIndex = 0; + compressor.externalInletNodeIndex = getNumNodes() - 1; compressor.perfMap.reserve(5); @@ -2293,7 +2293,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) {7.15, -0.04, 0.0} // COP Coefficients (COP_coeffs) }); - compressor.hysteresis_dC = 4; + compressor.hysteresisOffsetT_C = 4; compressor.configuration = HeatSource::CONFIG_EXTERNAL; compressor.isMultipass = false; compressor.maxSetpointT_C = MAXOUTLET_R744; @@ -2353,8 +2353,8 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.isVIP = true; compressor.typeOfHeatSource = TYPE_compressor; compressor.minT_C = F_TO_C(-25.); - compressor.externalOutletHeight = 0; - compressor.externalInletHeight = getIndexTopNode(); + compressor.externalOutletNodeIndex = 0; + compressor.externalInletNodeIndex = getIndexTopNode(); compressor.setCondensity({1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}); @@ -2390,7 +2390,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) {7.15, -0.04, 0.0} // COP Coefficients (COP_coeffs) }); - compressor.hysteresis_dC = 4; + compressor.hysteresisOffsetT_C = 4; compressor.configuration = HeatSource::CONFIG_EXTERNAL; compressor.isMultipass = false; compressor.maxSetpointT_C = MAXOUTLET_R744; @@ -2474,7 +2474,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(42.0); compressor.maxT_C = F_TO_C(120.); - compressor.hysteresis_dC = dF_TO_dC(2); + compressor.hysteresisOffsetT_C = dF_TO_dC(2); compressor.configuration = HeatSource::CONFIG_WRAPPED; compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -2498,7 +2498,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { resistiveElementBottom.setupAsResistiveElement(0, 4500); } - resistiveElementBottom.hysteresis_dC = dF_TO_dC(2); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(2); // logic conditions double compStart = dF_TO_dC(35); @@ -2585,7 +2585,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(42.0); compressor.maxT_C = F_TO_C(120.); - compressor.hysteresis_dC = dF_TO_dC(2); + compressor.hysteresisOffsetT_C = dF_TO_dC(2); compressor.configuration = HeatSource::CONFIG_WRAPPED; compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -2609,7 +2609,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { resistiveElementBottom.setupAsResistiveElement(0, 4500); } - resistiveElementBottom.hysteresis_dC = dF_TO_dC(2); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(2); // logic conditions double compStart = dF_TO_dC(35); @@ -2690,7 +2690,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(42.0); compressor.maxT_C = F_TO_C(120.0); - compressor.hysteresis_dC = dF_TO_dC(1); + compressor.hysteresisOffsetT_C = dF_TO_dC(1); // top resistor values if (presetNum == MODELS_RheemHBDR2280) @@ -2712,7 +2712,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) { resistiveElementBottom.setupAsResistiveElement(0, 4500); } - resistiveElementBottom.hysteresis_dC = dF_TO_dC(2); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(2); // logic conditions double compStart = dF_TO_dC(35); @@ -2786,7 +2786,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(42.0); compressor.maxT_C = F_TO_C(120.); - compressor.hysteresis_dC = dF_TO_dC(2); + compressor.hysteresisOffsetT_C = dF_TO_dC(2); compressor.configuration = HeatSource::CONFIG_WRAPPED; // top resistor values @@ -2795,7 +2795,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) // bottom resistor values resistiveElementBottom.setupAsResistiveElement(0, 4500); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(2); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(2); // logic conditions double compStart = dF_TO_dC(34.1636); @@ -2868,7 +2868,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(47.0); // Product documentation says 45F doesn't look like it in CMP-T test// compressor.maxT_C = F_TO_C(110.0); - compressor.hysteresis_dC = dF_TO_dC(2); + compressor.hysteresisOffsetT_C = dF_TO_dC(2); compressor.configuration = HeatSource::CONFIG_WRAPPED; compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -2880,7 +2880,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) // bottom resistor values resistiveElementBottom.setupAsResistiveElement(0, wattRE); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(2); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(2); resistiveElementBottom.setCondensity( {0.2, 0.8, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.}); // Based of CMP test @@ -2970,7 +2970,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(37.); compressor.maxT_C = F_TO_C(120.); - compressor.hysteresis_dC = dF_TO_dC(1.); + compressor.hysteresisOffsetT_C = dF_TO_dC(1.); compressor.configuration = HeatSource::CONFIG_WRAPPED; compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -2978,7 +2978,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) resistiveElementTop.isVIP = true; resistiveElementBottom.setupAsResistiveElement(0, 4500); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(2); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(2); // logic conditions double compStart = dF_TO_dC(30.2); @@ -3043,7 +3043,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(37.0); compressor.maxT_C = F_TO_C(120.); - compressor.hysteresis_dC = dF_TO_dC(2); + compressor.hysteresisOffsetT_C = dF_TO_dC(2); compressor.configuration = HeatSource::CONFIG_WRAPPED; compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -3054,7 +3054,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) // bottom resistor values resistiveElementBottom.setupAsResistiveElement(0, 4000); resistiveElementBottom.setCondensity({0, 0.2, 0.8, 0, 0, 0, 0, 0, 0, 0, 0, 0}); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(2); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(2); // logic conditions resistiveElementTop.addTurnOnLogic(HPWH::topThird(dF_TO_dC(19.6605))); @@ -3122,7 +3122,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) // bottom resistor values resistiveElementBottom.setupAsResistiveElement(0, 4000); resistiveElementBottom.setCondensity({0, 0.2, 0.8, 0, 0, 0, 0, 0, 0, 0, 0, 0}); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(2); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(2); // logic conditions resistiveElementTop.addTurnOnLogic(HPWH::topThird(dF_TO_dC(19.6605))); @@ -3188,7 +3188,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(37.0); compressor.maxT_C = F_TO_C(120.); - compressor.hysteresis_dC = dF_TO_dC(2); + compressor.hysteresisOffsetT_C = dF_TO_dC(2); compressor.configuration = HeatSource::CONFIG_WRAPPED; compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -3199,7 +3199,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) // bottom resistor values resistiveElementBottom.setupAsResistiveElement(0, 4000); resistiveElementBottom.setCondensity({0, 0.2, 0.8, 0, 0, 0, 0, 0, 0, 0, 0, 0}); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(2); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(2); // logic conditions resistiveElementTop.addTurnOnLogic(HPWH::topThird(dF_TO_dC(20))); @@ -3265,7 +3265,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(37.0); compressor.maxT_C = F_TO_C(120.); - compressor.hysteresis_dC = dF_TO_dC(2); + compressor.hysteresisOffsetT_C = dF_TO_dC(2); compressor.configuration = HeatSource::CONFIG_WRAPPED; compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -3276,7 +3276,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) // bottom resistor values resistiveElementBottom.setupAsResistiveElement(0, 4000); resistiveElementBottom.setCondensity({0, 0.2, 0.8, 0, 0, 0, 0, 0, 0, 0, 0, 0}); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(2); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(2); // logic conditions resistiveElementTop.addTurnOnLogic(HPWH::topThird(dF_TO_dC(20))); @@ -3342,7 +3342,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(37.0); compressor.maxT_C = F_TO_C(120.); - compressor.hysteresis_dC = dF_TO_dC(2); + compressor.hysteresisOffsetT_C = dF_TO_dC(2); compressor.configuration = HeatSource::CONFIG_WRAPPED; compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -3353,7 +3353,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) // bottom resistor values resistiveElementBottom.setupAsResistiveElement(0, 4000); resistiveElementBottom.setCondensity({1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(2); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(2); // logic conditions // resistiveElementTop.addTurnOnLogic(HPWH::topThird(dF_TO_dC(20))); @@ -3421,7 +3421,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(37.0); compressor.maxT_C = F_TO_C(120.); - compressor.hysteresis_dC = dF_TO_dC(2); + compressor.hysteresisOffsetT_C = dF_TO_dC(2); compressor.configuration = HeatSource::CONFIG_WRAPPED; compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -3432,7 +3432,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) // bottom resistor values resistiveElementBottom.setupAsResistiveElement(0, 4000); resistiveElementBottom.setCondensity({0, 0.2, 0.8, 0, 0, 0, 0, 0, 0, 0, 0, 0}); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(2); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(2); // logic conditions resistiveElementTop.addTurnOnLogic(HPWH::topThird(dF_TO_dC(20))); @@ -3513,7 +3513,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(37.0); compressor.maxT_C = F_TO_C(120.0); - compressor.hysteresis_dC = dF_TO_dC(1); + compressor.hysteresisOffsetT_C = dF_TO_dC(1); compressor.configuration = HPWH::HeatSource::CONFIG_WRAPPED; compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -3523,7 +3523,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) // bottom resistor values resistiveElementBottom.setupAsResistiveElement(0, 4500); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(4); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(4); // logic conditions double compStart = dF_TO_dC(32); @@ -3605,7 +3605,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) {8.45936, -0.04539, 0.0} // COP Coefficients (COP_coeffs) }); - compressor.hysteresis_dC = dF_TO_dC(1); + compressor.hysteresisOffsetT_C = dF_TO_dC(1); compressor.minT_C = F_TO_C(37.0); compressor.maxT_C = F_TO_C(120.0); compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -3618,7 +3618,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) // bottom resistor values resistiveElementBottom.setupAsResistiveElement(0, 4500); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(4); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(4); // logic conditions double compStart = dF_TO_dC(30); @@ -3701,7 +3701,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(37.0); compressor.maxT_C = F_TO_C(120.0); - compressor.hysteresis_dC = dF_TO_dC(1); + compressor.hysteresisOffsetT_C = dF_TO_dC(1); compressor.configuration = HPWH::HeatSource::CONFIG_WRAPPED; compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -3754,7 +3754,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) {5.48189, -0.01604, 0.0} // COP Coefficients (COP_coeffs) }); - compressor.hysteresis_dC = dF_TO_dC(1); + compressor.hysteresisOffsetT_C = dF_TO_dC(1); compressor.minT_C = F_TO_C(37.0); compressor.maxT_C = F_TO_C(120.0); compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -3808,7 +3808,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) {6.3, -0.03, 0.0} // COP Coefficients (COP_coeffs) }); - compressor.hysteresis_dC = dF_TO_dC(1); + compressor.hysteresisOffsetT_C = dF_TO_dC(1); compressor.minT_C = F_TO_C(40.0); compressor.maxT_C = F_TO_C(120.0); compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -3821,7 +3821,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) // bottom resistor values resistiveElementBottom.setupAsResistiveElement(0, 2250); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(2); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(2); // logic conditions double compStart = dF_TO_dC(38); @@ -3867,7 +3867,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.typeOfHeatSource = TYPE_compressor; resistiveElement.setupAsResistiveElement(0, 1500); - resistiveElement.hysteresis_dC = dF_TO_dC(0); + resistiveElement.hysteresisOffsetT_C = dF_TO_dC(0); compressor.setCondensity({0, 0.12, 0.22, 0.22, 0.22, 0.22, 0, 0, 0, 0, 0, 0}); @@ -3887,7 +3887,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(32.0); compressor.maxT_C = F_TO_C(120.); - compressor.hysteresis_dC = 0; // no hysteresis + compressor.hysteresisOffsetT_C = 0; // no hysteresis compressor.configuration = HeatSource::CONFIG_WRAPPED; compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -3941,7 +3941,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(45.0); compressor.maxT_C = F_TO_C(120.); - compressor.hysteresis_dC = dF_TO_dC(2); + compressor.hysteresisOffsetT_C = dF_TO_dC(2); compressor.configuration = HeatSource::CONFIG_WRAPPED; compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -3951,7 +3951,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) // bottom resistor values resistiveElementBottom.setupAsResistiveElement(0, 4500); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(2); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(2); // logic conditions compressor.addTurnOnLogic(HPWH::bottomThird(dF_TO_dC(40.0))); @@ -4013,7 +4013,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(40.0); compressor.maxT_C = F_TO_C(120.); - compressor.hysteresis_dC = dF_TO_dC(2); + compressor.hysteresisOffsetT_C = dF_TO_dC(2); compressor.configuration = HeatSource::CONFIG_WRAPPED; compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -4023,7 +4023,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) // bottom resistor values resistiveElementBottom.setupAsResistiveElement(0, 4500); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(2); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(2); // logic conditions compressor.addTurnOnLogic(HPWH::bottomThird(dF_TO_dC(40))); @@ -4090,7 +4090,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(35.0); compressor.maxT_C = F_TO_C(120.); - compressor.hysteresis_dC = dF_TO_dC(2); + compressor.hysteresisOffsetT_C = dF_TO_dC(2); compressor.configuration = HeatSource::CONFIG_WRAPPED; // top resistor values @@ -4100,7 +4100,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) // bottom resistor values resistiveElementBottom.setupAsResistiveElement(0, 4500); resistiveElementBottom.setCondensity({1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(2); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(2); // logic conditions compressor.addTurnOnLogic(HPWH::bottomThird(dF_TO_dC(40))); @@ -4163,7 +4163,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(37.0); compressor.maxT_C = F_TO_C(120.); - compressor.hysteresis_dC = dF_TO_dC(2); + compressor.hysteresisOffsetT_C = dF_TO_dC(2); compressor.configuration = HeatSource::CONFIG_WRAPPED; compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -4174,7 +4174,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) // bottom resistor values resistiveElementBottom.setupAsResistiveElement(0, 4000); resistiveElementBottom.setCondensity({0, 0.2, 0.8, 0, 0, 0, 0, 0, 0, 0, 0, 0}); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(2); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(2); // logic conditions resistiveElementTop.addTurnOnLogic(HPWH::topThird(dF_TO_dC(18.6605))); @@ -4265,7 +4265,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(42.0); compressor.maxT_C = F_TO_C(120.); - compressor.hysteresis_dC = dF_TO_dC(2); + compressor.hysteresisOffsetT_C = dF_TO_dC(2); compressor.configuration = HeatSource::CONFIG_WRAPPED; compressor.maxSetpointT_C = MAXOUTLET_R134A; @@ -4276,7 +4276,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) // bottom resistor values resistiveElementBottom.setupAsResistiveElement(0, 4000); resistiveElementBottom.setCondensity({0, 0.2, 0.8, 0, 0, 0, 0, 0, 0, 0, 0, 0}); - resistiveElementBottom.hysteresis_dC = dF_TO_dC(2); + resistiveElementBottom.hysteresisOffsetT_C = dF_TO_dC(2); // logic conditions resistiveElementTop.addTurnOnLogic(HPWH::topThird(dF_TO_dC(20))); @@ -4326,10 +4326,10 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.configuration = HeatSource::CONFIG_EXTERNAL; compressor.isMultipass = false; compressor.perfMap.reserve(1); - compressor.hysteresis_dC = 0; + compressor.hysteresisOffsetT_C = 0; - compressor.externalOutletHeight = 0; - compressor.externalInletHeight = getIndexTopNode(); + compressor.externalOutletNodeIndex = 0; + compressor.externalInletNodeIndex = getIndexTopNode(); // Defrost Derate compressor.setupDefrostMap(); @@ -4427,9 +4427,9 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.setCondensity({0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0}); compressor.configuration = HeatSource::CONFIG_EXTERNAL; compressor.perfMap.reserve(1); - compressor.hysteresis_dC = 0; - compressor.externalOutletHeight = 0; - compressor.externalInletHeight = static_cast(getNumNodes() / 3.) - 1; + compressor.hysteresisOffsetT_C = 0; + compressor.externalOutletNodeIndex = 0; + compressor.externalInletNodeIndex = static_cast(getNumNodes() / 3.) - 1; // logic conditions std::vector nodeWeights; @@ -4543,7 +4543,7 @@ int HPWH::HPWHinit_presets(MODELS presetNum) compressor.minT_C = F_TO_C(-25); compressor.maxT_C = F_TO_C(125.); - compressor.hysteresis_dC = dF_TO_dC(1); + compressor.hysteresisOffsetT_C = dF_TO_dC(1); compressor.configuration = HeatSource::CONFIG_SUBMERGED; // logic conditions