-
Notifications
You must be signed in to change notification settings - Fork 460
New Feature to allow autosizing of Thermal Energy Storage tank capacity #11147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/EnergyPlus/IceThermalStorage.cc
Outdated
| auto &plntSizData = state.dataSize->PlantSizData(PltSizNum); | ||
| int startPeak = 9 * state.dataGlobal->TimeStepsInHour; // 9:00 AM | ||
| int endPeak = 22 * state.dataGlobal->TimeStepsInHour; // 10:00 PM | ||
| Real64 sizingFactor = 0.36; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far these 3 things are needed for autosizing TES tank capacity. On-peak period start and end, and a sizingFactor to allow adjustment for plant configuration (e.g., if chiller is on during the on-peak period the tank can be downsized).
| BaseSizer::reportSizerOutput(state, tankType, this->Name, "Design Size Capacity [GJ]", tankCapacity * Constant::rSecsInHour / 1.0E9); | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ThermalStorage:Ice:Detailed,
Ice Tank, !- Name
ON, !- Availability Schedule Name
! 0.5, !- Capacity {GJ}
autosize, !- Capacity {GJ}
Component Sizing Information, ThermalStorage:Ice:Detailed, ICE TANK, Design Size Capacity [GJ], 0.49726
|
src/EnergyPlus/IceThermalStorage.cc
Outdated
| Real64 Cp = plntLoop.glycol->getSpecificHeat(state, plntSizData.ExitTemp, callingRoutine); | ||
| Real64 rho = plntLoop.glycol->getDensity(state, plntSizData.ExitTemp, callingRoutine); | ||
| Real64 onPeakEnergy = | ||
| onPeakSumWaterFlow * rho * Cp * plntSizData.DeltaT * Constant::rSecsInHour; // need Joules here, J = m3/s * kg/m3 * J/kg-C * C * sec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To calculate onPeakEnergy, onPeakSumWaterFlow is summed (1471 to 1477) from start to end of on peak period. This means that any demand side component that will be served by this tank needs to log it's time step load. See epluspsz.csv. Then converted to joules. This is the amount of energy (accounting for the sizing factor) that the tank needs to meet. The time step water flow rate is estimated in CoolingWaterFlowSizing.cc, via calcCoilWaterFlowRates and stored in state.dataPlnt->PlantLoop(loopNum).compDesWaterFlowRate[coilNumOnPlant].tsDesWaterFlowRate[timeStep]. Those data are summed into plntLoop.plantDesWaterFlowRate[ts]. The sum is used to find the plant load via line 1481. From here the tank size is calculated at line 1491. kWh for the detailed model and J for the simple model.
| return coilInHumRat; | ||
| } | ||
|
|
||
| void BaseSizer::calcCoilWaterFlowRates(EnergyPlusData &state, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a epluszsz.csv (zone), eplusssz (system), and now a epluspsz.csv (plant). The psz file reports the demand side component water flow rate that ultimately sizes the plant. I needed this to make sure I was summing the time step water flow rate correctly and then it seemed it was a good output for user inspection. This branch only sums the water coils. There are other component types that add to the plant load that will eventually need to be included. e.g., water source HPs, LoadProfile, etc. Those can be included with a copy of CoolingWaterflowSizing.cc line 169 to the appropriate model code (hopefully).
src/EnergyPlus/Autosizing/Base.cc
Outdated
|
|
||
| std::vector<Real64> tmpFlowData; | ||
| tmpFlowData.resize(size_t(24 * state.dataGlobal->TimeStepsInHour + 1)); | ||
| tmpFlowData[0] = compNum; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note state.dataPlnt->PlantLoop(loopNum).compDesWaterFlowRate[i].tsDesWaterFlowRate[0] holds the comp index. How to differentiate between different model indexes is TBD (e.g. between a water coil index, a plant load profile index, or a water source HP coil index). The array state.dataPlnt->PlantLoop(loopNum).plantCoilObjectNames holds the name of the component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that line 748 and 749 have name and type now so differentiating across object types should not be a problem.
src/EnergyPlus/Plant/PlantManager.cc
Outdated
| } | ||
| } | ||
|
|
||
| void ReportPlantCompWaterFlowData(EnergyPlusData &state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Report out what was found for demand side component water flow rate per time step on the peak day for each demand side component. On a per component basis in epluspsz.csv. Currently applies to Coil:Cooling:Water* object types.
I had to go back and check where that "Des Cool Volume Flow" came from. Probably needs to be changed to be generic.
| state.dataPlnt->PlantLoop(LoopNum).plantDesWaterFlowRate[ts] += thisCoil.tsDesWaterFlowRate[ts + 1]; | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Above sums plant component water flow rates into the master plantDesWaterFlowRate array. The below reports to epluspsz.csv.
| } | ||
| } | ||
|
|
||
| void HeatExchangerStruct::updateCompFlowData(EnergyPlusData &state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fluid to fluid HX logic copies the coil data from the plant loop on the supply side of the HX (downstream side, i.e., to a secondary loop) to the plant loop on the demand side of the HX (upstream side). This moves the comp flow rates (load surrogate) to the upstream plant.
| This alpha field specifies the name of the ThermalStorage:Sizing object name. If the capacity field is autosized this object is required. | ||
|
|
||
| Following is an example input for the THERMAL STORAGE:ICE:SIMPLE object. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn’t necessary, but it might be helpful to include one more example IDF that uses autosizing like:
\begin{lstlisting}
ThermalStorage:Ice:Simple,
Ice Tank, !- Name
IceOnCoilInternal, !- Ice Storage Type
autosize, !- Capacity {GJ}
Ice Tank Inlet Node, !- Inlet Node Name
Ice Tank Outlet Node, !- Outlet Node Name
TESSizing; !- Thermal Storage Sizing Object Name
\end{lstlisting}
(Copied from the new testfile)
|
I built it locally with the latest develop branch pulled in and ran the newly added test files with various on/off-peak schedules and sizing factors. The results look reasonable across the different cases, and all related documentation looks great. |
|
Thanks everyone for all the great work here. Merging. |



Pull request overview
The following components report their chilled water flow rate to the TES system to accomodate autosizing tank capacity:
Description of the purpose of this PR
Pull Request Author
Reviewer