BBQ Done When?
https://news.ycombinator.com/item?id=39666186Question:
Roasting cooking pork shoulder for BBQ and want to know when it will be done.
Why Care:
The usual approach to cooking BBQ is "low and slow". So, with oven temperature of 210 F (which is "low") the cooking time to reach a BBQ recommended internal meat temperature of 180 F might be 20 hours ("slow").
So, after a few hours of cooking noting, say, two times and internal meat temperatures and considering other activities, sleeping, etc., can want to know how many more hours will be needed to reach the 180 F.
So, made a physics assumption, did some math derivations, and wrote the simple software for the arithmetic. The physics assumption ignores the temperature stall sometimes seen in BBQ cooking.
Details:
At what we can call time 0, the internal temperature was 155 F.
At time 157 minutes, the internal temperature was 170 F.
Answer: At 300 minutes the temperature should be 180.071 F.
So, we start with the oven temperature and the internal meat temperature at two times so far, and from that data we can find the internal meat temperature at any time.
The physics and math:
Y -- oven temperature (F)
t -- time (minutes)
y(t) -- internal meat temperature
(F) at time t
Physics:At time t (minutes) the rate of temperature increase is directly proportional to the difference between the oven temperature and the internal meat temperature. So, with constant of proportionality k, we have
y'(t) = k*(Y - y(t))
That is a first order, linear, ordinary
differential equation.Math Solution:
For some constants k and c, the solution is:
y(t) = Y - e^(-k*t + c)
To simplify the notation, we have
quantities a1 and a2 defined below. The
two times are t1 and t2. Then we have the
values of k and c: k = (a2 - a1) / (t1 - t2)
c = a1 + t1*k
The arithmetic in simple (Rexx
programming) syntax: The oven temperature:
Y = 210
Time in minutes of the first meat
internal temperature measurement:
t1 = 0
The first temperature (F):
y1 = 155
Taking the natural logarithm, that
is, base e = ~2.71828
a1 = RxCalcLog(Y - y1)
Second time (minutes):
t2 = 157
The second temperature (F):
y2 = 170
a2 = RxCalcLog(Y - y2)
So using the t1, t2, a1, a2 from
above we have k and c:
k = (a2 - a1) / (t1 - t2)
c = a1 + t1 * k
For a Do-End loop to find many
time-temperature pairs, our time
step (minutes):
dt = 60
s = ' Time (minutes) Temperature (F)'
Say s
Do j = 0 to 22
t3 = j * dt
Taking e^(-k t3 + c) we get our
desired temperature y3 at each of the
times t3:
y3 = Y - RxCalcExp(-k*t3 + c)
Say Format( t3, 18) Format( y3, 14, 3)
End
From the output of the Do j = 0 to 22
we get at 300 minutes the temperature will
be 180.071 F.