# Thermodynamics spring problem

Hi guys,
i just discovered this forum and this is my first post so apologies if i made any mistake with the how im suppose to structure a thread. but nontheless any help would be greatly appreciated!
cheers

1. Homework Statement

4. A 250mm diameter insulated cylinder (see figure below) is fitted with a frictionless, leakproof piston, which is attached to an unstressed spring S (spring constant, k = 175kN/m). The cylinder is connected by a closed valve to the mains pipe, in which air flows at a high pressure and a temperture of 27°C. The spring side of the cylinder is open to the atmosphere (Patm = 101kPa).

The valve is now opened slowly permitting air to move the piston through a distance of 150mm, thus compressing the spring. At this point the valve is closed, trapping air in the cylinder.

a) Write down the 1st law of thermodynamics for an open system and simplify it for this charging process, which can be assumed to be adiabatic. b) Calculate:

i) The final pressure of the air in the cylinder.
ii) The final temperature of the air in the cylinder.
iii) The mass of air injected into the cylinder.

[636kPa, 340.8K, 0.0479kg]

## The Attempt at a Solution

i've managed to get the first answer of P2. but im stuck on the 2nd part. am i suppose to use
P1/T1=P2/T2
any help would be appreciated!

Simon Bridge
Homework Helper
Welcome to PF;
i've managed to get the first answer of P2. but im stuck on the 2nd part. am i suppose to use
P1/T1=P2/T2
any help would be appreciated!
... that formula would be appropriate if the volume did not change: does it?

Welcome to PF;
... that formula would be appropriate if the volume did not change: does it?
yes the volume does change. but initial volume is 0 because the piston is flushed against the cylinder so i dun really thing that would work..
how do i use the part (a) answer to help me?

Simon Bridge
Homework Helper
You asked about an equation that requires volume to remain the same, but you notice that it changes. Therefore: do not use that equation. The initial volume being zero makes no difference to these facts.

how do i use the part (a) answer to help me?
1. what is the name of the process?
2. what was the simplified 1st Law equation you came up with?

You asked about an equation that requires volume to remain the same, but you notice that it changes. Therefore: do not use that equation. The initial volume being zero makes no difference to these facts.

1. what is the name of the process?
2. what was the simplified 1st Law equation you came up with?

1) i think its an adiabatic system as mentioned in (a)
2) im not sure if im right but i got -w=m(h2-h2)

Chestermiller
Mentor
You are working with the open system version of the first law. This is not a steady flow situation, so the equation you wrote down is not applicable. Does the internal energy of the system (i.e., the contents of the cylinder) change? You have mass entering the system, but no mass leaving. Please write down the form of the first law that applies to this situation.

You are working with the open system version of the first law. This is not a steady flow situation, so the equation you wrote down is not applicable. Does the internal energy of the system (i.e., the contents of the cylinder) change? You have mass entering the system, but no mass leaving. Please write down the form of the first law that applies to this situation.

i see.. so what you mean is the equation should be -w+mihi=m2u2-m1u1?
im not sure if there is w though but if the spring compresses then there should be work done right?

Chestermiller
Mentor
i see.. so what you mean is the equation should be -w+mihi=m2u2-m1u1?
im not sure if there is w though but if the spring compresses then there should be work done right?
Much better. So, if m is the mass that enters, then, in the final state:$$mu=-W+mh_{in}$$
You are correct that (shaft) work is done on the surroundings. Algebraically, what do you get for the shaft work done (on the piston)? How does the enthalpy and temperature of the air entering the system hin and Tin compare with the enthalpy and temperature of the air in the mains pipe (assuming ideal gas)?

Much better. So, if m is the mass that enters, then, in the final state:$$mu=-W+mh_{in}$$
You are correct that (shaft) work is done on the surroundings. Algebraically, what do you get for the shaft work done (on the piston)? How does the enthalpy and temperature of the air entering the system hin and Tin compare with the enthalpy and temperature of the air in the mains pipe (assuming ideal gas)?
the enthalpy and temperature of air entering the system should be the same as that in the pipe isnt it?

Chestermiller
Mentor
the enthalpy and temperature of air entering the system should be the same as that in the pipe isnt it?
Yes.

From a force balance on the piston, what is the final pressure P in terms of x, k, and patm?

Yes.

From a force balance on the piston, what is the final pressure P in terms of x, k, and patm?
the final pressure i calculated was 635.8kPa, there shouldnt be an x right since its air? assuming you meant x as in quality..? k would be 1.4 for air and Patm was given in the question at 101kPa.

Chestermiller
Mentor
the final pressure i calculated was 635.8kPa, there shouldnt be an x right since its air? assuming you meant x as in quality..? k would be 1.4 for air and Patm was given in the question at 101kPa.
Please do it algebraically. There is a good reason I'm asking for this.

the final pressure i calculated was 635.8kPa, there shouldnt be an x right since its air? assuming you meant x as in quality..? k would be 1.4 for air and Patm was given in the question at 101kPa.
okay correct me if im wrong but what you're asking for is P=Patm+k*x/Areapiston

Chestermiller
Mentor
okay correct me if im wrong but what you're asking for is P=Patm+k*x/Areapiston
Perfect. Now, the final volume is V = Ax. So, again, in terms of these same parameters, what is the final value of PV?

Perfect. Now, the final volume is V = Ax. So, again, in terms of these same parameters, what is the final value of PV?
that would make it P2*Ax?

