In a recent paper,1 Smith and Matlis presented an interesting experiment about fluid oscillations in a drinking straw. They employed an approach using only Newton's second law, making it considerably simpler than the fluid mechanics-based solution given by a previous study.2 This paper offers an alternative approach—one using Lagrangian mechanics. It involves a modified form of the well-known Euler–Lagrange equation needed to accurately account for non-conservative forces and variable masses. This is pedagogically valuable as physics undergraduate students are generally less familiar with the modified forms.

Consider the setup shown in Fig. 1. If a straw is capped with a finger and immersed in a liquid bath up to a depth d and then the cap is suddenly released, the liquid rushes into the straw until it reaches its maximum height. The liquid level inside the straw z then undergoes a damped oscillation until it eventually settles to the level of the liquid bath. The question of how z varies with time, therefore, arises. In this paper, we will derive, using Lagrangian mechanics, the equation presented in Ref. 1 that models how z varies with time.

The Euler–Lagrange equation is widely known among undergraduates as

$ddt(∂L∂q̇i)=∂L∂qi,$
(1)

where $L≡T−V$ is the Lagrangian, which is defined as the difference between the kinetic energy T and the potential energy V, and qi is a generalized coordinate.

Less familiar, however, are the modified forms that account for non-conservative forces, such as friction and/or variable masses. This is both unsurprising and undesirable, because such forms are often omitted from physics textbooks, leading some students to falsely assume that the Lagrangian method does not apply at all to those systems.4

To properly incorporate non-conservative forces and variable masses, Eq. (1) must be modified into

$ddt(∂T∂q̇i)−∂T∂qi=Qqi,$
(2)

as given in Ref. 5. In the above equation, $Qqi$ is the sum of the generalized forces for variable qi, which act on the system, and it includes the momentum flux term

$Mqi=ṁu−12∂m∂qiv2,$
(3)

where m is the variable mass, u is the speed of the mass entering the system (liquid column in the straw), and v is the speed of the variable mass.5 The first term $ṁu$ is a reactive force, which arises from the accretion or excretion of mass by a system. The second term $(v2/2)(∂m/∂qi)$ describes the momentum flux force that originates from the mass's explicit dependence on position. These momentum flux forces are mathematically derived from D'Alembert's principle of virtual work and are discussed in greater depth by Pesce.6,7

Modelling the oscillation requires the use of the extended Euler–Lagrange equation, because the mass of the liquid in the drinking straw varies explicitly with position and a velocity-dependent damping force acts on the liquid during the oscillation. Here, qi is simply z, and the variable mass is given by $m=ρAz$. Thus, the kinetic energy T is given by

$T=12mż2=12ρAzż2,$
(4)

and the sum of the external generalized forces is

$Qz=Fg+Fpressure+Fdamping+Mz=−mg+ρgAd−b′ż+ṁu−12∂m∂zv2=−ρzAg+ρgAd−b′ż+ρżAu−12ρAv2,$
(5)

where ρ is the density of the liquid, A is the cross-sectional area of the straw, and $b′$ is the phenomenological damping coefficient.

The  Appendix shows that the fourth term of Eq. (5), $ρżAu$, is a second-order correction, which Smith and Matlis's model inherently neglected. Here, we also neglect this second-order term. This is equivalent to approximating the speed u that the liquid enters the straw as zero, after which that liquid is instantaneously accelerated to the speed of the liquid in the straw, v. Moreover, the speed v is equal to the time derivative $ż$. Hence, we have

$Qz=−ρzAg+ρgAd−b′ż−12ρAż2.$
(6)

Substituting Eqs. (4) and (6) into Eq. (2) yields

$ddt(ρAzż)−12ρAż2=−ρzAg+ρgAd−b′ż−12ρAż2ρAż2+ρAzz¨−12ρAż2=−ρzAg+ρgAd−b′ż−12ρAż2zz¨=−ż2−gz+gd−bż,$
(7)

where $b≡b′/ρA$. Dividing through by z, we obtain the equation

$z¨=−1z(ż2+gz−gd+bż),$
(8)

which describes the damped oscillations discussed in greater detail in Ref. 1.

Students could be asked to solve the differential equation above numerically to discover the damped oscillatory behaviour exhibited by this setup. This is a didactic task that would teach students a useful tool that is applicable to the study of many other physical phenomena. Furthermore, solving this problem using the Lagrangian formulation gives students the opportunity to apply the extended Euler–Lagrange equation and, therefore, better grasp the true power of the Lagrangian method.

Recall that Smith and Matlis1 modelled the oscillation with the equation

$dmdtż+mdżdt=−mg+ρgAd−b′ż.$
(A1)

Multiplying through by dt, we obtain

$ż dm+m dż=(−mg+ρgAd−b′ż) dt.$
(A2)

This  Appendix explains why this model inherently assumes that the mass enters the straw at speed u =0, which we have substituted into Eq. (5) to obtain Eq. (6).

Consider the mass m inside the straw and an infinitesimal mass dm entering the straw during the time interval t to t + dt. The forces acting on this system are the weight $Fg=−mg$, the force due to hydrostatic pressure at the bottom of the liquid in the straw $Fpressure=ρgAd$, and the velocity-dependent damping force $Fdamping=−b′ż$. From the impulse-momentum theorem, the change in momentum during the time interval t to t + dt is given by

$Δp=∑F dtpfinal−pinitial=(−mg+ρgAd−b′ż)dt.$
(A3)

Using $pinitial=mż$ and substituting Eq. (A2) into Eq. (A3), we obtain the final momentum

$pfinal=mż+ż dm+m dż.$
(A4)

Conversely, we can calculate $pfinal$ at time t + dt by using the mass m + dm inside the straw moving at velocity $ż+dż$, which gives $pfinal=(m+dm)(ż+dż)=mż+ż dm+m dż+ dmdż$. Neglecting the last term, which is second order, gives the same final momentum as Eq. (A4). This implies that the infinitesimal mass dm has speed u =0 at time t. Hence, Smith and Matlis' model assumes that the liquid enters the straw at speed u =0 and is instantaneously accelerated to speed $ż$.

Note that it does not matter whether we use m or m + dm when calculating $Fg$ and whether we use $ż$ or $ż+dż$ when calculating $Fdamping$. This is because the differences in momentum arising from these (dmdt and $dżdt$) are second order and can, therefore, be neglected.

1.
Ryan P.
Smith
and
Eric H.
Matlis
, “
Gravity-driven fluid oscillations in a drinking straw
,”
Am. J. Phys.
87
(
6
),
433
435
(
2019
).
2.
Élise
Lorenceau
, “
David Quéré, Jean-Yves Ollitrault, and Christophe Clanet, ‘Gravitational oscillations of a liquid column in a pipe’
,”
Phys. Fluids
14
(
6
),
1985
1992
(
2002
).
3.
Ref. 1.
4.
C.
Leubert
and
P.
Krumm
, “
Lagrangians for simple systems with variable mass
,”
Eur. J. Phys.
11
(
1
),
31
34
(
1990
).
5.
Mark
Denny
, “
A uniform explanation of all falling chain phenomena
,”
Am. J. Phys.
88
(
2
),
94
101
(
2020
).
6.
C. P.
Pesce
, “
The application of Lagrange equations to mechanical systems with mass explicitly dependent on position
,”
J. Appl. Mech.
70
,
751
756
(
2003
).
7.
C. P.
Pesce
and
L.
Casseta
, “
Variable mass system dynamics in engineering mechanics education
,” in
COBEM2007, 19th International Congress of Mechanical Engineering
,
Brasilia
,
Brazil (
2007
).