# Energy equation in Three Dimension

by Dasa . 01 Sep 2023

The first law of thermodynamics states that the change in internal energy equals the work done, and change is heat transfer.

Change in total (Specific) energy (E) of a fluid particle = Work done by the fluid particle + change in heat of fluid particle.

\begin{aligned} \begin{Bmatrix} \text{Change in Specific } \\ \text{energy (E) of a}\\ \text{fluid particle} \end{Bmatrix} = \begin{Bmatrix} \text{Work done } \\ \text{by the } \\ \text{fluid particle} \end{Bmatrix} + \begin{Bmatrix} \text{change in heat } \\ \text{of the } \\ \text{fluid particle} \end{Bmatrix} \end{aligned}

Change in Specific energy (E) of a fluid particle is

$\rho \frac{D E} {D t}$

The specific energy (E) is equal to the sum of internl energy (i), kinetic energy ($\frac{1}{2}(u^2+v^2+w^2)$), and gravitational potential energy.

If the potential energy due to gravitational force is considered as source term we can define the Specific energy as below

$E = i + \frac{1}{2}(u^2+v^2+w^2)$

## Work done

Work done by the fluid particle is equal to the product of the velocity and the forces.

We get the below equation when we take x-momentum with out the source term from Momentum equation in a 3D particle and its surface & body forces and multiply it by velcity u.

$\begin{array}{c} \frac{\partial [u(-p + \tau_{xx})]}{\partial x} + \frac{\partial (u \tau_{yx})}{\partial y} + \frac{\partial (u \tau_{zx})}{\partial z} \end{array}$

Similary we can do for y and z directions as below

$\begin{array}{c} \frac{\partial (v \tau_{xx})}{\partial x} + \frac{\partial [v(-p + \tau_{yx})]}{\partial y} + \frac{\partial (v \tau_{zx})}{\partial z} \\\\ \frac{\partial (w\tau_{xx})}{\partial x} + \frac{\partial (w\tau_{yx})}{\partial y} + \frac{\partial [w(-p+\tau_{zx})]}{\partial z} \end{array}$

Since,

$\begin{array}{c} -\frac{\partial (up)}{\partial x} -\frac{\partial (vp)}{\partial y} -\frac{\partial (wp)}{\partial z} = - div(pU) \end{array}$

We can write the total work done by the fluid particle due to surface forces as below

\begin{aligned} -div(pU) + \frac{\partial (u\tau_{xx})}{\partial x} + \frac{\partial (u \tau_{yx})}{\partial y} + \frac{\partial (u \tau_{zx})}{\partial z} \\ + \frac{\partial (v \tau_{xx})}{\partial x} + \frac{\partial (v \tau_{yx})}{\partial y} + \frac{\partial (v \tau_{zx})}{\partial z} \\ + \frac{\partial (w\tau_{xx})}{\partial x} + \frac{\partial (w\tau_{yx})}{\partial y} + \frac{\partial (w \tau_{zx})}{\partial z}\\ =>Eq-(1) \end{aligned}

## Energy flux due to heat conduction

Similar to the conservation of mass we can define the energy flux due to heat conduction as below

Now the total heatflux per unit volume can be expressed with below equation

$\begin{array}{c} -\frac{\partial q_{x}}{\partial x} - \frac{\partial q_{y}}{\partial y} - \frac{\partial q_{z}}{\partial z} = -div(q) \end{array}$

Fourier law gives the flux due to heat condution (Refer Heat Transfer) as below.

$q_{x} = -k \frac{\partial T}{\partial x}$, $q_{y} = -k \frac{\partial T}{\partial y}$, and $q_{z} = -k \frac{\partial T}{\partial z}$

The same can be written in vector form as below

$q = -k \space grad(T)$

So, we can say

\begin{aligned} -div(q) = div(k \space grad(T))\\ =>Eq-(2) \end{aligned}

## Total Energy

The total energy is equal to the sum of work done (Eq. 1), Energy flux (Eq. 2) due to heat conduction, and stored potential energy due to gravity ($S_{E}$).

So,

\begin{aligned} \rho \frac{D E} {D t} &= -div(pU) + \frac{\partial (u\tau_{xx})}{\partial x} + \frac{\partial (u \tau_{yx})}{\partial y} + \frac{\partial (u \tau_{zx})}{\partial z} \\ &+ \frac{\partial (v \tau_{xx})}{\partial x} + \frac{\partial (v \tau_{yx})}{\partial y} + \frac{\partial (v \tau_{zx})}{\partial z} \\ &+ \frac{\partial (w\tau_{xx})}{\partial x} + \frac{\partial (w\tau_{yx})}{\partial y} + \frac{\partial (w \tau_{zx})}{\partial z}\\ &+ div(k \space grad(T)) + S_{E}\\ &=>Eq-(3) \end{aligned}

