4. The First Law of Thermodynamics for Closed Systems

# 4.3 Work

Work is a form of mechanical energy associated with a force and its resulting displacement. When a force $F$ moves a body from one position to another, it does work on that body over the distance, see Figure 4.3.1.

${}_{1}W_{2}= \displaystyle\int_{1}^{2}{Fdx }$

The common SI units for work are kJ and J.

## 4.3.1 Boundary work

Work associated with the expansion and compression of a gas is commonly called boundary work because it is done at the boundary between a system and its surroundings.

Let us consider a piston-cylinder device, as illustrated in Figure 4.3.2. The gas in the cylinder exerts an upward force, $F=PA$, where $P$ is the gas pressure, and $A$ is the cross-sectional area of the piston. Upon receiving heat, the gas will tend to expand, pushing the piston up. We will assume the expansion process is quasi-equilibrium, and the piston moves up an infinitesimal distance $d$. The boundary work done by the gas to the surroundings in this infinitesimal process is $dW=Fd=(PA)d=P(Ad)=P\Delta \mathbb{V}$; therefore, the total boundary work between two states in a process can be written as

${}_{1}W_{2}= \displaystyle\int_{1}^{2}{Pd\mathbb{V}\ }$

where

$P$: pressure, in kPa or Pa

$\mathbb{V}$: volume, in m3

${}_{1}W_{2}$: boundary work, in kJ or J

Specific boundary work refers to the boundary work done by a unit mass of a substance. It can be written as

${}_{1}w_{2}=\displaystyle\int_{1}^{2}{Pdv\ }$

where

$P$: pressure, in kPa or Pa

$v$: specific volume, in m3/kg

${}_{1}w_{2}$: specific boundary work, in kJ/kg or J/kg

From the integral equations for ${}_{1}W_{2}$ and ${}_{1}w_{2}$, we can tell that the boundary work and specific boundary work between any two states in a process can be illustrated graphically as the area under the process curve in the $P-\mathbb{V}$ and $P-v$ diagrams, respectively. For example, the shaded area in Figure 4.3.3 represents the specific boundary work between states 1 and 2 in the compression process A. The three compression processes, A, B, and C in Figure 4.3.3 have different specific boundary work because of their different paths. By comparing the areas under the process curves, we can tell that process A has the smallest specific boundary work and process C has the largest specific boundary work.

Figure 4.3.3 demonstrates that the boundary work and specific boundary work in a quasi-equilibrium process are path functions;  they depend on the initial and final states as well as the process path. Boundary work can be defined as positive or negative. Here is a common sign convention: the boundary work in an expansion process is positive. This is because the change of volume in an expansion process is positive. Likewise, the boundary work in a compression process is negative.

Example 1

Consider a rigid sealed tank of a volume of 0.3 m3 containing nitrogen at 10oC and 150 kPa. The tank is heated until the temperature of the nitrogen reaches 50oC. Treat nitrogen as an ideal gas.

1. Sketch the process on a $P-\mathbb{V}$ diagram
2. Calculate the boundary work in this process
3. Calculate the change in internal energy in this process

Solution

1.   $P-\mathbb{V}$ diagram

2.  The boundary work is zero because the volume of nitrogen remains constant in the process.

${}_{1}W_{2}=\displaystyle \int_{1}^{2}{Pd\mathbb{V}\ }=0$

3. Change in internal energy in the process

From Table G1:

R=0.2968 kJ/kgK and Cv= 0.743 kJ/kgK

The mass of nitrogen:

$\because P\mathbb{V} = mRT$

$\therefore m = \dfrac{P\mathbb{V}}{RT} = \dfrac{150 \times 0.3}{0.2968 \times (273.15 + 10)} = 0.5355 \ \rm{kg}$

The change in internal energy:

\begin{align*} \Delta U &= m \Delta u =mC_v\left(T_2-T_1\right) \\&= 0.5355 \times 0.743 \times (50-10) = 15.9 \ \rm{kJ} \end{align*}

Nitrogen absorbs 15.9 kJ of heat in this process.

Example 2

Consider 0.2 kg of ammonia in a reciprocating compressor (piston-cylinder device) undergoing an isobaric expansion. The initial and final temperatures of the ammonia are 0oC and 30oC, respectively. The pressure remains 100 kPa in the process.

1. Sketch the process on a $P-v$ diagram
2. Calculate the boundary work in this process
3. Calculate the change in internal energy in this process

Solution:

1.   $P-v$ diagram

2.  Boundary work

