SimScale CAE Forum

Fundamental Equations for Fluid Mechanics


#1

In order to get the solution of a fluid flow problem, we have to know the following unknown quantities:

  1. Velocities u_x, u_y, u_z

  2. Pressure p

  3. Density \rho

  4. Temperature T , the internal energy e or enthalpy h


For a three-dimensional case, we have to determine six unknowns. The following equations help us accomplish this:

  1. Conservation of Momentum

  2. Conservation of Energy

  3. Conservation of Mass

  4. Equation of state


\underline{\textbf{General formulation of the conservation equations}}

If we look at an infinitesimal small control volume (CV), the general formulation for the equations describing conservation laws for a quantity \mathbf{X} for a fixed observer (Eulerian frame of reference) is:

\underbrace{\frac{\partial\rho\mathbf{X}}{\partial t}}_\text{Temporal change inside the CV} + \underbrace{\vec{\nabla}(\rho \vec{v} \mathbf{X})}_\text{Flux across CV boundaries} = \text{additional terms} \tag{1}

If \mathbf{X}= 1 we get the formulation for the conservation of mass, \mathbf{X} = \vec{v} gives the momentum conservation and \mathbf{X} = e + \frac{1}{2}v^2 the energy conservation.


\underline{\textbf{Conservation of Mass}}

The conservation of mass in a CV is described by the continuity equation:

\underbrace{\frac{\partial\rho}{\partial t}}_\text{Temporal change inside the CV} + \underbrace{\vec{\nabla}(\rho \vec{v})}_\text{Flux across CV boundaries} = 0 \tag{2}

This representation describes the changes at a fixed location (Eulerian frame of reference). In some cases, it might be better to use the Lagrangian frame of reference. It describes the change in a CV along a trajectory. For this, we first use the chain rule for the second term on the left side of the equation. This results in:

\underbrace{\frac{\partial \rho}{\partial t} + \vec{v}\vec{\nabla{\rho}}}_{\frac{D\rho}{Dt}} + \rho\vec{\nabla\vec{{v}}} = 0 \tag{3}

The term \frac{D\rho}{Dt} is called the material derivative. It describes the changes that a CV experiences when moving in a velocity field. In this context, it is important to know that the transformation from the Eulerian frame of reference to the Lagrangian frame of reference (and vice versa) is not a change of the reference system (thus a change of the coordinate system) but rather another way of balancing the changes that a CV sees. For a Lagrangian frame of reference, the continuity equation is:

\frac{D\rho}{D t} = -\rho\vec{\nabla\vec{{v}}} \tag{4}

For an incompressible fluid (\rho = constant), we get:

\vec{\nabla\vec{{v}}} = 0 \tag{5}

This means that the flow field of an incompressible fluid has no divergence so it has no sources and sinks.

Hint: Compressible flow can be approximated as incompressible for steady flow if the Mach number is below 0.3.


\underline{\textbf{Conservation of Momentum}}

We can recall equation (1) for the conservation of momentum setting \mathbf{X} =\vec{v}.

\underbrace{\frac{\partial\rho\vec{v}}{\partial t}}_\text{Temporal change inside the CV} + \underbrace{\vec{\nabla}(\rho[\vec{v} \otimes \vec{v}])}_\text{Flux across CV boundaries} = \underbrace{-\vec{\nabla}p}_\text{Pressure Force} + \underbrace{\vec{\nabla}\tau}_\text{Friction Force} + \underbrace{\vec{f}\rho}_\text{External Field Forces}\tag{6}

The equation for the conservation of momentum is a balance of vectors (forces). As you can see on the right-hand side, we have to take care of the pressure forces, friction forces as well as external field forces. The vector \vec{f} indicates the acceleration vector of the external field (for example, gravitation).
The term [\vec{v} \otimes \vec{v}] is the outer product of the velocity vectors \vec{v} thus a tensor.

