A Thermo: Calculating temperature drop from gas leaving system

  • Thread starter Magellanic
  • Start date
Hi PF! I have a tricky problem that I'm trying to model, and none of the typical textbook examples cover this--or they only cover it tangentially--so I was hoping to get some insight here. (Couldn't find a "Thermodynamics" section of the forums so if there's a better place to post this, please tell me).

I'm trying to model the resultant temperature drop in a bottle of high-pressure CO2 as gas is allowed to escape (the application is for a cold gas propulsion system and for supply to air bearings). Right off the bat, I understand that cooling of a single-phase ideal gas as it is allowed to expand is due to adiabatic expansion (aka Joule expansion), but I don't think this model will work for my case since CO2 in a bottle is a two-phase liquid-vapor mixture. Furthermore, some liquid is evaporating due to the removal of mass from the system, so I presume cooling is due to the absorption of energy from the system in order to vaporize some of the liquid to maintain equilibrium.

My end goal is to graph the time-rate of change of pressure and temperature in the CO2 as mass is removed at a steady (or unsteady?) rate. For my first iteration I will ignore heat transfer from the surrounding air (I can add it in later--I think it's pretty trivial compared to the rest of the model). I originally went into this thinking I could numerically model it after finding some differential equations that model the process, but it's not nearly that simple.

The way I'm thinking about it is like this:
  1. The control volume consists of 9 oz (0.255 kg) of compressed CO2 at room temp (25C, or 77F), and since it's a two-phase mixture, that automatically gives us the pressure (6.4342 MPa, or 933.20 PSI)
  2. There is some total enthalpy (H) associated with the system at this initial point, depending on the quality of the mixture. Since I'm starting with full bottles, then for the sake of simplicity I'll say that it's entirely liquid. Therefore, by definition, quality is 0%. The mixture is entirely a saturated liquid at 25C, the specific enthalpy is 274.78 kJ/kg, meaning the total enthalpy of my system is (274.78 kJ/kg)(0.255 kg), or H = 70.1 kJ.
  3. When I remove some small amount of mass from the system, then the total enthalpy of the system must drop (in effect I am removing energy in the form of matter). Some liquid will evaporate in order to re-establish equilibrium (and oddly enough, the quality increases). The temperature will drop due to this evaporation, and the overall pressure will be slightly lower. I now have a two-phase liquid/vapor mixture of CO2 that is at some slightly lower temperature/pressure and of some reduced total mass.
The pressure difference between inside and out does, of course, drive the mass flow rate out of the system. However, for the sake of simplicity I would like to say that I have a constant (average) mass flow rate out of the system which I have measured empirically at 0.0396 g/s. I presume it's a valid assumption because 1) the change in pressure differential is presumably small compared the total pressure, and 2) the flow is regulated by a pressure regulator downstream anyway

At this point, I would think that the problem is entirely independent of time. If I remove a little mass, then the temperature/pressure will drop a little bit. If I remove a lot of gas, then the temperature/pressure will drop a lot. Again, this is entirely neglecting heat transfer from outside the bottle.

Is there some sort of relationship that I can derive between how much the temperature changes vs. how much mass is removed from the system? Are the assumptions I've made even valid? Would I have to approach this using something like Gibb's Free Energy function or something to determine the new equilibrium temperature after some mass is removed?

Any help would be appreciated! Even just pointing me in the right direction would be a great start. Thank you in advance!
 
18,637
3,600
The mixture of liquid and vapor remaining in the bottle at any time has done work to force the mass of vapor that has exited the bottle up to that time out of the bottle. This work has been carried out adiabatically and reversibly. So the entropy per unit mass of the mixture remaining in the bottle at and time has not changed. But, its average specific volume has decreased.
 
Thanks for the insight, Chester. That's interesting--I hadn't really considered looking at it from an entropy point of view. One point I'd like to have clarified, though: How valid is it to treat this as an isentropic process? I would imagine that CO2 that's near-supercritical would diverge greatly from the ideal gas model, so would my results be even remotely close?
 
18,637
3,600
Thanks for the insight, Chester. That's interesting--I hadn't really considered looking at it from an entropy point of view. One point I'd like to have clarified, though: When you talk about the average specific volume, is that the spec. volume of the gas? Or more specifically: Is that the specific volume that is listed in the saturated CO2 tables?
It is a mass-weighted average of the specific heats of the saturated liquid and saturated vapor.
Moreover, how valid is it to treat this as an isentropic process? I would imagine that CO2 that's near-supercritical would diverge greatly from the ideal gas model, so would my results be even remotely close?
Why does a system need to behave like an ideal gas in order to execute an isentropic process? You need to get an enthalpy-pressure diagram for CO2 and examine it. I will be glad to answer questions about it.
 
I thought the very definition of "isentropic" assumed the gas behaved ideally. Then again, I'm still trying to work out how exactly that would affect me if all I'm doing is tracking entropy on a saturated gas table. Speaking of which...

Am I interpreting the isentropic process correctly? I thought I had my fill of PH diagrams when I took thermo 9 years ago! Kind of fun to be looking at them again.

240741


From the looks of it, I won't get anywhere near a realistic solution unless I include heat transfer from the environment.

At any rate, I think I'm following what you're saying, but I'd like to lay out the process (or algorithm, if you will) I have going on in my head. Sorry for the word vomit--feel free to ignore:
  1. Knowing the initial mass of the gas and volume of the container, and knowing how much mass is removed, I calculate a new (average) specific volume based on the fixed container volume and new (lower) mass.

    m_final = m_init - m_dot*time
    spec_vol = vol_tot/m_final


  2. Looking at the gas table, I find that there are many possible temperatures for which my new specific volume could correspond to; the only difference being that each temperature would correspond to a different quality of the mixture.

  3. Assuming an isentropic process, I know that the new entropy will be equal to the initial entropy, which in turn means that there are many possible temperatures for which my entropy could correspond to; again the only difference being that each temperature corresponds to a different quality of the mixture.

  4. The task is to now figure out which temperature corresponds to the new specific volume and entropy which share the same quality. Probably some linear interpolations involved, maybe some iterations. Sounds like fun!

    Determine what temperature and quality correspond to the entropy and specific volume calculated above

  5. At this point, I'll have found my new temperature and, in turn, my new enthalpy. Now I would have to add some heat energy from the environment (obviously based on the temperature difference and with a heat transfer coefficient that I'll just have to fudge) and i'll arrive at a new enthalpy corresponding to some quality of the mixture.

    This part seems a little fishy, though. At each time step, I would essentially be adding my heat after the temperature has dropped as opposed to integrating over time. I'm going to have to think about how to better handle this. Moreover, I would need to have a function for Cp vs. Temp...

    H_convec = m*Cp*(T_atm - T_co2)

  6. Using a combination of the new enthalpy (after heat transfer) and same specific volume (since the total mass and volume don't change with temperature), I'll land at a new, final temperature.
 
Last edited:
18,637
3,600
I thought the very definition of "isentropic" assumed the gas behaved ideally. Then again, I'm still trying to work out how exactly that would affect me if all I'm doing is tracking entropy on a saturated gas table. Speaking of which...
No. Entropy is a much more general concept than that, and applies to all materials, not just ideal gas, but also real gases, liquids, and solids.
Am I interpreting the isentropic process correctly? I thought I had my fill of PH diagrams when I took thermo 9 years ago! Kind of fun to be looking at them again.

View attachment 240741

From the looks of it, I won't get anywhere near a realistic solution unless I include heat transfer from the environment.
If you have to include heat transfer from the environment, then the process that has been experienced by the material remaining in the bottle up to any time t is not isentropic. For the present, let's assume that the process is without heat transfer from the environment.
At any rate, I think I'm following what you're saying, but I'd like to lay out the process (or algorithm, if you will) I have going on in my head. Sorry for the word vomit--feel free to ignore:
  1. Knowing the initial mass of the gas and volume of the container, and knowing how much mass is removed, I calculate a new (average) specific volume based on the fixed container volume and new (lower) mass.

    m_final = m_init - m_dot*time
    spec_vol = vol_tot/m_final


  2. Looking at the gas table, I find that there are many possible temperatures for which my new specific volume could correspond to; the only difference being that each temperature would correspond to a different quality of the mixture.

  3. Assuming an isentropic process, I know that the new entropy will be equal to the initial entropy, which in turn means that there are many possible temperatures for which my entropy could correspond to; again the only difference being that each temperature corresponds to a different quality of the mixture.

  4. The task is to now figure out which temperature corresponds to the new specific volume and entropy which share the same quality. Probably some linear interpolations involved, maybe some iterations. Sounds like fun!

    Determine what temperature and quality correspond to the entropy and specific volume calculated above

  5. At this point, I'll have found my new temperature and, in turn, my new enthalpy. Now I would have to add some heat energy from the environment (obviously based on the temperature difference and with a heat transfer coefficient that I'll just have to fudge) and i'll arrive at a new enthalpy corresponding to some quality of the mixture.
  1. This is all correct up to step 5. Very nice. But, in step 5, you need to determine the new internal energy per unit mass, not enthalpy. The mass that remains in the tank up to any time t is a closed system, and the first law requires use of the internal energy here.
