Egg Simulation
1. Introduction
The following assignment explored the thermal conductivity of an egg and the components that affect the target cooking time, defined as the time it takes for the egg white to cook but the yolk remains raw. Throughout this experiment, the heat equation below was used to drive our solutions:
Here, c is the specific heat, K is the thermal conductivity, and ⍴ is the density.
To successfully determine the target cooking time, different variables had to be carefully considered and simulated. Throughout the course of this assignment, we will explain the effects of modeling the egg as a solid or a liquid, the inclusion of the egg shell, the yolk position within the egg, as well as the shape of the egg.
In all of the above cases, the same boundary conditions were applied: the egg is initially at room temperature of 293.15 K, the outer shell is introduced to a temperature of 373.2 K at time t = 0 s, and the model was studied at various time steps. Provided by the professor, it was assumed that the yolk is spherical and occupies 33% of the egg volume, and its size was calculated according to this assumption. The cooking temperatures of the egg white and yolk were provided, which ranged from 144 - 149 ℉ (335.37 - 338.15 K) and 149 - 158 ℉ (338.15 - 342.15 K), respectively. In all of the following simulations, we had used the lower bound of the egg yolk cooking temperature to ensure that the yolk is not cooked.
2. COMSOL
Because the egg has a rotational symmetry, it can be modeled as a 2D axisymmetric model rather than as a full 3D model. This assumption was proven valid previously, so all the following simulations had used the 2D axisymmetric model. In addition, when we modeled the egg, we neglected the egg shell. One study had shown that the shell has a very high thermal conductivity, 2.28 W/mᐧK, a value much higher than water, and so, we concluded that its impact on the way the egg cooks is negligible [1]. Previous studies had also shown that the egg shell has minimal effect on the temperature distribution [2]. Another aspect of the egg we neglected to model was the air sac/cell due to its unpredictable nature [3]. The air sac can change sides around the egg, or even geometry depending on the way it lays, and due to the rapid heat exchange between the egg and water, the air cell could even crack the shell and fill the egg with boiling water [4]. Theoretically, we predict that if we were to model an air cell, then it would shift the temperature plots and increase the time for the side of the yolk near the air sac to be higher than our prediction. For example, the presence of an air sac at the wide end of our realistic egg could potentially shift Figure 4.1 to the right making it more symmetric.
The mesh element was set to “normal” in all of the following simulations. Changing the mesh element size becomes necessary when there are deformities in shape or sharp corners and edges. However, the egg was modeled to have a uniform curvature. Furthermore, because we are examining the transient state of the temperature, time plays a more significant role, and so, modifying the simulation time would give us more relevant information rather than changing the element size. A “normal” setting was sufficient to obtain necessary results.
2.1. Fluid vs. Solid Modeling
Before simulating the egg, we had to determine whether to model the inside as a solid or a liquid. The egg will be in liquid form before the start of the experiment, but the egg cooks from the outside-in, meaning that heat will be traveling through more and more solid as time goes on. Here we modeled both states and the results were compared. For the fluid modeling, we assumed that the liquid is incompressible and the specific heat ratio of 1 was used. Figure 1 below shows the plots of the solid and liquid simulation results, side by side.

Figure 1. Plot of egg temperature against distance along the center at t = 0 to t = 300 s in 30-s intervals. Left plot shows solid modeling and the right, fluid modeling.
As shown from the plots, the results of the two situations are very similar. All the values for the solid and liquid egg are almost the same. The only discrepancy is an error for the initial temperature of the solid egg where the plot somehow drops below any of the initial temperatures that were set, indicating that there may be a COMSOL error. Interestingly, when the mesh element was modified to “extremely fine,” however, it eliminated this error. For the purpose of this assignment, a mesh element of “normal” was still used since t = 0 s is not our primary interest. The rest of the line plots except the t = 0 s plot were nearly identical to the liquid case. To ensure that both the solid and fluid cases were indeed comparable, specific data points were taken and compared. Table 1 below tabulates this data.
The data below can be supplemented with a more analytical approach. The main difference between fluid and solid simulation using COMSOL is the governing equation. For solids, the only equation used is Fourier’s conduction equation. On the other hand, fluid studies take into account convection as well. Because the equations for the fluid simulation are more comprehensive, and there is no initial error at t = 0 s, we chose to continue our simulations modeling the egg as a fluid.

Table 1. Temperature values at two data points at t = 286 s and t = 314 s.
2.2. Elliptical Egg with Centered Yolk
The next point to consider is the effect of the yolk on the simulation. The ideal case is when the yolk is positioned at the center of the egg since the temperature will be evenly distributed to the yolk from the outer temperature of the egg. Here, the egg was modeled as an ellipse and the yolk as a sphere. Based on the assumptions mentioned previously, the radius of the yolk was calculated to be 1.60 cm.
According to Figure 2.1, the temperature decreases and increases back, and this is because temperature was measured along the center of the egg, spanning through its entirety. The initial point starts at the egg-water boundary where temperature is the highest, and as the distance from the egg-water boundary increases, the temperature drops. However, because the egg is an ellipse, the temperature rises back again as the distance gets closer to the egg-water boundary. The plot also shows that as the simulation time increases, the lines shift upward and the slope at the ends gets steeper. This is consistent with its physical implication: as the egg remains in the boiling water longer, it will get hotter.
Figure 2.2 displays the surface temperature distribution of the egg at various time points. Overall, the plot shows that heat is traveling inward, as indicated by a cooler temperature at the core. As the simulation time increases, we observe more surface of the egg has a higher temperature distribution.
To determine the target time, the temperature at one of the white-yolk boundaries (r = 1.2 cm or 4.4 cm) must be less than 338.15 K, and this was measured to be 286 s. The data collected from this simulation was then compared with that of the following simulation which modeled the egg with an off-centered yolk.

