me201/mth281/me400/che400 coffee cup oscillations · in the present case, we consider water waves...

12
ME201/MTH281/ME400/CHE400 Coffee Cup Oscillations 1. Introduction In this notebook, we study the modes of coffee oscillating in a coffee cup. These motions are an instance of what are called water waves in fluid dynamics. Such waves are likely to be seen whenever we have a liquid with a free surface in the presence of gravity. At equilibrium the free surface of the liquid coincides with a gravitational equipotential surface. When the surface is perturbed, an oscillation is set up in which the energy cycles between kinetic energy and gravitational potential energy. If the amplitude of the surface oscillations is small (the only case we consider here), the motions may be described by a linear theory. The most unusual aspect of this theory is that the governing equation is not a wave equation, but rather the Laplace equation, which normally serves as a model for equilibrium and not wave motion. The basic quantity in the theory is the velocity potential F, defined so that the fluid velocity V at any point is given by (1) V = F . The existence of such a potential is a point developed at length in basic courses in fluid dynamics. We take it as a given here. 2. Governing Equations In the present case, we consider water waves in a coffee cup -- a cylindrical container of circular cross section, with symmetry axis parallel to gravity. Let the radius of the cup be a, and let h be the equilibrium height of the coffee in the cup. Then the governing Laplace equation in cylindrical coordinates (r, q, z) is (2) 1 r r r F r + 1 r 2 2 F q 2 + 2 F z 2 = 0, 0 < r < a,0 §q § 2 p, and 0 < z < h , where z = 0 is the rigid bottom of the cup, z = h is the upper free surface of the coffee, and r = a is the rigid side of the cup. The boundary conditions on the bottom and side of the cup come from the physical fact that the fluid cannot flow into a rigid surface. Thus the normal component of velocity must vanish on those surfaces. Hence (3) F z Hr, q, 0, tL = 0, and F r Ha, q, z, tL = 0. The condition on the upper free surface is somewhat more involved, and it comes from both a kinematical analysis of the surface motion, and the time-dependent version of the famous Bernoulli equation. After some analysis, the condition may be put into the following form: (4) 2 F t 2 Hr, q, h, tL + g F z Hr, q, h, tL = 0. What a curious problem! First we have a wave governed by the Laplace equation, and then we have the time-depen- dence entering through a boundary condition. There is one additional quantity of importance, and this is the deviation of the perturbed free surface from the equilibrium free surface at z = h. We denote this height deviation by h(r, q, t). It may be calculated, once the potential F is known, from the formula

Upload: others

Post on 25-Jun-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ME201/MTH281/ME400/CHE400 Coffee Cup Oscillations · In the present case, we consider water waves in a coffee cup -- a cylindrical container of circular cross section, with symmetry

ME201/MTH281/ME400/CHE400Coffee Cup Oscillations

1. IntroductionIn this notebook, we study the modes of coffee oscillating in a coffee cup. These motions are an instance of

what are called water waves in fluid dynamics. Such waves are likely to be seen whenever we have a liquid with afree surface in the presence of gravity. At equilibrium the free surface of the liquid coincides with a gravitationalequipotential surface. When the surface is perturbed, an oscillation is set up in which the energy cycles betweenkinetic energy and gravitational potential energy. If the amplitude of the surface oscillations is small (the only case weconsider here), the motions may be described by a linear theory. The most unusual aspect of this theory is that thegoverning equation is not a wave equation, but rather the Laplace equation, which normally serves as a model forequilibrium and not wave motion. The basic quantity in the theory is the velocity potential F, defined so that the fluidvelocity V at any point is given by

(1)V = !F .

The existence of such a potential is a point developed at length in basic courses in fluid dynamics. We take it as agiven here.

2. Governing EquationsIn the present case, we consider water waves in a coffee cup -- a cylindrical container of circular cross section,

