Sunday, August 30, 2009

Phase Transition Temperature Part 1

Last weekend was lazy and unproductive so I didn't write anything - I will end that ignominy with immediate effect.

Today I will try to answer a question I had no satisfactory answer for until I came across this website, and even now have a poor appreciation for. The question is: why is temperature constant during a phase change of a single-component system? Most people with a basic grounding in science are familiar with the standard answer: energy transfer is required for some process in the phase change (like bond-breaking or forming, particle rearrangement), and thus doesn't contribute to changing the temperature. If this answer satisfies your sensibilities, please skip this article and I will see you back in a few weeks. If you're like me and feel like a lot of wool is being pulled over my eyes and dust swept under my carpet, please stick around - your insights will be very helpful in a topic I am uncertain about.

The explanation from the Temperature and Phase Change website linked to in the previous paragraph relies on Gibbs' Phase Rule, which says the number of independent intensive variables is

F = c - p + 2,

where c is the number of unreacting components and p the number of phases in the system. We can get this rule by adding the number of intensive variables needed to describe a system and subtracting the number of equations relating these variables:

Intensive Variables
cp densities
cp temperatures
cp pressures

Equations
Thermal equilibrium: cp-1 temperature relations
Pressure equilibrium: cp-1 pressure relations
Chemical equilibrium: c(p-1) stoichiometric chemical potential relations
Equations of state: p

F = 3cp - 2(cp-1) - c(p-1) - p = c - p + 2.

We can now apply this rule to analyse phase change in a single-component system where c=1.

When both phases are present, p=2 and F=1 - if we specify 1 intensive, all other intensives will follow. Suppose we fix the pressure at which the phase transition occurs, then the temperature is uniquely determined and constant. On the other hand, if we don't fix the pressure, the temperature can vary, dependent on the pressure at any point during the phase transition. So the question we initially asked wasn't quite right - it should have been: why is temperature constant during a constant-pressure phase change of a single-component system?

If at this point you have the nagging feeling something's missing, you're not alone. I thought: if the pressure and temperature are fixed, and the densities of each phase are thus uniquely specified, how can the proportion of either phase change during the transition? The answer must be that the system volume is not constant as I'd implicitly assumed, so if the proportion of the less dense phase increases, the system volume must increase. For example, if one of the phases is an ideal gas, with pV = NkT, V increases with N when p and T are constant until all particles are in the ideal gas phase.

And here is the missing piece to the energy puzzle! The so-called latent heat is actually the energy needed to expand the system at constant pressure, and given by pressure times the change in volume. Since this expansion does involve some "bond-breaking" or "particle rearrangement," there is some merit in the textbook basis for latent heat.

Moreover, we can now see how 2 systems with different proportions of either phase can have the same temperature and thus be in thermal equilibrium with each other. To do so, we start with a system with some proportion of either phase. Since the system temperature is uniform, we can form a new system at the same temperature with selected portions of the former. In particular, the new system can have a different proportion of either phase, and will be in equilibrium because the temperature, pressure and densities are unchanged. Thus there will be no net heat transfer between systems with different proportions of coexisting phases.

Finally, when there is only 1 phase, p=1 and F=2. So even if the pressure is fixed, the temperature can vary. Only when both the pressure and the density are specified is the temperature uniquely determined. This is evident for an ideal gas with p=nkT.

So Gibbs does a good job of explaining why temperature is constant during a fixed-pressure single-component phase transition. To get any more mileage on this problem, we really need concrete examples, which I will go into later. Meanwhile, I am still considering an alternative explanation based on free energies. I'll let you know if that bears fruit.

Saturday, August 15, 2009

Wheels and Friction Part 3

I want to finish this topic and move to one of the gazillions of other topics I want to discuss. I'm supposed to talk qualitatively about some examples of how a wheel under friction can reach steady state. Let's start with a wheel with some arbitrary linear and rotational velocities and consider what happens when one is greater than the other.

When the forward linear velocity is greater than the backward rotational velocity of the wheel's bottom, it has a net forward velocity relative to ground, so friction acts backward on the wheel. Backward friction decreases the forward linear velocity while generating a torque that increases the backward rotational velocity until the two velocities are equal. Vice versa for when the forward linear velocity is less than the backward rotational velocity.