From Table B2: for the initial state 1 at T = 0oC, P = 100 kPa,

$v_1 = 1.31365 \ \rm{m^3/kg}$               $u_1 = 1504.29 \ \rm{kJ/kg}$

For the final state 2 at T = 30oC, P = 100 kPa,

$v_2 = 1.46562 \ \rm{m^3/kg}$               $u_2 = 1554.1 \ \rm{kJ/kg}$

Graphically, the specific boundary work is the shaded rectangular area under the process line in the P – $v$ diagram.

\begin{align*} {}_{1}W_{2} &=m{}_{1}w_{2} = m\displaystyle\int_{1}^{2}{Pdv} = mP(v_2 - v_1) \\&= 0.2 \times 100 \times (1.46562 - 1.31365) = 3.0394 \ \rm{kJ} \end{align*}

3. Change in internal energy

\begin{align*} \Delta U &= m \Delta u = m(u_2 - u_1) \\&= 0.2 \times (1554.1 -1504.29)= 9.962 \ \rm{kJ} \end{align*}

Example 3

Consider air undergoing an isothermal expansion. The initial and final pressures of the air are 200 kPa and 100 kPa respectively. The temperature of the air remains 50oC in the process. Treat air as an ideal gas.

1. Sketch the process on a $P-v$ diagram
2. Calculate the specific boundary work in this process
3. Calculate the change in specific internal energy in this process

Solution:

1.   $P-v$ diagram

2.  Specific Boundary work

From Table G1: R = 0.287 kJ/kgK for air. The ideal gas, air, undergoes an isothermal process.

$\because Pv = RT$

$\therefore P=\dfrac{RT}{v}$ and $\dfrac{v_2}{v_1} = \dfrac{P_1}{P_2}$

\begin{align*} {}_{1}W_{2}&=\displaystyle \int_{1}^{2}{Pdv} = \int_{1}^{2}{\dfrac{RT}{v }dv} \\&= RT\displaystyle\int_{1}^{2}{\dfrac{1}{v }dv} = RT ln\dfrac{v_2}{v_1} = RTln\dfrac{P_1}{P_2} \\&= 0.287 \times (273.15 + 50)ln\dfrac{200}{100} = 64.285 \ \rm{kJ} \end{align*}

3. The process is isothermal; therefore, the temperature remains constant and the change in internal energy is zero.

$\Delta u =C_v\left(T_2-T_1\right)=0$

## 4.3.2 Polytropic process and its boundary work

A polytropic process refers to any quasi-equilibrium thermodynamic process, which can be described with the following mathematical expression.

$P\mathbb{V}^n= \rm{constant}$         or       $Pv^n= \rm{constant}$

where

$P$: pressure, in kPa or Pa

$\mathbb{V}$: volume, in m3

$v$: specific volume, in m3/kg

$n$: polytropic exponent, dimensionless

By adjusting $n$ to different values, the above two simple expressions can be used to represent the relations of pressure-volume or pressure-specific volume of various processes that are encountered in real thermal systems, including the isobaric, isochoric, and isothermal processes. Table 4.3.1 lists the polytropic exponents corresponding to an ideal gas undergoing an isobaric, isochoric, and isothermal process, respectively.

Table 4.3.1 Ideal gas equation of state expressed in polytropic relations
Process Polytropic exponent Ideal gas equation of state Polytropic relation
Isobaric $n=0$ $P= \rm{constant}$ $Pv^0= \rm{constant}$
Isothermal $n=1$ $\because T= \rm{constant}$  and  $Pv=RT$

$\therefore Pv= \rm{constant}$

$Pv^1= \rm{constant}$
Isochoric $n=\infty$ $v= \rm{constant}$ $Pv^\infty= \rm{constant}$

Figure 4.3.4 shows different polytropic processes of an ideal gas. In many actual thermodynamic processes, the polytropic exponents are typically in the range of $1 \lt n \lt k$, where $k=\displaystyle\frac{C_p}{C_v}$. $C_p$ and $C_v$ are the constant-pressure and constant-volume specific heats, respectively.

The boundary work and corresponding specific boundary work in a polytropic process can be calculated by using the following equations. Detailed derivations are left for the readers to practice.

The following expressions are valid for both real and ideal gases.

If  $n \neq 1$,

${}_{1}W_{2}=\displaystyle\frac{{P}_\mathbf{2}\mathbb{V}_\mathbf{2}-{P}_\mathbf{1}\mathbb{V}_\mathbf{1}}{1-n}\\$

