Friday, November 20, 2015

The Mystery of the Flawed Homework Problem

When teaching PHY 325 (Biological Physics) this fall, I assigned my students homework from the 5th edition of Intermediate Physics for Medicine and Biology. One problem comes from Section 7.10 about Electrical Stimulation.
Problem 36. If the medium has a constant resistance, find the energy required for stimulation as a function of pulse duration.
The odd thing is, when I looked in the solution manual to review how to solve this problem, it contained answers to parts (a) and (b), and (b) is the most useful part. Where are (a) and (b)? Somehow when preparing the 5th edition, part (b) was left out (it is missing from the 4th edition too). Nevertheless, part (b) ended up in the solution manual (don’t ask me how). This is what Problem 36 should look like:
Problem 36. The longevity of a pacemaker battery is related to the energy required for stimulation.
(a) Find an expression for the energy U expended by a pacemaker to stimulate the heart as a function of the pulse duration t. Use the Lapicque strength-duration curve (Eq. 7.45), and assume the body and electrodes have a constant resistance R. Sketch a plot of energy versus duration.
(b) In general you want to stimulate using the least energy. Determine what duration minimizes the energy expended per pulse.
I don’t usually solve homework problems from the book in this blog, but because the interesting part of this problem was left out of IPMB I don’t think it will hurt in this case. Also, it provides readers with a sneak peak at the solution manual. Remember that Russ Hobbie and I will only send the solution manual to instructors, not students. So if you are teaching from IPMB and want the solution manual, by all means contact us. If you are a student, however, you had better talk to your instructor.
7.36 Issues such as pacemaker battery life are related to the energy required for electrical stimulation. This problem relates the energy to the strength-duration curve, and provides additional insight into the physical significance of the chronaxie.
(a) Let the resistance seen by the electrode due to the medium be R. The power is i2R. Therefore the total energy is
An equation giving the energy of a stimulation pulse.
 (b) The duration corresponding to minimum energy is found by setting dU/dt = 0. We get
An equation specifying the minimum energy of a stimulation pulse.
which reduces to t = tC. The minimum energy corresponds to a duration equal to the chronaxie.
In the 5th edition’s solution manual, each problem has a brief preamble (in italics) explaining the topic and describing what the student is supposed to learn. We also mark problems that are higher difficulty (*), that complete a derivation from the text (§), and that are new in the fifth edition (¶). Problem 7.36 didn’t fall into any of these categories. We typically outline the solution, but don’t always show all the intermediate steps. I hope we include enough of the solution that the reader or instructor can easily fill in anything missing.

One thing not in the solution manual is the plot of energy, U, versus duration, t. Below I include such a plot. The energy depends on the rheobase current iR, the chronaxie tC, and the resistance R.

The energy of a stimulus pulse as a function of pulse duration.
The energy of a stimulus pulse as a function of pulse duration.
I wonder if this change to Problem 7.36 should go into the IPMB errata? It is not really an error, but more of an omission. After some thought, I have decided to include it, since it was supposed to be there originally. You can find the errata at the book's website: https://sites.google.com/view/hobbieroth. I urge you to download it and mark the corrections in your copy of IPMB.

I hope this blog post has cleared up the mystery behind Problem 7.36. Yet, the curious reader may have one last question: why did I assign a homework problem to my students that is obviously flawed? The truth is, I chose which homework problems to assign by browsing through the solution manual rather than the book (yes, the solution manual is that useful). Problem 7.36 sure looked like a good one based on the solution manual!

Friday, November 13, 2015

Stokes' Flow around a Sphere

When working on the 5th edition of Intermediate Physics for Medicine and Biology, Russ Hobbie and I added a new homework problem about low Reynolds number flow. We ask the reader to analyze the classic example of “Stokes’ flow” or “creeping flow” around a sphere.
Problem 46. Consider a stationary sphere of radius a placed in a fluid of viscosity η moving uniformly with speed V. For low Reynolds number flow, the radial and tangential components of the fluid velocity and the pressure surrounding the sphere are
Equations giving the velocity and pressure around a sphere during Stokes' flow.
(a) Show that the no-slip boundary condition is satisfied.
(b) Integrate the shear force and the pressure force over the sphere surface and find an expression for the net drag force on the sphere (Stoke’s law). What fraction of this force arises from pressure drag, and what fraction from viscous drag?
(Everywhere else in our book we correctly write “Stokes’ law” since the law is named after Sir George Stokes, but in this problem we slip up and write “Stoke’s law”. Sorry. I noted this in the errata available on the book website.)

