Sunday, November 6, 2011

Linear momentum

Hey there.
As you might have noticed on the previous post, the one about the mass, its conservation laws, and its mathematical formulations. It enough to replace $\phi$ by some other quantity, and perhaps we can tell something interesting about our fluid, perhaps we can withdraw interesting conservation laws...or not.

If we choose poorly our quantity $\phi$, we won't be able to interpret physically its integral over the fluid volume, and therefore the RHS, even though it is correct, might mean nothing to us. So lets check on another quantity $\phi$ such that its integral over the fluid volume has some importance from the physical point of view.

If we go back to our first lessons on Classical Mechanics, we see that Newtons Second law can be mathematically stated as follows:

\[\frac{d\vec{P}}{dt}=\vec{F}\]

Where $\vec{P}$ is the linear moment of our system of interest, and $\vec{F}$ represents sum of all the forces acting upon it.

If we set our system as our fluid volume Vf, we then can rewrite:

\[\frac{d\vec{P}}{dt}=\frac{d}{dt}\int_{V_f(t)}\rho\vec{u}\,d\Omega\]

According to Newton's second law, this equals the sum of all the forces acting on the fluid. But, what kind of forces can act on our fluid? Well, we have all the forces like the Gravitational, the Lorentz force, or the centripetal force that act on every fluid particle that belongs to Vf. However we also have forces like a direct pressure on one side of the fluid, the air, and the atmospheric pressure that act all over the surface of the fluid, BUT NOT INSIDE OF IT. This distinction is very important because it allows us to classify the forces in Volumetric forces, and Surface forces. the first ones, as their name indicates, act over all the volume Vf, and their magnitude is proportional to the volume Vf. Surface forces are a bit different, they act only on surfaces of the fluid and their final magnitude depends on the surface of the fluid.

Keeping the above classification in mind, we can write the volumetric forces as an integral over Vf(t) of $\rho\vec{a}$ where $\vec{a}$ represents the volumetric acceleration of a given force. We write:

\[\vec{F}_{Volumetric}=\int_{V_f(t)}\rho\vec{a}\,d\Omega\]

For the surface forces we can write this:

\[\vec{F}_{Surface}=\int_{\partial V_f(t)}\vec{f}\,d\sigma\]

Where $f$ is the force per unit area, or pressure. We have to realize that this pressure depends on the specific orientation of the surface over which it is acting upon. In the most general case, at a given point in space the force acting over a differential area section $\vec{n_1}$ is, in general, different to the pressure exerted over another surface element $\vec{n_2}$ even if both $\vec{n_1},\vec{n_2}$ are at the same point in space. If we write the final integral equation, (that is, equating both sides of Newtons second law, and using our version of Reynols Transport Theorem for each scalar components of the vectors involved):

\[\int_{V_f(t)}\rho\vec{a}\,d\Omega+\int_{\partial V_f(t)} \vec{f}\,d\sigma=\frac{d}{dt}\int_{V_c(t)}\rho\vec{u}\,d\Omega+\int_{\partial V_c(t)}\rho \vec{u} [(\vec{u}-\vec{u_c})\cdot\vec{n}]\,d\sigma\]

We see must realize that it is not very general. Its not general int he sense that the surface forces depend on the specific orientation of our surface. This integral formulation, at this stage, assumes we have the following info on our pressures: we know at each point on the fluid, what the pressure would be if the surface of our fluid element at that point would be some $\vec{n}$. Its too much to ask. it might look like it is an infinite amount of information (since there are infinitely many different orientations!!) Like I said, this is not a very useful result. Let's see how we can generalize it, and avoid this awkward result.

The above awkward result is equivalent to the result that arises form the motion of a rigid body: What is the moment of inertia of a given body if we spin-it through an axis $\vec{n}$ with angular velocity $\omega$ ? Again, there are infinitely many possible orientations for this axis, and infinitely many different values for $\omega$. So how do we characterize this situation without turning it into a case-specific type of thing? Lets see, i could also ask: for a given $\vec{\omega} (=\omega\vec{n})$ what the moment of inertia is? the answer is: The tensor of Inertia.

The tensor of inertia allows you to compute the moment of inertia of a body that is being rotated with angular velocity $\vec{\omega}$. That is, exists an entity $\vec{\vec{\Pi}}$ such that:

\[\vec{I}=\vec{\vec{\Pi}}\cdot\vec{\omega}\]

Where $\vec{I}$ is the moment of inertia of the body. Since $\vec{I}$ and $\vec{\omega}$ are not necessarily parallel, our entity $\vec{\vec{\Pi}}$ must, at least, be a 3x3 matrix.

So, one question comes to my mind. How can all the infinite information that we were talking about  be contained in these Tensor? The answer is simple. All the infinite information that we were discussing has been isolated into $\vec{\omega}$. The Tensor only contributes with the specific characteristics of the body itself.
Its components can be calculated explicitly depending on the specific shape of the object. I'm not going to present this computation, Ill simply state that it's construction is possible and depends only on the geometry of the object we are considering.

The cool think is that we can use the same trick for our problem with $f$. We would like to separate the dependence with the normal vector $\vec{n}$ from the physical characteristics of our fluid. The tensor involved will be called, the stress tensor, and we will denote it by $\vec{\vec{T}}$.

With new super tool, we can write our surface forces as:

\[\vec{F}_{Surface}=\int_{\partial V_f(t)} \vec{\vec{T}}\cdot\vec{n}\,d\sigma\]


Finally, our improved and generalized form of Newton's second law can be written in it integral formulations as:


\[\int_{V_f(t)}\rho\vec{a}\,d\Omega+\int_{\partial V_f(t)} \vec{\vec{T}}\cdot\vec{n}\,d\sigma=\frac{d}{dt}\int_{V_c(t)}\rho\vec{u}\,d\Omega+\int_{\partial V_c(t)}\rho \vec{u} [(\vec{u}-\vec{u_c})\cdot\vec{n}]\,d\sigma\]

Now, proceeding in a similar way to the last post, let's derive the differential form of it. 

Using Stokes theorem on the terms involving surfaces integrals, and introducing the time derivative inside the integral (by setting, with no loss of generality Vc(t)=Vc) we can write for the i-th component of the velocity:

\[0=\int_{V_c}\left(\rho a_i + (\nabla\cdot\vec{\vec{T}})_i-\frac{\partial(\rho u_i)}{\partial t}-\nabla\cdot(\rho\vec{u}u_i)\right)\,d\Omega\]

Using the same argument as before, namely that this equality holds for any Vc that you can think off, we equal the integrand to zero. next, we use the identity 

\[\nabla\cdot(\psi\vec{A})=\nabla(\psi)\vec{A}+\psi\nabla\cdot\vec{A}\] 
and identifing $\psi\rightarrow u_i$ and $\vec{A}\rightarrow\rho\vec{u}$, we have:

\[\rho\vec{a}+\nabla\cdot\vec{\vec{T}}=\rho\left(\frac{\partial}{\partial t}+(\vec{u}\nabla)\right)\vec{u}+\vec{u}\left(\frac{\partial\rho}{\partial t}+\nabla\cdot(\rho\vec{u})\right)\]

The first parenthesis is nothing but the material derivative operator acting on $\vec{u}$. The second parenthesis on the right, thanks to the continuity equation vanishes. The resulting equation is called the differential formulation of the conservation of liner momentum:


\[\rho\frac{D\vec{u}}{Dt}=\nabla\cdot\vec{\vec{T}}+\rho\vec{a}\]

With this, I finish the $\phi=\rho\vec{u}$ case. Again, I hope you enjoyed as much as I did.








Saturday, November 5, 2011

Mass

We will now analyze the case where our function $\phi$ is equal to the density of our fluid. Again, this is a property defined over all the region $\Omega$ and it might change in time, and be different at different places inside the fluid.

From our last post, we had an equation, which after replacing $\phi\rightarrow\rho$ looks like this:

\[\frac{d}{dt}\int_{V_f(t)}\rho\,d\Omega=\frac{d}{dt}\int_{V_c(t)}\rho\,d\Omega+\oint_{\partial V_c(t)}\rho \left[(\vec{u}-\vec{u}_c)\cdot\vec{n}\right]\,d\sigma\]

We can inmediatly identify the LHS of the equation with the time derivative of the total mass inside our fluid volume. 

\[M=\int_{V_f(t)}\rho\,d\Omega\]

However, we must remember that one of the basic properties of the fluid volume, is that it's mass remains constant. Therefore the time derivative of such quantity is zero. We are left with:

