16
The Perfect Brownie Pan Riley Dulin Jun Seok Yeo Nick Fuerstenberg March 2015 1

The Perfect Brownie Pan - University of Washingtonstudents.washington.edu/.../The_Perfect_Brownie_Pan...The pan and the brownies are perfect black-bodies Seventh The temperature and

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: The Perfect Brownie Pan - University of Washingtonstudents.washington.edu/.../The_Perfect_Brownie_Pan...The pan and the brownies are perfect black-bodies Seventh The temperature and

The Perfect Brownie Pan

Riley Dulin Jun Seok Yeo Nick Fuerstenberg

March 2015

1

Page 2: The Perfect Brownie Pan - University of Washingtonstudents.washington.edu/.../The_Perfect_Brownie_Pan...The pan and the brownies are perfect black-bodies Seventh The temperature and

1 Abstract

This paper examines different shapes for a brownie pan such that it maximizesthe area covered in an oven, and the temperature distribution across the brown-ies. We also examine the relationship between the perimeter of the pan and thetemperature distribution. We used a combination of analytical and numericalsolutions to find these values, and wrote MATLAB code to simulate the tem-perature distribution. Through these methods, we hope to discover the optimalshape for a brownie pan.

2 Introduction

When baking in a rectangular pan, heat is concentrated in the 4 corners andthe product gets overcooked at the corners (and to a lesser extent at the edges).In a round pan the heat is distributed evenly over the entire outer edge and theproduct is not overcooked at the edges, and there are no corners at which theproduct will be extremely overcooked. However, since most ovens are rectangu-lar in shape using round pans is not efficient with respect to using the space inan oven. Develop a model to show the distribution of heat across the outer edgeof a pan for pans of different shapes - rectangular to circular and other shapesin between.

Assume:

1. A width to length ratio of W/L for the oven which is rectangular in shape

2. Each pan must have an area of A

3. Pans in the oven must have a space d between each other and the sides ofthe oven

4. Initially two racks in the oven, evenly spaced

Develop a model that can be used to select the best type of pan (shape)under the following conditions:

1. Maximize number of pans that can fit in the oven (N)

2. Maximize even distribution of heat (H) for the pan

3. Optimize a combination of conditions (1) and (2) where weights p and(1− p) are assigned to illustrate how the results vary with different valuesof W/L and p

[1]

2

Page 3: The Perfect Brownie Pan - University of Washingtonstudents.washington.edu/.../The_Perfect_Brownie_Pan...The pan and the brownies are perfect black-bodies Seventh The temperature and

3 Assumptions

FirstThe ideal shape of the brownie pan is a member of the family of Superel-lipses (also known as Lame Curves)∣∣∣x

a

∣∣∣n +∣∣∣yb

∣∣∣n = 1 (1)

n ∈ [2,∞) (2)

Where a and b are the positive half-width and half-length respectivelyof the shape. Below is a picture of the ”squircle”, a superellipse withn = 4, a = 1, b = 1:

Figure 1: A ”Squircle”: x4 + y4 = 1

This is justified because the family of superellipses go from perfect ellipseto perfect rectangle (n = 10 is sufficiently close to infinity to make a near-perfect rectangle), and in between they form rounded rectangles, whichwould be the perfect compromise between the two extremes.

3.1 Area Assumptions

SecondThe optimal layout of the pans in the oven is in a rectangular spacingpattern

Thirda and b have the same ratio to each other as the oven’s width to lengthratio. This is justified because in order to maximize the rectangular spac-ing pattern, an equal amount of rows and columns of brownie pans arenecessary because a square has a higher number of pans than rectangles,and in order to get a square pattern each pan must match the dimensionsof the oven

3

Page 4: The Perfect Brownie Pan - University of Washingtonstudents.washington.edu/.../The_Perfect_Brownie_Pan...The pan and the brownies are perfect black-bodies Seventh The temperature and

FourthThe second rack is exactly the same in alignment and heat distributionas the first rack, so we will only analyze the situation for one rack. Thisis justified because an oven heats the top and bottom rack in approxi-mately the same way, and we assume the brownies on the top rack willnot interfere with the radiation received by the bottom rack

3.2 Heat Assumptions

FifthHeat flux only flows from high temperature to low temperature and doesnot flow back

SixthThe pan and the brownies are perfect black-bodies

SeventhThe temperature and the radiation in the oven are equally distributed

EigthThe temperature of the pan is equally distributed