with symmetry axis parallel to gravity. Let the radius of the cup be a, and let h be the equilibrium height of the coffeein the cup. Then the governing Laplace equation in cylindrical coordinates (r, q, z) is

(2)1

r

¶∂

¶∂rr¶∂F

¶∂r+

1

r2¶∂2F

¶∂q2+

¶∂2F

¶∂z2= 0 , 0 < r < a, 0 § q § 2 p, and 0 < z < h ,

where z = 0 is the rigid bottom of the cup, z = h is the upper free surface of the coffee, and r = a is the rigid side of thecup. The boundary conditions on the bottom and side of the cup come from the physical fact that the fluid cannot flowinto a rigid surface. Thus the normal component of velocity must vanish on those surfaces. Hence

(3)¶∂F

¶∂zHr, q, 0, tL = 0, and

¶∂F

¶∂rHa, q, z, tL = 0.

The condition on the upper free surface is somewhat more involved, and it comes from both a kinematicalanalysis of the surface motion, and the time-dependent version of the famous Bernoulli equation. After some analysis,the condition may be put into the following form:

(4)¶∂2F

¶∂ t2Hr, q, h, tL + g

¶∂F

¶∂zHr, q, h, tL = 0 .

What a curious problem! First we have a wave governed by the Laplace equation, and then we have the time-depen-dence entering through a boundary condition.

There is one additional quantity of importance, and this is the deviation of the perturbed free surface from theequilibrium free surface at z = h. We denote this height deviation by h(r, q, t). It may be calculated, once the potentialF is known, from the formula

Page 2: ME201/MTH281/ME400/CHE400 Coffee Cup Oscillations · In the present case, we consider water waves in a coffee cup -- a cylindrical container of circular cross section, with symmetry

(5)h Hr, q, tL = -1

g

¶∂F

¶∂ tHr, q, h, tL .

3. Normal Modes of OscillationWe look for normal modes of oscillation -- i.e., standing waves with pure sinusoidal time dependence. Thus

we try(6)F Hr , q, z, tL = cos HwtL Y Hr, q, zL .

Then Y satisfies

(7)1

r

¶∂

¶∂rr¶∂Y

¶∂r+

1

r2¶∂2Y

¶∂q2+

¶∂2Y

¶∂z2= 0 , 0 < r < a, 0 § q § 2 p, and 0 < z < h ,

(8)¶∂Y

¶∂zHr, q, 0L = 0, and

¶∂Y

¶∂rHa, q, zL = 0,

and, from equation (4),

(9)-w2 Y Hr, q, hL + g¶∂Y

¶∂zHr, q, hL = 0 .

As we shall see, this last equation determines the frequencies of the modes.

As discussed in class, the problem specified by equations (7) and (8) may be solved by separation of variables.The result (after a straightforward but lengthy analysis) is

(10)Yn,m Hr, q, zL = Jm IanHmL r êaM 8Am cos HmqL + Bm sin HmqL< cosh IanHmL z êaM .

Here anHmL is the nth positive root of Jm£ = 0. The functions in equation (10) satisfy equation (7) and the boundaryconditions (8). By substituting this solution for Y into equation (9), we get an equation determining the frequency ofthe mode:

(11)wn,m2 =

ganHmL

atanh IanHmL h êaM .

The quantity wn,m is the angular frequency in radians per second. The linear frequency is n = w/2p, so the linearfrequencies in Hz are

(12)nn,m =1

2 p:

ganHmL

atanh IanHmL h êaM>

1ê2.

4. Modal FrequenciesWe are now going to evaluate the frequencies of the lower modes for a particular coffee cup. We will need the

zeros of the derivatives of the Bessel functions. This capability was available in Mathematica 5, but is not directlyavailable in Mathematica 7. Mathematica 7 does have a built-in function to give zeros of the Bessel function itself,but not zeros of the derivative. The built-in function is BesselJZero[m,n] which returns the nth positive zero of Jm.We use this to construct a function BesselJPrimeZero[m,n] which returns the nth zero of Jm. The code for this isannotated and tested elsewhere (in the notebook derbesszer.nb), so we just include the code without annotation here.