After solving this problem, the reader is probably thinking “this is all well and nice, and I understand now how you get Stokes’ law from the pressure distribution and the viscous drag, but where in the world did you get those weird velocity and pressure distributions?”

First, this example applies to a sphere in water, and water is nearly incompressible. Problem 1.35 shows that incompressibility implies that the velocity u has zero divergence,
An equation indicating that the divergence of the velocity is zero, the condition for incompressibility.
The reader should pause now, look up the expression for the divergence in spherical coordinates, and verify that the given velocity really is divergenceless.

Second, the equation describing flow is the Navier-Stokes equation, which is really nothing more than Newton’s second law (F=ma) applied to the fluid. Problem 1.28 provides some insight by deriving a simplified form of the Navier-Stokes equation
A one dimensional version of the Navier-Stokes equation for fluid flow. 
If we assume a low Reynolds number, we can ignore the two terms on the left-hand side of this equation because they are “inertial” terms arising from the acceleration of the fluid. The two terms on the right-hand side can be generalized to three dimensions, with the pressure term containing the gradient of the pressure and the viscous term containing the Laplacian of the velocity. The resulting Navier-Stokes equation is
The Navier-Stokes equation for low Reynolds number flow.
To get the expressions given in the new Problem 1.46, solve the Navier-Stokes equation assuming an incompressible fluid. In addition, the boundary conditions are 1) far from the sphere (r much greater than a) the flow is entirely along the z-axis with speed V, and 2) at the sphere surface (r = a) the radial component of the velocity vanishes because the flow is incompressible and the tangential component of the velocity vanishes because of the no-slip boundary condition.

Stokes’ law for the net drag force F, derived in part (b) of Problem 1.46, is F = 6πηaV. Often the drag force is described by a dimensionless coefficient called the drag coefficient, C, equal to F divided by ½ρV2πa2. For creeping flow around a sphere, the drag coefficient is
An equation giving the drag coefficient during low Reynolds number flow around a sphere.
Using the definition of the dimensionless Reynolds number, Re (Eq. 1.62 in IPMB), we find that C = 12/Re. Often the Reynolds number is written in terms of the diameter of the sphere rather than the radius, in which case we get the more commonly quoted relationship C = 24/Re. In many fluid dynamics textbooks you will see C plotted versus Re (usually on log-log graph paper). At low Reynolds number C is inversely proportional to Re as creeping flow predicts. At high Reynolds number the relationship between C and Re is more complex because a turbulent boundary layer forms near the sphere surface. But that’s another story.

Friday, November 6, 2015

The Magnetic Field of a Single Axon (Part 2)

In my last blog entry, I began the story behind “The Magnetic Field of a Single Axon: A Comparison of Theory and Experiment” (Biophysical Journal, Volume 48, Pages 93–109, 1985). I wrote this paper as a graduate student working for John Wikswo at Vanderbilt University. (I use the first person “I” in this blog post because I was usually alone in a windowless basement lab when doing the experiment, but of course Wikswo taught me how to do everything including how to write a scientific paper.) Last week I described how I measured the transmembrane potential of a crayfish axon, and this week I explain how I measured its magnetic field.

A toroid used to measure the magnetic field of a single axon.
A toroid used to measure
the magnetic field of a single axon.
The magnetic field was recorded using a wire-wound toroid (I have talked about winding toroids previously in this blog). Wikswo had obtained several ferrite toroidal cores of various sizes, most a few millimeters in diameter. I wound 50 to 100 turns of 40-gauge magnet wire onto the core using a dissecting microscope and a clever device designed by Wikswo to rotate the core around several axes while holding its location fixed. I had to be careful because a kink in a wire having a diameter of less than 0.1 mm would break it. Many times after successfully winding, say, 30 turns the wire would snap and I would have to start over. After finishing the winding, I would carefully solder the ends of the wire to a coaxial cable and “pot” the whole thing in epoxy. Wikswo—who excels at building widgets of all kinds—had designed Teflon molds to guide the epoxy. I would machine the Teflon to the size we needed using a mill in the student shop. (With all the concerns about liability and lawsuits these days student shops are now uncommon, but I found it enjoyable, educational, and essential.) Next I would carefully place the wire-wound core in the mold with a Teflon tube down its center to prevent the epoxy from sealing the hole in the middle. This entire mold/core/wire/cable would then be placed under vacuum (to prevent bubbles), and filled with epoxy. Once the epoxy hardened and I removed the mold, I had a “toroid”: an instrument for detecting action currents in a nerve. In 1984, this “neuromagnetic current probe” earned Wikswo an IR-100 award. The basics of this measurement are described in Chapter 8 of Intermediate Physics for Medicine and Biology.

