# Oscillation of Chocolate bar on soda [closed]

Why does a piece of chocolate bar oscillate in soda (i.e. floats then after a while sinks and vice versa)? What parameters does the period of oscillation rely on? Is there a specific formula that describes the period?

## closed as unclear what you're asking by Aaron Stevens, Kyle Kanos, GiorgioP, Yashas, JMacApr 25 at 17:12

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• What do you see? – M. Enns Apr 22 at 11:03
• My guess is you specific chocolate bar has a density just slightly above that of water causing it to slowly sink in water. Given you have soda, small bubbles can attach to the surface of the chocolate bar giving just enough bouyancy to counteract gravity and cause the chocolate bar to start floating. At the surface of the soda, most of the exposed bubbles on the chocolate bar pop causing the opposite effect and the bar sinks again. – nluigi Apr 22 at 13:25

## 1 Answer

This is basically an engine powered by pressure and gravity*. As nluigi pointed out, what happens is that bubbles form on the chocolate, make it buoyant, move it to the surface where they burst, the chocolate sinks, and the process repeats.

Can we specify the parameters and make a model? The most obvious ones are the density of the drink $$\rho_d$$, the chocolate $$\rho_c$$ and the bubbles $$\rho_b$$. The volume of the chocolate is $$V_c$$ and the bubbles $$V_b(t)$$. The force on the chocolate will be $$F=-g\left[(\rho_c-\rho_d)V_c + (\rho_b - \rho_d)V_b(t)\right] -kz'(t)$$ where $$k$$ is a drag term resisting the motion of the chocolate which is at depth $$z(t)$$ (the scale is so small here that the Reynolds number makes the drag linear rather than quadratic in velocity). Since $$\rho_d>\rho_b$$ the second term will push the chocolate upward, while first term will push it down if $$\rho_c>\rho_d$$.

We can turn this into an equation of motion by dividing by the mass of the chocolate $$\rho_cV_c$$: $$z''(t)=-g\left[\frac{\rho_c-\rho_d}{\rho_c} + \frac{\rho_b-\rho_d}{\rho_c}\frac{V_B(t)}{V_c}\right ] - kz'(t)$$

Were the bubble size constant this is basically the equation $$v'(t)=c-kv(t)$$ with solution $$v(t)=(c/k) - (A/k)\exp(-kt)$$ where $$A$$ is a constant set by the initial condition. For $$A=c$$ the chocolate starts from zero velocity, and after a short time ($$\approx 1/k$$) approaches terminal velocity $$c/k$$. Incidentally, this is very visible if you look at streams of bubbles from flaws in the glass: the distance between subsequent bubbles first increases as they accelerate, but then becomes constant as they reach terminal velocity.

How do the bubbles grow? This is not entirely trivial. Larger bubbles will have greater surface area to absorb carbon dioxide, and surface tension will be less strong. But they also crowd each other out, and as the chocolate rises the lower pressure will make them grow a bit (although the later effect is negligible in a normal glass). Following Peters above a linear radial growth over time might be reasonable, making $$V_b(t)=k_2 t^3$$ from the moment bubbles show up, and $$k_2$$ dependent on how carbonated the drink is, temperature, geometry etc.

Now we can make a simple dynamical system by taking the above equation for the acceleration and combine with the bubble growth. We still have to simplify the bubble release process. We can model it as a certain time $$T$$ to lose all bubbles. Now if we start time just as all bubbles are gone and the chocolate begins to sink, we have:$$z(0)=0,$$ $$z'(0)=0,$$ $$z''(t)=-g\left[\frac{\rho_c-\rho_d}{\rho_c} + \frac{\rho_b-\rho_d}{\rho_c}\frac{k_2 t^3}{V_c}\right ] - kz'(t).$$

$\rho_c= 1280$, $$\rho_d=1050$$ (Tonic Water), $$\rho_b =1.98$$, $$V_c = 10^{-7}$$, $$k=1.8850\cdot 10^{-4}$$, $$k_2=10^{-6}$$.">