NinthAll energy that the pan and the brownies receive from radiation convertsto heat with 100% transfer (ideal transfer rate)

TenthThermal conductivity is constant even when there is a change in temper-ature

EleventhOven remains the same temperature and provides unlimited heat untilequilibrium

TwelfthThe oven has a vacuum inside, and thus there are no convection currents,and only radiative heat transfer. We assume this because it makes calcu-lations significantly easier to make

3.3 Strategies

We had several strategies of how to model this problem. The problem was splitinto two halves, the maximization of the ”Area Score”, and the maximizationof the ”Heat Score”. These are termed as scores because in order to comparethings as different as area and temperature distributions, we needed to normalizethe values. So we give each field a score between 0 and 1 by subtracting theminimum and dividing by the range of the area and temperature values, so thatthe minimum scoring shape is assigned 0, the maximum shape is assigned 1,

4

Page 5: The Perfect Brownie Pan - University of Washingtonstudents.washington.edu/.../The_Perfect_Brownie_Pan...The pan and the brownies are perfect black-bodies Seventh The temperature and

and the rest are scaled to be between those two numbers while still retainingthe shape of their plot. We then use those values to compare against each otherand decide what is the optimal shape.

During our research we found that an alternative exists for calculating theHeat Score, namely, the Perimeter Score. More details are found in the perime-ter section.

3.4 Constants and Variables

3.4.1 Constants

W Width of the oven (m)L Length of the oven (m)r Ratio of W/LA Area of the pan (m 2)d Distance between each pan (m)p Weight of Area Score (Heat Score is 1− p)h Height of the brownie pan (m)pt Thickness of the brownie pan (m)Kb Thermal conductivity of brownies (W/(m*K))cb Specific heat of brownies (J/(kg*K))cp Specific heat of the pan (J/(kg*K))σ Stefan-Boltzmann’s Constant (W/(m2 ∗K4))ρb Density of the brownies (kg/m3)ρp Density of the pan (kg/m3)TR Room temperature (K)TO Oven temperature (K)∆t Time step (s)t0 Start time (s)tf End time (s)∆x Spatial step (m)ccube Specific heat for one cube (J/(kg*K))Qtop Heat from the oven radiation (J/kg)

Qbottom Heat from the pan (J/kg)Qside,j Heat from sides of a cube (J/kg)

5

Page 6: The Perfect Brownie Pan - University of Washingtonstudents.washington.edu/.../The_Perfect_Brownie_Pan...The pan and the brownies are perfect black-bodies Seventh The temperature and

3.4.2 Variables

n Parameter of the superellipsea Half-width of the superellipse (m)b Half-length of the superellipse (m)x Spatial x coordinate (m)y Spatial y coordinate (m)t Time value (s)N Number of pansP Perimeter of the superellipseTp Temperature of the pan (K)Tm Temperature for one cube on the mth second (K)

Tside,j Temperature of the jth side of a brownie (K)T (x, y, t) Temperature function (K)

SA(W,L, a, b, d) Area ScoreSH(a, b, n) Heat ScoreSP (a, b, n) Perimeter Score

4 Model

The formal solution to this problem is the value of n that maximizes the follow-ing expression

p ∗ SA(W,L, a, b, d) + (1− p) ∗ SH(a, b, n) (3)

where n is the parameter of a superellipse given by (1) and (2) and each S isnormalized in the following waySA:

S =V −min(V)

max(V)−min(V)(4)

SH , SP :

S−1 =min(V)−V

max(V)−min(V)+ 1 (5)

where V is a vector of values that are determined by each respective score andS is the normalized score vector. SH and SP use the ”inverse” normalizationfunction because their values are opposite to the desired measurement. SeeSections 4.1.3, 4.2.5, and 4.3.1 for individual explanations of why the scoreshave their formulae.

4.1 Area Score

To find the Area Score we followed this outline:

1. Find a and b

2. Calculate N , the number of pans

3. Normalize the values

6

Page 7: The Perfect Brownie Pan - University of Washingtonstudents.washington.edu/.../The_Perfect_Brownie_Pan...The pan and the brownies are perfect black-bodies Seventh The temperature and

4.1.1 Find a and b

To find a and b, we use a formula for finding the area of a superellipse:

A = 4ab ∗(Γ(1 + 1

n

))2Γ(1 + 2

n

) (6)

a = br (7)

We then solve these equations, and thus we have found the a and b for this valueof n. We will use this for all of the scores we compute.

4.1.2 Find N