Figure 2.1. Plot of egg temperature against distance along the center for an elliptical egg with centered, spherical yolk.

Figure 2.2. 2D plane plots depicting the surface temperature of egg at t = 0 to t = 300 s in 60-s intervals.
2.3. Elliptical Egg with Off-Centered Yolk
For the following simulation, the egg was still modeled as an ellipse with a spherical yolk, but the yolk was placed one-third the distance from one of the ends rather than at the center. The distance was set arbitrarily to observe the effects of the location of the yolk. Figure 3 shows that the location of the yolk had minimal effect on the temperature along the central axis. The plots had shifted to the right slightly, in comparison to Figure 2, while still exhibiting the same graphical behaviors. The target time evaluated at point top, bottom, and side of the yolk were 480, 31, and 65 s, respectively. The results show that a significant variance exists in the temperature at the white-yolk boundary. We presumed that this may be due to the fact that the egg was modeled to be an ellipse and the yolk was not at the center, and that an actual egg is not an ellipse. Therefore, in the next simulation, we modeled the egg to be its actual shape with an off-centered yolk.

Figure 3. Plot of egg temperature against distance along the center for an elliptical egg with off-centered, spherical yolk at t = 0 to t = 300 s in 30-s intervals.
2.4. Egg Modeled as Its Shape
The following simulation modeled the egg as its actual shape with an off-centered yolk. The egg was modeled on SolidWorks with the same given dimensions and its volume was determined through SolidWorks as well. Its 2D plane drawing was imported to COMSOL, and the radius of the yolk was calculated to be 1.58 cm. The distance of the yolk was set to one-third of the distance from the wider end of the egg. The temperature plot in Figure 4.1 shows that the graphs had shifted to the left, in comparison to Case 2. The general behavior of the graph, however, is still retained. Furthermore, the target time evaluated at points top, bottom, and side of the yolk were 372, 115, and 110 s, respectively. According to Figure 4.2, some portion of the yolk would have been already cooked at t = 286 s, which is the value obtained from Case 2. The results of this simulation demonstrate that the shape of the egg had a greater effect on the evaluating the target time more than the position of the yolk. Theoretically if the egg had also been modeled with the air sac toward the bottom of the egg the temperature distribution along our centerline might have regained some of its symmetry due to the added insulation of the low conductivity of air.

Figure 4.1. Plot of egg temperature against distance along the center for egg-shaped egg and off-centered, spherical yolk at t = 0 to t = 300 s in 30-s intervals.

Figure 4.2. 2D plane plots depicting the surface temperature of egg at t = 110, 286, and 372 s.
2.5. Egg Modeled as Its Shape
The following simulation modeled the egg as its actual shape with an off-centered yolk. The egg was modeled on SolidWorks with the same given dimensions and its volume was determined through SolidWorks as well. Its 2D plane drawing was imported to COMSOL, and the radius of the yolk was calculated to be 1.58 cm. The distance of the yolk was set to one-third of the distance from the wider end of the egg. The temperature plot in Figure 4.1 shows that the graphs had shifted to the left, in comparison to Case 2. The general behavior of the graph, however, is still retained. Furthermore, the target time evaluated at points top, bottom, and side of the yolk were 372, 115, and 110 s, respectively. According to Figure 4.2, some portion of the yolk would have been already cooked at t = 286 s, which is the value obtained from Case 2. The results of this simulation demonstrate that the shape of the egg had a greater effect on the evaluating the target time more than the position of the yolk. Theoretically if the egg had also been modeled with the air sac toward the bottom of the egg the temperature distribution along our centerline might have regained some of its symmetry due to the added insulation of the low conductivity of air.
3. Analytic Result
The following series expression can be used to model the temperature of a sphere of a single material:
Assumptions were made that the temperature only depends radially because it is a sphere. The infinite series, however, does not give good results when t = 0 s due to Gibbs Phenomenon. As observed in Figure 6.2, the plot overshoots at very small times, but this spike is eliminated when large time values are used. Its reasoning will be explained later in the section.
3.1. Effects of Increasing Number of Terms (N)
The first series of plots study the effects of the amount of terms calculated (Figure 6.1). Since the above equation is a series, a solution can be reached with one term or be expanded with more terms to get a more accurate answer. As expected, as the number of terms increased, the more uniform and flatter the plot becomes. The fluctuation becomes less dramatic, and the plot begins to resemble a line instead of a sinusoidal wave. However, after a quick glance at the plots, it is obvious there is an error at both ends of the plot, known as the Gibbs Phenomenon. These spikes are a side effect of using a continuous sinusoidal series near a discontinuity in the function. The nth sum of the Fourier series has large amplitudes near the spike, potentially increasing the maximum of the partial sum.


