EnergyPlus is an advanced whole-building energy simulation tool developed by the U.S. Department of Energy. This robust platform is an invaluable asset for architects, engineers, and researchers involved in building energy efficiency. Among its extensive features is the ability to analyze the energy consumption of refrigeration systems, a key component in the food production industry. Refrigeration in this industry is a significant contributor to energy consumption and greenhouse gas emissions. In this comprehensive article, we’ll discuss the importance of refrigeration in food production, explore the limitations of current performance curves for ammonia compressors within EnergyPlus, and introduce a novel Python-based method for creating custom performance curves tailored to compressors of any size. If you’re new to EnergyPlus, it would be beneficial to read our comprehensive guide EnergyPlus 101: Your Ultimate Guide to Building Energy Simulation Software.
Understanding EnergyPlus and Refrigeration Systems
EnergyPlus, while being an advanced simulation tool, does not focus solely on commercial buildings. It also caters to the industrial sector, which includes food production facilities. EnergyPlus comes with a variety of example files for refrigeration systems to aid users. The refrigerated warehouse example and multiple supermarket examples provided with EnergyPlus are commercial-focused but offer valuable insights into how these systems work. However, for industrial facilities such as food production plants, these examples may not perfectly match due to the significantly different design and operational characteristics.
Food production facilities often use large ammonia-based refrigeration systems that operate differently from commercial refrigeration systems. The simulation of these industrial systems needs to consider the specific features of the ammonia refrigeration system, including multi-stage compressors, complex piping systems, and other factors such as the impact of suction pressure on compressor performance.
Refrigeration in Food Production
In the context of food production facilities, refrigeration is pivotal. These facilities deploy a range of refrigeration systems to cater to their diverse cooling needs. Centralized systems use a single large-scale refrigeration system to cool the entire facility, while decentralized systems have multiple smaller-scale refrigeration units distributed throughout the facility.
Optimizing the energy efficiency of these systems can be challenging due to factors like varying cooling loads and temperatures and fluctuating loads based on production schedules and the product mix. Several strategies can be used to improve the energy efficiency of refrigeration systems in these facilities. Regular maintenance and system optimization, waste heat recovery, and upgrading equipment and controls are some of the potential strategies. To understand more about sustainability optimization, do check out our blog post Sustainability Optimization: Multi-Objective Optimization and the Knapsack Approach for Energy Efficiency Measure Selection.
Limitations of Current Performance Curves
The performance of a refrigeration compressor in EnergyPlus is represented using curves. These curves, based on compressor capacity and energy use as functions of temperature conditions, play a significant role in predicting the performance of a refrigeration system. While EnergyPlus provides default performance curves based on common commercial refrigeration systems, they may not accurately represent the performance of larger, industrial-scale ammonia compressors used in food production facilities.
The typical performance curves are often sourced from smaller commercial-grade compressors, which operate under different principles and constraints compared to their larger, industrial counterparts. Consequently, the simulation results for large-scale ammonia refrigeration systems may not accurately represent real-world energy use and performance.
Custom Performance Curves with Python
To address this limitation, we’ve developed a Python-based method for generating custom performance curves for any size of ammonia compressors. This innovative approach allows energy modelers to tailor the performance curves to their specific compressors, based on manufacturer’s data, leading to more accurate energy consumption simulations. The Python script uses manufacturer data and employs the scipy’s curve_fit function to generate a bicubic curve. This accurately represents the compressor’s performance under various operating conditions, filling the gap left by the commercial-grade compressor curves traditionally used in EnergyPlus.
For those unfamiliar with Python, it is a versatile programming language renowned for its readability and flexibility. It offers a vast array of scientific and mathematical libraries, making it ideal for tasks such as this. The core of the code is to use the least squares method to fit a bicubic curve to the data points, representing the relationship between the compressor’s operating conditions and its performance. This curve can then be used in EnergyPlus to simulate the compressor’s behavior under different operating conditions more accurately.
The Python code requires a dataset from the manufacturer containing performance data for the compressor at different operating conditions. This data includes the suction and discharge temperatures, compressor capacity (in tons of refrigeration), and power consumption (in brake horsepower). The script converts this data to the units required by EnergyPlus (Celsius and Watts), fits the curve to the data, and then outputs the coefficients of the bicubic curve.
# This is for compressor capacity curve
import numpy as np
# Function to convert Fahrenheit to Celsius
def fahrenheit_to_celsius(temp_f):
return (temp_f - 32) * 5 / 9
# Function to convert tons of refrigeration to watts
def tons_to_watts(capacity_tr):
return capacity_tr * 3516.85
# Convert temperatures to Celsius and capacity to watts
manufacturer_data[:, 0] = fahrenheit_to_celsius(manufacturer_data[:, 0])
manufacturer_data[:, 1] = fahrenheit_to_celsius(manufacturer_data[:, 1])
manufacturer_data[:, 2] = tons_to_watts(manufacturer_data[:, 2])
# Extract evaporating temperatures (Te), condensing temperatures (Tc), and cooling capacity (X)
Te = manufacturer_data[:, 0]
Tc = manufacturer_data[:, 1]
X = manufacturer_data[:, 2]
# Construct the design matrix A
A = np.column_stack([
np.ones_like(Te),
Te,
Tc,
Te**2,
Te*Tc,
Tc**2,
Te**3,
Tc*Te**2,
Te*Tc**2,
Tc**3,
])
# Solve the least squares problem to find the coefficients
coefficients, _, _, _ = np.linalg.lstsq(A, X, rcond=None)
# Print the coefficients
print("C1:", coefficients[0])
print("C2:", coefficients[1])
print("C3:", coefficients[2])
print("C4:", coefficients[3])
print("C5:", coefficients[4])
print("C6:", coefficients[5])
print("C7:", coefficients[6])
print("C8:", coefficients[7])
print("C9:", coefficients[8])
print("C10:", coefficients[9])
# Convert temperatures to Celsius and power to watts
# Function to convert BHP to watts
def bhp_to_watts(power_bhp):
return power_bhp * 745.7
manufacturer_data[:, 0] = fahrenheit_to_celsius(manufacturer_data[:, 0])
manufacturer_data[:, 1] = fahrenheit_to_celsius(manufacturer_data[:, 1])
manufacturer_data[:, 2] = bhp_to_watts(manufacturer_data[:, 2])
# Extract suction temperatures (Ts), condensing temperatures (Tc), and compressor power (P)
Ts = manufacturer_data[:, 0]
Tc = manufacturer_data[:, 1]
P = manufacturer_data[:, 2]
# Construct the design matrix A
A = np.column_stack([
np.ones_like(Ts),
Ts,
Tc,
Ts**2,
Ts*Tc,
Tc**2,
Ts**3,
Tc*Ts**2,
Ts*Tc**2,
Tc**3,
])
# Solve the least squares problem to find the coefficients
coefficients, _, _, _ = np.linalg.lstsq(A, P, rcond=None)
# Print the coefficients
print("C1:", coefficients[0])
print("C2:", coefficients[1])
print("C3:", coefficients[2])
print("C4:", coefficients[3])
print("C5:", coefficients[4])
print("C6:", coefficients[5])
print("C7:", coefficients[6])
print("C8:", coefficients[7])
print("C9:", coefficients[8])
print("C10:", coefficients[9])
Conclusion
Using Python and EnergyPlus together unlocks a new level of precision for energy modelers, creating the opportunity for more accurate and comprehensive energy models of food production facilities. These refined tools, combined with the strategies discussed above, can help facilities to make substantial strides towards reducing their energy consumption and greenhouse gas emissions.
By extending the capabilities of EnergyPlus with Python, we can better match our energy models to real-world conditions, improving our understanding of how different factors affect a building’s energy consumption. With these improved models, we can make more informed decisions about how to improve energy efficiency, whether by making adjustments to our existing systems or by designing new, more efficient systems.
If you are interested in learning more about how EnergyPlus can be used in the early design phase, check out our blog post Early Design Phase Energy Modeling with EnergyPlus. This will help provide a broader understanding of the potential that integrated energy modeling has in not just improving efficiency, but also designing more sustainable facilities from the onset.
Embracing these advanced techniques in energy modeling serves not only to improve the efficiency and cost-effectiveness of our facilities but also to contribute to the global effort to reduce greenhouse gas emissions and combat climate change.
In the ongoing journey of improving energy efficiency, every bit of accuracy and improvement counts. With Python’s power integrated with EnergyPlus, modelers are more equipped than ever to make a difference.
