# I Cannot find the Temperature Change inside of a Tank

1. May 6, 2018

### treddie

It seems that a solution to the following problem is strangely absent from the internet. After days of research, I have found no one who offers such a solution. Only one paper addressed it but was sloppy in the way it presented the equations; they were incomplete.

The problem is simply this...Given a pressurized tank with a given mass of REAL gas within, at an initial pressure and temperature, what will the internal temperature be at any time (t) when (n) moles/sec of additional gas is added at a given inlet temperature?

This looks like a squirly differential problem and numerical solution, and I am trying to incorporate the Van der Waals equation of state, NOT the ideal gas equation. If I have the initial tank pressure at say, 4000psi @ 100 degF temperature, and I add (n) moles / sec at 34 degF, I would expect the tank temperature to drop as the cold inlet gas immediately begins colliding with the molecules already in the tank and before the energy in the tank gets thoroughly mixed. But then, due to more collisions per second overall and therefore higher pressure, I would expect that there would also be a heating effect that predominates (I know that whenever you add gas to a tank, that it heats up). So what portion of the input energy converts to the average internal pressure, and how much to the average internal temperature?

In researching for a solution to this tank filling problem, I figured I would probably be looking at some differential equations for real gases dealing with adding mass and therefore energy to the tank. But I ended up with references along the lines of U = f (T). How can I know what the internal energy change is in the tank if it requires me to know temperature change first?! And if I work backwards, how can I know what the temperature change is if it requires me to know the internal energy change first?! I do not know either.

2. May 6, 2018

### Staff: Mentor

Are you familiar with the open-system version of the first law of thermodynamics? For a Van der Waals gas, do you know the effect of specific volume (or pressure) on the internal energy at constant temperature? Are you willing to assume that, as the new gas is added to the tank, it becomes well-mixed with the gas already inside the tank?

3. May 6, 2018

### treddie

Thank you for your response, Chester.
1. I am not familiar with the open-system version of the first law, but any direction would be helpful as I try to get my mind around this problem.
2. I would imagine that since at constant temperature, raising either the pressure or volume would imply a greater amount of moles, that that would imply an increase in the internal energy, but affected by the a & b constants as corrections.
3. At some point, just like diffusion of dye in clear water, I would assume that mixing of high pressure gases would act similarly, but perhaps much quicker But I have no way to quantify how long it would take for thorough mixing to occur, and have seen no demonstrations of such. At the same time, there is always new gas entering the tank, so there can be no steady state. Like constantly adding little drops of dye to water. So in that sense, I cannot expect THOROUGH mixing to ever occur as long as gas is either being added or withdrawn. And I have no idea what a group of sensors placed on the outside of a cylindrical tank would read in terms of local temperatures. I would however expect to be able to calculate an average temperature, that the tank would settle down to, once the valve is closed.

4. May 6, 2018

### Staff: Mentor

To help you with your problem, I need you to have some understanding of the open system version of the first law of thermodynamics. You can develop this understanding by Googling "open system version of first law of thermodynamics," or in the books Fundamentals of Engineering Thermodynamics by Moran et al or Introduction to Chemical Engineering Thermodynamics by Smith and van Ness.
I meant to ask whether you are aware of the effect of specific volume on the internal energy per mole of a Van der Waals gas.
My motivation for asking this question was to ascertain whether you are willing to make the approximation that, at any time, the temperature of the gas in the tank is all at the same temperature; this will be the case if the gas is being admitted slowly enough. However, if the gas is being admitted rapidly, the temperature will vary with location within the tank.

5. May 7, 2018

### treddie

Chester, please hold on...I am researching the open system. I will report back soon.

6. May 12, 2018

### treddie

Ok, I'm back. Sorry for the delay...I am trying to squeeze this all in in my downtime. In responding further to your questions,

"[What is] the effect of specific volume on the internal energy per mole of a Van der Waals gas at constant temperature?"

My understanding (I hope I am correct) is that the energy does not change at constant temperature when the volume is changed. If the volume changes, and the temperature is allowed to change, the pressure will drop and each mole will have less energy and a lower temperature...unless the temperature is raised during the volume change to keep the temperature constant, which means adding in continuous energy. The continuous result is no change in energy for that mole.

"[Am I] willing to make the approximation that, at anytime, the temperature of the gas in the tank is all at the same temperature?"

Yes. The actual, real-time dynamics inside the tank sounds like a CFD problem, which would be an interesting problem in itself, but I am more interested in the real-time, average tank temperature, at this point.

7. May 12, 2018

### Staff: Mentor

Your assessment is basically incorrect. However, for the specific case of a Van Der Waals gas, the internal energy and the heat capacity are independent of specific volume.
OK. How do you stand with regard to coming up to speed on being able to apply the open-system version of the first law of thermodynamics?

