# Transient state energy balance -- Variable volume system

Hello PF! I have some questions regarding the accumulation term for the energy balance on a variable volume system. Suppose we have a tank storing a liquid substance. The tank has a moving boundary at the top, which can expand unlimitedly. The system has a mass input $\dot{m}_1$ and mass output $\dot{m}_2$, where $\dot{m}_1 > \dot{m}_2$. The system does pV work at a rate $\dot{W}$. Also, consider heat is being transferred into the system by a coiled tube heat exchanger inside the tank at a rate $\dot{Q}_1$, and the system loses heat through its walls at a rate $\dot{Q}_2$. Also, consider no phase changes happen at any time during the process. I included a rather simple diagram of the process. The overall macroscopic energy balance of the system is given by the following equation.
$$\frac{dE}{dt} = \dot{m}_1[\hat{H}_1 + \hat{K}_1 + \hat{P}_1] - \dot{m}_2[\hat{H}_2 + \hat{K}_2 + \hat{P}_2] + \dot{Q}_1 - \dot{Q}_2 - \dot{W}$$
Assuming the changes in kinetic and potential energies in both the system and mass flows are not significant, and letting $\dot{W} = p \dot{V}$ we can simplify the energy balance equation.
$$\frac{dU}{dt} = \dot{m}_1 \hat{H}_1 - \dot{m}_2 \hat{H}_2 + \dot{Q}_1 - \dot{Q}_2 - p \dot{V}$$
If we want an equation for temperature, we can express the internal energy in terms of the specific heat capacity and temperature. However, as this is not a constant volume process, I'm not comfortable using dU in the energy balance and I was wondering if it is possible to use dH, so I applied some thermodynamic definitions and did some algebra. However, I don't know if what I did is correct. First, since U = H - pV
$$\frac{dH}{dt} - p \frac{dV}{dt} = \dot{m}_1 \hat{H}_1 - \dot{m}_2 \hat{H}_2 + \dot{Q}_1 - \dot{Q}_2 - p \dot{V}$$
But $\frac{dV}{dt} = \dot{V}$, so, we can cancel the pV terms on both sides and finally arrive at
$$\frac{dH}{dt} = \dot{m}_1 \hat{H}_1 - \dot{m}_2 \hat{H}_2 + \dot{Q}_1 - \dot{Q}_2$$
After this, I arrived at the conclusion that, for non-isochoric processes, we can use dU as long as we include the pV work done by the system in the energy balance, or, we can use dH without including the system's pV work in the energy balance. Is this correct? I think there's actually nothing wrong with using dU, however, I'd like to know what the people of PF thinks about this.

Thanks in advance for any input!

Last edited:

Chestermiller
Mentor
I think that this is not valid. If the contents of the tank are not uniform and vary with spatial position, then using the pressure at the boundary certainly can't be used to get the enthalpy of the contents.

Secondly, if there are significant viscous stresses present, then to get the work at the boundary, the viscous stresses certainly need to be included in getting the force per unit area at the boundary, and one cannot just use the pressure of the contents to get the work. The work at a boundary is correctly written as PextdV, where Pext represents the force per unit area exerted by the surroundings on the deforming part of the system. Pext must match the total compressive stress of the system contents at the boundary, which includes the viscous stresses.

Chet

I think that this is not valid. If the contents of the tank are not uniform and vary with spatial position, then using the pressure at the boundary certainly can't be used to get the enthalpy of the contents.

Secondly, if there are significant viscous stresses present, then to get the work at the boundary, the viscous stresses certainly need to be included in getting the force per unit area at the boundary, and one cannot just use the pressure of the contents to get the work. The work at a boundary is correctly written as PextdV, where Pext represents the force per unit area exerted by the surroundings on the deforming part of the system. Pext must match the total compressive stress of the system contents at the boundary, which includes the viscous stresses.

Is the procedure still incorrect if we consider the fluid to be inviscid and the process to be quasistatic?

However, as you say, if we do take into account all those microscopic properties like viscous stresses and pressure gradients within the layers of the fluid (I'm not sure if I'm saying this correctly), is it better then to just use dU? Also, something I did not have in mind while writing the OP is that for solids and liquids dU = dH (at least in equilibrium thermodynamics, as far as I know).

Chestermiller
Mentor
Is the procedure still incorrect if we consider the fluid to be inviscid and the process to be quasistatic?
In my judgement, it would then not be incorrect.
However, as you say, if we do take into account all those microscopic properties like viscous stresses and pressure gradients within the layers of the fluid (I'm not sure if I'm saying this correctly), is it better then to just use dU?
Are you saying "then" or "than?"
Also, something I did not have in mind while writing the OP is that for solids and liquids dU = dH (at least in equilibrium thermodynamics, as far as I know).
Yes. This is a good approximation which you can confirm by checking out the steam tables.

Chet

• MexChemE
Are you saying "then" or "than?"

Then, meaning to just use dU and not transform it into dH.

Chestermiller
Mentor
Then, meaning to just use dU and not transform it into dH.
Yes. I would stick with dU. But, if the internal energy per unit mass varies with spatial position within the system, this has to be taken into account.

Chet

But, if the internal energy per unit mass varies with spatial position within the system, this has to be taken into account.

How can internal energy be a function of spatial position? Can this be determined with a microscopic energy balance on a differential volume within the system?