In Wikswo’s original experiment to measure the magnetic field of a frog sciatic nerve (the entire nerve; not just a single axon), the toroid signal was recorded using a SQUID magnetometer (see Wikswo, Barach, Freeman, “Magnetic Field of a Nerve Impulse: First Measurements,” Science, Volume 208, Pages 53–55, 1980). By the time I arrived at Vanderbilt, Wikswo and his collaborators had developed a low-noise, low-input impedance amplifier—basically a current-to-voltage converter—that was sensitive enough to record the magnetic signal (Wikswo, Samson, Giffard, “A Low-Noise Low Input Impedance Amplifier for Magnetic Measurements of Nerve Action Currents,” IEEE Trans. Biomed. Eng. Volume 30, Pages 215–221, 1983). Pat Henry, then an instrument specialist in the lab, ran a cottage industry building and improving these amplifiers.

To calibrate the instrument, I threaded the toroid with a single turn of wire connected to a current source that output a square pulse of known amplitude and duration (typically 1 μA and 1 ms). The toroid response was not square because we sensed the rate-of-change of the magnetic field (Faraday’s law), and because of the resistor-inductor time constant of the toroid. Therefore, we had to adjust the signal using “frequency compensation”; integrating the signal until it had the correct square shape.

The amplifier output was recorded by a digital oscilloscope that saved the data to a tape drive. Another of my first jobs at Vanderbilt was to write a computer program that would read the data from the tape and convert it to a format that we could use for signal analysis. We wrote our own signal processing program—called OSCOPE, somewhat analogous to MATLAB—that we used to analyze and plot the data. I spent many hours writing subroutines (in FORTRAN) for OSCOPE so we could calculate the magnetic field from the transmembrane potential, and vice versa.

A drawing of the experiment to measure the transmembrane potential, the extracellular potential, and the magnetic field of a single axon.
An experiment to measure the
transmembrane potential, the extracellular potential,
and the magnetic field of a single axon.
Once all the instrumentation was ready, the experiment itself was straightforward. I would dissect the ventral nerve cord from a crayfish and place it in a plexiglass bath (again, machined in the student shop) filled with saline (or more correctly, a version of saline for the crayfish called van Harreveld’s solution). The nerve was gently threaded through the toroid, a microelectrode was poked into the axon, and an electrode to record the extracellular potential was placed nearby. I would then stimulate the end of the nerve. It was easy to excite just a single axon; the nerve cord split to go around the esophagus, so I could place the stimulating electrode there and stimulate either the left or right half. In addition, the threshold of the giant axon was lower than that of the many small axons, so I could adjust the stimulator strength to get just one giant axon.

The magnetic field of a single axon. The data was recorded with no averaging.
The magnetic field of a single axon.
When I first started doing these experiments, I had a horrible time stimulating the nerve. I assumed I was either crushing or stretching it during the dissection, or there was something wrong with the saline solution, or the epoxy was toxic. But after weeks of checking every possible problem, I discovered that the coaxial cable leading to the stimulating electrode was broken! The experiment had been ready to go all along; I just wasn’t stimulating the nerve. Frankly, I now believe it was a blessing to have a stupid little problem early in the experiment that forced me to check every step of the process, eliminating many potential sources of trouble and giving me a deeper understanding of all the details. 

As you can tell, a lot of effort went into this experiment. Many things could, and did, go wrong. But the work was successful in the end, and the paper describing it remains one of my favorites. I learned much doing this experiment, but probably the most important thing I learned was perseverance.

Friday, October 30, 2015

The Magnetic Field of a Single Axon (Part 1)

