# Fluid Mechanics/Control Volume Analysis
## Control Volume Analysis

A fluid dynamic system can be analyzed using a control volume, which is an imaginary surface enclosing a volume of interest. The control volume can be fixed or moving, and it can be rigid or deformable. Thus, we will have to write the most general case of the laws of mechanics to deal with control volumes.

### Conservation of Mass

The first equation we can write is the conservation of mass over time. Consider a system where mass flow is given by dm/dt, where m is the mass of the system. The term on the left denotes the rate of change of the mass of the system. The first term on the right describes the amount of flow across the control surface. The second term on the right refer to the condition within the control volume. We have,
${\dot {m}}=\int _{CS}\rho \left(\mathbf {V} \cdot \mathbf {n} \right)dA+{\frac {d}{dt}}\int _{CV}\rho dV$
However, by definition of a system the mass of which is a constant; thus the left-hand side of the above equation equals to zero and it could be rewritten as:
$\int _{CS}\rho \left(\mathbf {V} \cdot \mathbf {n} \right)dA=-{\frac {d}{dt}}\int _{CV}\rho dV$
For steady flow, the time derivative of the quantity is zero, we have
$\int _{CS}\rho \left(\mathbf {V} \cdot \mathbf {n} \right)dA=0$
And for incompressible flow, we have
$\int _{CS}\left(\mathbf {V} \cdot \mathbf {n} \right)dA=0$
If we consider flow through a tube, we have, for steady flow,
$\rho _{1}A_{1}V_{1}=\rho _{2}A_{2}V_{2}$
and for incompressible steady flow, A$_1$V$_1$ = A$_2$V$_2$.

### Conservation of Momentum

Law of conservation of momentum as applied to a control volume states that
$\sum F={\frac {d}{dt}}\left(\int _{CV}\!\mathbf {V} \mathbf {\rho } \,dV\right)+\int _{CS}\mathbf {V} \mathbf {\rho } \left(\mathbf {V} \cdot \mathbf {n} \right)dA$
where V is the velocity vector and n is the unit vector normal to the control surface at that point.
The sum of the forces represents the sum of forces that act on the entirety of the fluid volume (body forces) and the forces that act only upon the bounding surface of a fluid (surface forces). Body forces include the gravitational force.

### Conservation of Energy

The law of Conservation of Energy in fluid mechanics is a specific application of the First Law of Thermodynamics.
${\frac {d\mathbf {Q} }{dt}}+{\frac {d\mathbf {W} }{dt}}={\frac {d}{dt}}\left(\int _{CV}e\mathbf {\rho } \,dV\right)+\int _{CS}e\mathbf {\rho } \left(\mathbf {V} \cdot \mathbf {n} \right)dA$
where e is the energy per unit mass.

### Bernoulli's Equation

Bernoulli's equation considers frictionless flow along a streamline.
For steady, incompressible flow along a streamline, we have
${\frac {p}{\rho }}+{\frac {V^{2}}{2}}+gz=constant$
We see that Bernoulli's equation is just the law of conservation of energy without the heat transfer and work.
It may seem that Bernoulli's equation can only be applied in a very limited set of situations, as it requires ideal conditions. However, since the equation applies to streamlines, we can consider a streamline near the area of interest where it is satisfied, and it might still give good results, i.e., you don't need a control volume for the actual analysis (although one is used in the derivation of the equation).

#### Energy in terms of Head

Bernoulli's equation can be recast as
${\frac {p}{\rho g}}+{\frac {V^{2}}{2g}}+z=constant$
This constant can be called head of the water, and is a representation of the amount of work that can be extracted from it. For example, for water in a dam, at the inlet of the penstock, the pressure is high, but the velocity is low, while at the outlet, the pressure is low (atmospheric) while the velocity is high. The value of head calculated above remains constant (ignoring frictional losses).

#### Mechanical Energy Balance Equation

Yet another variation of the Bernoulli's equation is the mechanical energy balance equation. The mechanical energy balance equation is useful when needing to consider things such as work or losses due to friction, or if there are differences between the outlet and inlet (such as pressure, velocity, and height).
${\frac {\Delta p}{\rho }}+{\frac {\Delta (V^{2})}{2}}+g\Delta z+f=-w$

## Conservation Equations of Mass, Momentum and Energy
### Equation of Continuity

* A differential mass balance relating density change to velocity.
    ${\frac {\partial \rho }{\partial t}}+\nabla \cdot \left(\rho \mathbf {V} \right)=0$
* For incompressible fluids the equation of continuity reduces to:
    $\rho \left(\nabla \cdot \mathbf {V} \right)=0$
    since
       ${\frac {\partial \rho }{\partial t}}=0$
    for all incompressible fluids

### Euler's Equation

* applies conservation of momentum to inviscid, incompressible flow.
    $\rho \mathbf {g} -\nabla p=\rho {\frac {d\mathbf {V} }{dt}}$

### Stokes' Equation

* applies conservation of momentum in creeping flow limit (low Reynold's Number)
    $\nabla p=\mu \nabla ^{2}\mathbf {V}$