diff --git a/src/EnergyPlus/HeatRecovery.cc b/src/EnergyPlus/HeatRecovery.cc index 855768e5c4d..eff971ebfd7 100644 --- a/src/EnergyPlus/HeatRecovery.cc +++ b/src/EnergyPlus/HeatRecovery.cc @@ -56,6 +56,7 @@ #include #include #include +#include #include #include #include @@ -428,40 +429,8 @@ namespace HeatRecovery { thisExchanger.NomSupAirVolFlow = state.dataIPShortCut->rNumericArgs(1); thisExchanger.HeatEffectSensible100 = state.dataIPShortCut->rNumericArgs(2); thisExchanger.HeatEffectLatent100 = state.dataIPShortCut->rNumericArgs(3); - thisExchanger.HeatEffectSensible75 = state.dataIPShortCut->rNumericArgs(4); - thisExchanger.HeatEffectLatent75 = state.dataIPShortCut->rNumericArgs(5); - if (thisExchanger.HeatEffectSensible75 < thisExchanger.HeatEffectSensible100) { - ShowWarningError(state, - format("{} \"{}\" sensible heating effectiveness at 75% rated flow is less than at 100% rated flow.", - cCurrentModuleObject, - thisExchanger.Name)); - ShowContinueError(state, "Sensible heating effectiveness at 75% rated flow is usually greater than at 100% rated flow."); - } - if (thisExchanger.HeatEffectLatent75 < thisExchanger.HeatEffectLatent100) { - ShowWarningError(state, - format("{} \"{}\" latent heating effectiveness at 75% rated flow is less than at 100% rated flow.", - cCurrentModuleObject, - thisExchanger.Name)); - ShowContinueError(state, "Latent heating effectiveness at 75% rated flow is usually greater than at 100% rated flow."); - } - thisExchanger.CoolEffectSensible100 = state.dataIPShortCut->rNumericArgs(6); - thisExchanger.CoolEffectLatent100 = state.dataIPShortCut->rNumericArgs(7); - thisExchanger.CoolEffectSensible75 = state.dataIPShortCut->rNumericArgs(8); - thisExchanger.CoolEffectLatent75 = state.dataIPShortCut->rNumericArgs(9); - if (thisExchanger.CoolEffectSensible75 < thisExchanger.CoolEffectSensible100) { - ShowWarningError(state, - format("{} \"{}\" sensible cooling effectiveness at 75% rated flow is less than at 100% rated flow.", - cCurrentModuleObject, - thisExchanger.Name)); - ShowContinueError(state, "Sensible cooling effectiveness at 75% rated flow is usually greater than at 100% rated flow."); - } - if (thisExchanger.CoolEffectLatent75 < thisExchanger.CoolEffectLatent100) { - ShowWarningError(state, - format("{} \"{}\" latent cooling effectiveness at 75% rated flow is less than at 100% rated flow.", - cCurrentModuleObject, - thisExchanger.Name)); - ShowContinueError(state, "Latent cooling effectiveness at 75% rated flow is usually greater than at 100% rated flow."); - } + thisExchanger.CoolEffectSensible100 = state.dataIPShortCut->rNumericArgs(4); + thisExchanger.CoolEffectLatent100 = state.dataIPShortCut->rNumericArgs(5); thisExchanger.SupInletNode = GetOnlySingleNode(state, state.dataIPShortCut->cAlphaArgs(3), ErrorsFound, @@ -499,7 +468,7 @@ namespace HeatRecovery { NodeInputManager::CompFluidStream::Secondary, DataLoopNode::ObjectIsNotParent); - thisExchanger.NomElecPower = state.dataIPShortCut->rNumericArgs(10); + thisExchanger.NomElecPower = state.dataIPShortCut->rNumericArgs(6); if (UtilityRoutines::SameString(state.dataIPShortCut->cAlphaArgs(7), "Yes")) { thisExchanger.ControlToTemperatureSetPoint = true; @@ -529,9 +498,9 @@ namespace HeatRecovery { } if (!UtilityRoutines::SameString(state.dataIPShortCut->cAlphaArgs(9), "None")) { - thisExchanger.ThresholdTemperature = state.dataIPShortCut->rNumericArgs(11); - thisExchanger.InitialDefrostTime = state.dataIPShortCut->rNumericArgs(12); - thisExchanger.RateofDefrostTimeIncrease = state.dataIPShortCut->rNumericArgs(13); + thisExchanger.ThresholdTemperature = state.dataIPShortCut->rNumericArgs(7); + thisExchanger.InitialDefrostTime = state.dataIPShortCut->rNumericArgs(8); + thisExchanger.RateofDefrostTimeIncrease = state.dataIPShortCut->rNumericArgs(9); } if (state.dataIPShortCut->lAlphaFieldBlanks(10)) { @@ -544,6 +513,12 @@ namespace HeatRecovery { thisExchanger.EconoLockOut = static_cast(toggle); } + // yujie: read new curves here + thisExchanger.HeatEffectSensibleCurveIndex = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(11)); // convert curve name to number + thisExchanger.HeatEffectLatentCurveIndex = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(12)); // convert curve name to number + thisExchanger.CoolEffectSensibleCurveIndex = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(13)); // convert curve name to number + thisExchanger.CoolEffectLatentCurveIndex = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(14)); // convert curve name to number + BranchNodeConnections::TestCompSet(state, DataHVACGlobals::cHXTypes(thisExchanger.ExchType), thisExchanger.Name, @@ -2097,16 +2072,12 @@ namespace HeatRecovery { if (this->SupInTemp < this->SecInTemp) { // Use heating effectiveness values - this->SensEffectiveness = this->HeatEffectSensible75 + - (this->HeatEffectSensible100 - this->HeatEffectSensible75) * (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); - this->LatEffectiveness = - this->HeatEffectLatent75 + (this->HeatEffectLatent100 - this->HeatEffectLatent75) * (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); + this->SensEffectiveness = Curve::CurveValue(state, this->HeatEffectSensibleCurveIndex, HXAirVolFlowRatio) * this->HeatEffectSensible100; + this->LatEffectiveness = Curve::CurveValue(state, this->HeatEffectLatentCurveIndex, HXAirVolFlowRatio) * this->HeatEffectLatent100 ; } else { // Use cooling effectiveness values - this->SensEffectiveness = this->CoolEffectSensible75 + - (this->CoolEffectSensible100 - this->CoolEffectSensible75) * (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); - this->LatEffectiveness = - this->CoolEffectLatent75 + (this->CoolEffectLatent100 - this->CoolEffectLatent75) * (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); + this->SensEffectiveness = Curve::CurveValue(state, this->CoolEffectSensibleCurveIndex, HXAirVolFlowRatio) * this->CoolEffectSensible100; + this->LatEffectiveness = Curve::CurveValue(state, this->CoolEffectLatentCurveIndex, HXAirVolFlowRatio) * this->CoolEffectLatent100 ; } // Keep effectiveness between 0 and 1.0 ?? @@ -2123,11 +2094,9 @@ namespace HeatRecovery { this->Name)); if (this->SupInTemp < this->SecInTemp) { ShowContinueError(state, format("...Sensible Effectiveness at 100% Heating Air Flow = {:.2R}", this->HeatEffectSensible100)); - ShowContinueError(state, format("...Sensible Effectiveness at 75% Heating Air Flow = {:.2R}", this->HeatEffectSensible75)); ShowContinueError(state, "...Sensible effectiveness reset to zero and the simulation continues."); } else { ShowContinueError(state, format("...Sensible Effectiveness at 100% Cooling Air Flow = {:.2R}", this->CoolEffectSensible100)); - ShowContinueError(state, format("...Sensible Effectiveness at 75% Cooling Air Flow = {:.2R}", this->CoolEffectSensible75)); ShowContinueError(state, "...Sensible effectiveness reset to zero and the simulation continues."); } ShowContinueError(state, format("...Heat Exchanger Air Volume Flow Ratio = {:.2R}", HXAirVolFlowRatio)); @@ -2144,11 +2113,9 @@ namespace HeatRecovery { this->Name)); if (this->SupInTemp < this->SecInTemp) { ShowContinueError(state, format("...Latent Effectiveness at 100% Heating Air Flow = {:.2R}", this->HeatEffectLatent100)); - ShowContinueError(state, format("...Latent Effectiveness at 75% Heating Air Flow = {:.2R}", this->HeatEffectLatent75)); ShowContinueError(state, "...Latent effectiveness reset to zero and the simulation continues."); } else { ShowContinueError(state, format("...Latent Effectiveness at 100% Cooling Air Flow = {:.2R}", this->CoolEffectLatent100)); - ShowContinueError(state, format("...Latent Effectiveness at 75% Cooling Air Flow = {:.2R}", this->CoolEffectLatent75)); ShowContinueError(state, "...Latent effectiveness reset to zero and the simulation continues."); } ShowContinueError(state, format("...Heat Exchanger Air Volume Flow Ratio = {:.2R}", HXAirVolFlowRatio)); @@ -2219,16 +2186,12 @@ namespace HeatRecovery { CMin = min(CSup, CSec); if (TempSupIn < TempSecIn) { // Use heating effectiveness values - this->SensEffectiveness = this->HeatEffectSensible75 + (this->HeatEffectSensible100 - this->HeatEffectSensible75) * - (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); - this->LatEffectiveness = this->HeatEffectLatent75 + (this->HeatEffectLatent100 - this->HeatEffectLatent75) * - (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); + this->SensEffectiveness = Curve::CurveValue(state, this->HeatEffectSensibleCurveIndex, HXAirVolFlowRatio) * this->HeatEffectSensible100; + this->LatEffectiveness = Curve::CurveValue(state, this->HeatEffectLatentCurveIndex, HXAirVolFlowRatio) * this->HeatEffectLatent100 ; } else { // Use cooling effectiveness values - this->SensEffectiveness = this->CoolEffectSensible75 + (this->CoolEffectSensible100 - this->CoolEffectSensible75) * - (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); - this->LatEffectiveness = this->CoolEffectLatent75 + (this->CoolEffectLatent100 - this->CoolEffectLatent75) * - (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); + this->SensEffectiveness = Curve::CurveValue(state, this->CoolEffectSensibleCurveIndex, HXAirVolFlowRatio) * this->CoolEffectSensible100; + this->LatEffectiveness = Curve::CurveValue(state, this->CoolEffectLatentCurveIndex, HXAirVolFlowRatio) * this->CoolEffectLatent100 ; } if (this->SensEffectiveness < 0.0) { @@ -2242,14 +2205,10 @@ namespace HeatRecovery { if (this->SupInTemp < this->SecInTemp) { ShowContinueError( state, format("...Sensible Effectiveness at 100% Heating Air Flow = {:.2R}", this->HeatEffectSensible100)); - ShowContinueError( - state, format("...Sensible Effectiveness at 75% Heating Air Flow = {:.2R}", this->HeatEffectSensible75)); ShowContinueError(state, "...Sensible effectiveness reset to zero and the simulation continues."); } else { ShowContinueError( state, format("...Sensible Effectiveness at 100% Cooling Air Flow = {:.2R}", this->CoolEffectSensible100)); - ShowContinueError( - state, format("...Sensible Effectiveness at 75% Cooling Air Flow = {:.2R}", this->CoolEffectSensible75)); ShowContinueError(state, "...Sensible effectiveness reset to zero and the simulation continues."); } ShowContinueError(state, format("...Heat Exchanger Air Volume Flow Ratio = {:.2R}", HXAirVolFlowRatio)); @@ -2267,14 +2226,10 @@ namespace HeatRecovery { if (this->SupInTemp < this->SecInTemp) { ShowContinueError(state, format("...Latent Effectiveness at 100% Heating Air Flow = {:.2R}", this->HeatEffectLatent100)); - ShowContinueError(state, - format("...Latent Effectiveness at 75% Heating Air Flow = {:.2R}", this->HeatEffectLatent75)); ShowContinueError(state, "...Latent effectiveness reset to zero and the simulation continues."); } else { ShowContinueError(state, format("...Latent Effectiveness at 100% Cooling Air Flow = {:.2R}", this->CoolEffectLatent100)); - ShowContinueError(state, - format("...Latent Effectiveness at 75% Cooling Air Flow = {:.2R}", this->CoolEffectLatent75)); ShowContinueError(state, "...Latent effectiveness reset to zero and the simulation continues."); } ShowContinueError(state, format("...Heat Exchanger Air Volume Flow Ratio = {:.2R}", HXAirVolFlowRatio)); @@ -2803,10 +2758,8 @@ namespace HeatRecovery { HXSecAirVolFlowRate = this->SecOutMassFlow / RhoSec; HXAvgAirVolFlowRate = (HXSecAirVolFlowRate + HXSupAirVolFlowRate) / 2.0; HXAirVolFlowRatio = HXAvgAirVolFlowRate / this->NomSupAirVolFlow; - this->SensEffectiveness = - this->HeatEffectSensible75 + (this->HeatEffectSensible100 - this->HeatEffectSensible75) * (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); - this->LatEffectiveness = - this->HeatEffectLatent75 + (this->HeatEffectLatent100 - this->HeatEffectLatent75) * (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); + this->SensEffectiveness = Curve::CurveValue(state, this->HeatEffectSensibleCurveIndex, HXAirVolFlowRatio) * this->HeatEffectSensible100; + this->LatEffectiveness = Curve::CurveValue(state, this->HeatEffectLatentCurveIndex, HXAirVolFlowRatio) * this->HeatEffectLatent100 ; this->SupOutTemp = this->SupInTemp + this->SensEffectiveness * CMin / CSup * (this->SecInTemp - this->SupInTemp); this->SupOutHumRat = this->SupInHumRat + this->LatEffectiveness * CMin / CSup * (this->SecInHumRat - this->SupInHumRat); this->SupOutEnth = Psychrometrics::PsyHFnTdbW(this->SupOutTemp, this->SupOutHumRat); @@ -2859,16 +2812,12 @@ namespace HeatRecovery { CMin = min(CSup, CSec); if (TempSupIn < TempSecIn) { // Use heating effectiveness values - this->SensEffectiveness = this->HeatEffectSensible75 + (this->HeatEffectSensible100 - this->HeatEffectSensible75) * - (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); - this->LatEffectiveness = this->HeatEffectLatent75 + - (this->HeatEffectLatent100 - this->HeatEffectLatent75) * (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); + this->SensEffectiveness = Curve::CurveValue(state, this->HeatEffectSensibleCurveIndex, HXAirVolFlowRatio) * this->HeatEffectSensible100; + this->LatEffectiveness = Curve::CurveValue(state, this->HeatEffectLatentCurveIndex, HXAirVolFlowRatio) * this->HeatEffectLatent100 ; } else { // Use cooling effectiveness values - this->SensEffectiveness = this->CoolEffectSensible75 + (this->CoolEffectSensible100 - this->CoolEffectSensible75) * - (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); - this->LatEffectiveness = this->CoolEffectLatent75 + - (this->CoolEffectLatent100 - this->CoolEffectLatent75) * (HXAirVolFlowRatio - 0.75) / (1.0 - 0.75); + this->SensEffectiveness = Curve::CurveValue(state, this->CoolEffectSensibleCurveIndex, HXAirVolFlowRatio) * this->CoolEffectSensible100; + this->LatEffectiveness = Curve::CurveValue(state, this->CoolEffectLatentCurveIndex, HXAirVolFlowRatio) * this->CoolEffectLatent100 ; } // calculation of local variable Csup can be 0, gaurd against divide by 0. TempSupOut = TempSupIn + this->SensEffectiveness * SafeDiv(CMin, CSup) * (TempSecIn - TempSupIn); diff --git a/src/EnergyPlus/HeatRecovery.hh b/src/EnergyPlus/HeatRecovery.hh index 267b5a88d3a..285701b8fa5 100644 --- a/src/EnergyPlus/HeatRecovery.hh +++ b/src/EnergyPlus/HeatRecovery.hh @@ -145,14 +145,14 @@ namespace HeatRecovery { int PerfDataIndex = 0; // Performance data index allocating performance data number to heat exchanger Real64 FaceArea = 0.0; // face area of balanced desiccant heat exchangers to determine face velocity [m2] // generic hx performance inputs - Real64 HeatEffectSensible100 = 0.0; // heating sensible effectiveness at 100% rated air flow - Real64 HeatEffectSensible75 = 0.0; // heating sensible effectiveness at 75% rated air flow - Real64 HeatEffectLatent100 = 0.0; // heating latent effectiveness at 100% rated air flow - Real64 HeatEffectLatent75 = 0.0; // heating latent effectiveness at 75% rated air flow - Real64 CoolEffectSensible100 = 0.0; // cooling sensible effectiveness at 100% rated air flow - Real64 CoolEffectSensible75 = 0.0; // cooling sensible effectiveness at 75% rated air flow - Real64 CoolEffectLatent100 = 0.0; // cooling latent effectiveness at 100% rated air flow - Real64 CoolEffectLatent75 = 0.0; // cooling latent effectiveness at 75% rated air flow + Real64 HeatEffectSensible100 = 0.0; // heating sensible effectiveness at 100% rated air flow + Real64 HeatEffectLatent100 = 0.0; // heating latent effectiveness at 100% rated air flow + Real64 CoolEffectSensible100 = 0.0; // cooling sensible effectiveness at 100% rated air flow + Real64 CoolEffectLatent100 = 0.0; // cooling latent effectiveness at 100% rated air flow + int HeatEffectSensibleCurveIndex = 0; // heating sensible effectiveness multiplier curve to HeatEffectSensible100 + int HeatEffectLatentCurveIndex = 0; // heating latent effectiveness multiplier curve to HeatEffectLatent100 + int CoolEffectSensibleCurveIndex = 0; // cooling sensible effectiveness multiplier curve to CoolEffectSensible100 + int CoolEffectLatentCurveIndex = 0; // cooling latent effectiveness multiplier curve to CoolEffectLatent100 // 1 = None, 2 = Bypass, 3 = Stop Rotary HX Rotation HXConfigurationType ExchConfig = HXConfigurationType::Invalid; // parameter equivalent of HX configuration, plate or rotary // frost control parameters diff --git a/testfiles/5Zone_Unitary_HXAssistedCoil.idf b/testfiles/5Zone_Unitary_HXAssistedCoil.idf index d6e3486fb91..bc4eb514fcd 100644 --- a/testfiles/5Zone_Unitary_HXAssistedCoil.idf +++ b/testfiles/5Zone_Unitary_HXAssistedCoil.idf @@ -2736,12 +2736,8 @@ autosize, !- Nominal Supply Air Flow Rate {m3/s} 0.7, !- Sensible Effectiveness at 100% Heating Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Heating Air Flow {dimensionless} - 0.70000, !- Sensible Effectiveness at 75% Heating Air Flow {dimensionless} - 0.650000, !- Latent Effectiveness at 75% Heating Air Flow {dimensionless} 0.7, !- Sensible Effectiveness at 100% Cooling Air Flow {dimensionless} 0.65, !- Latent Effectiveness at 100% Cooling Air Flow {dimensionless} - 0.70000, !- Sensible Effectiveness at 75% Cooling Air Flow {dimensionless} - 0.650000, !- Latent Effectiveness at 75% Cooling Air Flow {dimensionless} Main Cooling Coil 1 Inlet Node, !- Supply Air Inlet Node Name Heat Recovery Supply Outlet, !- Supply Air Outlet Node Name Heat Recovery Exhuast Inlet Node, !- Exhaust Air Inlet Node Name @@ -2753,7 +2749,11 @@ 1.7, !- Threshold Temperature {C} 0.083, !- Initial Defrost Time Fraction {dimensionless} 0.012, !- Rate of Defrost Time Fraction Increase {1/K} - Yes; !- Economizer Lockout + Yes, !- Economizer Lockout + heatingSensibleEffCurve, !- Sensible Effectiveness of Heating Air Flow Curve Name + heatingLatentEffCurve, !- Latent Effectiveness of Heating Air Flow Curve Name + coolingSensibleEffCurve, !- Sensible Effectiveness of Cooling Air Flow Curve Name + coolingLatentEffCurve; !- Latent Effectiveness of Cooling Air Flow Curve Name Coil:Cooling:DX:VariableSpeed, Main Cooling Coil 1, !- Name @@ -2847,6 +2847,34 @@ Temperature, !- Input Unit Type for Y Dimensionless; !- Output Unit Type + Curve:Linear, + heatingSensibleEffCurve, !- Name + 0.0, !- Coefficient1 Constant, + 0.5, !- Coefficient2 x, + 0.0, !- Minimum Value of x, + 1.5; !- Maximum Value of x, + + Curve:Linear, + heatingLatentEffCurve, !- Name + 0.0, !- Coefficient1 Constant, + 0.5, !- Coefficient2 x, + 0.0, !- Minimum Value of x, + 1.5; !- Maximum Value of x, + + Curve:Linear, + coolingSensibleEffCurve, !- Name + 0.0, !- Coefficient1 Constant, + 0.5, !- Coefficient2 x, + 0.0, !- Minimum Value of x, + 1.5; !- Maximum Value of x, + + Curve:Linear, + coolingLatentEffCurve, !- Name + 0.0, !- Coefficient1 Constant, + 0.5, !- Coefficient2 x, + 0.0, !- Minimum Value of x, + 1.5; !- Maximum Value of x, + OutdoorAir:Node, Main Cooling Coil 1 Condenser Node, !- Name -1.0; !- Height Above Ground {m}