Here is a better pressure-enthalpy diagram which includes constant entropy lines on it:
Screen Shot 2019-03-24 at 3.01.37 PM.png

The lines labelled ...0.20, 0.24, 0.28,... are constant entropy lines. So, if your process involves no heat transfer from the environment, you follow one of these constant entropy lines down.

Now, if you have heat transfer from the environment, there are several considerations. There may be heat conduction through the wall and external heat transfer resistance. You may also need to consider the thermal inertia of the bottle. The material within the tank many also have conduction occurring, meaning that the temperature in the CO2 may not be spatially uniform. Before addressing any of this, you should first solve the problem without heat transfer from the environment. You can then make a determination a' postiori of whether heat transfer from the environment is going to be important.
 
No. Entropy is a much more general concept than that, and applies to all materials, not just ideal gas, but also real gases, liquids, and solids.
Thank you for the clarification!

If you have to include heat transfer from the environment, then the process that has been experienced by the material remaining in the bottle up to any time t is not isentropic.
Right. And this is something I'll have to figure out how to work around if I end up needing to include heat transfer--which will probably be necessary if I want to validate my model with my experimental setup.

For the present, let's assume that the process is without heat transfer from the environment.
I agree. Start simple.

  1. This is all correct up to step 5. Very nice. But, in step 5, you need to determine the new internal energy per unit mass, not enthalpy. The mass that remains in the tank up to any time t is a closed system, and the first law requires use of the internal energy here.
