Problem 1

0.1 kg of ammonia gas is maintained at a constant pressure of \(\require{color}{\color[rgb]{0.315209,0.728565,0.037706}2}\) bar in a cylinder by means of a weighted piston. The ammonia is slowly heated with a Bunsen burner flame from an initial temperature of \(\require{color}{\color[rgb]{0.164799,0.878862,0.723179}10}\) degrees Celcius to a final temperature of \(\require{color}{\color[rgb]{0.164799,0.878862,0.723179}20}\) degrees Celcius. Calculate:

  1. the change in the volume of the gas
  2. the work done during the expansion
  3. the heat addition during the process

To solve this problem you will need to use the two tables provided in Lecture 13. They are reproduced below for your convenience.

table1

table2

Solution

The relevant formulas for the solutions are detailed below. For the numerical solutions, please go throught the code.

  1. The change in volume is given by

\[ \large \require{color} {\color[rgb]{0.079785,0.618358,0.483717}\Delta V} = m \left( {\color[rgb]{0.918231,0.469102,0.038229}\nu_2 }- {\color[rgb]{0.918231,0.469102,0.038229}\nu_1} \right). \]

  1. The work done is given by the integral

\[ \large \require{color} {\color[rgb]{0.562040,0.190215,0.568721}W} = \int_{1}^{2} {\color[rgb]{0.315209,0.728565,0.037706}p}d{\color[rgb]{0.079785,0.618358,0.483717}V} = {\color[rgb]{0.315209,0.728565,0.037706}p} {\color[rgb]{0.079785,0.618358,0.483717}\Delta V} \]

as the pressure is constant.

  1. The heat addition during the process is:

\[ \large \require{color} {\color[rgb]{0.334690,0.296180,0.998454}Q} - {\color[rgb]{0.562040,0.190215,0.568721}W} = {\color[rgb]{0.999993,0.999963,0.041015}\Delta U} \Rightarrow {\color[rgb]{0.562040,0.190215,0.568721}W} + m \left({\color[rgb]{0.999993,0.999963,0.041015}u_2} - {\color[rgb]{0.999993,0.999963,0.041015}u_1} \right) \]

In the solutions below, please be wary of the units.
Code
import numpy as np

# a.
nu_2 = 0.69952 # specific volume table entry at 20 degrees @ 2 bar
nu_1 = 0.67320 # specific volume table entry at 10 degrees @ 2 bar
m = 0.1 # kg
Delta_V = m * (nu_2 - nu_1)
print('The change in volume is '+str(np.round(Delta_V, 4))+' m^3 \n')

# b.
p = 2 * 10**5 # 2 bar = 200 kPa = 2 * 10^5 Pa
W = p * Delta_V
print('The work done during expansion is '+str(np.round(W,4)/10**3)+' kJ \n')

# c. 
u_2 = 1369.28 # specific internal energy table entry at 20 degrees @ 2 bar
u_1 = 1351.87 # specific internal energy table entry at 10 degrees @ 2 bar
Q = W/10**3 + m * (u_2 - u_1)
print('The head addition is '+str(np.around(Q,4))+' kJ \n')
The change in volume is 0.0026 m^3 

The work done during expansion is 0.5264 kJ 

The head addition is 2.2674 kJ 

Problem 2

Dry air has a molar composition of \(21 \% \; O_2 \; (M=32 \; g/mol)\) and \(79 \% \; N_2 \; (M=28.15 \; g/mol)\). Calculate:

  1. The specific gas constant for air;
  2. The mass of 1 liter of air at \(\require{color}{\color[rgb]{0.315209,0.728565,0.037706}1.013 \; bar}\) and \(\require{color}{\color[rgb]{0.164799,0.878862,0.723179} 25^{\circ}\; C}\).
  3. The density of air at these conditions.
Solution
  1. The molecular mass of air is given by

\[ \large \require{color} M_{air} = \frac{21}{100} M_{O_2} + \frac{79}{100} M_{N_2} = 0.21 \times 32 + 0.79 \times 28.15 = 28.96 \frac{g}{mol}. \]

This can then be used to work out the specific gas constant

\[ \large \require{color} R_{air} = \frac{\bar{R}}{M_{air}} = \frac{8.314 \frac{J}{mol \cdot K}}{M_{air} \; \frac{g}{mol}} = \frac{8.314 \; J }{28.96 \; g \cdot K} = \frac{8.314 \times 10^{3} \; J }{28.96 \; kg \cdot K} = 287 \; \frac{J}{kg \cdot K} \]

which represents the solution in the standard units.

  1. To calculate the mass, we simply utilize the idea gas law in the form

\[ \large \require{color} m = \frac{{\color[rgb]{0.315209,0.728565,0.037706}p} {\color[rgb]{0.079785,0.618358,0.483717}V}}{R {\color[rgb]{0.164799,0.878862,0.723179}T}} = \frac{\left( {\color[rgb]{0.315209,0.728565,0.037706}1.013 \times 10^{5} \; Pa} \right) \left( {\color[rgb]{0.079785,0.618358,0.483717} 1 \; liter \times \frac{0.001 m^3}{1 \; liter} }\right) }{\left( 287 \; \frac{J}{kg \cdot K} \right)\left( {\color[rgb]{0.164799,0.878862,0.723179}298.15 \; K }\right) } = 0.00118 \; kg \]

  1. To work out the density, we simply divide the mass by the volume

\[ \large \require{color} {\color[rgb]{0.918231,0.469102,0.038229}\rho} = \frac{m}{{\color[rgb]{0.079785,0.618358,0.483717}V}} = \frac{0.00118 \; kg}{{\color[rgb]{0.079785,0.618358,0.483717}0.001 \; m^3}} ={\color[rgb]{0.918231,0.469102,0.038229} 1.18 \; \frac{kg}{m^3}}. \]