Figure 6.1. Plot of temperature against distance using 25, 50, and 100 terms at t = 0.00001 s.
3.2. Effects of Increasing Time (t)
The second set of plots demonstrates the effect of using various simulation times on the refinement of the graph. At small time values, a spike is observed at the ends, close to the egg-water boundary. This is not expected because the temperature cannot start below the initial temperature. However, this overshoot goes away as the simulation time increases. The temperature rises as the distance increases, as expected, and as the simulation time increases, the temperature increases at shorter distance.

Figure 6.2. Plot of temperature against distance using 200 terms at varying times.
3.3. Effects of Using One Term (N = 1)
The third set of plots only uses one term, and its equation then simplifies into:
where a is the radius of the egg, and
With these plots, we see an anomaly when t is relatively small: the plot dips below the x-axis (Figure 6.3). Since we are starting at room temperature, it does not make sense for the temperature of the egg to be below 0℃. However, as time gets larger, the plot shifts upwards, eventually settling on the expected value for r = 0. When comparing these plots at large t values with the 200 term series, they are almost identical. As stated in the assignment, this is due to the exponential term in the equation. As t increases, that exponential term gets smaller, making those values of the series negligible. Furthermore, Figure 6.4 shows that for large t values, using more terms has a negligible effect on refining the plot. This implies that fewer terms can be used for larger t values to obtain an accurate solution. Therefore, a single-term equation can be used for this assignment since a relatively large t value is used.

Figure 6.3. Plots of temperature against distance using one term at varying times.

Figure 6.4. Plots of temperature against distance using 200 terms at t = 300, 1000, and 4200 s.
3.4. Analytical Solution
For the analytical section of this report, the single term equation will be used as explained previously. Since the egg white is being cooked, the properties of the egg white are used to calculate ⲧ0 which comes out to be 3795 s. However, this is large for our purposes, and so, 0.1ⲧ0 = 379.5 s is used instead. Solving the equation for time, t:
where Tcooking = 338.15 K, Tboiling water = 373.15 K, and Tegg = 293.15 K. The t values were calculated under three different cases: 1) spherical egg with equivalent volume to Part I (a = 2.31 cm); 2) spherical egg with a = 2.8 cm; and 3) spherical egg with a = 2.1 cm. The results are summarized in Table 2 below shows that the target time for the analytical case is around 100 s. Since the analytical case is the most ideal case, it would be the minimum time value for the target time.


Table 2. Target time under different egg radii.
4. Experiment
To test our simulation, we will cook the egg in boiling water for:
198 seconds.
If we are correct, the white of the egg will be fully cooked, but the yolk will still be uncooked. The final target time was determined by using the analytical solution as the minimum value of target time as well as the results obtained from Case 2 (elliptical egg with centered yolk) and Case 4 (egg-shaped with off-centered yolk). We averaged the two target times, 286 and 110 s.
5. Conclusion
The assignment has demonstrated that selecting the correct parameters and making necessary assumptions are crucial in obtaining accurate results. After making some educated assumptions on behalf of modeling without the shell and neglecting the air sack we found that the position of the yolk had minimal effect on evaluating the target time, whereas the shape of the egg had a significant impact. In the analytical portion, we found that at very low times ~0 s the Fourier series operating with either higher or low order terms resulted in error at the discontinuities that occur around edges of the egg which is a result of the Gibbs phenomenon. For the values at least larger than ~0.1 s, the Gibbs phenomenon involving error at the discontinuities subsides, and using more terms gave a more accurate temperature distribution. A single term shows large error at lower time values, and as time increases, the temperature distribution becomes more accurate. In the analytical section, conveniently a single term is enough to approximate the time to cook the white of an egg, we calculated this time to be at least 100 s. Combining our results from COMSOL, we concluded that our final prediction for the target time is 198 s.
References
-
Abbasnezhad, B., Hamdami, N., Monteau, J.‐Y. and Vatankhah, H. (2016), Numerical modeling of heat transfer and pasteurizing value during thermal processing of intact egg. Food Sci Nutr, 4: 42-49. doi:10.1002/fsn3.257
-
Denys, S., Pieters, J. and Dewettinck, K. (2003), Combined CFD and Experimental Approach for Determination of the Surface Heat Transfer Coefficient During Thermal Processing of Eggs. Journal of Food Science, 68: 943-951. doi:10.1111/j.1365-2621.2003.tb08269.x
-
American Egg Board. (2020). Air Cell. https://www.incredibleegg.org/eggcyclopedia/a/air-cell/
-
beccers099. (2017, April 24). Cracked eggs, dislocated air sacs and broken air pockets. Retrieved from https://www.backyardchickens.com/threads/cracked-eggs-dislocated-air-sacs-and-broken-air-pockets.628104/