## Kinetic Energy

The kinetic energy can be calculated by multiplying the momentum equation by the velocity.

Below is the momentum equation from Momentum equation in a 3D particle and its surface & body forces

$\begin{array}{c} \rho \frac{Du}{Dt} = \frac{\partial (-p + \tau_{xx})}{\partial x} + \frac{\partial (\tau_{yx})}{\partial y} + \frac{\partial (\tau_{zx})}{\partial z} + S_{Mx} \\\\ \rho \frac{Dv}{Dt} = \frac{\partial (\tau_{xx})}{\partial x} + \frac{\partial (-p + \tau_{yx})}{\partial y} + \frac{\partial (\tau_{zx})}{\partial z} + S_{My}\\\\ \rho \frac{Dw}{Dt} = \frac{\partial (\tau_{xx})}{\partial x} + \frac{\partial (\tau_{yx})}{\partial y} + \frac{\partial (-p+\tau_{zx})}{\partial z} + S_{Mz}\\\\ \end{array}$

When we separate the pressure terms

$\begin{array}{c} \rho \frac{Du}{Dt} = -\frac{\partial p}{\partial x} + \frac{\partial \tau_{xx}}{\partial x} + \frac{\partial \tau_{yx}}{\partial y} + \frac{\partial \tau_{zx}}{\partial z} + S_{Mx} \\\\ \rho \frac{Dv}{Dt} = -\frac{\partial p}{\partial y} + \frac{\partial \tau_{xx}}{\partial x} + \frac{\partial \tau_{yx}}{\partial y} + \frac{\partial \tau_{zx}}{\partial z} + S_{My}\\\\ \rho \frac{Dw}{Dt} = -\frac{\partial p}{\partial z} + \frac{\partial \tau_{xx}}{\partial x} + \frac{\partial \tau_{yx}}{\partial y} + \frac{\partial \tau_{zx}}{\partial z} + S_{Mz}\\\\ \end{array}$

Since,

$-\frac{\partial p}{\partial x} -\frac{\partial p}{\partial y} -\frac{\partial p}{\partial z} = -grad \space p$

We can write the Kinematic equation as below,

$\begin{array}{c} \rho \frac{D \frac{1}{2}(u^2+v^2+w^2)} {D t} &= -U.grad \space p \\\\ &+ u(\frac{\partial \tau_{xx}}{\partial x} + \frac{\partial \tau_{yx}}{\partial y} + \frac{\partial \tau_{zx}}{\partial z})\\\\ &+ v(\frac{\partial \tau_{xx}}{\partial x} + \frac{\partial \tau_{yx}}{\partial y} + \frac{\partial \tau_{zx}}{\partial z})\\\\ &+ w(\frac{\partial \tau_{xx}}{\partial x} + \frac{\partial \tau_{yx}}{\partial y} + \frac{\partial \tau_{zx}}{\partial z})\\\\ &+ U.S_{M}\\\\ &=>Eq-(4) \end{array}$

## Internal Energy

The internal energy can be calculated by subtracting the Kinetic energy (Eq. 4) from total energy (Eq. 3).

### LHS

$\rho \frac{D E} {D t} = \rho \frac{D [i+\frac{1}{2}(u^2+v^2+w^2)]} {D t}$

$\rho \frac{D [i+\frac{1}{2}(u^2+v^2+w^2)]} {D t} - \rho \frac{D [\frac{1}{2}(u^2+v^2+w^2)]} {D t} = \rho \frac{D [i]} {D t}$

### RHS

Since,

$-div(pU) = -[(U.grad \space p ) + p \space div(U)]$

Using the dot product rule (refer divergence rule)

$\frac{\partial (u\tau_{xx})}{\partial x} = u\frac{\partial (\tau_{xx})}{\partial x} + \tau_{xx} \frac{\partial (u)}{\partial x}$

And introducing a new source term $S_{E} - U.S_{M} = S_{i}$, We can write the Internal Energy equation as below

\begin{aligned} \rho \frac{D [i]} {D t} &= - p \space div(U) + div(k \space grad(T)) \\ &+ \tau_{xx}\frac{\partial u}{\partial x} + \tau_{yx} \frac{\partial u}{\partial y} + \tau_{zx} \frac{\partial u}{\partial z} \\ &+ \tau_{xx}\frac{\partial v}{\partial x} + \tau_{yx}\frac{\partial v}{\partial y} + \tau_{zx}\frac{\partial v}{\partial z} \\ &+ \tau_{xx} \frac{\partial w}{\partial x} + \tau_{yx} \frac{\partial w}{\partial y} + \tau_{zx} \frac{\partial w}{\partial z}\\ &+ S_{i}\\ &=>Eq-(5) \end{aligned}

