Total energy of the fluid

Consider a one dimensional system with fluid in it. Mass and momentum balance equation of the system are (in the absence of external forces and assuming Newtonian behaviour valid for viscocity), \begin{eqnarray} \frac{\partial \rho}{\partial t} + \frac{\partial}{\partial x}(\rho u)= 0\\ \rho\frac{\partial u}{\partial t} = -c_s^2\frac{\partial \rho}{\partial x} + \nu\frac{\partial u}{\partial x^2} \end{eqnarray}

What is the total mechanical energy of the system? I would take energy as solely kinetic energy of the system.

\begin{eqnarray} E = \sum\frac{1}{2}\rho u^2 \end{eqnarray}

It seems that this definition is incorrect as if we start with a system of initial density variation $\rho(x,0) = \rho(x)$ and zero velocity everywhere $u(x,0)= 0$ then we start with zero kinetic energy and zero total energy. But from the mass and momentum balance equations it is clear that there will motion in fluid due to density variations. So we have higher energy than we started with.

What is wrong with definition of total energy I am assuming? which part of the energy should be taken into account?

• You are missing the internal energy of the fluid (which depends on the equation of state). – Thomas Feb 18 '16 at 18:35
• @alekhine since there is force proportional to gradient of density, there is also energy associated with presence of gradient of density. It is potential energy, in addition to kinetic energy you already have. – Ján Lalinský Feb 18 '16 at 21:09
• The title states the total energy, your question is about mechanical energy? Which one are you interested in? @Thomas, i would argue that the mechanical energy doesn't include the internal energy (its an isothermal system anyway) but should include the effects of pressure, i.e. $e_m=\frac{p}{\rho}+\frac{1}{2}v^2$. If he is interested in the total energy, then ofcourse the internal energy is required along with any potential energies. – nluigi Feb 19 '16 at 13:56
• @nluigi I expanded my comment into an answer – Thomas Feb 19 '16 at 23:51

1) There is no "total mechanical energy", there is only mechanical energy and total energy. Only total energy $$E =\int d^3x\, \left({\cal E}_{int}+\frac{1}{2}\rho v^2\right)$$ is conserved. Here, ${\cal E}_{int}$ is the internal energy of the gas. During the expansion of a gas pressure gradients convert internal energy to kinetic energy. If the gas is moving in an external potential then there is an extra potential energy term $n V$.
2) The internal energy is related to pressure and density. The precise dependence depends on the equation of state (we usually call the inverse, $P=P({\cal E}_{int},\rho)$ the equation of state). In general, $P$ really is a function of two variables, but the situation sometimes simplifies. For a free gas in $d$ dimensions $${\cal E}_{int} = \frac{d}{2}P\, .$$
3) In writing the Navier-Stokes equation you already made certain assumptions about the equation of state or the kind of flow you are considering. In general, the RHS involves $\partial P/(\partial x)$. In writing $c_s^2\partial \rho/(\partial x)$ you assume that either $P$ is not a function of $T$, or that $T$ is constant.