\[0=\frac{d}{dt}\int_{V_c(t)}\rho\,d\Omega+\oint_{\partial V_c(t)}\rho \left[(\vec{u}-\vec{u}_c)\cdot\vec{n}\right]d\sigma\]

This is a very important equation, and can help us understand many interesting properties of the system we are studying. For example, as a general consequense, we can say that the change in mass inside a given volume is equal to the mass-flow through the surface of such volume. Something rather trivial, but that can be mathematically quantified in this particular equation.

The last equation is also called the Integral Formulation of the Law of Conservation of Mass. As any other integral formulation or representation,  it encodes a macroscopic condition on the physics of the fluid. It provides a set of rules that restrict the behavior from a macroscopic point of view. What I mean by that is, The conditions imposed on the fluid take the form of conditions or regulations over fluid as a whole (integrals over Vc and it's surfaces). The integral formulation offers no local conditions for the fluid. The fluid, as far as the integral formulation is concerned, can have "holes" in it. As far as the final number, resulting from the integration over the whole volume is in agreement with the equation, everything might seem OK.

My point here is the following. Given a control volume, the integral formulation of the conservation of mass doesn't really impose, by itself, conditions on the internal, and local characteristics of the fluid. The fluid might have points where the density is incredibly high, like a black hole, then mysteriously disappear and appear instantaneously in some other point (of course, also inside Vc), and still, the integral formulation will not have any idea of whats going on inside. 

The last argument is perfectly valid, no flaws. However, if you add a small detail (a very important, and must never be forgotten) you can actually convert the integral formulation into a set of restrictions for the fluid at the local level, at the microscopic level. The trick goes somehow like this: The integral formulation is correct, and it is correct for ANY CONTROL VOLUME you can think off. 

Now think about this, if it is valid for any control volume, you can shrink your control volume (The shrinking is not as if Vc depends on time, and shrinks while you integrate, no. Its more like everytime you are about to integrate, you pick a smaller and smaller Vc), almost to the point where is seems like a point. At this level, you can see the integration formulation of such a tinny volume as a local formulation, a local restriction on the fluid.

Is kinda hard to imagine at first, but think about it. Given that the integral formulation offers you info about the macroscopic state of the fluid, and since it is valid for any Vc, and it's respective surface, you could shrink Vc to the point where is so small that you could identify it with a microscopic condition on the fluid. The math behind this is consistent  with what we have talked here. The resulting microscopic formulation is usually called the differential formulation of the conservation of mass, or simply (and perhaps more familiarly) the continuity equation.

To get there we will use the well known Stoke's theorem, to transform the surface mass fluxes into an integral over a volume. The most general formulation of this theorem is something like this:

\[\int_{\Omega}d\omega=\int_{\partial\Omega}\omega\]

Where $\omega$ is n-form in a n-dimensional space, and $d$ is the exterior derivative. $\Omega$ is an n-dimensional volume, and $\partial\Omega$ is the (n-1) dimensional boundary of $\Omega$. Green's Theorem, The gradient Theorem, Gauss-Ostrogradsky theorem, or the 3D-Stokes theorem are all specific cases of this more general version. Each one of them is the result of the correct choice of the n-form $\omega$. Check out this guy, he's got everything you need to know about this topic in one pdf:

 For our purposes, we will pick n=3, and 

\[\omega=A_1dy\wedge dz+A_2dz\wedge dx+A_3dx\wedge dy\]

Which corresponds to: $\vec{A}\cdot\vec{n}\,d\sigma$. 


Applying the exterior derivative to this form, we have:


\[d\omega=\left({\frac{dA_1}{dx}+\frac{dA_2}{dy}+\frac{dA_3}{dz}}\right)dx\wedge dy\wedge dz\] 

Which corresponds to $\nabla\cdot\vec{A}\,dV$

For this specific form, Stoke's theorem reads:

\[\oint_{\partial V} \vec{A}\cdot \vec{n}\,d\sigma = \int_V \nabla\cdot\vec{A}\,dV\]

This is called, the divergence theorem.


Now, back to our mass equation with 0 on the LHS. If we look at the RHS, more specifically, the integral over $\partial\Omega$ we can apply the divergence theorem simply by setting:

\[\vec{A}=\rho\vec{u}\]

More over, if Vc is such that it is stationary, ie $V_c(t)=V_c$ and $\vec{u}_c=0$. Then we can put the time derivative in our first term inside the intergral at the cost of making it a partial derivative. This is:

\[\frac{d}{dt}\int_{Vc}\rho\,d\Omega = \int_{Vc}\frac{\partial\rho}{\partial t}\,d\Omega\]

Finally, putting all together, we have:

\[\int_{Vc}\left(\frac{\partial\rho}{\partial t}+\nabla\cdot (\rho\vec{u})\right)\,d\Omega=0\]

Now, back to our naive argument "valid for any Vc you can think off". In our case, this argument is extremely powerfull. It means, that no matter which Vc we pick, we will always have this integral equal to zero. No matter how small, or large Vc is, we will have this integral being zero. Now, if you think about this for about $ to \times 10^{15}$ minutes, you will convince yourself that the only possible explanation for this, rather curious, fact is that the integrand itself must be equal to zero.

\[\frac{\partial\rho}{\partial t}+\nabla\cdot (\rho\vec{u})=0\]


This can also be written in a nicer way, using the identity: $\nabla(\psi\vec{A})=\psi\nabla\cdot\vec{A}+\vec{A}(\nabla\psi)$, and our previously derived Lagrangian/Convective/Total/Material derivative:

\[\frac{D\rho}{Dt}+\rho\nabla\cdot\vec{u}=0\]


This is what  we call, the continuity equation, or the differential formulation of the conservation of mass.With this I finish the treatment of the special case $\phi=\rho$. I hope you enjoyed as much as I did, and let's start counting how many times you will go back to this blog in your life..hehe.

Friday, November 4, 2011

The Math


Hey There!

To most of you (referring to my two only subscribers) this might not concern. I'm making it out of boredom, and mainly because typing in LaTeX is neat and the equations look MUCH better that my hand writing. Having said this, I present a small summary of the concepts I have studied so far in my three weeks of Fluid Dynamics.

What is a fluid? At this stage let's stick to our natural interpretation of a fluid. Let's use our intuitive notion of the fluids as a first tool. Let's use this notion to guide our progress towards a mathematical description of what a fluid is. Later on, when certain mathematical background has been created, we will identify, classify, and analyze all the resulting mathematical tools, we will also make sure they, to some extend, coincide with our natural notions of what we commonly refer as to a fluid, and moreover, we will be able to extrapolate to regimes where our experience has not yet been. This, in principle is what a physical theory is. We start from daily notions, we create a mathematical background that describes it, and then we extrapolate this theory to make predictions of unseen, or untested scenarios.


So, lets start with the question of how to describe a fluid. Historically there are two main descriptions. The one postulated by Euler, and the one by Lagrange. Both have the power to give you a full description of a fluid ,the difference is conceptual. I would like to make the analogy with a graph. By a graph I mean the collection of points $\{x,y\}$ in the set $R^2$, such that $y=f(x)$. This collection of points can be fully described by specifying the x-coordinate and the y-coordinate of each point. However there is another, perhaps less natural, way to do so. It is as follows, we will specify the slope and the intersect with the y-axis of every line which is tangent to f at the point of interest. The envelope of this family of tangent lines is our graph ''$f$''. Many other examples can be found in Physics and Math
See for example:
http://web.uvic.ca/~chem458/Handouts/Handout1_Lengendre_Transform.pdf

From this we see that both ideas are equivalent and that through the appropriate transformation (Legendre Transformation) we can go from one to the second. In the case of fluids , the situation is very similar; The Eulerian description is equivalent to the Lagrangian description and the mathematical transformation between these two is called the material derivative. Lets explain these three concepts.

Let's imagine a fluid as a group of little "blobs", each moving with certain velocity, and each having certain mass. We will call them fluid particles. Now, if I tell you how the position and velocity of each fluid particle evolves in time, it will be a full description of the fluid. This way of describing a fluid is called the Lagrangian description. In other words, we put little ''receptors'' on each fluid particle, and these receptors send us the position and the velocity of the particles at any desired time.

-----In the Lagrangian picture, we follow the fluid particle------


Now, another way to describe the fluid is as follows, we put these receptors fixed to the ''floor'', and at any desired time they will send the velocity of the nearest fluid particle. It seems at first that these description offers less information than the previous one. But it doesn't. It surely looks as if the Lagrangian description offers both position and velocities, and the new description, only offers velocity. However, the fact that we know where the transmitters are, save us the need to specify their location. We know beforehand where they are, and since they are fixed to the ''floor'', their positions won't change in time. These second description is called the Eulerian description of a fluid.

------In the Eulerian picture, we study a fixed geometrical point, letting the fluid particles "flow" above it----

Both descriptions are equally valid, they both offer the same amount of information about the fluid, and they both have pros and cons.
As a first example, let's imagine for example a flow of fluid particles in some direction (don't worry about the details of the flow, at this point I'm only concerned with a qualitative exercise). Now lets imagine that the temperature of the fluid is a function of the position and the time i.e. the fluid particles at some instant (x,t) will have a temperature T(x,t). Now, since the fluid particles are moving/flowing, their temperatures are changing too.

Now, if we want to specify the change of rate of the temperature in the Eulerian description, we write:


\[ EulerianChange = \frac{\partial }{\partial t}\]

This term only contains the partial derivative of T. The reason, in my own words is as follows: We don't need to specify the change of T in space because we know, from our imaginary receptors, which are fixed, which point we are referring to. The change of T in space is zero in the Eulerian description. 

Now, from the Lagrangian description the change of T looks a bit more complex. I mean, if you are fixed with the fluid particle, and look at a the floor, you need to specify not only the change of T in time at your fluid particle, but also how your position changes in time. So, from the Lagrangian perspective, we write:

\[ LagrangianChange= \frac{d}{dt}\]



Material Derivative:

The Material Derivative is the way to link the two concepts. Its simply a way to quantify these two descriptions. 

Let's compute the change in T a bit more formally. That is, taking the total derivative of T with respect to time, and let's see what we get.


\[\frac{\Delta T(x_1,x_2,x_3,t)}{\Delta t}=\frac{T(x_1+\Delta x_1,x_2+\Delta x_2,x_3+\Delta x_3,t+\Delta t)-T(x_1,x_2,x_3,t)}{\Delta t}\]


Using the Taylor expansion, and considering $\Delta x_i$ small enough so higher derivatives are neglected. We obtain:


\[\frac{\Delta T(x_1,x_2,x_3,t)}{\Delta t}=\frac{\partial T}{\partial t}\frac{\Delta t}{\Delta t}+\frac{\partial T}{\partial x_1}\frac{\Delta x_1}{\Delta t}+\frac{\partial T}{\partial x_2}\frac{\Delta x_2}{\Delta t}+\frac{\partial T}{\partial x_3}\frac{\Delta x_3}{\Delta t}\]


Talking the limit $\Delta t \rightarrow 0$ and realizing that $\frac{\Delta x_i}{\Delta t}\rightarrow u_i$ where $u_i$ is the $i^{th}$ component of the velocity. We can write


\[\frac{dT}{dt}=\frac{\partial T}{\partial t}+\vec{u}\cdot \nabla T\]

The last equation can be seen as both, the total derivative of T with respect of time, or as the transformation needed to go from the Lagrangian description to the Eulerian one, and vice-versa. This is the link between the two descriptions, the bridge between the two point of views. From the equation follows:

\[LagrangianChange = EulerianChange + (\vec{u}\cdot \nabla)\]



From now on we will adopt the following notation:

\[\frac{D}{Dt}:=\frac{\partial }{\partial t}+(\vec{u}\cdot \nabla )\]

And we will call the operator $\frac{D}{Dt}$ the material derivative. Some authors might call it the convective or Lagrangian derivative too. This operator can act upon any scalar or vectorial quantity (In the case of a vectorial quantity you have to be careful when applying $\nabla$, since the result is a tensor! ). And it tells you how such quantity changes in time as a function of the velocity, and the variation of such quantity in a given fluid particle.


Now we need to finish our mathematical background. The next big mathematical tool we will use is the so called Reynolds transport theorem. In order to demonstrate this theorem we will introduce two very important concepts, namely the concept of a control volume, and a fluid volume.

This two new concepts are deeply related to the Eulerian and Lagrangian descriptions. In fact, I would propose to use the names Control-volume/Eulerian-volume, and Fluid-volume/Lagrangian-volume interchangeably.

In the Eulerian description, where we attached receptors all over the floor, and get readings about the velocities of the nearest fluid particles, we can take the idea a bit further. We can place some holographic projectors on the floor, and project right in the middle of the fluid, a box, or a sphere, or any 3D object. Now this is our Control-Volume or Vc. The Vc has some particular characteristics, for example, it doesn't interact with the fluid regardless how many particles come in one side and how many  go out the other, or how fast they do. It is simply an hologram and does not interact with the fluid. We can also make it expand or contract at any desired rate. We can make it go left or right, along the flow, or transverse to it....its motion is completely up to us.

Now back to the Lagrangian description, where we track the fluid particles. In this model we will define the fluid volume as follows: We will freeze time. Then we will place the holographic projectors on the floor. Project any 3D body right in the middle of the fluid. We will then "paint" of a different color all the fluid particles inside this 3D body. Next we will turn off the holographic projector. And finally un-freeze the picture. The fluid volume is the volume that all the newly-painted fluid particles create. This Fluid-Volume, or Vf will flow along the rest of the fluid particles, it will deform, tore apart, put back together and so on. We don't care...we only care about keeping an eye on the fluid particles that were once part of the holographic image. Since we were very very smart and we painted them with a different color!, it's "easy" to keep track of them.

The cool thing is this: at the instant when we froze time, lets say t=0 Vf was exactly the same as Vc. However, the Vf motion depends on the flow of the fluid while the Vc motion depends only on us.  At the same time we see that, by definition, the number of fluid particles in Vf won't change, but the number of fluid particles inside Vc might!; They might compress so each will occupy less volume, and more fluid particles will fit inside Vc, or the opposite, they will expand and then less of them will fit inside Vc. If we make Vc bigger, more particles will fit into it...and so on.

This being said, I will proceed to formulate Reynolds transport theorem:

Reynold's Transport theorem (RTT):
Let's $\phi$ be a scalar quantity, defined in some region $\Omega$. Then:


\[\frac{d}{dt}\int_{V_f(t)}\phi(x,t)\,d\Omega=\int_{V_f(t)}\frac{\partial\phi(x,t)}{\partial t}\,d\Omega+\oint_{\partial V_f(t)}\phi(x,t) \left[\vec{u}_f\cdot\vec{n}\right]\,d\sigma\]

Where $\partial V_f$ is the surface of Vf, and $\vec{u}_f$ is the velocity at which the boundaries of Vf is moving.  $\vec{n}$ is the normal vector to the surface of Vf. 

The demonstration of this theorem is not very difficult, but since  for a good understanding of it, a great deal of drawing is involved, I will omit it, and refer you to:


Just keep in mind that they use the following notation:

 \[\phi\rightarrow b\rho\]

\[\int_{V_f(t)} b \rho\,d\Omega\rightarrow B_{sys} \]
                             
Now, In order to deduce the more useful equation in the whole course, we will do as follows: we will apply RTT to Vc as well. We obtain (omiting the arguments (x,t)):

\[\frac{d}{dt}\int_{V_c(t)}\phi\,d\Omega=\int_{V_c(t)}\frac{\partial\phi}{\partial t}\,d\Omega+\oint_{\partial V_c(t)}\phi [\vec{u}_c\cdot\vec{n}]\,d\sigma\]


Finally we subtract both equations. We must also realize that


\[\int_{V_c(t)}\frac{\partial\phi}{\partial t}\,d\Omega=\int_{V_f(t)}\frac{\partial\phi}{\partial t}\,d\Omega\]


The reason for this is simple. Since the RTT holds at any time, we can just pick t=0 where our two volumes were exactly the same. Therefore these terms cancel out, and we are left with:


\[\frac{d}{dt}\int_{V_f(t)}\phi\,d\Omega=\frac{d}{dt}\int_{V_c(t)}\phi\,d\Omega+\oint_{\partial V_c(t)}\phi\left[(\vec{u}_f-\vec{u}_c)\cdot\vec{n}\right]\,d\sigma\]


We must realize that $\vec{u}_f$ is simply the velocity of the fluid $\vec{u}$ and so we drop the subindex.


This result is super important!. I will say, it's the cuspid of our mathematical background. Now that we have this, and the material derivative we can start doing some physics!.