ME 200 – Thermodynamics I – Spring 2020

Homework 6: 1st Law for Closed Systems w/o Properties

Part (i): Classroom

Part (ii): A Piston-Cylinder

Part (i): Classroom

Given:

A classroom with the following data.

In [1]:
#Given Inputs
N_students = 100  # number of students
Q_student = 360   # heat loss for each student (assumes awake and paying attention), [kJ/h] 
Area = 30*15      # floor area in the classroom, [m^2]
Q_light = 15      # heat output of the lights per unit floor area [W/m^2]

Find:

Rate of cooling required (kW) to maintain a constant room temperature.

System Sketch:

Assumptions:

1) closed system, 2) steady state conditions, 3) heat transfer gains only from internal sources (students and lights).

Basic Equations:

$$\dfrac{dE}{dt} = \dot Q- \dot W + \displaystyle\sum_{in} \dot m_{in} (h+ke+pe)_{in}-\displaystyle\sum_{out} \dot m_{out}(h+ke+pe)_{out}$$

Solution:

The energy balance is applied to air in the room. This is considered to be a closed system operating at steady steady, such that $dE/dt=0$ and $\dot m_{in}= \dot m_{out} = 0$. Also, there is no work done by or on the air. Therefore, the energy balance reduces to $\dot Q=0$ where $\dot Q$ is the net heat transfer to the room resulting from internal gains and cooling or

$$\dot Q = \dot Q_{students} + \dot Q_{lights} - \dot Q_{cooling}=0$$

where

$$\dot Q_{students} = N_{students}*\dot Q_{student}$$$$\dot Q_{lights} = Area \cdot \dot Q_{light}$$

and $\dot Q_{cooling}$ is the rate of cooling required. As a result,

$$\dot Q_{cooling} = \dot Q_{students} + \dot Q_{lights}$$

The units need to be consistent and converted to kW as illustrated in the following code cell.

In [2]:
Q_students = N_students*Q_student/3600  # includes conversion from kJ/h to kW
Q_lights = Area*Q_light/1000            # includes conversion from W to kW
Q_cooling = Q_students + Q_lights       # net cooling requirement [kW]
print('Q_cooling = ',Q_cooling,'kW')
Q_cooling =  16.75 kW

Part(ii): A Piston-Cylinder

Given:

Air in a well-insulated cylinder supports a piston and contains an electric resistance heater as shown below. The heater is energized for 60 minutes with a DC voltage of 10 V resulting in a current of 1A. This causes the piston to move upwards by 25 cm. Following is data associated with this problem

In [3]:
# Given Inputs
d_p = 20/100   # diameter of the piston, [m]
P_atm =  100   # pressure of the atmosphere above piston,[kPa] 
m_p = 70       # mass of the piston, [kg] 
Current = 1    # current flowing through resistor, [A]
Voltage = 10   # voltage across the resistor, [V] 
Dt = 60        # time interval for heating process, [min]
Dx = 25/100    # change in piston height from bottom of cylinder, [m]
g = 9.81       # acceleration due to gravity, [m/s^2]

Find:

a) pressure of air before the piston moves (kPa)\ b) work due to expansion of air in the cylinder (kJ)\ c) work done on or by the system for part (d) \ d) electrical work from the resistor (kJ)\ e) change in internal energy of air (kJ)

System Sketch:

Basic Equations:

$$\Sigma F=0, P = \dfrac{F}{A},W_{boundary}=\int PdV, W_{electrical}= \int \epsilon\cdot i\cdot dt$$$$\dfrac{dE}{dt} = \dot Q- \dot W + \displaystyle\sum_{in} \dot m_{in} (h+ke+pe)_{in}-\displaystyle\sum_{out} \dot m_{out}(h+ke+pe)_{out}, E = U + KE + PE$$

Assumptions:

1) closed system, 2) quasi-equilbrium expansion process, 3) neglect changes in kinetic and potential energy of air, 4) negligible heat transfer from the system to the surroundings, 5) neglect internal energy change of the resistor