$\ {}_{1}w_{2}=\displaystyle\frac{{P}_\mathbf{2}{v}_\mathbf{2}-{P}_\mathbf{1}{v}_\mathbf{1}}{1-n}\\$

If  $\ n=1,$

${}_{1}W_{2}={P}_\mathbf{1}\mathbb{V}_\mathbf{1}{ln}{\displaystyle\frac{\mathbb{V}_\mathbf{2}}{\mathbb{V}_\mathbf{1}}}={P}_\mathbf{2}\mathbb{V}_\mathbf{2}{ln}{\displaystyle\frac{\mathbb{V}_\mathbf{2}}{\mathbb{V}_\mathbf{1}}}\\$

${}_{1}W_{2}={P}_\mathbf{1}\mathbb{V}_\mathbf{1}{ln}{\displaystyle\frac{{P}_\mathbf{1}}{{P}_\mathbf{2}}}={P}_\mathbf{2}\mathbb{V}_\mathbf{2}{ln}{\displaystyle\frac{{P}_\mathbf{1}}{{P}_\mathbf{2}}}\\$

$\ {}_{1}w_{2}={P}_\mathbf{1}{v}_\mathbf{1}{ln}{\displaystyle\frac{{v}_\mathbf{2}}{{v}_\mathbf{1}}}={P}_\mathbf{2}{v}_\mathbf{2}{ln}{\displaystyle\frac{{v}_\mathbf{2}}{{v}_\mathbf{1}}}\\$

$\ {}_{1}w_{2}={P}_\mathbf{1}{v}_\mathbf{1}{ln}{\displaystyle\frac{{P}_\mathbf{1}}{{P}_\mathbf{2}}}={P}_\mathbf{2}{v}_\mathbf{2}{ln}{\displaystyle\frac{{P}_\mathbf{1}}{{P}_\mathbf{2}}}\\$

The following two expressions are valid only for ideal gases in an isothermal process ($\ n=1$).

If  $\ n=1,$

$\ {}_{1}W_{2}={{mRT}}{ln}{\displaystyle\frac{\mathbb{V}_\mathbf{2}}{\mathbb{V}_\mathbf{1}}}={{mRT}}{ln}{\displaystyle\frac{{P}_\mathbf{1}}{{P}_\mathbf{2}}}\\$

$\ {}_{1}w_{2}={{RT}}{ln}{\displaystyle\frac{{v}_\mathbf{2}}{{v}_\mathbf{1}}}={{RT}}{ln}{\displaystyle\frac{{P}_\mathbf{1}}{{P}_\mathbf{2}}}\\$

where

${}_{1}W_{2}$: boundary work, in kJ or J

${}_{1}w_{2}$: specific boundary work, in kJ/kg or J/kg

$P$: pressure, in kPa or Pa

$\mathbb{V}$: volume, in m3

$v$: specific volume, in m3/kg

$T$: absolute temperature, in K

$R$: gas constant, in kJ/kgK or J/kgK

$m$: mass, in kg

Example 4

Consider an ideal gas undergoing a polytropic process. At the initial state: P1=200 kPa, v1=0.05 m3/kg. At the final state: v2=0.1 m3/kg. For n=1.3 and n=1,

1. Sketch the two processes on a $P-v$ diagram. Which process has a larger specific boundary work?
2. Calculate the specific boundary work and verify your answer to the question in part 1.

Solution:

1.   $P-v$ diagram

From the $P - v$ diagram, the area under the process line for $n = 1$ is greater than that for $n = 1.3$; therefore, the isothermal process with $n = 1$ has a larger specific boundary work.

2. For $n=1.3$, find the final pressure $P_2$ first.

$\because P_1v_1^n = P_2v_2^n$

$\therefore P_2 = P_1\left(\dfrac {v_1}{v_2}\right)^n = 200 \times \left(\dfrac{0.05}{0.1}\right)^{1.3} = 81.225 \ \rm{kPa}$

\begin{align*} {}_{1}W_{2} &= \dfrac{P_2v_2 - P_1v_1}{1-n} \\&= \dfrac{81.225 \times 0.1 - 200 \times 0.05}{1-1.3} = 6.258 \ \rm{kJ/kg} \end{align*}

For $n = 1$, the process is isothermal; therefore,

\begin{align*} {}_{1}W_{2} &= P_1v_1ln \left(\dfrac{v_2}{v_1}\right) \\&= 200 \times 0.05 \times ln \dfrac{0.1}{0.05}= 6.931 \ \rm{kJ/kg} \end{align*}