[\vec{v} \otimes \vec{v}] = \begin{bmatrix} v_x v_x & v_x v_y & v_x v_z\\ v_y v_x & v_y v_y & v_y v_z\\ v_z v_x & v_z v_y & v_z v_z \end{bmatrix} \tag{7}

The momentum flux \nabla (\rho[\vec{v} \otimes \vec{v}]) is a vector. In the Cartesian coordinate system, the vector is described as:

\nabla (\rho[\vec{v} \otimes \vec{v}]) = \begin{bmatrix} \frac{\partial}{\partial x} (\rho v_x v_x) & \frac{\partial}{\partial y} (\rho v_y v_x) & \frac{\partial}{\partial z} (\rho v_z v_x)\\ \frac{\partial}{\partial x} (\rho v_x v_y) & \frac{\partial}{\partial x} (\rho v_y v_y) & \frac{\partial}{\partial x} (\rho v_z v_y)\\ \frac{\partial}{\partial x} (\rho v_x v_z) & \frac{\partial}{\partial x} (\rho v_y v_z) & \frac{\partial}{\partial x} (\rho v_z v_z) \end{bmatrix} \tag{8}

The tensor describing friction is showed as:

\tau = \begin{bmatrix} \tau_{xx} & \tau_{xy} & \tau_{xz}\\ \tau_{yx} & \tau_{yy} & \tau_{yz}\\ \tau_{zx} & \tau_{zy} & \tau_{zz} \end{bmatrix} \tag{9}

The tensor consists of normal stresses \tau_{i,i} as well as shear stresses \tau_{i,k} acting on a CV. Please note that this tensor is symmetric!

The friction force \vec{\nabla}\tau in the momentum equation is a vector:

\vec{\nabla}\tau = \begin{bmatrix} \frac{\partial}{\partial x}\tau_{xx} & \frac{\partial}{\partial y}\tau_{yx} & \frac{\partial}{\partial z}\tau_{zx}\\ \frac{\partial}{\partial x}\tau_{xy} & \frac{\partial}{\partial y}\tau_{yy} & \frac{\partial}{\partial z}\tau_{zy}\\ \frac{\partial}{\partial x}\tau_{xz} & \frac{\partial}{\partial y}\tau_{yz} & \frac{\partial}{\partial z}\tau_{zz} \end{bmatrix} \tag{10}

For a Newtonian fluid, the correlation between the tensor describing friction and the velocity field is:

\tau = \mu [\vec{\nabla} \otimes \vec{v} + (\vec{\nabla} \otimes \vec{v})^T - \frac{2}{3}(\vec{\nabla} \vec{v}) \mathbf{I}] \tag{11}

where \mathbf{I} is the unit tensor:

\mathbf{I} = \begin{bmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1 \end{bmatrix} \tag{12}

Writing the tensor for friction out in full:

\begin{align} \tau & =\mu \begin{bmatrix} \frac{\partial}{\partial x} v_x & \frac{\partial}{\partial x} v_y & \frac{\partial}{\partial x} v_z\\ \frac{\partial}{\partial y} v_x & \frac{\partial}{\partial y} v_y & \frac{\partial}{\partial y} v_z\\ \frac{\partial}{\partial z} v_x & \frac{\partial}{\partial z} v_y & \frac{\partial}{\partial z} v_z \end{bmatrix} + \mu \begin{bmatrix} \frac{\partial}{\partial x} v_x & \frac{\partial}{\partial x} v_y & \frac{\partial}{\partial x} v_z\\ \frac{\partial}{\partial y} v_x & \frac{\partial}{\partial y} v_y & \frac{\partial}{\partial y} v_z\\ \frac{\partial}{\partial z} v_x & \frac{\partial}{\partial z} v_y & \frac{\partial}{\partial z} v_z \end{bmatrix} \\ & = -\frac{2}{3}\mu \begin{bmatrix} [\frac{\partial}{\partial x} v_x + \frac{\partial}{\partial y} v_y + \frac{\partial}{\partial z} v_z] & 0 & 0\\ 0 & [\frac{\partial}{\partial x} v_x + \frac{\partial}{\partial y} v_y + \frac{\partial}{\partial z} v_z] & 0\\ 0 & 0 & [\frac{\partial}{\partial x} v_x + \frac{\partial}{\partial y} v_y + \frac{\partial}{\partial z} v_z] \end{bmatrix} \end{align} \tag{13}

Finally, we get for the normal as well as the shear components the following representations:

\tau_{xx} = 2\mu\frac{\partial v_x}{\partial x} - \frac{2}{3}\mu\vec{\nabla} \vec{v} \tag{14}
\tau_{xy} = \tau_{yx} = \mu (\frac{\partial v_x}{\partial y} + \frac{\partial v_y}{\partial x}) \tag{15}

In equation (14) the volume viscosity of the normal stresses \tau_{xx}, \tau_{yy}, \tau_{zz} have been set to -\frac{2}{3}\mu\vec{\nabla}\vec{v} so that the sum of the normal stresses is equal to zero. This is necessary so that the pressure in the Navier-Stokes equation is equal to the thermodynamic pressure.

In order to get the Lagrangian representation, we use the chain rule for both terms on the left-hand side in equation (6):

\rho\frac{\partial \vec{v}}{\partial t} + \vec{v}\frac{\partial \rho}{\partial t}+ \rho \vec{v}[\vec{\nabla} \otimes \vec{v}] + \vec{v} \vec{\nabla} (\rho\vec{v}) = -\vec{\nabla}p + \vec{\nabla}\tau + \rho \vec{f} \tag{16}

The continuity equation causes the following term to vanish:

\vec{v}\frac{\partial \rho}{\partial t} + \vec{v} \vec{\nabla} (\rho\vec{v}) = 0

Equation (16) becomes:

\rho\frac{\partial \vec{v}}{\partial t} + \rho \vec{v}[\vec{\nabla} \otimes \vec{v}] = -\vec{\nabla}p + \vec{\nabla}\tau + \rho \vec{f} \tag{17}

The representation in the Lagrangian reference frame then is:

\rho\frac{D \vec{v}}{Dt} = -\vec{\nabla}p + \vec{\nabla}\tau + \rho \vec{f} \tag{18}

with the material derivative of the velocity vector:

\frac{D \vec{v}}{Dt} = \frac{\partial \vec{v}}{\partial t} + \vec{v}[\vec{\nabla} \otimes \vec{v}] \tag{19}

\underline{\textbf{Conservation of Energy}}

For the Eulerian frame of reference the energy equation gives:

\begin{align} \underbrace{ \frac{\partial (\rho (e + \frac{1}{2}v^2))}{\partial t}}_\text{Temporal change inside the CV} + \underbrace{ \vec{\nabla} \left(\rho \vec{v} (e + \frac{1}{2}v^2)\right)}_\text{Flux across CV boundaries} & = \underbrace{-\vec{\nabla}(p\vec{v})}_\text{Pressure} + \underbrace{\vec{\nabla}(\tau\vec{v})}_\text{Friction} \\ & + \underbrace{\rho \vec{v} \vec{f}}_\text{External field forces} - \underbrace{\vec{\nabla}\vec{\dot{q}}}_\text{Heat Conduction} + \underbrace{\dot{Q_s}}_\text{Heat Source} \tag{20} \end{align}

In equation (20) e is the internal energy, \vec{\dot{q}} the flux vector of the heat conduction and \vec{\dot{Q_s}} the introduced or dissipated thermal output from a source (examples: combustion, evaporating drops, radiation).
According to Fourier’s law, the flux vector for heat conduction is:

\vec{\dot{q}} = \lambda \vec{\nabla}T \tag{21}

where \lambda is the so-called thermal conductivity.


(For more information about this subject, we advise you to read the existing SimWiki article on heat transfer).


The term (\tau\vec{v}) is the product of the tensor \tau and vector \vec{v}, thus a vector.

(\tau\vec{v}) = \begin{bmatrix} \tau_{xx}v_x & \tau_{xy}v_y & \tau_{xz}v_z\\ \tau_{yx}v_x & \tau_{yx}v_y & \tau_{yz}v_z\\ \tau_{zx}v_x & \tau_{zy}v_y & \tau_{zz}v_z \end{bmatrix} \tag{22}

The evaluation of the friction term in Cartesian coordinates yields:

\begin{align} \vec{\nabla}(\tau\vec{v}) & = \frac{\partial}{\partial x} (\tau_{xx}v_x) + \frac{\partial}{\partial x} (\tau_{xy}v_y) + \frac{\partial}{\partial x} (\tau_{xz}v_z) \\& + \frac{\partial}{\partial y} (\tau_{yx}v_x) + \frac{\partial}{\partial y} (\tau_{yy}v_y) + \frac{\partial}{\partial y} (\tau_{yz}v_z) \\& + \frac{\partial}{\partial z} (\tau_{zx}v_x) + \frac{\partial}{\partial z} (\tau_{zy}v_y) + \frac{\partial}{\partial z} (\tau_{zz}v_z) \end{align} \tag{23}

Besides formula (20) describing the conservation of energy, we have several other possibilities to do so. But first we want to derive conservation equations for the kinetic energy from the convervation of momentum. If we multiply formula (18) with the velocity vector \vec{v}, we get:

\vec{v} \rho \frac{D\vec{v}}{Dt} = -\vec{v}\vec{\nabla}p + \vec{v}\vec{\nabla}\tau + \rho \vec{v} \vec{f} \tag{24}

The material derivative on the left-hand side can be rearranged with the help of the continuity equation.

\begin{align} \vec{v} \rho \frac{D\vec{v}}{Dt} & = \rho \frac{D \left( \frac{\vec{v^2}}{2}\right)}{Dt} \\& = \rho \frac{\partial \left( \frac{\vec{v^2}}{2}\right)}{\partial t} + \rho \vec{v} \vec{\nabla} \left(\frac{\vec{v^2}}{2}\right) + \frac{\vec{v^2}}{2} \underbrace{\left( \frac{\partial p}{\partial t} + \vec{\nabla}(\rho\vec{v}) \right)}_{= 0 \rightarrow continuity} \\& = \frac{\partial(\rho \frac{\vec{v^2}}{2})}{\partial t} + \vec{\nabla} (\rho \vec{v} \frac{\vec{v^2}}{2}) \tag{25} \end{align}

From (24) we then get the equation for the mechanical energy flux (kinetic energy).

\frac{\partial}{\partial t} \left(\rho \frac{\vec{v^2}}{2} \right) + \vec{\nabla} \left(\rho e \vec{v} \right) = -\vec{v}\vec{\nabla}p + \vec{v}\vec{\nabla}\tau + \rho \vec{v} \vec{f} \tag{26}

Equation (20) and (26) can be combined into:

\frac{\partial (\rho e)}{\partial t} + \vec{\nabla}(\rho e \vec{v}) = -p \vec{\nabla}\vec{v} + \tau : [\vec{\nabla} \otimes \vec{v}] - \vec{\nabla}\vec{\dot{q}} + \dot{Q_s} \tag{27}

Next to equation (20), this is another possibility of the energy equation, where the kinetic energy has been eliminated.

\begin{align} \tau : [\vec{\nabla} \otimes \vec{v}] & = \tau_{xx} \frac{\partial}{\partial x} v_x + \tau_{yx} \frac{\partial}{\partial x} v_y + \tau_{zx} \frac{\partial}{\partial x} v_z \\& + \tau_{xy} \frac{\partial}{\partial y} v_x + \tau_{yy} \frac{\partial}{\partial y} v_y + \tau_{zy} \frac{\partial}{\partial y} v_z \\& \tau_{xz} \frac{\partial}{\partial z} v_x + \tau_{yz} \frac{\partial}{\partial z} v_y + \tau_{zz} \frac{\partial}{\partial z} v_z \tag{28} \end{align}

Term (28) expresses the rate of the irreversible transformation to internal energy (dissipation). Sometimes it is better to describe the energy equation in terms of the enthalpy h:

h = e + \frac{p}{\rho} \tag{29}

From equation (27) we get the energy equation described in terms of enthalpy h.

\frac{\partial (\rho h)}{\partial t} + \vec{\nabla}(\rho h \vec{v}) = \frac{\partial \rho}{\partial t} + \vec{v}\vec{\nabla}p + \tau : [\vec{\nabla} \otimes \vec{v}] - \vec{\nabla}\vec{\dot{q}} + \dot{Q_s} \tag{30}

Finally the energy equation in Cartesian coordinates taking into account Fourier’s law is:

\begin{align} \frac{\partial (\rho h)}{\partial t} + \frac{\partial (\rho h v_x)}{\partial x} + \frac{\partial (\rho h v_y)}{\partial y} + \frac{\partial (\rho h v_z)}{\partial z} & = \frac{\partial p}{\partial t} + v_x \frac{\partial p}{\partial x} + v_y \frac{\partial p}{\partial y} + v_z \frac{\partial p}{\partial z} \\& + \tau_{xx} \frac{\partial v_x}{\partial x} + \tau_{yx} \frac{\partial v_y}{\partial x} + \tau_{zx} \frac{\partial v_z}{\partial x} \\& + \tau_{xy} \frac{\partial v_x}{\partial y} + \tau_{yy} \frac{\partial v_y}{\partial y} + \tau_{zy} \frac{\partial v_z}{\partial y} \\& + \tau_{xz} \frac{\partial v_x}{\partial z} + \tau_{yz} \frac{\partial v_y}{\partial z} + \tau_{zz} \frac{\partial v_z}{\partial z} \\& + \vec{\nabla} (\lambda \vec{\nabla} T) + \dot{Q_s} \tag{31} \end{align}

From equation (30) we can derive the representation for the Lagrangian frame of reference.

\begin{align} \frac{\partial (\rho h)}{\partial t} + \vec{\nabla}(\rho h \vec{v}) & = h \frac{\partial \rho}{\partial t} + \rho \frac{\partial h}{\partial t} + h\vec{\nabla}(\rho \vec{v}) + \rho \vec{v} \vec{\nabla}h \\& = \rho \underbrace{\left( \frac{\partial h}{\partial t} + \vec{v} \vec{\nabla}h \right)}_{= \frac{Dh}{Dt}} + h \underbrace{\left( \frac{\partial \rho}{\partial t} + \vec{\nabla}(\rho \vec{v}) \right)}_\text{is zero because of continuity} \\& = \rho \frac{Dh}{Dt} \tag{32} \end{align}

Now we can write the whole energy equation in the Lagrangian frame of reference formulated with the enthalpy.

\rho \frac{Dh}{Dt} = \frac{\partial p}{\partial t} + \vec{v} \vec{\nabla}p + \tau : [\vec{\nabla} \otimes \vec{v}] - \vec{\nabla} \vec{\dot{q}} + \dot{Q_s} \tag{33}

The next step would be to derive the Navier-Stokes equation from the conservation of mass and momentum. We advise you to read the existing SimWiki article on the Navier-Stokes equations.


Resources

  • Dr.-Ing. Rainer Koch (Institute of Thermal Turbomachines - Karlsruhe Institute of Technology): Script for “Numerische Simulation reagierender Zweiphasenströmungen” (Numerical Simulation of Reactive Two-phase Flows)

Turbulence – The Gordian Knot
How Do Wings Work?