# Experiment on piston cylinder, issues with Ideal gas law

#### ida

Hello everyone,

I have an rather large piston-cylinder containing gas that is compressed when the piston extends. Using three sensors I am measuring the pressure, temperature and volume of the gas while I force the piston out using a winch. The system is closed and no gas is released or added to the system while doing the experiments.

From the data collected I am calculating the gas-mass using the ideal gas law (PV=mRsT). I was expecting the gas-mass to be more or less constant, however the results show that the mass seems to change during the gas-compression phase, and slowly crawl back to the initially calculated mass from before the gas-compression phase was started.

I've attached the state variables that i logged during my experiment. I started with the piston fully retracted, then pulled it out using a winch and kept it there for the rest of the experiment.    Could someone, with a bit more brains than me, enlighten me as to why the mass is not constant, and maybe point me towards another approach to calculating the mass of the gas in the cylinder?

My own hunch tells me that it got something to do with the limitations of the ideal gas law, but my thermodynamics knowledge is not sufficient to fully understand it. :)

Related Other Physics Topics News on Phys.org

#### Chestermiller

Mentor
The mass is not changing. The real question is why does the measured pressure peak and then come back down again during the transient? Without knowing the details of the setup and the locations of the sensors, it's hard to say.

You are correct in saying that the ideal gas law is not appropriate for this situation, since the pressures are too high. You need to use the compressibility factor z (or other equation of state) to get a more accurate answer for the initial and final equilibrium states.

Chet

#### ida

Hi, Chet

Thanks for you input, I appreciate it very much.

The setup is quite simple - I'm measuring the piston position and calculating the gas volume from known dimensions. The pressure and temperature sensors are mounted in such a way that they are both in contact with the gas.

Regarding the pressure:
I've been wondering about that myself. I'm guessing heat is added to the gas during the compression, but again that is somewhat wierd since the temperature is more or less constant through the whole experiment. (Isothermal process). Could heat be added to the system without the temperature rising? The wierd thing is that the pressure has that peak and comes back down again without the volume changing at all.

Regarding alternate EOS:
I've tried calculating the mass using cubic EOS aswell - only difference is slightly more mass - but the transient behaviour is still not stable and behaves as when calculated with the ideal gas law.

#### Chestermiller

Mentor
Here's what I think is happening. I'm guessing there is something wrong with the temperature measurement. Here's why. The pressure increase at the peak seems to be consistent quantitatively with the increase one would calculate for adiabatic reversible compression for the imposed volume compression ratio. In adiabatic compression, the temperature of the gas rises. After the peak, I think what we are looking at is cooling back down to the cylinder temperature. If I am right, there should have been about a 15 degree temperature rise during the compression, followed by subsequent cooling.

I think regarding the EOS behavior, there are much better ways of modeling this than using a cubic equation of state.

Chet

#### ida

Hi

Thanks again :)

Calculating the temperature based on the compression ratio, adiabatic, leaves me at the same conclusion as you. There must be an issue with the temperature sensor as expected temperature should be around 40 deg. C.

$T_2=T_1(V_1/V_2)^(\gamma-1)$

With T_1 = 18.6 C and V1 = 0.0176, V2 = 0.015 and $\gamma$ = 1.4. I get T2 = around 38 C or 311 K.

Using the theoretical temperature, I get a smoother curve for the mass. I'm guessing that the initial temperature is somewhat wrong aswell - causing the theoretical temperature to start out a bit wrong as well. Regarding the EOS - could you enlighten me as to other viable approaches to this? The clue here is to detect leakage of gas in a relativly noisy environment, and I thought if the mass would stay rather stable using a EOS, I could simply detect it when the mass has drifted too much.

#### Chestermiller

Mentor
Hi

Thanks again :)

Calculating the temperature based on the compression ratio, adiabatic, leaves me at the same conclusion as you. There must be an issue with the temperature sensor as expected temperature should be around 40 deg. C.

$T_2=T_1(V_1/V_2)^(\gamma-1)$

With T_1 = 18.6 C and V1 = 0.0176, V2 = 0.015 and $\gamma$ = 1.4. I get T2 = around 38 C or 311 K.
I would only apply this equation to getting the peak temperature. After the peak, the gas is almost certainly cooling, and you have no idea how the temperature is varying with time.
Using the theoretical temperature, I get a smoother curve for the mass. I'm guessing that the initial temperature is somewhat wrong aswell - causing the theoretical temperature to start out a bit wrong as well.
Please don't say that the mass is varying. The experimental data give no justification for making this assumption. In fact, they seem to indicate that the mass did not vary (comparing the initial and final states). Regarding the EOS - could you enlighten me as to other viable approaches to this? The clue here is to detect leakage of gas in a relativly noisy environment, and I thought if the mass would stay rather stable using a EOS, I could simply detect it when the mass has drifted too much.
No equation of state is going to be extremely accurate for your purposes. But, if I had to select an equation of state, I would be inclined to choose "corresponding states" compressibility factor (z factor) plots or functional fits. There might also be experimental data available on N2 under these conditions, and there certainly should be data on air (which is 80% N2, which should be adequate).