And that's basically it - simple right? No need for nauseating math. But let me go a teeny bit further and highlight some cases of interest to maybe bowlers and billards players.

Case 1: 0 rotational velocity (no spin). You get this state by tossing the wheel forward without spin. Then friction rotates the wheel while slowing it down until steady state is reached.

Case 2: backward rotational velocity (top spin) - toss the wheel forward while brushing forward over its top. If the spin is less than the forward linear velocity, friction increases the spin while slowing the wheel. The wheel is slowed less than if it had no spin to start with. On the other hand, if the spin is larger than the forward linear velocity, friction decreases the spin while speeding up the wheel. So use top spin if you want more speed!

Case 3: forward rotational velocity (back/under spin) - toss the wheel forward while brushing backward over its top. Here, friction decreases both the spin and the speed! As will be shown in the appendix (for the more technical), if the rotational velocity is larger in magnitude than twice the linear velocity, friction will decrease the linear velocity so much that the wheel eventually moves backward in steady state. If you're good enough to pick a forward rotational velocity exactly twice the forward linear velocity, friction decreases the linear velocity just the right amount to stop the wheel in steady state!

Finally I want to clarify a point about the wheel's energy. Although energy is conserved in steady state, it isn't when the wheel is getting to steady state. In that case, its bottom moves relative to ground so friction does work against it, and energy is lost at a rate given by the product of its net velocity and friction. Unfortuately, you can't win against friction here, and striking even is only possible if you start exactly in steady state.

I'm going to modify the wheel demo, at some point, to let you choose non-zero initial velocities. With that feature, you can look at the 3 types of spin without having to figure out what force you need to apply to get the wheel to that state. Other than that, I hope this trilogy has helped clear any confusion you might have had about wheels and friction, and I look forward to starting my next "adventure"! Questions please!

Appendix:
To prove the claim in case 3, look back to part 2 to find

\theta''[T] = -2X''[T]

Integrating from T=0 to steady state, where ɵ'[T] = X'[T],