2 coffee-1.nb

Page 3: ME201/MTH281/ME400/CHE400 Coffee Cup Oscillations · In the present case, we consider water waves in a coffee cup -- a cylindrical container of circular cross section, with symmetry

In[1]:= BesselJPrimeZero@m_, n_D := ModuleB8left, right, z<,

right = N@BesselJZero@m, nDD; WhichBHn > 1L, Hleft = N@BesselJZero@m, n - 1DD;

Re@z ê. Flatten@FindRoot@D@BesselJ@m, zD, zD ã 0, 8z, left, right<DDDL,

Hn == 1L, JIfBHm == 0L, H0.0L, JIfBHm < 0.5L, Jleft = m N, Hleft = 0.5 * rightLF;

Re@z ê. Flatten@FindRoot@D@BesselJ@m, zD, zD ã 0, 8z, left, right<DDDNFNFF

Now we set some parameter values. My favorite coffee cup has a radius ofIn[2]:= a = 0.04; H** cup radius in m **L

The height of the coffee in my full cup isIn[3]:= h = 0.08; H** coffee height in m **L

The acceleration of gravity isIn[4]:= g = 9.81; H** gravity in m^2ês **L

The modal frequency in Hz for a given a isIn[5]:= n@a_D := H1 ê H2 * pLL * Sqrt@Hg * a ê aL * Tanh@a * h ê aDD

Now we will calculate the first five frequencies (n = 1, 2, 3, 4, 5) for each of the first five angular modes (m =0, 1, 2, 3, 4). We begin by arranging the 25 relevant a values in a matrix, with each row being the five roots for afixed m.

In[6]:= row1 = Table@BesselJPrimeZero@0, iD, 8i, 1, 5<D

Out[6]= 80., 3.83171, 7.01559, 10.1735, 13.3237<

In[7]:= row2 = Table@BesselJPrimeZero@1, iD, 8i, 1, 5<D

Out[7]= 81.84118, 5.33144, 8.53632, 11.706, 14.8636<

In[8]:= row3 = Table@BesselJPrimeZero@2, iD, 8i, 1, 5<D

Out[8]= 83.05424, 6.70613, 9.96947, 13.1704, 16.3475<

In[9]:= row4 = Table@BesselJPrimeZero@3, iD, 8i, 1, 5<D

Out[9]= 84.20119, 8.01524, 11.3459, 14.5858, 17.7887<

In[10]:= row5 = Table@BesselJPrimeZero@4, iD, 8i, 1, 5<D

Out[10]= 85.31755, 9.2824, 12.6819, 15.9641, 19.196<

The zero value for the first root when m = 0 is a real mode. The frequency is zero, so it is not an interestingwave mode, but it corresponds to a constant function in the Fourier-Bessel expansion, quite analogous to the constantterm in a cosine series.Now we form the a matrix of roots.

In[11]:= amat = 8row1, row2, row3, row4, row5<

Out[11]= 880., 3.83171, 7.01559, 10.1735, 13.3237<, 81.84118, 5.33144, 8.53632, 11.706, 14.8636<,83.05424, 6.70613, 9.96947, 13.1704, 16.3475<,84.20119, 8.01524, 11.3459, 14.5858, 17.7887<, 85.31755, 9.2824, 12.6819, 15.9641, 19.196<<

Then to get the nth root of Jm£, we type amat[[m+1,n]]. For example, the second root of J3£ isIn[12]:= amat@@4, 2DD

Out[12]= 8.01524

Note that we have to shift the m-value by 1, because the m's start at zero and the first row of the matrix is row 1. Thisis a potential source of error later if we forget to carry out the shift, so we define a function now that lets us use theactual m-value.

coffee-1.nb 3