Chestermiller
Mentor
How can internal energy be a function of spatial position? Can this be determined with a microscopic energy balance on a differential volume within the system?
Sure. That's where the Navier Stokes equations and the microscopic energy balance come in. (Just hope that the flow is laminar, or you are going to need some CFD software - you may need some anyway - with turbulent flow approximation capability).

Chet

• MexChemE

Chestermiller
Mentor
Chapter 11 is a gem. It starts in section 11.1 with what they call The Energy Equation (what I call the Overall Energy Balance Equation). Then, in the very beginning of section 11.2, they do something amazingly clever: they subtract the Mechanical Energy Balance Equation (from chapter 3) from the Overall Energy Balance Equation to obtain what they call The Equation of Change for Internal Energy (what I call the Thermodynamic (or Thermal) Energy Balance Equation). Notice the close resemblance between this equation and the First Law of Thermodynamics. The remainder of the second paragraph of section 11.2 is extremely interesting also.

So there are three key equations:

1. The Overall Energy Balance Equation
2. The Mechanical Energy Balance Equation
3. The Thermal/Thermodynamic Energy Balance Equation

It is worthwhile going over the first few pages of Chapter 11 several times. The rest of the chapter deals with how to apply these equations to specific cases.

Chet

• MexChemE
Thanks, Chet! I will be reading BSL during the summer in order to prepare for my incoming Transport Phenomena course. Your summary of chapter 11 actually made me more eager to start reading the book and learn on my own.

3. The Thermal/Thermodynamic Energy Balance Equation

This is what some people call a heat balance, right? And, if I'm not mistaken, Fourier's heat equation can be derived from the heat balance by expressing internal energy in terms of T and applying Fourier's Law to the heat conduction terms.

Chestermiller
Mentor
Thanks, Chet! I will be reading BSL during the summer in order to prepare for my incoming Transport Phenomena course. Your summary of chapter 11 actually made me more eager to start reading the book and learn on my own.
Great!! You're the man!!
This is what some people call a heat balance, right?
I don't know.
And, if I'm not mistaken, Fourier's heat equation can be derived from the heat balance by expressing internal energy in terms of T and applying Fourier's Law to the heat conduction terms.
Yes. BSL have all this worked out for you.

But please note that BSL uses an unconventional sign convention for the stress tensor. They treat compressive stresses as positive and tensile stresses as negative. This is the opposite from most books on solid and fluid mechanics.

Chet

• MexChemE
I have just finished reading sections 11.1 and 11.2 and I have a question. I understand how the authors went from Eq. 11.2-1 to Eq. 11.2-2, as I already knew the definition of the material derivative. However, I'm having trouble understanding how they arrive at Eq. 11.2-3. Specifically, the change from U to H. This is how I thought the transformation of U into H was done as I thought D/Dt is a linear operator
$$\rho \frac{D \hat{U}}{Dt} = \rho \frac{D \hat{H}}{Dt} - \frac{Dp}{Dt}$$
However, according to my interpretation, the authors seem to have done it as
$$\rho \frac{D \hat{U}}{Dt} = \rho \frac{D \hat{H}}{Dt} - \frac{\partial p}{\partial t}$$
And then combined the partial derivative of p wrt t with the $-p(\nabla \cdot \mathbf{v})$ term to get the material derivative of p, however the signs don't seem to match. I may be missing a small detail in order to understand the procedure, or I may be misinterpreting the math involved (as this is my first time working with the notation used in the book; my multivariable/vector calculus class was very trivial).

Chestermiller
Mentor
I have just finished reading sections 11.1 and 11.2 and I have a question. I understand how the authors went from Eq. 11.2-1 to Eq. 11.2-2, as I already knew the definition of the material derivative. However, I'm having trouble understanding how they arrive at Eq. 11.2-3. Specifically, the change from U to H. This is how I thought the transformation of U into H was done as I thought D/Dt is a linear operator
$$\rho \frac{D \hat{U}}{Dt} = \rho \frac{D \hat{H}}{Dt} - \frac{Dp}{Dt}$$
This equation is not correct. We should have:
$$\frac{D \hat{U}}{Dt} = \frac{D \hat{H}}{Dt} - \frac{D(\frac{p}{\rho})}{Dt}$$
The second term on the right needs to be differentiated using the quotient rule. You will get two terms out of it. See if this helps.

Chet

Got it. I thought I could take ρ out of the derivative as in $\rho \frac{D \hat{U}}{Dt}$. Now with your hint I was able to do the correct derivation
$$\rho \frac{D \hat{H}}{Dt} + \frac{p}{\rho} \frac{D \rho}{Dt} - \frac{Dp}{Dt} = -(\nabla \cdot \mathbf{q}) -p(\nabla \cdot \mathbf{v}) - (\boldsymbol{\tau} : \nabla \mathbf{v})$$
Rearranging
$$\rho \frac{D \hat{H}}{Dt} = -(\nabla \cdot \mathbf{q}) - (\boldsymbol{\tau} : \nabla \mathbf{v}) -p \left(\frac{D \rho}{Dt} + \rho (\nabla \cdot \mathbf{v}) \right) + \frac{Dp}{Dt}$$
But
$$\frac{D \rho}{Dt} + \rho (\nabla \cdot \mathbf{v}) = 0$$
So finally, one arrives at Eq. 11.2-3
$$\rho \frac{D \hat{H}}{Dt} = -(\nabla \cdot \mathbf{q}) - (\boldsymbol{\tau} : \nabla \mathbf{v}) + \frac{Dp}{Dt}$$

• Chestermiller