×
The unified mathematical model
Now the glass and the graph run on exactly the same underlying law of nature: the Arrhenius equation.
1. The chemistry engine in the glass
For each frame (60 times a second) the chemical reaction rate is calculated from the water temperature in kelvin:
k(T) = 2000 · e-3242 / T
This determines exactly how much mass the tablet loses, and exactly how many gas bubbles are formed.
2. The buoyancy condition
The weight (mass) of the tablet is set to 100, and its initial volume is 40. As the reaction proceeds it loses mass and builds up gas volume. The tablet leaves the bottom and rises exactly when the volume exceeds the mass:
Vtotal(t) > Mass(t)
3. How the graph is calculated exactly from the simulation
Because we know the exact reduction and growth rates per frame, we can algebraically isolate the time it takes (before Volume > Mass). The mathematics shows that it requires a certain number of frames, which converted into seconds gives a waiting time of 0.625 / k(T).
To this we must add the "swim" itself to the surface. It takes 170 frames (2.83 seconds) to travel the distance in the glass. Inserting our Arrhenius expression k(T) here, we get the ultimate formula for the graph:
t(T) = [ 0.625 / (2000 · e-3242 / T) ] + 2.83
t(T) = 0.0003125 · e3242 / T + 2.83
If you set the temperature to 20 °C (293.15 K), the graph will calculate the result as 22.68 seconds. If you try the simulation, you will see the tablet break the surface at exactly 22.6 seconds. 100 % harmony!