Page 4: ME201/MTH281/ME400/CHE400 Coffee Cup Oscillations · In the present case, we consider water waves in a coffee cup -- a cylindrical container of circular cross section, with symmetry

Note that we have to shift the m-value by 1, because the m's start at zero and the first row of the matrix is row 1. Thisis a potential source of error later if we forget to carry out the shift, so we define a function now that lets us use theactual m-value.

In[13]:= a@m_, n_D := amat@@m + 1, nDD

Now we use these roots to construct a table of frequencies (in Hz) of these 25 modes.In[14]:= TableForm@Table@Prepend@n@amat@@iDDD, i - 1D, 8i, 1, 5<D,

TableHeadings -> 8None, 8"m ", "n = 1", "n = 2", "n = 3", "n = 4", "n = 5"<<DOut[14]//TableForm=

m n = 1 n = 2 n = 3 n = 4 n = 50 0. 4.87889 6.60171 7.94985 9.097811 3.37986 5.75502 7.28215 8.52764 9.609182 4.35586 6.45447 7.86974 9.04531 10.07743 5.1087 7.05639 8.39546 9.51898 10.51234 5.74752 7.59372 8.87599 9.95857 10.9202

We see that for each m, the frequencies increase with n. It is interesting that the lowest nonzero frequency is for amode that is not radially symmetric -- for the m = 1, n = 1 mode (3.38 Hz). The second lowest frequency occurs forthe m = 2, n = 1 (4.36 Hz). The third lowest frequency is for the radially symmetric mode m = 0, n = 2 (4.88 Hz).Which of these modes are we likely to excite when we are walking? In answering this question, it helps to see whatthe modes look like.

In calculating the positions of nodal surfaces later, we will need also the roots of J, so we calculate and storethem now.

In[15]:= Jrootmat = 8N@Table@BesselJZero@0, iD, 8i, 5<DD, N@Table@BesselJZero@1, iD, 8i, 5<DD,N@Table@BesselJZero@2, iD, 8i, 5<DD,N@Table@BesselJZero@3, iD, 8i, 5<DD,N@Table@BesselJZero@4, iD, 8i, 5<DD<

Out[15]= 882.40483, 5.52008, 8.65373, 11.7915, 14.9309<,83.83171, 7.01559, 10.1735, 13.3237, 16.4706<,85.13562, 8.41724, 11.6198, 14.796, 17.9598<,86.38016, 9.76102, 13.0152, 16.2235, 19.4094<,87.58834, 11.0647, 14.3725, 17.616, 20.8269<<

Now we may use these to calculate the positions of nodal surfaces. We split the calculation into two parts. Thefunction rnodes[m,n] returns the r-nodal surfaces for the mode m,n, and thetanodes[m,n] returns the q-nodal surfaces.

In[16]:= rnodes@m_, n_D :=Module@8ans, i, node<, ans = 8<; Do@Hnode = Ha * Jrootmat@@m + 1, iDD ê a@m, nDL;

If@Hnode < aL, Hans = Append@ans, nodeDLDL, 8i, 1, n<D; ansD

In[17]:= thetanodes@m_, n_D := Module@8ans, i, node<, ans = 8<;Do@Hnode = HHi - 1 ê 2L ê mL p; ans = Append@ans, nodeDL, 8i, 1, 2 * m<D; ansD

5. Visualizing the Modes With Printed Graph SequencesWe will now look at some animated graph sequences for several modes, in order to study the mode shapes.

Because we are interested here in only the mode shapes, and not the actual frequencies (which we have alreadycalculated), we assign a scaled time dependence so that every mode goes like cos[t]. For each mode studied, we willconstruct a sequence of graphs equally spaced in time, and covering one period. We start by defining the mode shapesfor Mathematica. From equations (5) and (6) we see that the mode shape is specified simply by Y(r, q, z) evaluated atz = h. Thus the modal shape function, apart from an unimportant multiplicative constant, can be taken to be