8. May 12, 2018

### treddie

Heheh...Not sure yet! but I like challenges, even though if I stand up in my foxhole, I'm expecting many open-system bullets headed my way. :)

9. May 12, 2018

### Staff: Mentor

OK. Just waiting for you to write down the open-system form of the 1st law equation applicable to your system.

10. May 13, 2018

### treddie

Before I adapt this to the specific tank problem, are you referring to:
Qdot - Wdotsys = mdotout (h + Vel2/2 + gz)out - mdotin (h + Vel2/2 + gz)in

11. May 13, 2018

### Staff: Mentor

Very close, but not quite. This is the steady state version of the equation. We need to use the transient version that determines the rate of change of the internal energy of the tank contents with time.

12. May 13, 2018

### treddie

Ahhhh, yes. I ran into the transient version but didn't quite get it at the time. Time for more reading.

13. May 14, 2018

### treddie

Begore I go further, I need to FINALLY know what the difference is between internal energy and enthalpy. In the past, I could do without fully understanding these concepts, but now I must figure this out. And this is what is frustrating about the Internet. Below are quotes from two different online sources, that appear to contradict each other.
_________
"Internal energy (U), refers to the energy of the constituents of a thermodynamic system. It INCLUDES the kinetic energy(due to ceaseless motion), potential energy( due to intermolecular forces) etc., of the molecules. It does NOT include energy that a system may possess as a result of its macroscopic position or motion. "
_________

"In thermodynamics, the internal energy of a system is the energy contained within the system, EXCLUDING the kinetic energy and potential energy."
_________
Digging deeper, I only find that the amount of hits supporting each definition are pretty much equal! From this, I can only conclude that grass is both green and red.

14. May 14, 2018

### Staff: Mentor

I think that the first definition is more precise than the second. Enthalpy is just a defined function equal to the internal energy plus the product of pressure and volume (from the equation of state for the material). It is not fundamental, and is merely a parameter that is convenient to work with in solving many kinds of problems:
$$h=u+Pv$$where h is the enthalpy per unit mass, u is the internal energy per unit mass, P is the pressure, and v is the specific volume.

15. May 17, 2018

### treddie

Thank you for clarifying.

So I think I have the correct, general equation here for transient conditions:

Qdot - Wdotsys = mdot2u2 - mdot1u1 +
mdotout (h+Vel2/2+gz)out -
mdotin (h+Vel2/2+gz)in

I have some questions about this form, since all of the references I have found never really explain these details:

1. Are the velocity terms the inlet and outlet
velocities into and out of the CV? Or are these just the average, random molecular velocities of the inlet and outlet flows? The latter makes no sense...The individual molecular velocities should sum to the velocities of the inlet and outlet streams, so I am back to the first suggestion. But why have separate velocity terms when we have the inlet and outlet mass flow rates that we could easily use to get stream velocities?

2. Since no work is being done inside the CV, shouldn't Wdotsys = 0?

3. Two additional mass flow rates are indicated, in addition to the original "in" and "out" rates. The new ones are:
(mdot1, mdot2). Do the subscripts refer to initial and final rates, respectively? Otherwise, these two don't make much sense to me, since the "in" and "out" rates should suffice.

4. z = 0, since gravity is not a factor in this scenario?

5. Is (g) the gravitational constant?

16. May 17, 2018

### Staff: Mentor

This equation is not quite right (the accumulation terms in particular). The equation should read:

$$\frac{d(mu)}{dt}=\dot{Q}-\dot{W_S}+\dot{m}_{in}(h+v^2/2+gz)_{in}-\dot{m}_{out}(h+v^2/2+gz)_{out}$$
In your problem, these kinetic energy terms are going to be negligible.
Correct.
They refer to the rates of flow into- and out of the control volume (say from the inlet hose)
Correct

17. May 20, 2018

### treddie

Your equation brings up an interesting point. I'ts right-hand side is identical to another I have found, but the left sides are different. Therefore, the left sides must be equal:

$\frac{d(mu)}{dt}=\Delta \dot{E_s}$

I think maybe there was a typo in the original text in that the $\Delta$ should not be there.
But the units look messed up. How can a change in mass * energy = a change in energy?

18. May 20, 2018

### Staff: Mentor

The left hand side is the rate of change of internal energy with respect to time within the tank and has the units of energy per unit time. In the equation, u is the energy per unit mass, so U = mu.

19. May 20, 2018

### treddie

So, rather than think of the mass term (m) as "mass", think of it as a non-dimensional scalar applied to (u)?

20. May 20, 2018

### Staff: Mentor

No. It’s mass. What’s the problem? What is your understanding of the units of u?