From 382814a0f53b95aa299a3ac33fe58491a7ab9361 Mon Sep 17 00:00:00 2001 From: Brent Griffith Date: Tue, 20 Jan 2015 17:05:28 -0700 Subject: [PATCH] add control over sizing factor to use add input switch for control which sizing factor is applied to the measured flow when setting the size for coincident plant sizing. improve reporting to predefined sizing summary table. --- idd/Energy+.idd.in | 8 +++- src/EnergyPlus/DataSizing.cc | 6 +++ src/EnergyPlus/DataSizing.hh | 10 +++++ src/EnergyPlus/OutputReportPredefined.cc | 2 + src/EnergyPlus/OutputReportPredefined.hh | 1 + src/EnergyPlus/SizingAnalysisObjects.cc | 49 ++++++++++++++++-------- src/EnergyPlus/SizingAnalysisObjects.hh | 2 +- src/EnergyPlus/SizingManager.cc | 19 ++++++++- 8 files changed, 78 insertions(+), 19 deletions(-) diff --git a/idd/Energy+.idd.in b/idd/Energy+.idd.in index eebe26ced24..b18799af53c 100644 --- a/idd/Energy+.idd.in +++ b/idd/Energy+.idd.in @@ -31045,10 +31045,16 @@ Sizing:Plant, \key Coincident \key NonCoincident \default NonCoincident - N3; \field Zone Timesteps in Averaging Window + N3, \field Zone Timesteps in Averaging Window \type integer \minimum 0 \default 1 + A4; \field Coincident Sizing Factor Mode + \type choice + \key None + \key GlobalHeatingSizingFactor + \key GlobalCoolingSizingFactor + \key LoopComponentSizingFactor OutputControl:Sizing:Style, \memo Default style for the Sizing output files is comma -- this works well for diff --git a/src/EnergyPlus/DataSizing.cc b/src/EnergyPlus/DataSizing.cc index 00ff575611e..c35ec560ad4 100644 --- a/src/EnergyPlus/DataSizing.cc +++ b/src/EnergyPlus/DataSizing.cc @@ -117,6 +117,12 @@ namespace DataSizing { int const FractionOfAutosizedCoolingCapacity( 11 ); int const FractionOfAutosizedHeatingCapacity( 12 ); + int const NoSizingFactorMode( 101 ); + int const GlobalHeatingSizingFactorMode( 102 ); + int const GlobalCoolingSizingFactorMode( 103 ); + int const LoopComponentSizingFactorMode( 104 ); + + // DERIVED TYPE DEFINITIONS: // INTERFACE BLOCK SPECIFICATIONS diff --git a/src/EnergyPlus/DataSizing.hh b/src/EnergyPlus/DataSizing.hh index b3072a2ad2c..2afe9ba4415 100644 --- a/src/EnergyPlus/DataSizing.hh +++ b/src/EnergyPlus/DataSizing.hh @@ -106,6 +106,12 @@ namespace DataSizing { extern int const FractionOfAutosizedCoolingCapacity; extern int const FractionOfAutosizedHeatingCapacity; + // Plant Coincident sizing factor options + extern int const NoSizingFactorMode; + extern int const GlobalHeatingSizingFactorMode; + extern int const GlobalCoolingSizingFactorMode; + extern int const LoopComponentSizingFactorMode; + // DERIVED TYPE DEFINITIONS: // INTERFACE BLOCK SPECIFICATIONS @@ -1689,6 +1695,7 @@ namespace DataSizing { Real64 DeltaT; // loop design temperature drop (or rise) [DelK] int ConcurrenceOption; // sizing option for coincident or noncoincident int NumTimeStepsInAvg; // number of zone timesteps in the averaging window for coincident plant flow + int SizingFactorOption; // option for what sizing factor to apply // Calculated Real64 DesVolFlowRate; // loop design flow rate in m3/s bool VolFlowSizingDone; // flag to indicate when this loop has finished sizing flow rate @@ -1700,6 +1707,7 @@ namespace DataSizing { DeltaT( 0.0 ), ConcurrenceOption( 0 ), NumTimeStepsInAvg( 0 ), + SizingFactorOption( 101 ), DesVolFlowRate( 0.0 ), VolFlowSizingDone( false ) {} @@ -1712,6 +1720,7 @@ namespace DataSizing { Real64 const DeltaT, // loop design temperature drop (or rise) [DelK] int const ConcurrenceOption, int const NumTimeStepsInAvg, + int const SizingFactorOption, Real64 const DesVolFlowRate, // loop design flow rate in m3/s bool const VolFlowSizingDone // flag to indicate when this loop has finished sizing flow rate ) : @@ -1721,6 +1730,7 @@ namespace DataSizing { DeltaT( DeltaT ), ConcurrenceOption( ConcurrenceOption ), NumTimeStepsInAvg( NumTimeStepsInAvg ), + SizingFactorOption( SizingFactorOption ), DesVolFlowRate( DesVolFlowRate ), VolFlowSizingDone( VolFlowSizingDone ) {} diff --git a/src/EnergyPlus/OutputReportPredefined.cc b/src/EnergyPlus/OutputReportPredefined.cc index 1784866b72f..51fa629ab97 100644 --- a/src/EnergyPlus/OutputReportPredefined.cc +++ b/src/EnergyPlus/OutputReportPredefined.cc @@ -266,6 +266,7 @@ namespace OutputReportPredefined { int pdchSysSizUserHtAir; int pdstPlantSize; int pdchPlantSizCalcVdot; + int pdchPlantSizMeasVdot; int pdchPlantSizPrevVdot; int pdchPlantSizPass; int pdchPlantSizCoincYesNo; @@ -972,6 +973,7 @@ namespace OutputReportPredefined { pdstPlantSize = newPreDefSubTable( pdrSizing, "Plant Loop Coincident Design Fluid Flow Rate Adjustments"); pdchPlantSizPass = newPreDefColumn( pdstPlantSize, "Sizing Pass" ); pdchPlantSizPrevVdot = newPreDefColumn( pdstPlantSize, "Previous Design Volume Flow Rate [m3/s]" ); + pdchPlantSizMeasVdot = newPreDefColumn( pdstPlantSize, "Measured Volume Flow Rate [m3/s]" ); pdchPlantSizCalcVdot = newPreDefColumn( pdstPlantSize, "Coincident Design Volume Flow Rate [m3/s]" ); pdchPlantSizCoincYesNo = newPreDefColumn( pdstPlantSize, "Coincident Size Adjusted" ); pdchPlantSizDesDay = newPreDefColumn( pdstPlantSize, "Peak Sizing Period Name" ); diff --git a/src/EnergyPlus/OutputReportPredefined.hh b/src/EnergyPlus/OutputReportPredefined.hh index 56902cc4910..37e8f083da7 100644 --- a/src/EnergyPlus/OutputReportPredefined.hh +++ b/src/EnergyPlus/OutputReportPredefined.hh @@ -257,6 +257,7 @@ namespace OutputReportPredefined { extern int pdchSysSizUserHtAir; extern int pdstPlantSize; extern int pdchPlantSizCalcVdot; + extern int pdchPlantSizMeasVdot; extern int pdchPlantSizPrevVdot; extern int pdchPlantSizPass; extern int pdchPlantSizCoincYesNo; diff --git a/src/EnergyPlus/SizingAnalysisObjects.cc b/src/EnergyPlus/SizingAnalysisObjects.cc index aa0e7e7b21a..1b98dcd47d8 100644 --- a/src/EnergyPlus/SizingAnalysisObjects.cc +++ b/src/EnergyPlus/SizingAnalysisObjects.cc @@ -84,7 +84,7 @@ namespace EnergyPlus { } int const SizingLoggerFramework::SetupVariableSizingLog( - int const & SupplySideInletNodeNum // change to pointer setup + int const SupplySideInletNodeNum // change to pointer setup ){ using DataGlobals::NumOfTimeStepInHour; using DataGlobals::ksDesignDay; @@ -193,33 +193,53 @@ namespace EnergyPlus { using DataGlobals::TimeStepZone; using DataGlobals::SecInHour; using DataSizing::PlantSizData; + using DataSizing::NoSizingFactorMode; + using DataSizing::GlobalHeatingSizingFactorMode; + using DataSizing::GlobalCoolingSizingFactorMode; + using DataSizing::LoopComponentSizingFactorMode; + using DataSizing::GlobalHeatSizingFactor; + using DataSizing::GlobalCoolSizingFactor; using namespace DataPlant; using namespace OutputReportPredefined; using WeatherManager::Environment; using DataHVACGlobals::SmallWaterVolFlow; bool SetNewSizes; + Real64 SizingFac; Real64 NormalizedChange; + Real64 newFoundVolFlowRate; - //this is for a loop level sizing factor which is assumed to not need to change for resizing - PlantSizingFraction = PlantLoop( PlantLoopIndex ).LoopSide( SupplySide ).Branch( 1 ).PumpSizFac; - previousVolDesignFlowRate = PlantSizData( PlantLoopIndex ).DesVolFlowRate; if (newFoundMassFlowRateTimeStamp.LogDataValue > 0.0 ) { - newFoundMassFlowRate = newFoundMassFlowRateTimeStamp.LogDataValue; + newFoundMassFlowRate = newFoundMassFlowRateTimeStamp.LogDataValue; } else { newFoundMassFlowRate = 0.0; } - - newAdjustedMassFlowRate = newFoundMassFlowRate * PlantSizingFraction; //indlude sizing fraction multiplier, often 1.0 - newVolDesignFlowRate = newAdjustedMassFlowRate / DensityForSizing; + newFoundVolFlowRate = newFoundMassFlowRate / DensityForSizing; + + // now apply the correct sizing factor depending on input option + if ( PlantSizData( PlantLoopIndex ).SizingFactorOption == NoSizingFactorMode ) { + SizingFac = 1.0; + } else if ( PlantSizData( PlantLoopIndex ).SizingFactorOption == GlobalHeatingSizingFactorMode ) { + SizingFac = GlobalHeatSizingFactor; + } else if ( PlantSizData( PlantLoopIndex ).SizingFactorOption == GlobalCoolingSizingFactorMode ) { + SizingFac = GlobalCoolSizingFactor; + } else if ( PlantSizData( PlantLoopIndex ).SizingFactorOption == LoopComponentSizingFactorMode ) { + //multiplier used for pumps, often 1.0, from component level sizing fractions + SizingFac = PlantLoop( PlantLoopIndex ).LoopSide( SupplySide ).Branch( 1 ).PumpSizFac; + } + + newAdjustedMassFlowRate = newFoundMassFlowRate * SizingFac; // apply overall heating or cooling sizing factor + newVolDesignFlowRate = newAdjustedMassFlowRate / DensityForSizing; - //compare threshold, store TODO + //compare threshold, SetNewSizes = false; - if (newVolDesignFlowRate > SmallWaterVolFlow && newVolDesignFlowRate < previousVolDesignFlowRate ) { + if ( ( newVolDesignFlowRate > SmallWaterVolFlow ) // do not use zero size +// && ( newVolDesignFlowRate < previousVolDesignFlowRate )// assume only shrink size from noncoincident? nah + ) { SetNewSizes = true; NormalizedChange = std::abs((newVolDesignFlowRate - previousVolDesignFlowRate) / previousVolDesignFlowRate); @@ -228,8 +248,6 @@ namespace EnergyPlus { } else { AnotherIterationDesired = false; } - - } if ( SetNewSizes ) { @@ -249,8 +267,9 @@ namespace EnergyPlus { } //report to sizing summary table called Plant Loop Coincident Design Fluid Flow Rates PreDefTableEntry( pdchPlantSizPass, PlantLoop( PlantLoopIndex ).Name, HVACSizingIterCount ); - PreDefTableEntry( pdchPlantSizPrevVdot, PlantLoop( PlantLoopIndex ).Name, previousVolDesignFlowRate , 4 ); - PreDefTableEntry( pdchPlantSizCalcVdot, PlantLoop( PlantLoopIndex ).Name, newVolDesignFlowRate , 4 ); + PreDefTableEntry( pdchPlantSizPrevVdot, PlantLoop( PlantLoopIndex ).Name, previousVolDesignFlowRate , 6 ); + PreDefTableEntry( pdchPlantSizMeasVdot, PlantLoop( PlantLoopIndex ).Name, newFoundVolFlowRate , 6 ); + PreDefTableEntry( pdchPlantSizCalcVdot, PlantLoop( PlantLoopIndex ).Name, newVolDesignFlowRate , 6 ); if (SetNewSizes) { PreDefTableEntry( pdchPlantSizCoincYesNo, PlantLoop( PlantLoopIndex ).Name, "Yes" ); @@ -261,7 +280,7 @@ namespace EnergyPlus { PreDefTableEntry( pdchPlantSizDesDay, PlantLoop( PlantLoopIndex ).Name, Environment(newFoundMassFlowRateTimeStamp.EnvrnNum).Title ); PreDefTableEntry( pdchPlantSizPkTimeDayOfSim, PlantLoop( PlantLoopIndex ).Name, newFoundMassFlowRateTimeStamp.DayOfSim ); PreDefTableEntry( pdchPlantSizPkTimeHour, PlantLoop( PlantLoopIndex ).Name, newFoundMassFlowRateTimeStamp.HourOfDay ); - PreDefTableEntry( pdchPlantSizPkTimeMin, PlantLoop( PlantLoopIndex ).Name, newFoundMassFlowRateTimeStamp.stepStartMinute ); + PreDefTableEntry( pdchPlantSizPkTimeMin, PlantLoop( PlantLoopIndex ).Name, newFoundMassFlowRateTimeStamp.stepStartMinute, 0 ); } } diff --git a/src/EnergyPlus/SizingAnalysisObjects.hh b/src/EnergyPlus/SizingAnalysisObjects.hh index d66d2fbc1f9..aa37f06246a 100644 --- a/src/EnergyPlus/SizingAnalysisObjects.hh +++ b/src/EnergyPlus/SizingAnalysisObjects.hh @@ -85,7 +85,7 @@ public: int const SetupVariableSizingLog( - int const & SupplySideInletNodeNum //change to pointers for generality later + int const SupplySideInletNodeNum //change to pointers for generality later ); void UpdateSizingLogValuesZoneStep(); diff --git a/src/EnergyPlus/SizingManager.cc b/src/EnergyPlus/SizingManager.cc index 93d8f6ae072..820067f0a54 100644 --- a/src/EnergyPlus/SizingManager.cc +++ b/src/EnergyPlus/SizingManager.cc @@ -2342,9 +2342,9 @@ namespace SizingManager { if ( NumAlphas > 2 ) { {auto const concurrenceOption (cAlphaArgs(3) ); - if (concurrenceOption == "NONCOINCIDENT"){ + if ( concurrenceOption == "NONCOINCIDENT" ){ PlantSizData( PltSizIndex ).ConcurrenceOption = NonCoincident; - } else if (concurrenceOption == "COINCIDENT" ){ + } else if ( concurrenceOption == "COINCIDENT" ){ PlantSizData( PltSizIndex ).ConcurrenceOption = Coincident; } else { ShowSevereError( cCurrentModuleObject + "=\"" + cAlphaArgs( 1 ) + "\", invalid data." ); @@ -2354,6 +2354,21 @@ namespace SizingManager { }} } + if (NumAlphas > 3){ + {auto const sizingFactorOption ( cAlphaArgs(4) ); + if ( sizingFactorOption == "NONE" ) { + PlantSizData( PltSizIndex ).SizingFactorOption = NoSizingFactorMode; + } else if ( sizingFactorOption == "GLOBALHEATINGSIZINGFACTOR" ) { + PlantSizData( PltSizIndex ).SizingFactorOption = GlobalHeatingSizingFactorMode; + } else if ( sizingFactorOption == "GLOBALCOOLINGSIZINGFACTOR" ) { + PlantSizData( PltSizIndex ).SizingFactorOption = GlobalCoolingSizingFactorMode; + } else if ( sizingFactorOption == "LOOPCOMPONENTSIZINGFACTOR" ) { + PlantSizData( PltSizIndex ).SizingFactorOption = LoopComponentSizingFactorMode; + } + + } + + } SetupEMSInternalVariable( "Plant Design Volume Flow Rate", PlantSizData( PltSizIndex ).PlantLoopName, "[m3/s]", PlantSizData( PltSizIndex ).DesVolFlowRate ); }