In[18]:= modeshape@r_, q_, m_, n_D := BesselJ@m, a@m, nD * r ê aD * Cos@m * qD

Sometimes we wish to examine the radial profile for a mode, so we define a Plot command which will do that.The ability to do this will help us to identify nodal surfaces for a given mode. In plotting the profile, we normalize theamplitude at the outer edge (r = a) to 1.

4 coffee-1.nb

Page 5: ME201/MTH281/ME400/CHE400 Coffee Cup Oscillations · In the present case, we consider water waves in a coffee cup -- a cylindrical container of circular cross section, with symmetry

In[19]:= radmodeprofile@m_, n_D := Plot@HBesselJ@m, a@m, nD * r ê aD ê BesselJ@m, a@m, nDDL,8r, 0, a<, AxesLabel -> 8"r", "radial amplitude"<,PlotLabel Ø Row@8" Mode n = ", n, " , m = ", m<DD

To display and animate the mode shapes, we need some 3D graphics routines. We start by defining a functionwhich produces a single 3D plot for one of our modes.

In[20]:= modeplot[m_,n_,t_,num1_,num2_] := ParametricPlot3D[{r Cos[q],r Sin[q],(modeshape[r,q,m,n])*Cos[t]},{r,0,a},{q,0,2 Pi}, SphericalRegion->True, BoxRatios -> {2,2,1}, Boxed -> False, Axes -> False, PlotRange -> {{-a,a},{-a,a},{-1,1}}, PlotLabel -> Row[{" n = ",n," , m = ",m," Phase = ",TraditionalForm[HoldForm[num1/num2]]," p"}]]

Next we define two functions which graph the nodal curves in white. These will be superimposed on themodeplots, through the function nodegraphs. We raise these curves slightly (0.025) above z = 0. Otherwise, becauseof peculiarities in Mathematica's way of combining graphs, the nodal curves sometimes disappear even when they arenot hidden by the surface.

In[21]:= rnodegraph@r_D := ParametricPlot3D@8r * Cos@uD, r * Sin@uD, 0.025<, 8u, 0, 2 * Pi<,SphericalRegion -> True, BoxRatios -> 82, 2, 1<, Boxed -> False, Axes -> False,PlotStyle Ø 8RGBColor@1, 1, 1D, Thick<, PlotRange -> 88-a, a<, 8-a, a<, 8-1, 1<<D

In[22]:= thetanodegraph@q_D := ParametricPlot3D@8u * Cos@qD, u * Sin@qD, 0.025<, 8u, 0, a<,SphericalRegion -> True, BoxRatios -> 82, 2, 1<, Boxed -> False, Axes -> False,PlotStyle Ø 8RGBColor@1, 1, 1D, Thick<, PlotRange -> 88-a, a<, 8-a, a<, 8-1, 1<<D

In[23]:= nodegraphs@m_, n_D := Module@8ans, i, j, rad, thet, lr, lt, temp<, ans = 8<;rad = rnodes@m, nD; thet = thetanodes@m, nD; lr = Length@radD; lt = Length@thetD;Do@Htemp = rnodegraph@rad@@iDDD; ans = Append@ans, tempDL, 8i, 1, lr<D;Do@Htemp = thetanodegraph@thet@@jDDD; ans = Append@ans, tempDL, 8j, 1, lt<D; ansD

Finally, we define a function which will produce M graphs covering one period.In[24]:= modeseq@m_, n_, M_D :=

Module@8i, inc, graphnodes<, graphnodes = nodegraphs@m, nD; inc = 2 * Pi ê M;Do@Print@Show@8modeplot@m, n, i * inc, 2 * i, MD, graphnodes<DD, 8i, 0, M - 1<DD

If you do not want to see the nodal curves, then you can use the alternative modeseqsansnodes, defined below.In[25]:= modeseqsansnodes@m_, n_, M_D := Module@8i, inc<, inc = 2 * Pi ê M;