Solution:

(a) Initial pressure of air

To calculate the initial pressure (state 1), a static force balance is performed on the piston (see piston FBD) leading to

$$F_{air} = m_pg + F_{atm}$$

where $F_{air}=P_{air}A_{p}$, $F_{atm}=P_{atm}A_{p}$, and $A_{p}$ is the piston surface area. Therefore, the air pressure is

$$P_{air} = \dfrac{m_pg}{A_p} + P_{atm}$$

where $A_{p} = \pi(d_p/2)^2$.

Since the static force balance doesn't change during the process and it is assumed to be a quasi-equilibrium process, then the pressure is constant.

In [4]:
import math
A_p = math.pi*(d_p/2)**2          # piston surface area, [m^2]
P_air  = m_p*g/A_p/1000 + P_atm   # in the first term, necessary to convert from units of N/m^2 [Pa] to kN/m^2 [kPa]
print('P_air = ',round(P_air,2),'kPa')
P_air =  121.86 kPa

(b) Expansion work

The boundary work due to the expansion of the air for this constant pressure, quasi-equilibrium process is

$$W_{b,12} = \int\limits_{V_1}^{V_2}{P_{air}dV}=P_{air}(V_2-V_1)$$

The change in volume is related to the piston area and movement according to

$$\Delta V_{12} = V_2 - V_1 = A_p\Delta x$$
In [5]:
DV_12 = A_p*Dx        # change in volume [m^3]
W_b_12 = P_air*DV_12  # units of kN-m [kJ]
print('W_b_12 = ',round(W_b_12,3),'kJ')
W_b_12 =  0.957 kJ

(c) Work direction

The work is positive because the air is doing work on its surroundings (i.e., the piston).

(d) Electrical work

The basic equation for electrical work applied to the resistor using the nomenclature of this problem is

$$W_{e,12}= -\int \limits_{0}^{\Delta t} \epsilon\cdot i\cdot dt$$

where $\epsilon$ is voltage across the resistor (V), $i$ is current (A), and $t$ is time. The sign is negative because work is done on the resistor. For ths problem, a DC voltage is applied and is constant, so the current is also constant. Thus, the integral becomes

$$ W_{e,12} = -\epsilon\cdot i\cdot\Delta t$$
In [6]:
W_e_12 = -Voltage*Current*Dt*60/1000 # necessary to convert from units of J-min/s to kJ
print('W_e_12 = ',W_e_12,'kJ')
W_e_12 =  -36.0 kJ

(e) Change in air internal energy

As depicted in the system sketch, the system includes both the air and electrical resistor. As a result, there is electrical work flowing into the system and boundary work is being performed by the expansion of the air against the piston. Heat transfer is neglected because the cylinder is "well insulated" and presumbaly there isn't sufficient time for heat transfer to occur.

The basic energy balance is

$$\dfrac{dE}{dt} = \dot Q- \dot W + \displaystyle\sum_{in} \dot m_{in} (h+ke+pe)_{in}-\displaystyle\sum_{out} \dot m_{out}(h+ke+pe)_{out}$$

However, the system is closed so that $\dot m_{in}= \dot m_{out} = 0$ and there is no heat transfer ($\dot Q = 0$), Thus,

$$\dfrac{dE}{dt} = -\dot W \rightarrow \int \limits_{E_1}^{E_2} dE = -\int \dot W dt \rightarrow E_2 - E_1 = -W$$

but $W = W_{b,12} + W_{e,12}$, $\Delta E_{12} = \Delta U_{12} + \Delta KE_{12} + \Delta PE_{12}$, and $\Delta KE_{12} = \Delta PE_{12} = 0$, so

$$ \Delta U_{12} = U_2 - U_1 = -(W_{b,12} - W_{e,12})$$
In [7]:
DU_12 = -(W_b_12 + W_e_12)
print('DU_12 = ',round(DU_12,2),'kJ')
DU_12 =  35.04 kJ