Building a Refrigerator Model in Wolfram SystemModeler
August 1, 2012 — Malte Lenz, Test Engineer, SystemModeler
Explore the contents of this article with a free Wolfram SystemModeler trial.Refrigerators and freezers are common household appliances, present in almost every home. That means most people use one every day, but how do they actually work? And what happens to the temperature when you open the door? Or when the power goes out during a storm?
Those are some of the questions this blog post seeks to answer by building a refrigerator model in Wolfram SystemModeler.
A common way to construct a combined refrigerator and freezer is to keep the freezer compartment cool with a heat pump and to then transfer some of the air to the fridge compartment. That way only one heat pump is needed, and both compartments can be kept at different temperatures.
The following diagram shows our goal: modeling a connected freezer and fridge complete with doors, casing, food contents, and a heat pump. At the top we see the freezer compartment together with the heat pump that cools the air, some frozen food in the freezer, and a door for the freezer. At the bottom we see a similar structure for the fridge. The two are connected with a component for air circulation at the middle right of the diagram, which will transfer cold air from the freezer to the fridge. Finally, to the left, we have components modeling the casing and insulation to the room temperature outside.
The freezer and refrigerator compartments, as well as the air flow in between, can be modeled with FluidHeatFlow components from the Modelica Standard Library. We will also create a custom component to control when to switch the air flow on and off.
The custom air flow control component, which is highlighted in the image below, consists of a temperature sensor at the upper left side of the callout (labeled “temperatureSensor”), measuring the temperature in the fridge. The temperature is the input to a hysteresis component used as a thermostat (labeled “thermostat”). The output from that in turn switches the fan on or off using a switch component (labeled “fanOn,” “fanOff,” and “switch”). This changes the flow of air between the ports of the freezer (“flowPort_a1”) and fridge (“flowPort_b1”) at the bottom of the callout.
The effect is that the air flow control component turns the circulation of air between the freezer and fridge compartments on or off depending on the temperature of the fridge.
Doors on the refrigerator and freezer compartments can be modeled with cold air flowing out through the door to an ambient environment (the room) as well as with warm air flowing in from the same environment.
The doors opening and closing are modeled with a table component, switching air flow through the doors on and off. The image below shows a larger image of the freezer door component. The fridge door has the same structure.
Heat will also enter a refrigerator through the casing. This is modeled with convection and insulation components. The insulation is assumed to be polyfoam, and the freezer has a thicker insulation than the fridge. The case is connected to an ambient temperature of 20° Celsius.
Now the structure of the refrigerator/freezer is complete. Remaining is something that will cool the air. We will model a heat pump connected to the freezer using a thermostat and convection from a flow of R-134a (also called 1,1,1,2-Tetrafluoroethane).
Finally, add food to the refrigerator and freezer. The food will act as heat capacitors, slowing down temperature changes. The model of a combined refrigerator/freezer unit is complete.
Building the model gives a basic understanding of the structure of a refrigerator/freezer. Let’s get back to the first question asked at the beginning of the blog: What happens when the doors open and close?
Getting the answer to this is as simple as clicking the Simulation Center button in SystemModeler, starting up the simulation environment with the refrigerator model. By clicking the Simulate button and selecting which variables to plot, we get the following result of the temperatures in the freezer air and food when doors are opened:
In this simulation, the fridge door is opened for a short while at 600 seconds and the freezer door at around 700 seconds.
We can see that the air temperature changes by up to 25 Kelvin (25° C, 45° F), while the food temperature stays almost unchanged.
The other questions asked were: What happens when the power goes out? How long does the food stay below an acceptable temperature? Investigate this by setting the parameters of the air circulation and heat pump to 0.
The plot above shows the temperatures of the food in the fridge in °C. The orange curve keeps the fridge closed for the whole time, while the blue curve opens the door during 30 seconds every hour.
When 10° C (50° F) is the highest acceptable temperature, that level is reached after a little under 8 hours and 20 minutes (30,000 seconds) when not opening the doors, and after 7 hours (25,000 seconds) when opening the doors every hour.
The plot below shows the temperatures in the freezer for the same simulation. The critical temperature for a freezer is 0° C (32° F), which is reached after around 14 hours (50,000 seconds) when leaving the doors closed, and only 11 hours (39,000 seconds) when opening the doors every hour.
It can be seen that opening the doors speeds up the temperature increase significantly, especially for the freezer. The advice to not open refrigerators and freezers during a power outage is therefore well-founded.
With the model of the refrigerator, other questions could also be answered. How would the temperatures be impacted if the fan between the freezer and fridge had multiple speeds instead of just being on or off? How about the size of the refrigerator? Are there differences if the refrigerator is close to empty or filled with food? How long does it take to cool down a beverage from room temperature to a target temperature by putting it in the freezer?
Download the model of the refrigerator, complete with examples and documentation, from the industry example page and start exploring!