Compare the specific boundary work in these two processes, the isothermal process (n=1) has a larger specific boundary work than the polytropic process with n = 1.3. The calculation results are consistent with the observation from the $P - v$ diagram.

## 4.3.3 Spring work

Spring work is a form of mechanical energy required to compress or expand a spring to a certain distance, see Figure 4.3.5.  Spring force and spring work can be expressed as follows:

$F=Kx$

$W_{spring}=\displaystyle\int_{1}^{2}{Fdx=}\displaystyle\frac{1}{2}K\left(x_2^2-x_1^2\right)$

where

$F$: spring force, in kN or N

$K$: spring constant, in kN/m or N/m

$W_{spring}$: spring work, in kJ or J

$x_1$ and $x_2$: initial and final displacements, in m, measured from the spring’s rest position.

Example 5

A linear spring with spring constant K=100 kN/m is mounted on a piston-cylinder device. At the initial state, the cylinder contains 0.15 m3 of gas at 100 kPa. The spring is uncompressed. The gas is then heated until its volume expands to 0.2 m3. The piston’s cross-sectional area is 0.1 m2. Assume the piston is frictionless with negligible weight and the process is quasi-equilibrium,

1. Write an expression of the gas pressure as a function of the gas volume in this process
2. Sketch the process on a $P-\mathbb{V}$ diagram
3. Calculate the total work done by the gas during this expansion process
4. If the spring is not mounted on the piston, the gas in the cylinder will expand isobarically after being heated. To reach the same final volume, 0.2 m3, how much work must be done by the gas in the expansion process?

Solution:

1.   Analyze the forces acting on the piston, see below.

Three forces acting on the piston are in equilibrium.

$\because\sum F = 0: F_{gas} = F_{spring} + F_{atm}$

$\therefore P_{gas} A = Kx + P_{atm} A = K \dfrac{\mathbb{V} -\mathbb{V}_1}{A} + P_{atm} A$

$\therefore P_{gas} = \dfrac{K(\mathbb{V}-\mathbb{V}_1)}{A^2} + P_{atm}$

At the initial state: $P_{gas} = 100 \ \rm{kPa}, \mathbb{V}= \mathbb{V}_1$. Substitute the two values,

$\because 100 = \dfrac{K(\mathbb{V}-\mathbb{V}_1)}{A^2} + P_{atm}$

$\therefore P_{atm} = 100 \ \rm{kPa}$

with K =100 kN/m, A = 0.1 m2, Patm = 100 kPa and $\mathbb{V}_1$= 0.15 m3, the gas pressure can be expressed as a function of the gas volume.

$\because P_{gas} = \dfrac{100(\mathbb{V}-0.15)}{0.1^2} + 100$

$\therefore P_{gas} = 10^4 \mathbb{V} -1400$

where gas pressure is in kPa and $\mathbb{V}$ is in m3.

2. $P-\mathbb{V}$ diagram

From part 1, Pgas is a linear function of volume $\mathbb{V}$.

3. During the expansion process, the gas has to overcome the resistance from the springand. At the same time, the gas pressure and volume increase until the gas reaches the final state. The total work done by the gas is the shaded area of the trapezoid in the $P-\mathbb{V}$ diagram.

At the final state, $\mathbb{V}_2= 0.2 \ m^3$; therefore,

$P_{gas,2}= 10^4 \times 0.2 -1400 = 600 \ \rm{kPa}$

The total work done by the gas is

\begin {align*} {}_{1}W_{2} &= \dfrac{(P_{gas,2} + P_{gas,1})(\mathbb{V}_2 - \mathbb{V}_1)}{2} \\&= \dfrac{(600 + 100)(0.2 - 0.15)}{2} = 17.5 \ \rm{kJ} \end{align*}

4. If the gas expands isobarically from $\mathbb{V}_1$ = 0.15 m3 to $\mathbb{V}_2$ = 0.2 m3, the work done by the gas will be

\begin {align*} {}_{1}W_{2a} &= P_{gas,1} (\mathbb{V}_2 - \mathbb{V}_1) \\&=100 \times (0.2 - 0.15) = 5 \ \rm{kJ} \end{align*}

${}_{1}W_{2a}$ is the shaded area of the rectangle. The difference between ${}_{1}W_{2}$ and ${}_{1}W_{2a}$ is the gas work used to overcome the resistance of the spring, as shown in the shaded area of the triangle.

$W_{spring} = {}_{1}W_{2} - {}_{1}W_{2a} = 17.5 -5 = 12.5 \ \rm{kJ}$

Practice Problems

Practice Problems