A system is a collection of matter that may move, flow and interact with its surroundings. You can imagine a fluid flow moving through a conduit as shown below and we somehow manage to tag a large number of Lagrangian particles in a cuboid of space and then we track those tagged particles as they move through the duct. These tagged Lagrangian particles are a system and they may move, flow and interact with their surroundings. As the duct's cross sectional area expands the shape of the system stretches in the spanwise direction and contracts in the streamwise direction since there are only so many particles in our system.
At various moments in time we can mark the volume and boundary occupied by the system as shown in red. Note that the flow shown below is a simplified inviscid frictionless flow.
Lets look at that again in 2D. As the duct expands the fluid expands to fill the spanwise width and so the streamwise length of the system shrinks. It appears that the volume of the system is kept constant.
This observation about the volume of our system illustrated above suggests that the volume is conserved. Lets think about that a little more. We defined our system as a collection of matter in the form of particles. We cannot add or remove matter from that system — there is only so much stuff and we've tagged all of it in our system. More precisely we can state that the time rate of change of the mass of the system does not change. This is called the Conservation of Mass. How it relates to volume will become apparent.
The total mass of a system $M_{sys}$ can be defined as the sum of the mass of all the particles that make up the system:
\begin{equation*} M_{sys} = \sum_\text{mass sys}{\delta m} = \sum_\text{volume sys}{\rho \delta \rlap{V}-} \end{equation*}Which is equivalent to the sum of the density times the volume of each particle. As the mass of each particle approaches zero, which is reasonable when dealing with small particles:
\begin{equation*} \lim_{\delta m \rightarrow 0} \Rightarrow M_{sys} = \underbrace{\int{\delta m}}_\text{mass sys} = \underbrace{\int{\rho \delta \rlap{V}-}}_\text{volume sys} \end{equation*}So since by definition our system is a finite number of particles the mass of the system remains constant but also if the density also remains constant the volume is also conserved. The conservation of mass can be written:
\begin{equation*} \frac{d M_{sys}}{dt} = 0 \end{equation*}We can also define conservation laws for momentum and energy.
Momentum $\vec{P}$ is simply the mass times the velocity of a body. Momentum is important because it allows us to understand how a mass of fluid responds to changes in velocity due to the forces acting on it. Each of the particles in our system have a constant infinitesimal mass and some measurable velocity as the system evolves. As above for conservation of mass, the momentum $\vec{P} = M\vec{V}$ can be written:
\begin{equation*} \vec{P}_{sys} = M_{sys} \vec{V} = \underbrace{\int{\vec{V}\delta m}}_\text{mass sys} = \underbrace{\int{\vec{V} \rho \delta \rlap{V}-}}_\text{volume sys} \end{equation*}Newton's second law for a linear system states that the time rate of change of the linear momentum of the system equals the sum of the external forces acting on the system.
\begin{equation*} \frac{d \vec{P}_{sys}}{dt} = \sum{\vec{F}} \end{equation*}Like mass and momentum, our particles in our system have energy, $E$. They may have potential energy or kinetic energy depending on their trajectory. They may have internal energy due to addition or removal of heat.
\begin{equation*} E_{sys} = \underbrace{\int{e \delta m}}_\text{mass sys} = \underbrace{\int{e \rho \delta \rlap{V}-}}_\text{volume sys} \end{equation*}The time rate of change of energy of the system equals the rate at which heat is added to the system across the system boundary plus the rate at which work is done on the system by body or surface forces.
\begin{equation*} \frac{d E_{sys}}{dt} = \dot{Q} - \dot{W} \end{equation*}where $\dot{Q}$ is the rate of heat addition and $\dot{W}$ the rate at which work is done on the system. You may recognise this as the First Law of Thermodynamics.
The following table summarises the three conserved quantities that we have considered.
Property | Total amount ($N$) | Definition | Amount per unit mass ($n$) |
---|---|---|---|
Mass | $M$ | density $\times$ volume | 1 |
Linear momentum | $\vec{P}$ | mass $\times$ linear velocity | $\vec{V}$ |
Energy | $E$ | mass $\times$ specific energy | $e = u + \frac{V^2}{2} + gz$ |
Note the total amount of any conserved property in a system is denoted $N$ and the amount per unit mass is given the symbol $n$.
Not only is it extremely tedious to track every Lagrangian particle in a system it is practically impossible, tracking a system boundary precisely is also extremely difficult. We need a means to analysis fluid flow that doesn't place such an onerous requirement on us. Fortunately such a method exists and it is the control volume. Consider again the duct from the start of the notebook. The control volume is a fixed region of the flow geometry and instead of tracking fluid particles we record the rate of change of our conserved quantities across its boundary — the control surface.
It is apparent that at the boundaries of the control volume fluid must enter, exit or, in the case of the boundaries in contact with the walls of the duct, not cross at all. This is a relatively simple control volume with one face where the flow enters and one where the flow exits. When dealing with complex engineering flows, such as flow through the complex geometry of a section of turbine blade passage in a jet engine or the flow in a cardiovascular geometry the shape of the control volume can be extremely complex. We need to know where each face of the control volume is positioned and which direction it is pointing in. In geometry, computer graphics and engineering we define a surface normal which is a vector that is normal to the surface. Typically we represent complex surfaces as a collection of smaller faces. For a manifold of faces that form the closed shell of a volume those normals must point outwards by convention. The figure below shows the face normals of the control volume we've just introduced as viewed in Blender 2.80, the 3D software package used to generate all the graphics for this module.
Some students struggle with the somewhat abstract idea of surface normal vectors, especially in the context of control volumes, but they are not all that complex. They are simply vectors that indicate which side of a face is the outside. We can easily imagine coordinates in $\mathbb{R}^3$ that define the vertices of a flat face, the normal is required to tell us what direction the resulting polygon faces.
A 3D geometry such as a control volume, a CAD model you want to 3D print or a video game character is made up of 2D polygonal faces connected together in a manifold or mesh. Normal vectors are required to always point outwards so we can tell which way the flow is moving, which way the 3D printer should infill, or which way the light should bounce off our game character. Here's a fun 3D animation showing how surface normals look in motion.
from IPython.display import IFrame
IFrame('https://nolankucd.github.io/MEEN20010/media/4.1/torus.html', '100%', '600px')
The normals can be unit vectors or we can scale the length of the vectors by the area of their respective faces which has many uses. In the context of fluid mechanics it allows us to visualise the relative magnitude of the forces on each face for a given pressure — force is pressure per unit area so bigger faces will feel a bigger force.
from IPython.display import IFrame
IFrame('https://nolankucd.github.io/MEEN20010/media/4.1/torus1.html', '100%', '600px')
The Reynolds transport theorem enables the transformation of the conservation equations from a system to a control volume representation. This is very powerful because it frees us from the extremely difficult requirements of the Lagrangian particle tracking approach. For any conserved quantity $N$, the Reynolds transport theorem is as follows:
\begin{equation*} \underbrace{\vphantom{\int\limits_{\large{AB}}}\frac{dN_{sys}}{dt}}_\text{system} = \underbrace{\frac{\partial}{\partial t} \int\limits_{CV}{n \rho d\rlap{V}-}}_\text{control volume} + \underbrace{\int\limits_{CS}{n \rho \vec{V}\cdot{}d{\vec{A}}}}_\text{control surface} \end{equation*}Each under braced group represents the time rate of change of the property $N$ contained within the system, currently within the control volume and being transported across the control surface respectively.
There's a lot going on in this equation so lets break it down a bit.
The group to the left of the equality we've seen before in our description of a system.
The second group corresponding to the control volume contains a partial derivative with respect to time and an integral with respect to volume. The symbol $n$ represents the amount of quantity $N$ per unit mass. Therefore this group adds up the amount of $n$ in the control volume (times the density), and then computes the time rate of change of the total in time.
The final group performs an integral over the control surface. Inside the integral there is our conserved quantity $n$ and a velocity vector $\vec{V}$. The dot product with the normal vector $d\vec{A}$ is taken. What this is doing is computing how much of quantity $n$ is transported normal to the surface due to the component of $\vec{V}$ normal to the control surface. The integral simply sums the total amount of $n$ transported in or out across the control surface.
Now that we have an idea what a control volume is and armed with a basic understanding of the Reynolds Transport theorem, we can recast our conservation laws relative to this Eulerian frame of reference.
The time rate of change of mass within the control volume plus the rate at which mass is transported across the control surface is zero.
Here $N_{sys}$ is $M_{sys}$, $n = 1$ and $\frac{d M_{sys}}{dt} = 0$.
\begin{equation*} \frac{dM_{sys}}{dt} = \frac{\partial}{\partial t} \int\limits_{CV}{(1) \rho d\rlap{V}-} + \int\limits_{CS}{(1) \left(\rho \vec{V}\cdot{}d{\vec{A}}\right)} = 0 \end{equation*}If the flow is steady, i.e. the flow is time invariant we obtain:
\begin{equation*} \int\limits_{CS} \rho \vec{V}\cdot{}d{\vec{A}} = 0 \end{equation*}and if the flow is steady and incompressible:
\begin{equation*} \int\limits_{CS} \vec{V}\cdot{}d{\vec{A}} = 0 \end{equation*}The time rate of change of linear momentum within the control volume plus the rate at which momentum is transported across the control surface equals the sum of the external forces acting upon the control volume.
Here $N_{sys}$ is $\vec{P}_{sys}$, $n = \vec{V}$ and $\frac{d \vec{P}_{sys}}{dt} = \sum{\vec{F}}$
\begin{equation*} \frac{d\vec{P}_{sys}}{dt} = \frac{\partial}{\partial t} \int\limits_{CV}{\left(\vec{V}\right) \rho d\rlap{V}-} + \int\limits_{CS}{\left(\vec{V}\right) \left(\rho \vec{V}\cdot{}d{\vec{A}}\right)} = \sum{\vec{F}} \end{equation*}If the flow is steady:
\begin{equation*} \int\limits_{CS} \vec{V}\left(\rho \vec{V}\cdot{}d{\vec{A}}\right) = \sum{\vec{F}} \end{equation*}and if the flow is steady and incompressible:
\begin{equation*} \rho \int\limits_{CS} \vec{V}\left( \vec{V}\cdot{}d{\vec{A}}\right) = \sum{\vec{F}} \end{equation*}The time rate of change of energy within the control volume plus the rate at which energy is transported across the control surface equals the rate at which heat is added to the control volume plus the rate at which work is done on the control volume by body or surface forces.
Here $N_{sys}$ is $E_{sys}$
$n = e = u + \frac{\vec{V}^2}{2}+gz$
and $\frac{d E_{sys}}{dt} = \dot{Q} - \dot{W}$
\begin{equation*} \frac{dE_{sys}}{dt} = \frac{\partial}{\partial t} \int\limits_{CV}{\left(u + \frac{\vec{V}^2}{2}+gz\right) \rho d\rlap{V}-} + \int\limits_{CS}{\left(u + \frac{\vec{V}^2}{2}+gz\right) \left(\rho \vec{V}\cdot{}d{\vec{A}}\right)} = \dot{Q} - \dot{W} \end{equation*}Once more for steady flow:
\begin{equation*} \dot{Q} - \dot{W} = \int\limits_{CS}{\left(u + \frac{\vec{V}^2}{2}+gz\right) \left(\rho \vec{V}\cdot{}d{\vec{A}}\right)} \end{equation*}and if the flow is steady and incompressible:
\begin{equation*} \dot{Q} - \dot{W} = \rho \int\limits_{CS}{\left(u + \frac{\vec{V}^2}{2}+gz\right) \left( \vec{V}\cdot{}d{\vec{A}}\right)} \end{equation*}We can summerise the conservation laws in a table
Property | System | Control Volume Representation via Reynolds Transport Theorem |
---|---|---|
Mass | $\frac{dM_{sys}}{dt}$ | $\frac{\partial}{\partial t} \int\limits_{CV}{\rho d\rlap{V}-} + \int\limits_{CS}{ \left(\rho \vec{V}\cdot{}d{\vec{A}}\right)} = 0$ |
Linear Momentum | $\frac{d\vec{P}_{sys}}{dt}$ | $\frac{\partial}{\partial t} \int\limits_{CV}{\left(\vec{V}\right) \rho d\rlap{V}-} + \int\limits_{CS}{\left(\vec{V}\right)\left(\rho \vec{V}\cdot{}d{\vec{A}}\right)} = \sum{\vec{F}}$ |
Energy | $\frac{dE_{sys}}{dt}$ | $\frac{\partial}{\partial t} \int\limits_{CV}{e \rho d\rlap{V}-} + \int\limits_{CS}{e \left(\rho \vec{V}\cdot{}d{\vec{A}}\right)} = \dot{Q} - \dot{W}$ |
We will be using the dot product $\left(\rho \vec{V}\cdot{}d{\vec{A}}\right)$ extensively in this section of the course so now might be a good time to remind ourselves what a dot product is and what it does in the context of geometry and fluid mechanics.
The dot product is all about mapping, or projecting, one vector onto another. A vector, as we know, has a direction and a magnitude and we may wish to know how much of one vector is aligned with another vector. In mechanics we would have looked at the Cartesian components of some 2D vector mapped along the $x$ and $y$ axis. The dot product lets us do this for any vector onto another.
So given vectors $\vec{V}_1$ and $\vec{V}_2$ (where we have colocated their tails) we wish to map $\vec{V}_1$ onto $\vec{V}_2$. This means we only care about the orientation of the second vector $\vec{V}_2$ we are mapping onto and not it's magnitude. To make things simple we can convert $\vec{V}_2$ into a unit vector. We do this by dividing by it's norm:
\begin{equation} \vec{V}_{2\text{norm}} = \frac{\vec{V}_2}{\left\| \vec{V}_2 \right\|} \end{equation}Where $\left\| … \right\|$ represents the norm of a vector which is the magnitude of its length. We've now converted $\vec{V}_2$ into a unit vector so that $\left\|\vec{V}_{2\text{norm}}\right\| = 1$.
To map $\vec{V}_1$ onto $\vec{V}_{2\text{norm}}$ we need to know the length (norm) of the first vector and angle between the pair, $\theta$.
\begin{equation} \vec{V}_1 \cdot \vec{V}_{2\text{norm}} = {\left\| \vec{V}_1 \right\|} \cos{\theta} \end{equation}and we can substitute for $\vec{V}_{2\text{norm}}$ to obtain:
\begin{equation} \vec{V}_1 \cdot \vec{V}_2 = {\left\| \vec{V}_1 \right\|}{\left\| \vec{V}_2 \right\|} \cos{\theta} \end{equation}As you can see to obtain $\vec{V}_1 \cdot \vec{V}_2$, the amount of which $\vec{V}_1$ aligns with $\vec{V}_2$ we need need the norms of both vectors and the angle between them. To obtain the mapping onto $\vec{V}_2$ requires that we divide by the norm of the vector we are projecting onto:
\begin{equation} \frac{\vec{V}_1 \cdot \vec{V}_2}{\left\| \vec{V}_2 \right\|} = {\left\| \vec{V}_1 \right\|} \cos{\theta} \end{equation}# This python example plots the dot product of two vectors and shows the mapping of the first onto the second.
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
# This function takes two vectore and plots their dot product
def plot_dot_product(vector1, vector2):
# Make a plot to draw on
fig, ax = plt.subplots(figsize=(10,10))
# Plot the vectors
ax.plot(vector1[0], vector1[1],'ko')
ax.plot(vector2[0], vector2[1],'ko')
ax.quiver(vector1[0], vector1[1], color='b', scale_units='xy', scale=1)
ax.quiver(vector2[0], vector2[1], color='r', scale_units='xy', scale=1)
# Compute the dot product between vector1 and vector2
dot_1_2 = np.dot(vector1, vector2)
# divide by the norm of the vector we are mapping onto
dot_1_2 = dot_1_2 / np.linalg.norm(vector2)
# Construct a new vector (vector3) to represent the mapping of vector1 onto vector 2
# Take vector2 and divide by its norm to scale it to a unit vector and multiply by the scaler dot_1_2
vector3 = vector2 / np.linalg.norm(vector2) * dot_1_2
# Draw the mapped vector and a line to show the mapping
ax.quiver(vector3[0], vector3[1], color='g', scale_units='xy', scale=1) # green
plt.plot([vector1[0],vector3[0]],[vector1[1],vector3[1]],'k-')
# Style the plot
plt.xlim([-10, 10])
plt.ylim([-10, 10])
plt.xlabel("x")
plt.ylabel("y")
plt.grid()
ax.set_aspect('equal')
print(f'The dot product of vector1 and vector2 is: {dot_1_2}')
# Create two vectors at the origin with x and y
vector1 = np.array([5, 4]) # blue
vector2 = np.array([8, -2]) # red
# Call our plot_dot_product function to plot the dot product as a green vector
plot_dot_product(vector1, vector2)
The dot product of vector1 and vector2 is: 3.8805700005813275
An understanding of the conservation laws is very important. Clarity of thought on these important concepts will help you understand a lot of processes that you will come across as engineers. We have introduced how a control volume can allow us to switch from a system of Lagrangian particles to an Eularian representation. This has benefits because tracking all Lagrangian particles is extremely difficult. Finally we took a trip down memory lane to take another look at the dot product which we will leverage in the next notebook when we derive the Reynolds Transport Theorem.