#### ida

I would only apply this equation to getting the peak temperature. After the peak, the gas is almost certainly cooling, and you have no idea how the temperature is varying with time.
Assuming the process is isentropic, could I not calculate the temperature using: (?)
$T_2/T_1 = (P_2/P_1)^{{\gamma-1}/\gamma}$

Please don't say that the mass is varying. The experimental data give no justification for making this assumption. In fact, they seem to indicate that the mass did not vary (comparing the initial and final states).
I'm sorry, what I actually meant was the calculations did not fluctuate as much by using a theoretical temperature based off the pressure, instead of the measured temperature while calculating the mass.

No equation of state is going to be extremely accurate for your purposes. But, if I had to select an equation of state, I would be inclined to choose "corresponding states" compressibility factor (z factor) plots or functional fits. There might also be experimental data available on N2 under these conditions, and there certainly should be data on air (which is 80% N2, which should be adequate).
So basically Peng- Robinson EOS could provide a better result - provided I get my temperature measurements sorted?

#### Chestermiller

Mentor
From time t = 900 on, try using the relationship T = 291+20exp(-(t-900)/300) for the temperature, and see what you get for the predicted mass.

Chet

#### Q_Goest

Science Advisor
Homework Helper
Gold Member
Hi Ida. Welcome to the board. The compressibility factor of nitrogen at the highest pressure (~ 68 barg) and a temperature of ~ 18 C is 0.994 and at the lowest pressure and temperature you show is around 0.993 so the variation from ideal gas is less than 1% and the difference you would calculate between the two states based on the variation between ideal gas equation and actual is only 0.1%. So the problem isn't with using the proper equation of state. The issue seems to be as pointed out, the temperature measurement is not capturing the bulk temperature of the gas.

I suspect the temperature probe may be closely following the vessel wall itself, not the gas inside. If you have a temperature probe on the vessel wall, and I assume this is steel or metal of some sort and relatively thick because of the pressure involved, then that metal has a tremenous amount of thermal mass. The amount of energy being put into the gas is small compared to the thermal mass of the vessel. To obtain a proper temperature reading of the gas is not easy because it will vary considerably from some location close to the vessel wall to some location in the center, furthest from the wall.

There is another problem though. From the trace of the pressure graph, you can make some inference of the temperature. Long after the pressure is changed, the pressure trace seems to level out indicating the temperature should be coming close to equilibrium. But even after that happens, there still seems to be some residual difference between the mass before and after the pressure change. There could be a very small error with the measurement of pressure or volume. Of course, you're only looking for an error between 1.13 kg before compression to 1.15 kg after compression or around 1.8% error. You won't find that much error in the calculation because of the assumption regarding an ideal gas. This small amount of error that appears after the system comes to thermal equilibrium appears to be caused by something else. Perhaps volume or pressure measurement. Regardless, the variation of less than 2% is relatively small.

• Chestermiller

#### ida

Hi,

From time t = 900 on, try using the relationship T = 291+20exp(-(t-900)/300) for the temperature, and see what you get for the predicted mass.
I had to change the initial conditions and the delta temperature in the heat transfer equation to make them fit the dataset I have. :) Looks like you are indeed very correct in your assumptions that the temperature is the culprit. Using your heat transfer model, the calculated mass looks very stable.

Goest:
Hi Ida. Welcome to the board.
Hi, and thank you. I'm a long time silent reader :)

You are absolutly right regarding the temperature probe - it is indeed screwed into the top of the cylinder, surrounded by very thick metal walls. From the looks of it I need a more appropriate sensor for measuring these temperature variations. The PT100 I'm using now has a slow risetime (4-8s), and is also in contact with both the metal walls and the gas obviously, thanks to you guys, gives me totally useless data for the task I'm trying to achieve.

Regarding the initial vs. final mass:
I was doing several of these experiments, and I think that the issue here is once again the temperature. I removed the tension from the winch right before this experiment, letting the piston move into the cylinder again, and thus expanding the gas volume and ultimatly cooling the gas. I'm guessing I did not wait long enough, so the temperature was still going upwards while I started this experiment.

### 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