- #1
Danild
- 4
- 1
- TL;DR Summary
- I am trying to calculate the time it takes to empty a cylinder with gas into atmospheric pressure.
(I have general idea, but need feedback if solution is good)
Hi everyone
I am trying to solve a specific problem. I already have an idea on how to solve it, but I hoped someone else could tell me if my general approach is somewhat sensible or not. So I would really appreciate some feedback.
Situation:
A long, narrow cylinder filled with gas that is at higher pressure than atmospheric. (like for example a cylinder that is 0.01 meters in diameter, and 10 meters long, and the absolute pressure is 4 bar / 400kPa.
Now we open the cylinder in one end, and the overpressurized gas will empty out into the atmospheric air.
The opening will be big compared to the cylinder, like for example 0.008 m in diameter.
What I am trying to solve:
When will the pressure in the cylinder have dropped to around 108 kPa (assuming atmospheric pressure of around 103 kPa)?
---My general idea sofar---
Overall calculation method:
I realize that this is a non-stationary problem, which complicates things a lot. I am planning to use a Python script, that runs through all the calculations continously, at very small time-increments, like for example 1/100 or 1/1000 of a second, or even smaller. I am hoping that the error I make will become rather small if I do this.
I am not expecting a precise result, to be honest if I can just get within an error margin of 20% I will consider it quite a success!
Known values:
Size of container and size of opening. Pressure and temperature inside and outside of cylinder. Molar mass of the gas (in this case regular air).
Formulas/concepts used:
Energy Equation (basically just Bernoullis Equation but with energy-losses added) (geometric height cancels out, since cylinder is horisontal, and geometric height-differences are negligible)
Ideal Gas Law
Conservation of mass (concept).
Assumptions:
Velocities is assumed to be below the speed of sound, Mach Number < 1
Constant temperature (however I might want to expand the calculations to include this too, after I have nailed this first part).I decided to carefully hand-write my formula-gymnastics, and take a picture, in the hope that they will be easier for you to read than a typed up version:
(Note: The resistance numbers I am referring to is simply going to be looked up on a table, based on the geometry of the opening)
As you can see from my scetch, I am using an energy-equation (similar to Bernoulli), and comparing 2 points, with index 1 and index 2.
Index 1 is inside the cylinder, just far enough inside that the flow hasn't started contracting yet towards the opening.
Index 2 is just at the end of the opening, so I am assuming atmospheric pressure at this point.
The problem is that I have an unknown speed at both Index 1 and Index 2 (two unknowns), and I cannot assume the same volumetric flow at both points, because the densities are changing.
I can however assume Conservation of mass, and by converting the velocities to mass-flows, I solve both of these problems.
The idea is then to calculate the mass flow at the starting point, calculate the mass "lost" from the cylinder during a small period of time (1/1000 second or similar), and then recalculate internal pressure based on this new total mass, and then start over again with a new mass-flow calculation, and so on in a loop, until some predetermined pressure has been reached.What do you think? Am I on the right track, or did I make some mistakes in my basic thinking and assumptions?
I am trying to solve a specific problem. I already have an idea on how to solve it, but I hoped someone else could tell me if my general approach is somewhat sensible or not. So I would really appreciate some feedback.
Situation:
A long, narrow cylinder filled with gas that is at higher pressure than atmospheric. (like for example a cylinder that is 0.01 meters in diameter, and 10 meters long, and the absolute pressure is 4 bar / 400kPa.
Now we open the cylinder in one end, and the overpressurized gas will empty out into the atmospheric air.
The opening will be big compared to the cylinder, like for example 0.008 m in diameter.
What I am trying to solve:
When will the pressure in the cylinder have dropped to around 108 kPa (assuming atmospheric pressure of around 103 kPa)?
---My general idea sofar---
Overall calculation method:
I realize that this is a non-stationary problem, which complicates things a lot. I am planning to use a Python script, that runs through all the calculations continously, at very small time-increments, like for example 1/100 or 1/1000 of a second, or even smaller. I am hoping that the error I make will become rather small if I do this.
I am not expecting a precise result, to be honest if I can just get within an error margin of 20% I will consider it quite a success!
Known values:
Size of container and size of opening. Pressure and temperature inside and outside of cylinder. Molar mass of the gas (in this case regular air).
Formulas/concepts used:
Energy Equation (basically just Bernoullis Equation but with energy-losses added) (geometric height cancels out, since cylinder is horisontal, and geometric height-differences are negligible)
Ideal Gas Law
Conservation of mass (concept).
Assumptions:
Velocities is assumed to be below the speed of sound, Mach Number < 1
Constant temperature (however I might want to expand the calculations to include this too, after I have nailed this first part).I decided to carefully hand-write my formula-gymnastics, and take a picture, in the hope that they will be easier for you to read than a typed up version:
(Note: The resistance numbers I am referring to is simply going to be looked up on a table, based on the geometry of the opening)
As you can see from my scetch, I am using an energy-equation (similar to Bernoulli), and comparing 2 points, with index 1 and index 2.
Index 1 is inside the cylinder, just far enough inside that the flow hasn't started contracting yet towards the opening.
Index 2 is just at the end of the opening, so I am assuming atmospheric pressure at this point.
The problem is that I have an unknown speed at both Index 1 and Index 2 (two unknowns), and I cannot assume the same volumetric flow at both points, because the densities are changing.
I can however assume Conservation of mass, and by converting the velocities to mass-flows, I solve both of these problems.
The idea is then to calculate the mass flow at the starting point, calculate the mass "lost" from the cylinder during a small period of time (1/1000 second or similar), and then recalculate internal pressure based on this new total mass, and then start over again with a new mass-flow calculation, and so on in a loop, until some predetermined pressure has been reached.What do you think? Am I on the right track, or did I make some mistakes in my basic thinking and assumptions?