To find N , we must form equations for how many pans can fit in the oven. Weknow a and b, along with the constants that represent the oven size, and weform these two linear equations:

(Ncol + 1) ∗ d+Ncol ∗ 2a = W (8)

(Nrow + 1) ∗ d+Nrow ∗ 2b = L (9)

N = Nrow ∗Ncol (10)

4.1.3 Normalize

Once we finish calculating N for each n, we normalize them using (4), becausethe number of pans that can fit in the oven is proportional to our desired be-havior. In other words, as the number of pans increases, so should the score, sowe use the first normalization function.

4.2 Heat Score

The Heat Score is the most complicated of all the scores to calculate, andrequires the creation of a simulation of the cooking brownies. To simulate theevent, we break the brownie mixture down into very small cubes and find theenergy transfer through each cube. To accomplish this we wrote some code inMATLAB that simulated the transfer of heat across the brownie mixture. SeeAppendix A for more details on the simulation, and see Appendix B for ourconsideration of an analytical solution

4.2.1 Heat Transfer for the pan

As shown in the diagram, the pan accepts heat from the oven in the form ofradiation according to Stefan–Boltzmann’s Law:

∂Qpan

∂t= AσT 4

O (11)

Qpan = cp ∗∆Tp (12)

∆Tp =AσT 4

O

cp∆t (13)

7

Page 8: The Perfect Brownie Pan - University of Washingtonstudents.washington.edu/.../The_Perfect_Brownie_Pan...The pan and the brownies are perfect black-bodies Seventh The temperature and

Figure 2: Diagram of Heat Transfer

4.2.2 Heat Transfer for a Single Brownie Cube

Figure 3: Segment of brownie into cubes

The total energy delivered to a single brownie cube of width and length ∆xis given by the sum of the heat transferred by all of its neighboring brownies, orthe pan if it is touching the pan, plus the heat transfer from the top of the ovenand the heat transfer from the bottom of the pan. To determine if the cube istouching the pan, we use (1) with the x and y of the brownie and see if thatis > 1. If so, then that side will be set to the Tp. The heat transfer equationsfrom radiation (from the oven on the top of the cube) and conduction (from thepan on the bottom of the cube) are as follows:

8

Page 9: The Perfect Brownie Pan - University of Washingtonstudents.washington.edu/.../The_Perfect_Brownie_Pan...The pan and the brownies are perfect black-bodies Seventh The temperature and

4.2.3 Heat Transfer for a Single Brownie Cube

Figure 4: Diagram of Heat Transfer

Figure 4 shows how the heat is transferred onto one cube from multiplesources

Qtop = ∆t∆x2σT 4O (14)

Qbottom = ∆t∆x22kbTp − Tm

h(15)

Qside,j = ∆thkb (Tside,j − Tm) (16)

Sinceccube = cbρb∆x

2h (17)

Q = ccube ∗∆T (18)

the equation for the change in temperature for one cube from the top and bottomis:

∆T1 =∆t∆x2

ccube

(σT 4

O + 2kbTp − Tm

h

)(19)

and the equation for the change in temperature for one cube from its neighboringcubes is:

∆T2 =∆tkbh

ccube

4∑j=1

(Tside,j)− 4Tm

(20)

Combine them together to get the net change in temperature for one browniecube:

Tm+1 = Tm + ∆T1 + ∆T2 (21)

T0 = TR (22)

We split the mixture into a 200x200 matrix of these cubes, and calculate thischange in temperature for each cube for m = 1200, or 20 minutes (the averagebaking time for a brownie recipe). [2] [3]

9

Page 10: The Perfect Brownie Pan - University of Washingtonstudents.washington.edu/.../The_Perfect_Brownie_Pan...The pan and the brownies are perfect black-bodies Seventh The temperature and

4.2.4 Average Variance

In order to assign a particular number for a heat distribution to be describedby, we decide to use the average standard deviation of the temperature over thewhole time period. The average standard deviation is defined as the square rootof the average variance:

σT =

√√√√√ tf∑m=0

σ2Tm

tf(23)

This number increases approximately linearly as the n value increases, thenplateaus at around n > 8.

4.2.5 Normalize

Similarly to the other scores, we then normalize this score using (5), because anincrease in average variance means that the heat is not as well distributed, whichgoes against our desired characteristic. Thus we use the ”inverse” normalizationfunction to make low variances higher valued.

4.3 Perimeter Score

