Part (i): Oil Injection into Air Cylinder¶
Part (ii): Cooling Jacket on Piston Cylinder¶
# Given Inputs
m_air = 1 # mass of air [kg]
T_air_i = 473.15 # initial air temperature [K]
P_air_i = 200 # initial air pressure [kPa]
m_oil = 0.5 # mass of oil [kg]
T_oil_i = 323.15 # initial oil temperature [K]
c_oil = 1.7 # specific heat of oil [kJ/(kg-K)]
Equilibrium pressure and temperature in the tank.
1) closed system, 2) stationary (no changes in KE and PE), 3) constant volume (no boundary work), 4) adiabatic chamber, 5) air is ideal gas, 6) oil is incompressible, 7) constant specific heats, 8) negligible effects of the cylinder material, 9) volume of oil is negligible relative to the air
Applying an integrated form of the energy balance to the system consisting of the air and oil (just after injection) with the assumptions of no heat transfer, no work, and no changes in kinetic and potential leads to
$$\Delta E = \Delta KE + \Delta PE + \Delta U = Q - W \rightarrow \Delta U = 0$$Thus, the overall change in internal energy is zero. Although there is no heat transfer across the boundary of this system, there is heat transfer that occurs from the air to the oil such that the internal energy of the air decreases while the internal energy of the oil decreases.
$$\Delta U = 0 = \Delta U_{air} + \Delta U_{oil} \rightarrow \Delta U_{oil} = -\Delta U_{air}$$Then, for the assumptions of ideal gas for air and incompressible for oil with constant specific heats,
$$\Delta U_{air} = m_{air}\int_{T_{air,i}}^{T_f} c_{v,air} dT = c_{v,air}(T_f-T_{air,i})$$and
$$\Delta U_{oil} = m_{oil}\int_{T_{oil,i}}^{T_f} c_{oil} dT = c_{oil}(T_f-T_{oil,i})$$where $T_f$ is the final equilibrium temperature for the oil and air ($T_{air,f} = T_{oil,f} = T_f$)). Therefore,
$$m_{oil}c_{v,oil}(T_f - T_{oil,i}) = -m_{air}c_{v,air}(T_{air,i} - T_f)$$Then, solving for final temperature:
$$T_f = \dfrac{m_{air}c_{v,air}T_{air,i} + m_{oil}c_{v,oil}T_{oil,i}}{m_{air}c_{v,air} + m_{oil}c_{v,oil}}$$The specific heat of the oil was given in the problem statement. A reasonable temperature for evaluating average $c_{v,air}$ for the air is the average of the initial air and oil temperatures or 125 C (~400 K). Then
$$c_{v,air,400 K} = 0.726 \dfrac{kJ}{kg-K}$$c_v_air = 0.726 # specific heat of air 400 K [kJ/(kg-K)]
T_f = ((c_v_air*m_air*T_air_i) + c_oil*m_oil*T_oil_i)/(c_v_air*m_air + c_oil*m_oil) # final temperature of the system at equilibrium [K]
T_f_C = T_f - 273.15 # final temperature of the system at equilibrium [°C]
print('T_f = ',round(T_f_C,2),'C')
To find the equilibium pressure, we apply the ideal gas equation to the air at the final condition
$$P_{air,f} = \frac{m_{air}R_{air}T_{f}}{V_{air}}$$The volume occupied by the oil is assumed to be constant. Then, the air volume is also constant and determined using the ideal gas law applied to the air at the initial condition.
$$V_{air,f} = V_{air,i} = V_{air} = \frac{m_{air}R_{air}T_{air,i}}{P_{air,i}}$$where
$$R_{air} = \bar{R}/M_{air}$$
R_bar = 8.314 # gas constant [kJ/(kmol-K)]
M_air = 28.97 # molecular weight of air [kg/kmol]
R_air = R_bar/M_air # gas constant of air [kJ/(kg-K)]
V_air = m_air*R_air*T_air_i/P_air_i # volume of air [m^3]
P_air_f = m_air*R_air*T_f/V_air # final air pressure [kPa]
print('P_air_f = ',round(P_air_f,3),'kPa')
# Given Inputs
m_air = 0.25 # mass of air in cylinder [kg]
T_1 = 300.15 # initial temperature of air [K]
P_1 = 100 # initial pressure [kPa]
m_water = 1.75 # mass of water [kg]
T_3 = 298.15 # initial temperature of water [K]
P_3 = 100 # initial pressure of water [kPa]
n = 1.3 # polytropic exponent [-]
a) boundary work for the air during the compression process, in kJ
b) final temperature for the water during the compression process, °C
Air within the piston cylinder is selected as the system for boundary work and determining heat transfer to the water. Water in the jacket is selected as the system for evaluating the final water temperature.

