#Given Inputs:
P_1 = 100 # compressor inlet pressure [kPa]
T_1 = 300 # compressor inlet temperature [K]
P_2 = 1000 # compressor outlet pressure [kPa]
R = 0.287 # ideal gas constant for air [kJ/kgK]
a) The specific work (kJ/kg)
b) The exit temperature (K)
c) The heat transfer (kJ/kg)
Depict the process on a T-s diagram.
The system is the air inside the compressor.
1) open system, 2) steady state, steady flow (SSSF) 3) air is an ideal gas, 4) negligible changes in kinetic and potential energy, 5) internally reversible
A mass balance is applied to the flow stream with the assumption of steady flow ($dm/dt=0$).
$$\dot m_{2} = \dot m_{1} = \dot m$$An energy balance is applied to the ystem with the assumption of SSSF ($dE/dt=0$) and negligible changes in potential and kinetic energy. The simplified energy balance becomes:
$$\dot Q_{12}= \dot m (h_2-h_1)-\dot W_{12}$$$$ q_{12}= (h_2-h_1)- w_{12}$$The specific work is found by simplifying the equation for internally reversible SSSF work by applying the assumption of negligible kinetic and potential energy changes.
$$w_{int,rev,flow}=-\int v dP$$Since the undergoes a polytropic process as it flows through the compressor, then $Pv^{n}=constant$ where $n=1.1$. Then substituting the expression
$$v=v_1\dfrac{P_1^{1/n}}{P^{1/n}}$$into the reversible work equation, integrating between the inlet and outlet conditions, and then simplying leads to
$$w_{12}=\dfrac{-n}{n-1}(P_2v_2-P_1v_1)$$Also, the ideal gas law can be used to further this result as
$$w_{12}=\dfrac{-n}{n-1}R(T_2-T_1)$$The values for $v_2$ and $v_1$ can be found using the following equations:
$$v_1=\dfrac{RT_1}{P_1}$$$$v_2=v_1\dfrac{P_1^{1/n}}{P_2^{1/n}}$$The temperature of the air leaving the compressor can be found using the ideal gas law.
$$T_2 = \dfrac{P_2v_2}{R}$$The following code evaluates these resulting equations to determine the exit temperature, specific work, and specific heat transfer.
v_1 = R*T_1/P_1 # specific volume of air at state 1 [m^3/kg]
h_1 = 300.1 # specific enthalpy of air at state 1 [kJ/kg]
v_2 = v_1*(P_1/P_2)**(1/1.1) # specific volume of air at state 2 [m^3/kg]
T_2 = P_2*v_2/R # temperature of air at state 2 [K]
n = 1.1
w_12 = -n/(n-1)*R*(T_2-T_1) # specific compressor work [kJ/kg]
h_2 = 370.7 # specific enthalpy of air at state 2 [kJ/kg]
q_12 = h_2-h_1 + w_12 # specific heat transfer for compressor [kJ/kg]
print('v_1 = ',round(v_1,5),' m^3/kg')
print('v_2 = ',round(v_2,5),' m^3/kg')
print('T_2 = ',round(T_2,1),' K')
print('w_12 = ',round(w_12,1),' kJ/kg')
print('q_12 = ',round(q_12,1),' kJ/kg')
#Given Inputs:
T_1 = 20+273 # pump inlet temperature [K]
P_1 = 100 # pump inlet pressure [kPa]
T_2 = 18+273 # pump outlet temperature [K]
P_2 = 600 # pump outlet pressure [kPa]
1) open system, 2) steady state, steady flow (SSSF), 3) water is incompressible, 4) constant specific heat, 5) internally reversible
A mass balance is applied to the flow stream with the assumption of steady flow ($dm/dt=0$).
$$\dot m_{2} = \dot m_{1} = \dot m$$An energy balance is applied to the system with the assumption of SSSF ($dE/dt=0$), along with no change in potential and kinetic energy. The simplified energy balance becomes:
$$\dot Q_{12}= \dot m (h_2-h_1)-\dot W_{12}$$$$ q_{12}= (h_2-h_1)- w_12$$The enthalpy change can be determined by integraing the following relation for an incompressible fluid:
$$dh=du+vdP$$for the assumption of constant specific heat to get the following result.
$$\int_1^2 dh=\int_1^2 CdT+\int_1^2 vdP$$$$h_2-h_1=C(T_2-T_1)+v(P_2-P_1)$$The energy balance can then be further simplified:
$$ q_{12}= C(T_2-T_1)+v(P_2-P_1)- w_{12}$$The specific work is found by simplifying the equation for internally reversible SSSF work with the assumptions of negligible kinetic and potential energy changes.
$$w_{int,rev,flow}=-\int v dP$$The equation can then be integrated for constant specific volume (incompressible assumption):
$$w_{int,rev,flow}=v(P_2-P_1)$$The value for the specific volume of incompressible water can be taken from the SLVM table.
$$v=v_f(T)$$Combining the equation for energy conservation and the equation for work leads to:
$$ q_{12}= C(T_2-T_1)+v(P_2-P_1)- v(P_2-P_1)$$or
$$ q_{12}= C(T_2-T_1)$$v_f = 0.0010018 # specific volume of water at state 1 [m^3/kg]
w_12 = -v_f*(P_2-P_1) # specific pump work [kJ/kg]
C = 4.18 # specific heat of water [kJ/kgK]
q_12 = C*(T_2-T_1) # specific heat transfer [kJ/kg]
print('w_12 = ',round(w_12,3),'kJ/kg')
print('q_12 = ',round(q_12,3),'kJ/kg')