The Magnetic Field of a Single Axon: A Comparison of Theory and Experiment (Biophysical Journal, 48:93–109, 1985)..
“The Magnetic Field of a Single Axon.”
Thirty years ago, John Wikswo and I published “The Magnetic Field of a Single Axon: A Comparison of Theory and Experiment” (Biophysical Journal, Volume 48, Pages 93–109, 1985). This was my second journal article (and my first as first author). Russ Hobbie and I cite it in Chapter 8 of the 5th edition of Intermediate Physics for Medicine and Biology. I reproduce the introduction below.
An active nerve axon can be modeled with sufficient accuracy to allow a detailed calculation of the associated magnetic field. Therefore the single axon provides a simple, yet fundamentally important system from which we can test our understanding of the relation between biomagnetic and bioelectric fields. The magnetic field produced by a propagating action potential has been calculated from the transmembrane action potential using the volume conductor model (1). The purpose of this paper is to verify that calculation experimentally. To make an accurate comparison between theory and experiment, we must be careful to correct for all systematic errors present in the data.

To test the volume conductor model it is necessary to measure the transmembrane potential and magnetic field simultaneously. An experiment performed by Wikswo et al. (2) provided preliminary data from a lobster axon, however the electric and magnetic signals were recorded at different positions along the axon and no quantitative comparisons were made between theory and experiment. In the experiment reported here, these limitations were overcome and improved instrumentation was used (3–5).
As the introduction notes, the volume conductor model was described in reference (1), which is an article by Jim Woosley, Wikswo and myself (“The Magnetic Field of a Single Axon: A Volume Conductor Model,” Mathematical Biosciences, Volume 76, Pages 1–36, 1985). I have discussed the calculation of the magnetic field previously in this blog, so today I’ll restrict myself to the experiment.

I was not the first to measure the magnetic field of a single axon. Wikswo’s student, J. C. Palmer, had made preliminary measurements using a lobster axon; reference (2) is to their earlier paper. One of the first tasks Wikswo gave me as a new graduate student was to reproduce and improve Palmer’s experiment, which meant I had to learn how to dissect and isolate a nerve. Lobsters were too expensive for me to practice with so I first dissected cheaper crayfish nerves; our plan was that once I had gotten good at crayfish we would switch to the larger lobster. I eventually became skilled enough in working with the crayfish nerve, and the data we obtained was good enough, that we never bothered with the lobsters.

I had to learn several techniques before I could perform the experiment. I recorded the transmembrane potential using a glass microelectrode. The electrode is made starting with a glass tube, about 1 mm in diameter. We had a commercial microelectrode puller, but it was an old design and had poor control over timing. So, one of my jobs was to design the timing circuitry (see here for more details). The glass would be warmed by a small wire heating element (much like you have in a toaster, but smaller), and once the glass was soft the machine would pull the two ends of the tube apart. The hot glass stretched and eventually broke, providing two glass tubes with long, tapering tips with a hole at the narrow end of about 1 micron diameter. I would then backfill these tubes with 2 Molar potassium citrate. The concentration was so high that when I occasionally forgot to clean up after an experiment I would comeback the next day and find the water had evaporated leaving impressive, large crystals. The back end of the glass tube would be put into a plexiglass holder that connected the conducting fluid to a silver-chloride electrode, and then to an amplifier.

One limitation of these measurements was the capacitance between the microelectrode and the perfusing bath. Because the magnetic measurements required that the nerve be completely immersed in saline, I could not reduce the stray capacitance by lowering the height of the bath. This capacitance severely reduced the rate of rise of the action potential, and to correct for it we used “negative capacitance.” We applied a square voltage pulse to the bath, and measured the microelectrode signal. We then adjusted the frequency compensation knob on the amplifier (basically, a differentiator) until the resulting microelectrode signal was a square pulse. That was the setting we used for measuring the action potential. Whenever I changed the position of the electrode or the depth of the bath, I had to recalibrate the negative capacitance.

To record the transmembrane potential, I would poke the axon (easy to see under a dissecting microscope) with a microelectrode. Often the tip of the electrode would not enter the axon, so I would tap on the lab bench creating a vibration that was just sufficient to drive the electrode through the membrane. Usually I had the output of the microelectrode amplifier go to a device that output current with a frequency that varied with the microelectrode voltage. I’d put this current through a speaker, so I could listen for when the microelectrode tip was successfully inside the axon because the DC potential would drop by about 70 mV (the axon’s resting potential) and therefore the pitch of the speaker would suddenly drop.