1) closed system, 2) quasi-equilbrium compression process, 3) neglect changes in kinetic and potential energy of both air and water, 4) air is ideal gas, 5) water is incompressible, 6) the outside of the piston is adiabatci, 7) constant specific heats for water
The compression process is polytropic ($PV^n$) where n = 1.3. Integration of the boundary work results in
$$W_{12} = \int_{V_{1}}^{V_{2}} P dV = P_1{V_1}^n \int_{V_{1}}^{V_{2}} \dfrac{dV}{V^{n}}$$which reduces to
$$W_{12} =\frac{P_{2}V_{2} - P_{1}V_{1}}{1-n}$$The initial volume for the air is determined using the ideal gas law as
$$V_{1} = \dfrac{m_{air}R_{air}T_1}{P_1}$$where
$$R_{air} = \bar{R}/M_{air}$$
We also know that $V_2 = 0.2V_1$. Finally, we can use the polytropic relation to solve for the final pressure of the air
$$P_{2} = P_{1}{\left(\dfrac{V_{1}}{V_{2}}\right)}^n$$R_bar = 8.314 # gas constant [kJ/(kmol-K)]
M_air = 28.97 # molecular weight of air [kg/kmol]
R_air = R_bar/M_air # gas constant of air [kJ/(kg-K)]
V_1 = m_air*R_air*T_1/P_1 # initial volume of the air in cylinder [m^3]
V_2 = 0.2*V_1 # final volume of the air in cylinder [m^3]
P_2 = P_1*(V_1/V_2)**n # final air pressure [kPa]
W_12 = (P_2*V_2 - P_1*V_1)/(1 - n) # boundary work [kJ]
print('V_2 = ',round(V_2,5),'m^3')
print('P_2 = ',round(P_2,2),'kPa')
print('W_12 = ',round(W_12,3),'kJ')
In order to determine the final water temperature, it is necessary to determine the heat transfer from the air to the water. The integrated form of the first law applied to the air as a closed system is
$$\Delta KE_{12} + \Delta PE_{12} + \Delta U_{12} = Q_{12} - W_{12}$$Then, for negligible changes in kinetic and potential energy
$$Q_{12} = m_{air}\Delta u_{12} + W_{12}$$We have already determined the boundary work and just need to evaluate the internal energies. The air is treated as an ideal gas, so internal energies only depend on temperature. The initial air temperature was specified, while the final air is determined with the ideal gas model as
$$T_{2} = \frac{P_{2}V_{2}}{m_{air}R_{air}}$$T_2 = P_2*V_2/(m_air*R_air)
print('T_2 = ',round(T_2,3),'K')
The temperature change of the air is greater than 100 K, so we'll use the ideal gas tables for air to determine the internal energy values. The initial specific internal energy value is evaluated at an initial temperature of 300 K (close to 300.15 K). The final internal energy is evaluated through linear interpolation between 490 K and 480 K for State 2.
u_1 = 214.10 # initial specific internal energy of the air [kJ/kg]
u_2 = 349.47 # final specific internal energy of the air (after compression) [kJ/kg]
Q_12 = m_air*(u_2 - u_1) + W_12 # heat transfer from the air during compression [kJ]
print('Q_12 = ',round(Q_12,3),'kJ')
To determine the final temperature of the water, an energy balance on the water is performed assuming negligible changes in kinetic and potential energy and no work, such that
$$\Delta U_{34} = Q_{34}$$Note that
$$Q_{34} = -Q_{12}$$Since the water is considered to be incompressible with constant specific heat, then
$$\Delta U_{34}=m_{water}c_{water}(T_4 - T_3)$$Therefore,
$$T_4 = T_3 + \dfrac{Q_{34}}{m_{water}c_{water}}$$The specific heat of water is determined from the tables at 300 K (very close to 298.15 K).
$$c_{water,300 K} = 4.179 \frac{kJ}{kg-K}$$c_water = 4.179 # specific heat of water [kJ/(kg-K)]
Q_34 = -Q_12 # heat transfer from the air during compression [kJ]
T_4 = T_3 + Q_34/(m_water*c_water) # final water temperature [K]
T_4_C = T_4 - 273.15 # final water temperature [°C]
print('T_4 = ',round(T_4_C,3),'C')
As a sanity check, we know that the idea here is that, given a somewhat realistic compression process, not 100% of the work will go into the increase in internal energy of the fluid. We confirmed that the boundary work is negative, suggesting work done on the system, and that the heat transfer was also negative, suggesting heat loss. Finally, the heat loss from the air resulted in a heat gain for the liquid cooling jacket, which resulted in a modest increase in temperature. This conclusion shows that this problem brings the class closer to being able to assess realistic thermodynamic processes that are used in true engineering applications.