We developed a third score, the Perimeter score, as a response to the length oftime it took to run the heat simulation. We assume that the strength of theHeat Score is dependent only on one factor, the perimeter of the superellipse.This is a logical assumption because brownies typically only burn at the edgesand corners, and so if the area is fixed, then the minimal perimeter would havethe best Heat Score. We will verify if this is true by comparing it to the HeatScore and seeing if it is a decent approximation. Finding the Perimeter Scoreis fairly straightforward, after finding a and b during the Area Score part, wesimply need to find the arc length of the superellipse to get the perimeter:

4 ∗∫ a

0

√√√√1 +

b2

a2

(xn

an − xn

) 2(n−1)n

dx (24)

We can solve this using numerical integration software.

4.3.1 Normalize

This perimeter value is then normalized using (5), because as perimeter in-creases, the heat is not as well distributed, which goes against our desiredcharacteristic. Thus we use the ”inverse” normalization function to make lowvariances higher valued.

10

Page 11: The Perfect Brownie Pan - University of Washingtonstudents.washington.edu/.../The_Perfect_Brownie_Pan...The pan and the brownies are perfect black-bodies Seventh The temperature and

5 Verification

After running the simulation and obtaining our results, we find that the perfectshape of the brownie is given by n = 3.3. The shape of this pan and the plotof the scores are shown in Figures 6 and 5, respectively. Figure 7 shows thesimulation of the heat distribution over time for n = 3.3 in a 3D plot and a 2Dcontour plot.

Figure 5: Area Scores(Blue), Heat Scores(Orange), and Perimeter Scores(Red)

Figure 6: The Shape of the Pan

11

Page 12: The Perfect Brownie Pan - University of Washingtonstudents.washington.edu/.../The_Perfect_Brownie_Pan...The pan and the brownies are perfect black-bodies Seventh The temperature and

(a) t = 8 (b) t = 8

(c) t = 32 (d) t = 32

(e) t = 56 (f) t = 56

(g) t = 80 (h) t = 80

Figure 7: Temperature Graphs (t in minutes)

12

Page 13: The Perfect Brownie Pan - University of Washingtonstudents.washington.edu/.../The_Perfect_Brownie_Pan...The pan and the brownies are perfect black-bodies Seventh The temperature and

5.1 Perimeter Perspective

As you can see in Figure 5, the perimeter and the heat score are somewhatsimilar in their distribution, and the heat score moves closer to the perimeterscore as ∆x is decreased. And if the perfect n is recalculated using perimeterinstead, we find n = 3.3 again. Therefore we conclude that the perimeter scoreis a suitable approximation for the heat score. For future tests then, we woulduse the perimeter instead of our simulation because finding the perimeter isorders of magnitude faster than finding the heat distributions.

6 Discussion

The true goal of modelling some situation is that in the future, the modelcould be used instead of doing any actual physical experiment. In order toassess whether our model meets these goals, we look at the predictive powerof the model, and the model’s behavior under changes in the initial conditionsor constants. After coming to a conclusion about these characteristics, we willthen assess what are the weaknesses and strengths of our model, and what wewould change if we were to do this again.

6.1 Predictive Power

The model’s predictive power is relatively strong as long as the assumptionsmade under section 3 are used. For any given value of n, we can see how manybrownie pans will fit in the oven, and what the temperature distribution acrossthe pan will be; however, beyond the realm of superellipses, we would need toadjust our model to allow other shapes to be analyzed in the same way. Thechanges would be minimal though, because regardless of the shape, the AreaScore and the Heat Score or even the Perimeter Score would still yield similarresults, and could still be used to find the maximum point of a shape. A possibleextension to this model would be to change the assumed perfect shape of thepan to instead have the form of the superformula:

r(ϕ) =

(∣∣∣∣∣cos(mϕ4

)a

∣∣∣∣∣n2

+

∣∣∣∣∣sin(mϕ4

)b

∣∣∣∣∣n3)− 1

n1

(25)

This equation allows for many more various shapes, and would be a much moregeneral solution of this problem. If we used this formula, it would becomealmost infeasible to test all of the shapes possible, but we would instead relywholly on an analytical solution, by finding the maximum of the perimeter andthe minimum of the dimensions. Due to the amount of time it takes to producea Heat Score and the difficulty of solving a partial differential equation for anygiven boundary conditions, we would focus on perimeter instead.

13

Page 14: The Perfect Brownie Pan - University of Washingtonstudents.washington.edu/.../The_Perfect_Brownie_Pan...The pan and the brownies are perfect black-bodies Seventh The temperature and

