- #1
thorwynn
- 2
- 0
Homework Statement
We were given a problem and asked to write a c++ program about this problem:
A sample of gas is inside a piston cylinder arrangement initially at a temperature of 303K. The gas is leaked to a final temperature of 323K. According to the process PV^n=constant. The cylinder is made of aluminum with dimensions of L=2D and with a uniform thickness T.
Input data (given):
1. User chooses the kind of gas (nitrogen,etc.)
2. mass of the gas, in kg.
3. polytropic index, n (1 to 3 only)
4. initial pressure, P1 (value from 1 to 3 bar only)
Find the following:
1. Final Pressure
2. Final Volume
3. Work Transfer
4. Heat Transfer
5. Thickness of cylinder
6. Mass of the container including the gas.
Can someone help me out on this, just giving me some points or equations on where to start will do. I am completely blank on this problem. Give me some tips on how to derive the right equation to be used in the problem. Thanks in advanced.
Homework Equations
The Attempt at a Solution
This is a closed polytropic system, so
P1(V1)ⁿ = P2(V2)ⁿ,
Using the ideal gas law: V2 = mRT2/P2, thus
P1(V1)ⁿ = P2(mRT2/P2)ⁿ = (P2)^(1-n) (mRT2)ⁿ,
(P2)^(1-n) = P1(V1/mRT2)ⁿ,
P2 = P1(V1/mRT2)^(n/1-n)
Where V1 = π(D²/4)2D,
V2 = mRT2/P2
W = (P2V2 – P1V1)/(n-1)
Q – W = ∆U
m(gas) is given.
m(cyl) = ρV= (2.6x10^-3)( π(D²/4 – (D-t)²/4)2D)