Do@Print@Show@modeplot@m, n, i * inc, 2 * i, MDDD, 8i, 0, M - 1<DD

We start by looking at the first non-constant radially symmetric mode, n = 2, m =0. We begin by looking at the radialprofile.

In[26]:= radmodeprofile@0, 2D

Out[26]=

0.01 0.02 0.03 0.04r

-2.5

-2.0

-1.5

-1.0

-0.5

0.5

1.0

radial amplitudeMode n = 2 , m = 0

We see that this radial function vanishes exactly once in the r-range [0,a], at approximately 0.025, and so there isexactly one nodal curve -- the circle r = 0.025. We can get a more accurate description of the nodal surfaces from ourroutine nodes defined earlier:

coffee-1.nb 5

Page 6: ME201/MTH281/ME400/CHE400 Coffee Cup Oscillations · In the present case, we consider water waves in a coffee cup -- a cylindrical container of circular cross section, with symmetry

In[27]:= rnodes@0, 2D

Out[27]= 80.0251045<

Now let's look at the oscillation sequence, choosing 16 graphs to cover one time period. The nodal curves appear inwhite. In the printed version of this notebook, the graphs are collected into a single cell, so only the first graph of eachsequence is shown.

In[28]:= modeseq@0, 2, 16D;

We can clearly see the single circular nodal curve. You can animate the sequence by selecting the graph groupand then using the Menu Option Graphics -> Rendering -> Animate Selected Graphics.

Now we look at the second radially symmetric mode, n = 2, m = 0. We expect two nodes, again circles. Let'sverify this by looking at the radial profile and calculating the nodal positions:

In[29]:= radmodeprofile@0, 3D

Out[29]=

0.01 0.02 0.03 0.04r

-1

1

2

3

radial amplitudeMode n = 3 , m = 0

6 coffee-1.nb

Page 7: ME201/MTH281/ME400/CHE400 Coffee Cup Oscillations · In the present case, we consider water waves in a coffee cup -- a cylindrical container of circular cross section, with symmetry

In[30]:= rnodes@0, 3D

Out[30]= 80.0137113, 0.0314732<

Now we construct the oscillation sequence.In[31]:= modeseq@0, 3, 16D;

For higher symmetric modes, we would get more circles as nodes -- for example, 3 for n = 3, m = 0. But it'stime to move on to the sloshing mode (sometimes called the seiching mode) that puts coffee on the floor and our shoesas we walk with cup in hand. This is the mode that has the lowest frequency, and it is defined by the modal numbers n= 1, m = 1. Let's check the nodes:

In[32]:= rnodes@1, 1D

Out[32]= 8<

In[33]:= thetanodes@1, 1D

Out[33]= :p

2,3 p

2>

Thus there is a single nodal line coinciding with the y-axis. Now we look at the oscillation sequence. In[34]:= modeseq@1, 1, 16D;

coffee-1.nb 7

Page 8: ME201/MTH281/ME400/CHE400 Coffee Cup Oscillations · In the present case, we consider water waves in a coffee cup -- a cylindrical container of circular cross section, with symmetry

In this mode, the free surface remains very nearly plane, and the coffee is just sloshing back and forth. This mode ishighly likely to be excited if the cup is oscillated back and forth in a horizontal plane, which is essentially whathappens when we walk while holding the cup. Just how flat is this free surface? We get a visual answer by plottingthe radial profile and the chord.

In[35]:= Show@radmodeprofile@1, 1D, Plot@r ê 0.04, 8r, 0, 0.04<DD

Out[35]=

0.01 0.02 0.03 0.04r

0.2

0.4

0.6

0.8

1.0

radial amplitudeMode n = 1 , m = 1

We see that the free surface doesn't deviate much from a plane.

Let's look now at the next radial mode for this m -- that is, n = 2, m = 1. We start by locating the nodes.In[36]:= rnodes@1, 2D

Out[36]= 80.028748<

8 coffee-1.nb