Chestermiller
Mentor
Yes. That would be $$PV=\left(P_a+\frac{kx}{A}\right)(Ax)=P_aAx+kx^2=P_aV+kx^2$$
So now you have the two equations:$$U=mh_{in}-W$$and$$PV=P_aV+kx^2$$
What do you get if you add these two equations together? (You still haven't answered my question about the algebraic expression for W in terms of k, x, A, and Pa)

Chet

Last edited:
Yes. That would be $$PV=\left(P_a+\frac{kx}{A}\right)(Ax)=P_aAx+kx^2=P_aV+kx^2$$
So now you have the two equations:$$U=mh_{in}-W$$and$$PV=P_aV+kx^2$$
What do you get if you add these two equations together?

Chet
erm im not sure..

Chestermiller
Mentor
erm im not sure..
You're not sure how to algebraically add two equations together by adding their left sides together and their right sides together?

You're not sure how to algebraically add two equations together by adding their left sides together and their right sides together?
oh.. PV+U=PaV+kx2+mhin−W is this what you mean?

Chestermiller
Mentor
oh.. PV+U=PaV+kx2+mhin−W is this what you mean?
Yes. Now, on the left hand side of this equation, you have U + PV. What thermodynamic function is that, and what does it represent physically in this problem?

I need to go to bed now, so I won't be available for a few hours.

Chet

Yes. Now, on the left hand side of this equation, you have U + PV. What thermodynamic function is that, and what does it represent physically in this problem?

I need to go to bed now, so I won't be available for a few hours.

Chet
U+PV=H right?

Chestermiller
Mentor
U+PV=H right?
Right! So H is the enthalpy of the gas in the cylinder at the end of the process: H = mh. In our subsequent analysis, we are going to let m be the number of moles of gas in the cylinder, and h the molar enthalpy. If we substitute this into our previous equation, we obtain:
$$mh=mh_{in}-W+kx^2+P_aAx$$
So we see that, by adding PV to both sides of the equation, we have been able to express everything in terms of enthalpies. This equation then gives:
$$m(h-h_{in})=-W+kx^2+P_aAx$$
Now, we will not be able to proceed any further until you provide an equation for the total work W done by the gas on the spring and atmospheric air in terms of k, x, A, and Pa.

Right! So H is the enthalpy of the gas in the cylinder at the end of the process: H = mh. In our subsequent analysis, we are going to let m be the number of moles of gas in the cylinder, and h the molar enthalpy. If we substitute this into our previous equation, we obtain:
$$mh=mh_{in}-W+kx^2+P_aAx$$
So we see that, by adding PV to both sides of the equation, we have been able to express everything in terms of enthalpies. This equation then gives:
$$m(h-h_{in})=-W+kx^2+P_aAx$$
Now, we will not be able to proceed any further until you provide an equation for the total work W done by the gas on the spring and atmospheric air in terms of k, x, A, and Pa.
would that just mean moving the W to one side and everything else to the other?

Chestermiller
Mentor
would that just mean moving the W to one side and everything else to the other?
No. The work is the force integrated over the displacement. In terms of k and x, how much elastic energy is stored in the spring? How much work is required to push the atmosphere back a distance of x if the area of the piston is A and the pressure of the atmosphere is Pa? What is the sum of these?

Chestermiller
Mentor
Another way of figuring out the work W is to recognize that, at any time t during the process, the force F exerted by the gas on the piston is:
$$F=k\xi +P_aA$$where ##\xi## is the piston displacement at time t. So, the amount of work that the gas does on the piston between time t and time t + dt is given by: $$dW=(k\xi +P_aA)d\xi$$ To get the total work W, you integrate this between ##\xi = 0## and ##\xi = x##, where x is the final displacement.

Another way of figuring out the work W is to recognize that, at any time t during the process, the force F exerted by the gas on the piston is:
$$F=k\xi +P_aA$$where ##\xi## is the piston displacement at time t. So, the amount of work that the gas does on the piston between time t and time t + dt is given by: $$dW=(k\xi +P_aA)d\xi$$ To get the total work W, you integrate this between ##\xi = 0## and ##\xi = x##, where x is the final displacement.
that would make W=[kξ2/2+PaAξ]0x?

Chestermiller
Mentor
that would make W=[kξ2/2+PaAξ]0x?
Yes, so substitute the integration limits please.

Yes, so substitute the integration limits please.
x would be 150mm..?

Chestermiller
Mentor
x would be 150mm..?
Yes, but I want the result algebraically in terms of k, x, Pa, and A. I want to hold off at substituting numbers in until later.

Chestermiller
Mentor
As you responded in a private conversation: W=[kx2/2+PaAx]. So now what do we get if we substitute this into our equation:
$$m(h-h_{in})=-W+kx^2+P_aAx$$
Chet

As you responded in a private conversation: W=[kx2/2+PaAx]. So now what do we get if we substitute this into our equation:
$$m(h-h_{in})=-W+kx^2+P_aAx$$
Chet
m(h−hin)=−[kx2/2+PaAx]+kx2+PaAx ?

Chestermiller
Mentor
m(h−hin)=−[kx2/2+PaAx]+kx2+PaAx ?
Collect terms????

Collect terms????
m(h−hin)=1/2kx2?

Chestermiller
Mentor
Correct. Pretty simple, huh?

This is all that needs to be done on the right hand side of the equation. I'll be back in a little while to get you started working on the left hand side of the equation. Right now, I'm on my iPhone.

Correct. Pretty simple, huh?

This is all that needs to be done on the right hand side of the equation. I'll be back in a little while to get you started working on the left hand side of the equation. Right now, I'm on my iPhone.
alright thanks! for the left side do i just use cv(t2-t1) i figured since the it isnt constant pressure process