Above, model trajectory with $$\rho_c= 1280$$ (medium chocolate), $$\rho_d=1050$$ (Tonic Water), $$\rho_b =1.98$$, $$V_c = 10^{-7}$$, $$k=1.8850\cdot 10^{-4}$$, $$k_2=10^{-6}$$.

At first the first term matters most, making the chocolate accelerate down. If $$k_2$$ is very small the piece would reach terminal velocity and eventually reach the bottom of the glass where it would come to rest. At some point the second term will become dominant, forcing the acceleration upwards. The third term will try to resist, again limiting speed. But eventually $$z(t)=0$$ and the bubbles get released, and a new cycle begins after time $$T$$.

The relevant equation in terms of velocity is $$v'(t)=\alpha+\beta t^3 -kv$$ where $$\alpha=-g\frac{\rho_c-\rho_d}{\rho_c}$$ and $$\beta=-g\frac{\rho_b-\rho_d}{\rho_c}\frac{k_2 }{V_c}$$. This has an explicit solution that can be integrated to give $$z(t)=\left(\frac{\alpha}{k}-\frac{6\beta}{k^4}\right )t +\frac{3\beta}{k^3}t^2 -\frac{\beta}{k^2}t^3 +\frac{b}{4k}t^4 +\left(\frac{6\beta}{k^4}-\frac{\alpha}{k}\right)e^{-kt}$$ (assuming I got the algebra right). This describes the orbit. The period of the oscillation is the first $$t>0$$ solution of the equation plus the surface delay $$T$$.

Unfortunately $$z(t)=0$$ by this formula has no closed form solution (it is nearly a quartic, so one can approximate using that complex formula), so one needs to solve it numerically. But we can see how it depends on the different densities and volumes, the carbonation level, plus the drag term through $$\alpha, \beta, k$$.

Period of the sinking and surfacing for different values of $$k_2$$. Note that for large values the period is short but the maximum depth achieved is very small; the chocolate is basically flopping near the surface rather than sinking.

• The work done comes from the pressure difference between the partial pressure of CO$$_2$$ in the drink and in the outside atmosphere (as pointed out by Daniel Sank), plus packing the soda deeper in the potential well as light carbon dioxide separates into bubbles and moves to the top, dragging the chocolate with it. We can estimate the work in blowing up a bubble as $$W_{pressure}=(p_{dCO2}-p_{aCO2})V_b$$ where $$p_{aCO2}=39$$ Pa is the atmosphere partial pressure and $$p_{dCO2}\approx 4p_{aCO2}$$ is the dissolved gas partial pressure. For $$V_B=10^{-7}$$ $$W_{pressure}=1.1700\cdot 10^{-5}$$ J. The work released by a bubble moving up is $$W_{gravity}=gz(\rho_d - \rho_b)V_b$$, which for a 10 cm glass is $$W_{gravity}=1.0292\cdot 10^{-4}$$ J. So for these assumptions gravity is doing more work, but this will not be true for a lower glass.
• Isn't it more accurate to say that the work comes from the evaporation of the dissolved CO2? – DanielSank Apr 22 at 17:45
• @DanielSank - I was thinking about this on my way home. Yes, the CO2 is doing work by pushing against the soda, powered by the vapour pressure difference. So there is the $PV_b$ work done on the bubble and the buoyancy $gzV_b(\rho_d-\rho_b)$. $P\approx 342.66$ kPa, so for $V_b\approx 10^{-7}$ m$^3$ the first is 0.0388 J, and the second (z=10cm) 1.0292e-04 J. So you are right, blowing up the bubble looks like the larger energy release. Will edit. – Anders Sandberg Apr 22 at 20:00
• @DanielSank - Did the update, but the new estimate of partial pressure I got let gravity win. Anybody know an authoritative measurement of the partial pressure of soft drinks? – Anders Sandberg Apr 22 at 20:19