This is extraordinarily insightful. I suppose I should have known, but I guess I was thinking "enthalpy" since I was dealing with pressure+volume as well as temperature, not just temperature alone. Also, I think I get how you're framing the problem now: Even though the total system is losing mass, by treating the mass that remains in the tank as closed you're essentially redefining the system boundary at every point in time. I get where you're going, but I think I just have to sit down and really think hard about it before I truly understand it.

Here is a better pressure-enthalpy diagram which includes constant entropy lines on it:
There's a lot going on here, but I see what you're pointing to.

As an aside: It would be nice if there were higher definition versions of these charts--better yet in the form of scaleable vector graphics so users could zoom in indefinitely. Maybe I should make one...


Now, if you have heat transfer from the environment, there are several considerations. There may be heat conduction through the wall and external heat transfer resistance. You may also need to consider the thermal inertia of the bottle. The material within the tank many also have conduction occurring, meaning that the temperature in the CO2 may not be spatially uniform. Before addressing any of this, you should first solve the problem without heat transfer from the environment. You can then make a determination a' postiori of whether heat transfer from the environment is going to be important.
Indeed, and I can refine the heat transfer model down the road.

I just got back home so I can finally start working on coding this. I'll post my results (if I get any) and let you know how it goes. Ideally, I'd love to build some sort of open-sourced tool to help others, but it seems like I'm the only one who's interested in modeling this. I wonder what the professionals use when designing [cold gas] propulsion systems?

At any rate, thank you again for your help! I don't think I would have ever gotten this far on my own. My thermo professor would be proud 😁
 
18,637
3,600
There's a lot going on here, but I see what you're pointing to.

As an aside: It would be nice if there were higher definition versions of these charts--better yet in the form of scaleable vector graphics so users could zoom in indefinitely. Maybe I should make one...
The purpose of this p-H diagram was just to give you an idea of what the isentropic lines look like, and a crude tool for getting a quick answer to your problem. For your detailed calculations, however, you can get what you need from your saturated CO2 tables.
Indeed, and I can refine the heat transfer model down the road.
When you want to start working on the non-adiabatic version of the problem, get back with me and I can help you out.
 
I got it working! I realized later on that by removing some mass from the system, I was effectively forcing a change of the specific volume. All I had to do was calculate the new specific volume, and assuming constant entropy, I derived a relationship between those properties and temperature by equating the quality as determined by specific volume with the quality as determined by entropy (I needed to program a look-up table for the saturated liquid & gas states as they vary by temperature). 'lo and behold, I was able to determine the temperature and quality of the two-phase mixture at any given point of source depletion, and it followed right along the constant entropy lines on the P-H diagram.