\theta'[T] - \theta'[0] = 2(X'[0]-X[T])

or

X'[T] = \frac{2X'[0] + \theta'[0]}{3}

which is negative if ɵ'[0] < 0 and |ɵ'[0]| > 2X'[0].

Tuesday, August 11, 2009

Wheels and Friction Demo

Since I don't know how to write Java applets or Flash animations, I'm starting my demos in Mathematica. I'd wanted to publish Mathematica notebooks directly to the web, but I realized I can't do that in blogspot and I'd also need a web server, which I don't have. So the best I can do is upload notebooks to Skydrive. You can play these notebooks in Mathematica 7 if you have a copy or Mathematica player, which you can get for free from Wolfram.

My attempt at generating a playable Mathematica notebook to illustrate wheel motion under friction was more frustrating than I'd imagined. While I'm a big fan of Mathematica, I have to express my dissatisfaction with its dynamic capabilities. First, I could not figure out how to update a dependent variable only after changing an independent variable and not continuously. Second, inserting legends increases lag, which is already undesirably high. Third, changing user-controlled variables does not automatically update the variable controls. Fourth, I could not figure out how to maintain sizes of frames being animated. You'd think specifying the frame's dimensions explicitly should work, but somehow changing the frame's ticks' labels still changes the frame size slightly, causing the frame animation to be unpleasantly jerky. Anyway, here's the best I could do.

I should probably learn Java or Action script...

Edit: had to switch to MediaFire because Skydrive link is impermanent.

Edit: the notebook has been optimized courtesy of Nick Lariviere of Wolfram support. Also, I've made the changes promised in part 3. Finally, I learnt that Mathematica cannot play nbp files meant for Mathematica player, so Mathematica users please download the nb file here.

Wheels and Friction Part 2

As promised, I will discuss how wheels under friction arrive at the steady state I talked about in part 1. I must thank Bihui for alerting me to this website, which allows tex equation rendering and enabled me to write this unfortunately technical entry. Those of you less interested in gory mathematical detail should stay tuned for the next issue. For now, we start with a stationary wheel on a flat surface. To move this wheel, we must apply a force. Once the wheel is moving, we have constant kinetic friction if there is relative motion between the bottom of the wheel and the surface, and static friction equal and opposite to the applied force up to some maximum if there is no such relative motion. In other words,


\begin{eqnarray}
f = \left\{ \begin{array}{cc}
-f_{kinetic} & R \theta'[t] < x'[t] \\
f_{kinetic} & R \theta'[t] > x'[t] \\
-Sgn[Fa]Min[|Fa|,f'_{max}] & R \theta'[t] = x'[t]
\end{array} \right\}
\end{eqnarray}

where f is friction, Fa is the applied force, R is the wheel's radius, ɵ is the wheel's angle, x is the wheel's horizontal position, and t is time. ɵ and x have equations of motion given by Newton's 2nd law:


m x''[t] = f[t] + Fa[t]
I \theta''[t] = - R f[t] + ra[t] Fa[t]

where m is the wheel's mass, I = 1/2 m R^2 is the wheel's moment of inertia, and ra is the normal signed distance between the applied force and the wheel's center. We can non-dimensionalize these equations by defining


X=x/R
r=ra/R
F=Fa/f_{kinetic}
f_{max} = f'_{max}/f_{kinetic}
T=t \sqrt{\frac{f_{kinetic}R}{m}}

to obtain:


X''[T] = F[T] + H[\theta'[T] - X'[T]]
\theta''[T] = 2 (r[T] F[T] - H[\theta'[T] - X'[T]])
\begin{eqnarray}
H[y-z] = \left\{ \begin{array}{cc}
-1 & y < z \\
1 & y > z \\
-Sgn[F[T]]Min[|F[T]|,f_{max}] & y = z
\end{array} \right\}
\end{eqnarray}

Note that when ɵ'[T] = X'[T], |F[T]| need only be non-zero but not greater than the maximum static friction to affect the wheel, since ɵ''[T] need not be 0. Unlike non-circular objects, a wheel can move even when static friction exceeds the applied force!

Consequently, we can actually disregard static friction, because of a confusing mathematical technicality you should skip over unless you doubt me. For non-zero F[T], ɵ'[T] = X'[T] at only isolated T, which can be disregarded in solving the equations of motion. When F[T]=0 and ɵ'[T]=X'[T], friction is static and 0. So without affecting the solution, we can write


\begin{eqnarray}
H[y-z] = \left\{ \begin{array}{cc}
-1 & y < z \\
1 & y > z \\
0 & y = z
\end{array} \right\}
\end{eqnarray}

The solution to the equations of motion can be obtained by time integration over pieces where ɵ'[T] <, > or = X'[T]. If F[T]=0 for T greater than some value, X''[T] = H[ɵ'[T] - X'[T]] and ɵ''[T] = -2 H[ɵ'[T] - X'[T]]. So X'[T] decreases while ɵ'[T] increases if X'[T] > ɵ'[T] and vice versa if X'[T] < ɵ'[T], until ɵ'[T] = X'[T] and X''[T]=ɵ''[T]=0. Therefore, the wheel always shifts to a steady state when there is no applied force.

With any steady state a natural question to ask is one about its stability. This state could be said to have neutral stability, in the sense that a perturbation in X'[T] or ɵ'[T] (via a non-zero F) causes the wheel to reach a different steady state with new equal X'[T] and ɵ'[T].

I can't squeeze anymore tidbits from this mathematical analysis (maybe you can), which is admittedly rich in technicality and correspondingly low on understanding. For a better picture of what's going on, you can try the Mathematica notebook advertised in the previous entry, where the equations of motion are solved by finite difference. Or just stay tuned for part 3, where I'll consider some simple cases. Phew!

Saturday, August 1, 2009

Wheels and Friction Part 1

The opening issue is about something that confused the hell out of me when I was a kid, and precollegiate teachers don't seem to do a proper job explaining. I'm talking about how friction acts on a rolling wheel. I got reacquainted with the problem during a physics tuition session, where we looked at a typical TYS question involving a toy car rolling down a ramp. For those of you who aren't Singaporean and probably don't know, "TYS" refers to "10-year-series", which is one of many books of exam questions taken from the past 10 years ultra-competitive Singaporean students use to prepare for their exams. Anyway, that question neglected friction between the car wheels and the ground, but got me thinking anyway.

So conventional wisdom due to our childhood teachers is that friction opposes motion and slows things down. But at the same time, a car needs friction to even start moving forward. So what's the deal?

I never got a satisfactory answer to that question until my 1st year at uni, during a freshman physics class. And the answer is actually counter-intuitive. Under friction, an ideal circular wheel actually never stops rolling forward. And you'd think friction killed all motion!

So let's see what really happens. First off, a primer about friction. To my knowledge, there are 2 types of friction: static and kinetic. Static friction arises between surfaces not moving relative to each other. Up to a threshold value, this friction is equal and opposite to any force directed along the tangent to the surfaces at any point of contact. On the other hand, kinetic friction arises between surfaces moving relative to each other. This friction is constant and opposite the direction of relative motion. Since the surfaces are either moving relative to each other or not, we can have only 1 type of friction between the surfaces at any 1 time. And that's all we need to know about friction to analyse this situation.

Let's first think about how a wheel can be in a steady state where its velocity is constant under friction, before going into how it got there in the first place. We have trusty Newton's 2nd law (or 1st law if you prefer) saying that for an object's velocity to be constant, there can be no net force on that object. Since there are no horizontal forces on the wheel other than friction, friction must be exactly 0! But how is that?

The only point of contact between the wheel and the ground is the bottom of the wheel at any instant. The only way for friction on the wheel to be 0 is if there is no relative motion between that point and the ground, so any friction would have to be of the static variety and 0 because there are no other horizontal forces acting on the wheel. But hold on a second! How can there be no relative motion between that point and the ground when the wheel is rolling forward? Well, it is precisely because the wheel is rolling forward that there can be no such relative motion. We just need the wheel's forward velocity to be equal to its rim's tangential velocity due to its rolling. Then the net velocity of the bottom-most point is the sum of the wheel's forward velocity and the equal and opposite tangential velocity and thus 0!

So what? We have a perpetual machine now? Nah, friction is 0, so no energy is lost to friction and its conservation is not violated. All we have is a wheel on a non-frictionless surface going on forever. Now everyone's happy, right? So why do cars need fuel to keep moving? I should be able to just burn enough gas to get up to whatever speed I want then cruise on forever, or at least until the next red light. Or if I'm cycling, I'd just need to cycle hard for a while, then shake my legs as my bike glides on effortlessly to wherever. If only. Don't forget about air resistance (and friction between other parts of your vehicle). Friction is not the enemy here - air resistance is!

I was supposed to tell you all how the wheel got into that steady state but let's leave that for another time, because I'm getting lazy and tired and I think you've read just about enough for now. Instead I want to go into some technicalities about the wheel's energetics when it's in steady state, purely for my interest and yours if you're curious enough. Specifically, the wheel's kinetic energy can be broken down into translational and rotational. Translational is just your usual 1/2 m v^2, representing the energy going into the wheel's forward motion, while rotational is 1/2 I w^2, representing the energy going into its rotation. I is the wheel's moment of inertia, which wikipedia gives as 1/2 m R^2, while w is the wheel's angular velocity. Since the wheel's forward velocity is equal to its rim's tangential velocity, v = R w, so the rotational energy is 1/4 m v^2, or half the translational energy. Interesting fact!

In the next issue I will talk about the processes involved in getting a wheel to its steady state. I'm already wondering how I can write equations in a more palatable form. I also need to figure out how to upload some Mathematica applets so you can play with these wheels. Comments!

Preliminaries

This blog was created out of a growing desire to find people with similar academic interests. The hope is to not only find such people, but to foster an environment conducive to discussions of issues that are amenable to mathematical analyses. The plan is then to raise such issues and offer my take on them, before opening the floor to your questions, comments and extrapolations. Your input will be very valuable in correcting my mistakes or oversights, and determining issues worthy of discussion. Please feel free to suggest problems I should look into, and I will try my best if they interest me. I hope my interests will become clearer after the preliminary posts, but for now I will summarise them as being anything with a mathematical or algorithmic angle, with a bias towards physics, my area of expertise.

With that, I hope this blog will be a respite for minds numbed by mundanity and in dire need of intellectual stimulation, and with luck become a bullet point on your weekly todo list. As my experience with blogging has never lasted beyond the 2nd post, I really need your encouragement to go the distance. Let's make this work together!