Next week I will continue this story, describing how we measured the magnetic field.

The transmembrane potential, measured with a glass microelectrode from a single axon.
The measured transmembrane potential.

Friday, October 23, 2015

Clearance and Semilog Plots

I occasionally like to write a new homework problem as a gift to the readers of Intermediate Physics for Medicine and Biology. Here is the latest, for Section 2.5 about clearance.
Problem 11 ½. A patient has been taking the drug digoxin for her atrial fibrillation. Her distribution volume is V = 400 l. At time t = 0 she stops taking the drug and her doctor measures her blood digoxin concentration, C, every 24 hours.

t (hr) C (ng/ml)
0 0.85
24 0.53
48 0.33
72 0.20
96 0.125
120 0.077

Calculate the clearance, K, in ml/min.
I like this problem because it reinforces two concepts at once: 1) clearance, and 2) using semilog plots. First, let’s analyze clearance. Equation 2.21 in IPMB gives the blood concentration as a function of time

C(t) = Co exp(−(K/V)t) .

If we can measure the rate of decay of the concentration, b, where the exponential factor is written as exp(−bt), we can calculate the clearance from K = bV. So, this problem really is about estimating b from the given data.

To calculate the rate b, we should plot the data on semilog graph paper. You can download this graph paper (for free!) at http://www.printablepaper.net/category/log, http://customgraph.com, or http://www.intmath.com/downloads/graph-paper.php. The figure below shows the data points (dots).

A plot of the concentration as a function of time. In this semilog plot, the decay appears as a straight line.
The concentration as a function of time.

Now, draw a line through the dots. Sophisticated mathematical techniques could be used to fit the best line through this data, but for this homework problem I suggest merely fitting a line by eye. For data with no noise, such as used here, you should be able to calculate b to within a few percent using a ruler, pen, and some care.

Next, our goal is to determine the decay constant b from the equation C = Co exp(−bt) using the method discussed in Section 2.3. Select two points on the line. They could be any two, but I suggest two widely spaced points. I’ll use the initial data point (t = 0, C = 0.85) and then estimate the time when the line has fallen by a factor of ten (C = 0.085). The vertical dashed line in the above figure indicates this time, which I estimate to be t = 115 ± 2 hr. I include the uncertainty, which reflects my opinion that I can estimate the time when the dashed line hits the time axis to slightly better than plus or minus one half of one of the small divisions shown on the paper, each of which is 24/5 = 4.8 hr wide. So I have two equations: 0.85 = Co and 0.085 = Co exp(−115b). When I divide the two equations, Co cancels out and I find 10 = exp(115b). Therefore, b = ln(10)/115 = 0.0200 ± 0.0003 hr−1. If I write the exponential as exp(−t/τ), then the time constant is τ = 1/b = 50.0 ± 0.9 hr. Often we say instead that the half-life is t1/2 = ln(2) τ = 34.7 ± 0.6 hr.

At this point, I suggest you inspect the plot and see if your result makes sense. Does the line appear to drop by half in one half-life? Using the plot, at t = 35 hr I estimate that C is about 0.42, which is just about half of 0.85, so it looks like I’m pretty close.

Now we can get the clearance from K = bV = (0.02 hr−1)(400 l) = 8 l/hr. The problem asks for units of ml/min (a common unit used in the medical literature), so (8 l/hr)(1 hr/60 min)(1000 ml/l) = 133 ml/min. The uncertainty in the clearance is probably determined by the uncertainty in the distribution volume, which we are not given but I’d guess is known to an accuracy of no better than 10%.

Astute readers might be thinking “This is a great homework problem, but I don’t understand why the distribution volume is so big; 400 l is much more than the volume of a person!” The distribution volume does not represent an actual volume of blood or of body fluid. Rather, it takes into account that most of the digoxin is stored in the tissue, with relatively little circulating in the blood. But since the blood concentration is what we measure, the distribution volume must be “inflated” to account for all the drug stored in muscle and other tissues. This is a common trick in pharmacokinetics.

I believe that analyzing data with semilog or log-log graph paper is one of those crucial skills that must be mastered by all science students. As an instructor, you cannot stress it enough. Hopefully this homework problem, and ones like it that you can invent, will reinforce this technique.