I also realized that up to this point the entire exercise has been independent of time. All I made was a script that would find the temperature given a new specific volume and assuming constant entropy. Now that I have the first part working, I'll want to include heat x-fer from the environment, but that WILL have to have a time component to it (and it will have to be non-isentropic).

For simplicity, I will ignore gravity and radiation, and I will assume constant heat transfer coefficients. I'm still having trouble conceptualizing exactly how to formulate the equations for this model, though. At every instance in time, the temperature drops due to expansion, but it won't drop as much as the isentropic case due to heat transfer. So when formulating this, do I assume an isentropic process at every time step, then "correct" the resultant temperature by introducing some amount of heat transfer from the surroundings? Or is there are more elegant, mathematical way that models it with a series of differential equations?

I've thrown together a simple diagram of the setup. I know the initial conditions, and I know the geometry of the bottle, and I'm assuming some of the constants (for the time being). Now that we're introducing heat transfer, this is a non-isentropic case and I (assume) I'll have to include the enthalpy of the gas, but I'm struggling to figure out where that comes in.

241716
 
18,637
3,600
I got it working! I realized later on that by removing some mass from the system, I was effectively forcing a change of the specific volume. All I had to do was calculate the new specific volume, and assuming constant entropy, I derived a relationship between those properties and temperature by equating the quality as determined by specific volume with the quality as determined by entropy (I needed to program a look-up table for the saturated liquid & gas states as they vary by temperature). 'lo and behold, I was able to determine the temperature and quality of the two-phase mixture at any given point of source depletion, and it followed right along the constant entropy lines on the P-H diagram.

I also realized that up to this point the entire exercise has been independent of time. All I made was a script that would find the temperature given a new specific volume and assuming constant entropy. Now that I have the first part working, I'll want to include heat x-fer from the environment, but that WILL have to have a time component to it (and it will have to be non-isentropic).

For simplicity, I will ignore gravity and radiation, and I will assume constant heat transfer coefficients. I'm still having trouble conceptualizing exactly how to formulate the equations for this model, though. At every instance in time, the temperature drops due to expansion, but it won't drop as much as the isentropic case due to heat transfer. So when formulating this, do I assume an isentropic process at every time step, then "correct" the resultant temperature by introducing some amount of heat transfer from the surroundings? Or is there are more elegant, mathematical way that models it with a series of differential equations?
Before you decide how to obtain a numerical solution, you must first decide upon the model and the model equations that you are going to be solving. To do this, you need to reconsider the physics of the problem.

1. Up to now, you have been assuming that there is no heat transfer between the gas and its surroundings, which consist of the cylinder itself and well as the environment surrounding the cylinder. So, even though the gas is cooling, you have assumed that the cylinder remains at the original temperature. You have neglected the cooling of the cylinder (which has thermal inertia) and any heat exchange taking place between the cylinder and the gas. You need to make a determination of whether you think this is a good approximation. To do this, you should compare the mass times heat capacity of the cylinder with the mass times heat capacity of the gas. If both the gas and the cylinder had the same temperature history during the change (say, with very rapid heat transfer between the cylinder and the gas), how would this change things.

2. Even if there were still no heat transfer with the surrounding environment, if the thermal inertia of the cylinder were important, it might also be necessary to treat the cylinder as having a temperature profile which varies with both radial position and time. So you would have to solve the transient heat conduction equation within the cylinder metal. This needs to be considered.

3. With heat transfer present between the cylinder and the gas, you may also have temperature gradients and heat transfer resistance within the gas, so that the gas is not uniform in temperature, at least near the boundary. Natural convection within the gas might also be a consideration.

So, in short, modeling the system in terms of an overall heat transfer coefficient between the surroundings and the gas (as you have been considering up to now in your post) may not give the accuracy of the answer that you desire, and might need to be reconsidered in detail, in light of items 1-3 above. Depending on what determination you make regarding the validity of assumptions and approximations, an appropriate model can be formulated. Certainly, for the model proposed in your previous post (with its inherent approximations), the formulation and solution are straightforward.
 

Want to reply to this thread?

"Thermo: Calculating temperature drop from gas leaving system" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving

Top Threads

Top