Page 9: ME201/MTH281/ME400/CHE400 Coffee Cup Oscillations · In the present case, we consider water waves in a coffee cup -- a cylindrical container of circular cross section, with symmetry

In[37]:= thetanodes@1, 2D

Out[37]= :p

2,3 p

2>

Thus one nodal circle and one nodal line. Now we construct the oscillation sequence.In[38]:= modeseq@1, 2, 16D;

These higher modes, although interesting in appearance, are less likely to be seen in a coffee cup because they areharder to excite. Modes even higher than this are visually very interesting, although not of importance in the problemof why you spill your coffee. With a styrofoam cup, it is not too difficult to excite higher modes. If you slide the cuphorizontally on a smooth surface, and at the same time exert a small downward force on the cup, you can produce astick-slip friction between the cup and the table as the cup slides. This in turn excites waves in the cup with thefrequency of the stick-slip. Because this is generally a high frequency compared to the frequencies of the first fewmode, you generate a higher mode. Let's look at one of these higher modes -- say m = 4, n = 5. Such a mode has 8nodal curves:

In[39]:= rnodes@4, 5D

Out[39]= 80.0158123, 0.0230562, 0.029949, 0.0367075<

In[40]:= thetanodes@4, 5D

Out[40]= :p

8,3 p

8,5 p

8,7 p

8,9 p

8,11 p

8,13 p

8,15 p

8>

Thus there are four circles and four lines as nodal curves. That tells us the graph is going to be rather complicated.

Because there is much detail, we also omit the nodal surfaces for clarity. In[41]:= modeseqsansnodes@4, 5, 16D;

coffee-1.nb 9

Page 10: ME201/MTH281/ME400/CHE400 Coffee Cup Oscillations · In the present case, we consider water waves in a coffee cup -- a cylindrical container of circular cross section, with symmetry

6. Visualizing the Modes With ManipulateThe graph sequences in produced in the last section give very smooth movies, and also easily can be exported

as a Quicktime movie. However, movie displays are a little more convenient in a Manipulate panel. In this section wemodify the two sequencing routines modeseq and modeseqsansnodes to send their output to a manipulate panel. Wecall the new routines manmodeseq and manmodeseqsansnodes. They are defined below.

In[42]:= manmodeseq@m_, n_, M_D := DynamicModule@8i, inc, graphnodes, mangraph, k<, graphnodes = nodegraphs@m, nD; inc = 2 * Pi ê M;Do@mangraph@iD = Show@8modeplot@m, n, i * inc, 2 * i, MD, graphnodes<D, 8i, 0, M - 1<D;Manipulate@mangraph@kD, 8k, 0, M - 1, 1<DD

In[43]:= manmodeseqsansnodes@m_, n_, M_D := DynamicModule@8i, inc, mangraph, k<,inc = 2 * Pi ê M; Do@mangraph@iD = Show@modeplot@m, n, i * inc, 2 * i, MDD, 8i, 0, M - 1<D;Manipulate@mangraph@kD, 8k, 0, M - 1, 1<DD

We try them for two of the sequences we considered in section 5.

10 coffee-1.nb

Page 11: ME201/MTH281/ME400/CHE400 Coffee Cup Oscillations · In the present case, we consider water waves in a coffee cup -- a cylindrical container of circular cross section, with symmetry

In[44]:= manmodeseq@0, 2, 16D

Out[44]=

k

coffee-1.nb 11

Page 12: ME201/MTH281/ME400/CHE400 Coffee Cup Oscillations · In the present case, we consider water waves in a coffee cup -- a cylindrical container of circular cross section, with symmetry

In[45]:= manmodeseqsansnodes@4, 5, 16D

Out[45]=

k

5

While the process works, the results are not quite as smooth as the earlier animation. Manipulate is sloweddown by the need to render the graphs as the display proceeds. The performance of manipulate for this particulardisplay is considerable better in Mathematica 8 than in earlier versions.

12 coffee-1.nb