## Deriving Temperature Equation for Incompressible Fluid

For incompressible fluid

$i = c \space T$

Where, c - specific heat

$div \space U = 0$

We can rewrite Eq.5 from the above conditions, resulting in a temperature equation as below.

\begin{aligned} \rho c \frac{D T} {D t} &= div(k \space grad(T)) \\ &+ \tau_{xx}\frac{\partial u}{\partial x} + \tau_{yx} \frac{\partial u}{\partial y} + \tau_{zx} \frac{\partial u}{\partial z} \\ &+ \tau_{xx}\frac{\partial v}{\partial x} + \tau_{yx}\frac{\partial v}{\partial y} + \tau_{zx}\frac{\partial v}{\partial z} \\ &+ \tau_{xx} \frac{\partial w}{\partial x} + \tau_{yx} \frac{\partial w}{\partial y} + \tau_{zx} \frac{\partial w}{\partial z}\\ &+ S_{i}\\ &=>Eq-(6) \end{aligned}

## Deriving Enthalpy Equation for Compressible Fluids

The specific enthalpy(h)(total enthalpy per unit mass) of fluid is equal to the sum of internal energy (i) and the product of pressure § & specific volume ($1/\rho$).

$h = i + \frac{p}{\rho}$

The total enthalpy ($h_{0}$) equals the sum of specific enthalpy (h) and kinetic energy ($\frac{1}{2}(u^2+v^2+w^2)$).

\begin{aligned} h_{0} &= h + \frac{1}{2}(u^2+v^2+w^2)\\ &= i + \frac{p}{\rho} + \frac{1}{2}(u^2+v^2+w^2)\\ &= E + \frac{p}{\rho} \end{aligned}

Now,

\begin{aligned} E = h_{0} - \frac{p}{\rho}\\ =>Eq-(7) \end{aligned}

As described in Conservation of momentum and energy, we can write the Energy equation below.

\begin{aligned} \rho \frac{DE}{Dt} = \frac{\partial (\rho E)}{\partial t} + div(\rho E U) \end{aligned}

Substituting Eq. 7 to the above we get,

\begin{aligned} \rho \frac{D (h_{0} - \frac{p}{\rho})}{Dt} &= \frac{\partial (\rho (h_{0} - \frac{p}{\rho}))}{\partial t} + div(\rho (h_{0} - \frac{p}{\rho}) U)\\ &= \frac{\partial (\rho h_{0})}{\partial t} - \frac{\partial p}{\partial t} + div(\rho h_{0}U) - div(pU) \end{aligned}

Using Eq. 3 we can write the below equation

\begin{aligned} \frac{\partial (\rho h_{0})}{\partial t} - \frac{\partial p}{\partial t} + div(\rho h_{0}U) - div(pU)\\ = \\ -div(pU) + \frac{\partial (u\tau_{xx})}{\partial x} + \frac{\partial (u \tau_{yx})}{\partial y} + \frac{\partial (u \tau_{zx})}{\partial z} \\ + \frac{\partial (v \tau_{xx})}{\partial x} + \frac{\partial (v \tau_{yx})}{\partial y} + \frac{\partial (v \tau_{zx})}{\partial z} \\ + \frac{\partial (w\tau_{xx})}{\partial x} + \frac{\partial (w\tau_{yx})}{\partial y} + \frac{\partial (w \tau_{zx})}{\partial z}\\ + div(k \space grad(T)) + S_{h} \end{aligned}

\begin{aligned} \frac{\partial (\rho h_{0})}{\partial t} + div(\rho h_{0}U) &= \frac{\partial p}{\partial t} +div(k \space grad(T))\\ &+\frac{\partial (u\tau_{xx})}{\partial x} + \frac{\partial (u \tau_{yx})}{\partial y} + \frac{\partial (u \tau_{zx})}{\partial z} \\ &+ \frac{\partial (v \tau_{xx})}{\partial x} + \frac{\partial (v \tau_{yx})}{\partial y} + \frac{\partial (v \tau_{zx})}{\partial z} \\ &+ \frac{\partial (w\tau_{xx})}{\partial x} + \frac{\partial (w\tau_{yx})}{\partial y} + \frac{\partial (w \tau_{zx})}{\partial z}\\ &+ S_{h} \end{aligned}

Don't be in delusion, understand the reality from historical data | Copyright © 2020 theDataTalks