6.2 Changes in Initial Conditions

Our model does not handle changes in the initial conditions well. The AreaScore is highly sensitive to changes in W , L, A, and d. By changing thosevalues we saw behavior that varied from a constant function (every shape tookup the same number of pans in the oven, this happens when the size of theoven is too small compared to the area of the pan, so that minute changes inthe dimensions of the pan don’t help as much) to a function with a large gap(when d was large enough that a slightly smaller pan size allowed it to fit onemore pan in, and cause a large jump in the graph). To make the Area Scoremore noticeable, we increased the size of a standard oven by a factor of 7, or inother words turned it into an industrial sized oven, and this produced a muchmore dynamic Area Score. The Heat Score is also sensitive to changes, the mostdramatic of which is changing ∆x, the size of the cubes. If this value gets toolarge (> 0.001) the average variance actually decreases as n increases, whichproduces a curve in the exact opposite shape. In order for our model to be themost correct, the limit should be taken as lim∆x→0 SH . The same thing alsoapplies to ∆t, and it should also be as close to 0 as possible. In this way, ourmodel is sensitive to changes in the initial conditions, and thus will not adaptwell to different parameters.

6.3 Simulation Error

Another note to add is that our Heat Score simulation stops at t = 1200 sec-onds, or equivalently 20 minutes; however, in section 5 it is noticeable that theequilibrium occurs after 80 minutes. We had tested this before, and the lengthof time observed changed the variances (in relation to each other) very little,so for the sake of the time it would take to simulate until equilibrium we short-ened it to be until a normal brownie baking time. One possible reason that theoven took so long was because under the Twelfth Assumption, we consideredconvection currents caused in the oven to be negligible, but they could accountfor a much larger percentage of the heat transfer than we realized. We wouldprobably include convection currents if we were to do this model again.

14

Page 15: The Perfect Brownie Pan - University of Washingtonstudents.washington.edu/.../The_Perfect_Brownie_Pan...The pan and the brownies are perfect black-bodies Seventh The temperature and

A Simulation Analysis

In our numerical simulation in MATLAB, we have to consider any possiblesources of error. One of the largest possible sources is numerical instability.Our simulation creates 2 200x200 matrices (one for current and one for thelast temperature) and runs operations on it m = 1200 times. This meansthat the simulation is O(ijm) (i is the number of rows in one matrix, j is thenumber of columns in one matrix, and m is the number of times to iterateover). Since this is a large number of calculations (due to ∆x and ∆t beingclose to 0), the chance for error is non-negligible. In the calculation of thetemperature change from the side cubes (20), we are subtracting two very similarnumbers, Tside,j − Tm and summing those 4 differences. Subtraction of verysimilar numbers creates numerical instability; however, we could not see a wayto mitigate these subtractions. Another possible source is when we compute theaverage variance (23), we subtract the sum of squares and the square of sumsover m, which are two large numbers being subtracted from each other that arerelatively close in magnitude, so there could be some instability there as well.

B Analytical Solution

An analytical solution exists for the brownies if we simplify the model more. Ifwe assume that the pan reaches the oven temperature almost instantly (plausiblegiven the thermal diffusivity, α2, of aluminum pans is much greater than thethermal diffusivity for chocolate brownies), and that the change in temperaturefrom the oven emitting radiation on the top of the brownies directly is negligible(because it hits all brownies evenly, it does not affect the distribution). Underthese assumptions, this is the partial differential equation we came up with todescribe the analytic solution:

α2b(Txx + Tyy) = Tt (26)

Subject to the following boundary and initial conditions:

T

(x, b n

√1− xn

an, t

)= TO (27)

T (x, y, 0) = TR (28)

Unfortunately, we do not know of a way to solve this equation, and the under-lying assumptions are questionable, so we decided not to pursue this route.

15

Page 16: The Perfect Brownie Pan - University of Washingtonstudents.washington.edu/.../The_Perfect_Brownie_Pan...The pan and the brownies are perfect black-bodies Seventh The temperature and

References

[1] The ultimate brownie pan. Mathematical Contest in Modeling, 2013.

[2] R. Byron Bird, Warren E. Stewart, and Edwin N. Lightfoot. TransportPhenomena. John Wiley Sons, Inc, 1960.

[3] H. S. Carslaw and J. C. Jaeger. Conduction of Heat in Solids. OxfordUniversity Press, 1959.

16