{"id":1838,"date":"2021-07-27T20:21:57","date_gmt":"2021-07-28T00:21:57","guid":{"rendered":"https:\/\/pressbooks.bccampus.ca\/thermo1\/chapter\/6-8-applications-of-the-second-law-of-thermodynamics-in-closed-systems\/"},"modified":"2022-08-12T00:48:11","modified_gmt":"2022-08-12T04:48:11","slug":"6-8-applications-of-the-second-law-of-thermodynamics-in-closed-systems","status":"publish","type":"chapter","link":"https:\/\/pressbooks.bccampus.ca\/thermo1\/chapter\/6-8-applications-of-the-second-law-of-thermodynamics-in-closed-systems\/","title":{"raw":"6.8 Applications of the second law of thermodynamics in closed systems","rendered":"6.8 Applications of the second law of thermodynamics in closed systems"},"content":{"raw":"<div class=\"6.8-applications-of-the-second-law-of-thermodynamics-in-closed-systems\">\r\n\r\nThe first and second laws of thermodynamics are often used together with the thermodynamic tables or ideal gas equations in thermal analysis. The following strategy may be adapted when solving problems requiring the second law of thermodynamics:\r\n<ol>\r\n \t<li style=\"text-align: justify\">Identify the process(es), e.g., isobaric, isothermal, isochoric, or isentropic process.<\/li>\r\n \t<li style=\"text-align: justify\">Determine the initial, final, and any intermediate states. Find the properties, such as, [latex]P, T, v, u, s[\/latex], by using the thermodynamic tables or equations, e.g., for an ideal gas, solid, or liquid.<\/li>\r\n \t<li style=\"text-align: justify\">Determine the heat transfer, [latex]Q[\/latex], or other unknowns by applying the first law of thermodynamics for closed systems.<\/li>\r\n \t<li style=\"text-align: justify\">Determine the entropy generation, [latex]S_{gen}[\/latex], or other unknowns by applying the second law of thermodynamics for closed systems.<\/li>\r\n<\/ol>\r\n&nbsp;\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Example 1<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nA piston-cylinder contains ammonia at 2000 kPa, 80\u00b0C. The piston is loaded with a linear spring, see <a href=\"#6.8.e1\">Figure 6.8.e1<\/a>. The outside ambient is at 15\u00b0C. The ammonia is now cooled down to saturated liquid at 15\u00b0C. Assuming the cylinder is always at the ambient temperature during the cooling process, determine the specific boundary work, the specific heat transfer, and the specific entropy generation in the <a id=\"6.8.e1\"><\/a>process.\r\n\r\n[caption id=\"attachment_2281\" align=\"aligncenter\" width=\"141\"]<a href=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-content\/uploads\/sites\/499\/2021\/07\/Fig.-6-23.png\" target=\"_blank\" rel=\"noopener\"><img class=\"wp-image-2281 size-full\" src=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-content\/uploads\/sites\/499\/2021\/07\/Fig.-6-23.png\" alt=\"A piston-cylinder device containing pressurized ammonia\" width=\"141\" height=\"215\" \/><\/a> <em><strong>Figure 6.8.e1<\/strong> A piston-cylinder device containing pressurized ammonia<\/em>[\/caption]\r\n\r\n<em><span style=\"text-decoration: underline\">Solution:<\/span><\/em>\r\n<p style=\"text-align: justify\">Analysis:<\/p>\r\n\r\n<ul style=\"text-align: justify\">\r\n \t<li>Ammonia in the piston-cylinder device can be treated as a closed system.<\/li>\r\n \t<li>As the piston is loaded with a linear spring, the pressure of ammonia changes linearly with its specific volume, see the [latex]P-v[\/latex] diagram, <a href=\"#6.8.e2\">Figure 6.8.e2<\/a>. Please refer to <a href=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/chapter\/4-3-work#sec4.3_ex5\" target=\"_blank\" rel=\"noopener\">example 5 in Section 4.3<\/a> for a detailed analysis.\u00a0 The specific boundary work can be found from<\/li>\r\n<\/ul>\r\n<p style=\"padding-left: 80px;text-align: justify\">[latex]{}_{1}w_{2}=\\displaystyle \\int_{1}^{2}{Pd{v}\\ } = \\dfrac{1}{2}(P_{1} + P_{2})(v_2 - v_1)[\/latex]<\/p>\r\n\r\n<ul style=\"text-align: justify\">\r\n \t<li>Apply both the first and second laws of thermodynamics to ammonia, we can then find the specific heat transfer and specific entropy generation.<\/li>\r\n<\/ul>\r\n<p style=\"padding-left: 80px;text-align: justify\">The first law: [latex]\\Delta u = {}_{1}q_{2} - {}_{1}w_{2} [\/latex]<\/p>\r\n<p style=\"padding-left: 80px;text-align: justify\">The second law: [latex]\\Delta s =\\sum\\dfrac{{}_{1}q_{2}}{T_{surr}}+s_{gen}[\/latex]<\/p>\r\n\r\n<ul style=\"text-align: justify\">\r\n \t<li>We will need to determine the following properties to complete the calculations.<\/li>\r\n<\/ul>\r\n<p style=\"padding-left: 80px;text-align: justify\">State 1: [latex] P_1, v_1, u_1, s_1 [\/latex]<\/p>\r\n<p style=\"padding-left: 80px;text-align: justify\"><a id=\"6.8.e2\"><\/a>State 2: [latex] P_2, v_2, u_2, s_2 [\/latex]<\/p>\r\n\r\n\r\n[caption id=\"attachment_2186\" align=\"aligncenter\" width=\"400\"]<a href=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-content\/uploads\/sites\/499\/2021\/07\/6.8.1.png\" target=\"_blank\" rel=\"noopener\"><img class=\"wp-image-2186\" src=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-content\/uploads\/sites\/499\/2021\/07\/6.8.1-300x253.png\" alt=\"P-v diagram of ammonia in a piston-cylinder device\" width=\"400\" height=\"337\" \/><\/a> <em><strong>Figure 6.8.e2<\/strong> P-v diagram of ammonia in a piston-cylinder device<\/em>[\/caption]\r\n\r\nNow let us solve the problem in detail.\r\n\r\nFrom <a href=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/back-matter\/appendix-b-thermodynamic-properties-of-ammonia#TB1\" target=\"_blank\" rel=\"noopener\">Table B1<\/a>: T<sub>1<\/sub> = 80<span lang=\"en-US\" xml:lang=\"en-US\">\u00b0C, P<sub>sat<\/sub> = 4.14197 MPa. Ammonia in state 1 is a superheated vapour because P<sub>1<\/sub> = 2000 kPa = 2 MPa &lt; P<sub>sat. <\/sub><\/span>From <a href=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/back-matter\/appendix-b-thermodynamic-properties-of-ammonia#TB2\" target=\"_blank\" rel=\"noopener\">Table B2<\/a>: for state 1 at T<sub>1<\/sub> = 80<span lang=\"en-US\" xml:lang=\"en-US\">\u00b0C, P<sub>1<\/sub> = 2000 kPa, [latex] v_1 [\/latex] = 0.075952 m<sup>3<\/sup>\/kg,\u00a0[latex] u_1 [\/latex] = 1583.81 kJ\/kg,\u00a0[latex] s_1 [\/latex] = 5.8292 kJ\/kgK<\/span>\r\n\r\n&nbsp;\r\n\r\nState 2 is a saturated liquid at T<sub>2<\/sub> = 15<span lang=\"en-US\" xml:lang=\"en-US\">\u00b0C. From <a href=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/back-matter\/appendix-b-thermodynamic-properties-of-ammonia#TB1\" target=\"_blank\" rel=\"noopener\">Table B1<\/a>, <\/span>P<sub>2<\/sub> = 728.53 kPa, [latex] v_2 = v_f [\/latex] = 0.001619 m<sup>3<\/sup>\/kg,\u00a0<span lang=\"en-US\" xml:lang=\"en-US\">[latex] u_2 [\/latex]<\/span> = 412.06 kJ\/kg,\u00a0[latex] s_2 = s_f [\/latex] = 1.7197 kJ\/kgK\r\n\r\n&nbsp;\r\n\r\nThe specific boundary work is\r\n<p style=\"padding-left: 40px\">[latex]\\begin{align*} {}_{1}w_{2} &amp;= \\dfrac{1}{2}(P_{1} + P_{2})(v_2 - v_1) \\\\&amp;= \\dfrac{1}{2}(2000 + 728.53)(0.001619 - 0.075952) = -101.41 \\ \\rm{kJ\/kg} \\end{align*}[\/latex]<\/p>\r\n&nbsp;\r\n\r\nThe specific heat transfer is\r\n<p style=\"padding-left: 40px\">[latex]\\begin{align*} {}_{1}q_{2} &amp;= \\Delta u + {}_{1}w_{2} \\\\&amp;= (412.06 - 1583.81) + (-101.41) = -1273.16 \\ \\rm{kJ\/kg} \\end{align*}[\/latex]<\/p>\r\n&nbsp;\r\n\r\nThe specific entropy generation is\r\n<p style=\"padding-left: 40px\">[latex]\\begin{align*} s_{gen} &amp;=\\Delta s - \\sum\\dfrac{{}_{1}q_{2}}{T_{surr}} \\\\&amp;=(s_2-s_1)- \\sum\\dfrac{{}_{1}q_{2}}{T_{surr}} \\\\&amp;= (1.7197 - 5.8292) - \\dfrac{-1273.16}{(273.15 + 15)} = 0.3089 \\ \\rm{kJ\/kgK} &gt; 0\\end{align*}[\/latex]<\/p>\r\n&nbsp;\r\n\r\nComment:\r\n<ul>\r\n \t<li style=\"text-align: justify\">The cooling process is irreversible; therefore, the specific entropy generation, [latex]s_{gen}&gt;0[\/latex].<\/li>\r\n \t<li style=\"text-align: justify\">When applying the second law of thermodynamics, it is important to note that [latex]T_{surr}[\/latex] is the absolute temperature (in Kelvin) of the system boundary or the surroundings if the boundary is in thermal equilibrium with the surroundings.<\/li>\r\n<\/ul>\r\n<\/div>\r\n<\/div>\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Example 2<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nThree kilograms of CO<sub>2<\/sub> at 150 kPa, 300 K is mixed with two kilograms of CO<sub>2<\/sub> at 220 kPa, 500 K, in a rigid, well-insulated tank, see <a href=\"#6.8.e3\">Figure 6.8.e3<\/a>. Find the final state (<em>P<\/em>,\u00a0<em>T<\/em>) and the entropy generation in this process. Assume CO<sub>2<\/sub> is an ideal gas in this mixing <a id=\"6.8.e3\"><\/a>process.\r\n\r\n[caption id=\"attachment_2187\" align=\"aligncenter\" width=\"400\"]<a href=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-content\/uploads\/sites\/499\/2021\/07\/6.8.2-e1629312562812.png\" target=\"_blank\" rel=\"noopener\"><img class=\"wp-image-2187\" src=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-content\/uploads\/sites\/499\/2021\/07\/6.8.2-300x121.png\" alt=\"A rigid tank with two compartments containing CO2\" width=\"400\" height=\"146\" \/><\/a> <em><strong>Figure 6.8.e3 <\/strong>A rigid tank with two compartments containing CO<sub>2<\/sub><\/em>[\/caption]\r\n<p style=\"text-align: justify\"><em><span style=\"text-decoration: underline\">Solution<\/span>:<\/em><\/p>\r\n<p style=\"text-align: justify\">Analysis:<\/p>\r\n\r\n<ul style=\"text-align: justify\">\r\n \t<li>CO<sub>2<\/sub> in the whole tank can be treated as a closed system.<\/li>\r\n \t<li>The mixing occurs after the partition is removed. As the tank is well-insulated, the heat transfer between the system and the surroundings is zero in this mixing process: [latex]{}_{1}Q_{2}=0\u00a0 [\/latex]<\/li>\r\n \t<li>Since the tank is rigid, the total volume of CO<sub>2<\/sub> remains constant; therefore, the boundary work is zero in the mixing process: [latex]{}_{1}W_{2}=0\u00a0 [\/latex]<\/li>\r\n \t<li>Apply the first law to the system (whole tank)<\/li>\r\n<\/ul>\r\n<p style=\"padding-left: 80px;text-align: justify\">[latex]\\Delta U = {}_{1}Q_{2} - {}_{1}W_{2}=0 [\/latex]<\/p>\r\n\r\n<ul style=\"text-align: justify\">\r\n \t<li>The entropy generation can be found by applying the second law to the system.<\/li>\r\n<\/ul>\r\n<p style=\"padding-left: 80px;text-align: justify\">[latex]\\because \\Delta S =\\sum\\dfrac{{}_{1}Q_{2}}{T_{surr}}+S_{gen}[\/latex]\u00a0\u00a0 and \u00a0 [latex] {}_{1}Q_{2} = 0[\/latex]<\/p>\r\n<p style=\"padding-left: 80px;text-align: justify\">[latex] \\therefore S_{gen} = \\Delta S [\/latex]<\/p>\r\n\r\n<ul style=\"text-align: justify\">\r\n \t<li>To complete the calculation, we will apply the ideal gas relations to determine the final pressure, temperature, [latex]\\Delta u[\/latex], and [latex]\\Delta s[\/latex].<\/li>\r\n<\/ul>\r\n<p style=\"text-align: justify\">Now let us solve the problem in detail.<\/p>\r\n<p style=\"text-align: justify\">From <a href=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/back-matter\/__unknown__-2#TG1\" target=\"_blank\" rel=\"noopener\">Table G1<\/a> for CO<sub>2<\/sub>: [latex]R[\/latex] = 0.1889 kJ\/kgK, [latex]C_p[\/latex] = 0.846 kJ\/kgK, [latex]C_v[\/latex] = 0.657 kJ\/kgK.<\/p>\r\n&nbsp;\r\n\r\nFirst, the volumes of compartments A and B at the initial state, state 1, can be found from the ideal gas law.\r\n<p style=\"padding-left: 40px\">[latex] \\because P\\mathbb{V} = mRT [\/latex]<\/p>\r\n<p style=\"padding-left: 40px\">[latex]\\therefore \\mathbb{V}_A = \\dfrac{m_{1A}RT_{1A}}{P_{1A}} = \\dfrac{3 \\times 0.1889 \\times 300}{150} = 1.1334 \\ \\rm{m^3} [\/latex]<\/p>\r\n<p style=\"padding-left: 40px\">[latex]\\therefore \\mathbb{V}_B = \\dfrac{m_{1B}RT_{1B}}{P_{1B}} = \\dfrac{2 \\times 0.1889 \\times 500}{220} = 0.8586 \\ \\rm{m^3} [\/latex]<\/p>\r\nThe total volume of the tank is\r\n<p style=\"padding-left: 40px\">[latex] \\mathbb{V}_{tot} = \\mathbb{V}_A + \\mathbb{V}_B = 1.1334 + 0.8586 = 1.992 \\ \\rm{m^3}[\/latex]<\/p>\r\n&nbsp;\r\n\r\nNext, the final temperature can be calculated by applying the first law to the whole tank. Note that the tank is rigid and well insulated; therefore, [latex] \\Delta U = 0[\/latex].\r\n<p style=\"padding-left: 40px\">[latex] \\because \\Delta U = (m_{1A} + m_{1B})u_2 - (m_{1A}u_{1A} + m_{1B}u_{1B})=0[\/latex]<\/p>\r\n<p style=\"padding-left: 40px\">[latex] \\therefore m_{1A}(u_2 - u_{1A}) + m_{1B}(u_2 - u_{1B}) = 0 [\/latex]\u00a0\u00a0\u00a0 and\u00a0\u00a0\u00a0 [latex] \\Delta u =C_v \\Delta T [\/latex]<\/p>\r\n<p style=\"padding-left: 40px\">[latex] \\therefore m_{1A}C_{v}(T_2 - T_{1A}) + m_{1B}C_{v}(T_2 - T_{1B}) = 0 [\/latex]<\/p>\r\n<p style=\"padding-left: 40px\">[latex] \\begin{align*} \\therefore T_2 &amp;= \\dfrac{m_{1A}T_{1A} + m_{1B}T_{1B}}{m_{1A} + m_{1B}} \\\\&amp;= \\dfrac{3 \\times 300 + 2 \\times 500}{3 + 2} = 380 \\ \\rm{K} \\end{align*}[\/latex]<\/p>\r\n&nbsp;\r\n\r\nThen, the final pressure can be determined from the ideal gas law.\r\n<p style=\"padding-left: 40px\">[latex] \\begin{align*} P_2 &amp;= \\dfrac{(m_{1A} + m_{1B})RT_2}{\\mathbb{V}_{tot}} \\\\&amp;= \\dfrac{(3+2) \\times 0.1889 \\times 380}{1.992} = 180.17 \\ \\rm{kPa} \\end{align*}[\/latex]<\/p>\r\n&nbsp;\r\n\r\nLast, the entropy generation can be calculated from the second law.\r\n<p style=\"padding-left: 40px\">[latex] \\begin{align*} S_{gen} &amp;= \\Delta S \\\\&amp;= (m_{1A} + m_{1B})s_2 - (m_{1A}s_{1A} + m_{1B}s_{1B}) \\\\&amp;= m_{1A}(s_2 - s_{1A}) + m_{1B}(s_2 - s_{1B}) \\end{align*}[\/latex]<\/p>\r\n<p style=\"padding-left: 40px\">[latex] \\begin{align*} s_2 - s_{1A} &amp;= C_pln\\dfrac{T_2}{T_{1A}} - Rln\\dfrac{P_2}{P_{1A}} \\\\&amp;= 0.846ln\\dfrac{380}{300} - 0.1889ln\\dfrac{180.17}{150} = 0.16536 \\ \\rm{kJ\/kgK} \\ &gt;\\\u00a0 0\\end{align*}[\/latex]<\/p>\r\n<p style=\"padding-left: 40px\">[latex] \\begin{align*} s_2 - s_{1B} &amp;= C_pln\\dfrac{T_2}{T_{1B}} - Rln\\dfrac{P_2}{P_{1B}} \\\\&amp;= 0.846ln\\dfrac{380}{500} - 0.1889ln\\dfrac{180.17}{220} = -0.19445 \\ \\rm{kJ\/kgK} \\ &lt; \\ 0\\end{align*}[\/latex]<\/p>\r\n<p style=\"padding-left: 40px\">[latex] \\begin{align*} \\therefore S_{gen} &amp;= m_{1A}(s_2 - s_{1A}) + m_{1B}(s_2 - s_{1B}) \\\\&amp;= 3 \\times 0.16536 + 2 \\times (-0.19445) = 0.1072 \\ \\rm{kJ\/K}\\end{align*}[\/latex]<\/p>\r\n&nbsp;\r\n\r\nComment:\r\n\r\nThe entropy in a process can increase or decrease. In this example, the entropy of CO<sub>2<\/sub> originally in compartment A increases and the entropy of CO<sub>2<\/sub> originally in compartment B decreases in this mixing process, but the entropy generation [latex]S_{gen} \\ge 0[\/latex] because the mixing process is irreversible.\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<div class=\"textbox textbox--exercises\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Practice Problems<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\n[h5p id=\"47\"]\r\n\r\n<\/div>\r\n<\/div>","rendered":"<div class=\"6.8-applications-of-the-second-law-of-thermodynamics-in-closed-systems\">\n<p>The first and second laws of thermodynamics are often used together with the thermodynamic tables or ideal gas equations in thermal analysis. The following strategy may be adapted when solving problems requiring the second law of thermodynamics:<\/p>\n<ol>\n<li style=\"text-align: justify\">Identify the process(es), e.g., isobaric, isothermal, isochoric, or isentropic process.<\/li>\n<li style=\"text-align: justify\">Determine the initial, final, and any intermediate states. Find the properties, such as, [latex]P, T, v, u, s[\/latex], by using the thermodynamic tables or equations, e.g., for an ideal gas, solid, or liquid.<\/li>\n<li style=\"text-align: justify\">Determine the heat transfer, [latex]Q[\/latex], or other unknowns by applying the first law of thermodynamics for closed systems.<\/li>\n<li style=\"text-align: justify\">Determine the entropy generation, [latex]S_{gen}[\/latex], or other unknowns by applying the second law of thermodynamics for closed systems.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Example 1<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>A piston-cylinder contains ammonia at 2000 kPa, 80\u00b0C. The piston is loaded with a linear spring, see <a href=\"#6.8.e1\">Figure 6.8.e1<\/a>. The outside ambient is at 15\u00b0C. The ammonia is now cooled down to saturated liquid at 15\u00b0C. Assuming the cylinder is always at the ambient temperature during the cooling process, determine the specific boundary work, the specific heat transfer, and the specific entropy generation in the <a id=\"6.8.e1\"><\/a>process.<\/p>\n<figure id=\"attachment_2281\" aria-describedby=\"caption-attachment-2281\" style=\"width: 141px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-content\/uploads\/sites\/499\/2021\/07\/Fig.-6-23.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2281 size-full\" src=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-content\/uploads\/sites\/499\/2021\/07\/Fig.-6-23.png\" alt=\"A piston-cylinder device containing pressurized ammonia\" width=\"141\" height=\"215\" srcset=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-content\/uploads\/sites\/499\/2021\/07\/Fig.-6-23.png 141w, https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-content\/uploads\/sites\/499\/2021\/07\/Fig.-6-23-65x99.png 65w\" sizes=\"auto, (max-width: 141px) 100vw, 141px\" \/><\/a><figcaption id=\"caption-attachment-2281\" class=\"wp-caption-text\"><em><strong>Figure 6.8.e1<\/strong> A piston-cylinder device containing pressurized ammonia<\/em><\/figcaption><\/figure>\n<p><em><span style=\"text-decoration: underline\">Solution:<\/span><\/em><\/p>\n<p style=\"text-align: justify\">Analysis:<\/p>\n<ul style=\"text-align: justify\">\n<li>Ammonia in the piston-cylinder device can be treated as a closed system.<\/li>\n<li>As the piston is loaded with a linear spring, the pressure of ammonia changes linearly with its specific volume, see the [latex]P-v[\/latex] diagram, <a href=\"#6.8.e2\">Figure 6.8.e2<\/a>. Please refer to <a href=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/chapter\/4-3-work#sec4.3_ex5\" target=\"_blank\" rel=\"noopener\">example 5 in Section 4.3<\/a> for a detailed analysis.\u00a0 The specific boundary work can be found from<\/li>\n<\/ul>\n<p style=\"padding-left: 80px;text-align: justify\">[latex]{}_{1}w_{2}=\\displaystyle \\int_{1}^{2}{Pd{v}\\ } = \\dfrac{1}{2}(P_{1} + P_{2})(v_2 - v_1)[\/latex]<\/p>\n<ul style=\"text-align: justify\">\n<li>Apply both the first and second laws of thermodynamics to ammonia, we can then find the specific heat transfer and specific entropy generation.<\/li>\n<\/ul>\n<p style=\"padding-left: 80px;text-align: justify\">The first law: [latex]\\Delta u = {}_{1}q_{2} - {}_{1}w_{2}[\/latex]<\/p>\n<p style=\"padding-left: 80px;text-align: justify\">The second law: [latex]\\Delta s =\\sum\\dfrac{{}_{1}q_{2}}{T_{surr}}+s_{gen}[\/latex]<\/p>\n<ul style=\"text-align: justify\">\n<li>We will need to determine the following properties to complete the calculations.<\/li>\n<\/ul>\n<p style=\"padding-left: 80px;text-align: justify\">State 1: [latex]P_1, v_1, u_1, s_1[\/latex]<\/p>\n<p style=\"padding-left: 80px;text-align: justify\"><a id=\"6.8.e2\"><\/a>State 2: [latex]P_2, v_2, u_2, s_2[\/latex]<\/p>\n<figure id=\"attachment_2186\" aria-describedby=\"caption-attachment-2186\" style=\"width: 400px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-content\/uploads\/sites\/499\/2021\/07\/6.8.1.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2186\" src=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-content\/uploads\/sites\/499\/2021\/07\/6.8.1-300x253.png\" alt=\"P-v diagram of ammonia in a piston-cylinder device\" width=\"400\" height=\"337\" srcset=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-content\/uploads\/sites\/499\/2021\/07\/6.8.1-300x253.png 300w, https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-content\/uploads\/sites\/499\/2021\/07\/6.8.1-65x55.png 65w, https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-content\/uploads\/sites\/499\/2021\/07\/6.8.1-225x190.png 225w, https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-content\/uploads\/sites\/499\/2021\/07\/6.8.1-350x295.png 350w, https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-content\/uploads\/sites\/499\/2021\/07\/6.8.1.png 546w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a><figcaption id=\"caption-attachment-2186\" class=\"wp-caption-text\"><em><strong>Figure 6.8.e2<\/strong> P-v diagram of ammonia in a piston-cylinder device<\/em><\/figcaption><\/figure>\n<p>Now let us solve the problem in detail.<\/p>\n<p>From <a href=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/back-matter\/appendix-b-thermodynamic-properties-of-ammonia#TB1\" target=\"_blank\" rel=\"noopener\">Table B1<\/a>: T<sub>1<\/sub> = 80<span lang=\"en-US\" xml:lang=\"en-US\">\u00b0C, P<sub>sat<\/sub> = 4.14197 MPa. Ammonia in state 1 is a superheated vapour because P<sub>1<\/sub> = 2000 kPa = 2 MPa &lt; P<sub>sat. <\/sub><\/span>From <a href=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/back-matter\/appendix-b-thermodynamic-properties-of-ammonia#TB2\" target=\"_blank\" rel=\"noopener\">Table B2<\/a>: for state 1 at T<sub>1<\/sub> = 80<span lang=\"en-US\" xml:lang=\"en-US\">\u00b0C, P<sub>1<\/sub> = 2000 kPa, [latex]v_1[\/latex] = 0.075952 m<sup>3<\/sup>\/kg,\u00a0[latex]u_1[\/latex] = 1583.81 kJ\/kg,\u00a0[latex]s_1[\/latex] = 5.8292 kJ\/kgK<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>State 2 is a saturated liquid at T<sub>2<\/sub> = 15<span lang=\"en-US\" xml:lang=\"en-US\">\u00b0C. From <a href=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/back-matter\/appendix-b-thermodynamic-properties-of-ammonia#TB1\" target=\"_blank\" rel=\"noopener\">Table B1<\/a>, <\/span>P<sub>2<\/sub> = 728.53 kPa, [latex]v_2 = v_f[\/latex] = 0.001619 m<sup>3<\/sup>\/kg,\u00a0<span lang=\"en-US\" xml:lang=\"en-US\">[latex]u_2[\/latex]<\/span> = 412.06 kJ\/kg,\u00a0[latex]s_2 = s_f[\/latex] = 1.7197 kJ\/kgK<\/p>\n<p>&nbsp;<\/p>\n<p>The specific boundary work is<\/p>\n<p style=\"padding-left: 40px\">[latex]\\begin{align*} {}_{1}w_{2} &= \\dfrac{1}{2}(P_{1} + P_{2})(v_2 - v_1) \\\\&= \\dfrac{1}{2}(2000 + 728.53)(0.001619 - 0.075952) = -101.41 \\ \\rm{kJ\/kg} \\end{align*}[\/latex]<\/p>\n<p>&nbsp;<\/p>\n<p>The specific heat transfer is<\/p>\n<p style=\"padding-left: 40px\">[latex]\\begin{align*} {}_{1}q_{2} &= \\Delta u + {}_{1}w_{2} \\\\&= (412.06 - 1583.81) + (-101.41) = -1273.16 \\ \\rm{kJ\/kg} \\end{align*}[\/latex]<\/p>\n<p>&nbsp;<\/p>\n<p>The specific entropy generation is<\/p>\n<p style=\"padding-left: 40px\">[latex]\\begin{align*} s_{gen} &=\\Delta s - \\sum\\dfrac{{}_{1}q_{2}}{T_{surr}} \\\\&=(s_2-s_1)- \\sum\\dfrac{{}_{1}q_{2}}{T_{surr}} \\\\&= (1.7197 - 5.8292) - \\dfrac{-1273.16}{(273.15 + 15)} = 0.3089 \\ \\rm{kJ\/kgK} > 0\\end{align*}[\/latex]<\/p>\n<p>&nbsp;<\/p>\n<p>Comment:<\/p>\n<ul>\n<li style=\"text-align: justify\">The cooling process is irreversible; therefore, the specific entropy generation, [latex]s_{gen}>0[\/latex].<\/li>\n<li style=\"text-align: justify\">When applying the second law of thermodynamics, it is important to note that [latex]T_{surr}[\/latex] is the absolute temperature (in Kelvin) of the system boundary or the surroundings if the boundary is in thermal equilibrium with the surroundings.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Example 2<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>Three kilograms of CO<sub>2<\/sub> at 150 kPa, 300 K is mixed with two kilograms of CO<sub>2<\/sub> at 220 kPa, 500 K, in a rigid, well-insulated tank, see <a href=\"#6.8.e3\">Figure 6.8.e3<\/a>. Find the final state (<em>P<\/em>,\u00a0<em>T<\/em>) and the entropy generation in this process. Assume CO<sub>2<\/sub> is an ideal gas in this mixing <a id=\"6.8.e3\"><\/a>process.<\/p>\n<figure id=\"attachment_2187\" aria-describedby=\"caption-attachment-2187\" style=\"width: 400px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-content\/uploads\/sites\/499\/2021\/07\/6.8.2-e1629312562812.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2187\" src=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-content\/uploads\/sites\/499\/2021\/07\/6.8.2-300x121.png\" alt=\"A rigid tank with two compartments containing CO2\" width=\"400\" height=\"146\" \/><\/a><figcaption id=\"caption-attachment-2187\" class=\"wp-caption-text\"><em><strong>Figure 6.8.e3 <\/strong>A rigid tank with two compartments containing CO<sub>2<\/sub><\/em><\/figcaption><\/figure>\n<p style=\"text-align: justify\"><em><span style=\"text-decoration: underline\">Solution<\/span>:<\/em><\/p>\n<p style=\"text-align: justify\">Analysis:<\/p>\n<ul style=\"text-align: justify\">\n<li>CO<sub>2<\/sub> in the whole tank can be treated as a closed system.<\/li>\n<li>The mixing occurs after the partition is removed. As the tank is well-insulated, the heat transfer between the system and the surroundings is zero in this mixing process: [latex]{}_{1}Q_{2}=0\u00a0[\/latex]<\/li>\n<li>Since the tank is rigid, the total volume of CO<sub>2<\/sub> remains constant; therefore, the boundary work is zero in the mixing process: [latex]{}_{1}W_{2}=0\u00a0[\/latex]<\/li>\n<li>Apply the first law to the system (whole tank)<\/li>\n<\/ul>\n<p style=\"padding-left: 80px;text-align: justify\">[latex]\\Delta U = {}_{1}Q_{2} - {}_{1}W_{2}=0[\/latex]<\/p>\n<ul style=\"text-align: justify\">\n<li>The entropy generation can be found by applying the second law to the system.<\/li>\n<\/ul>\n<p style=\"padding-left: 80px;text-align: justify\">[latex]\\because \\Delta S =\\sum\\dfrac{{}_{1}Q_{2}}{T_{surr}}+S_{gen}[\/latex]\u00a0\u00a0 and \u00a0 [latex]{}_{1}Q_{2} = 0[\/latex]<\/p>\n<p style=\"padding-left: 80px;text-align: justify\">[latex]\\therefore S_{gen} = \\Delta S[\/latex]<\/p>\n<ul style=\"text-align: justify\">\n<li>To complete the calculation, we will apply the ideal gas relations to determine the final pressure, temperature, [latex]\\Delta u[\/latex], and [latex]\\Delta s[\/latex].<\/li>\n<\/ul>\n<p style=\"text-align: justify\">Now let us solve the problem in detail.<\/p>\n<p style=\"text-align: justify\">From <a href=\"https:\/\/pressbooks.bccampus.ca\/thermo1\/back-matter\/__unknown__-2#TG1\" target=\"_blank\" rel=\"noopener\">Table G1<\/a> for CO<sub>2<\/sub>: [latex]R[\/latex] = 0.1889 kJ\/kgK, [latex]C_p[\/latex] = 0.846 kJ\/kgK, [latex]C_v[\/latex] = 0.657 kJ\/kgK.<\/p>\n<p>&nbsp;<\/p>\n<p>First, the volumes of compartments A and B at the initial state, state 1, can be found from the ideal gas law.<\/p>\n<p style=\"padding-left: 40px\">[latex]\\because P\\mathbb{V} = mRT[\/latex]<\/p>\n<p style=\"padding-left: 40px\">[latex]\\therefore \\mathbb{V}_A = \\dfrac{m_{1A}RT_{1A}}{P_{1A}} = \\dfrac{3 \\times 0.1889 \\times 300}{150} = 1.1334 \\ \\rm{m^3}[\/latex]<\/p>\n<p style=\"padding-left: 40px\">[latex]\\therefore \\mathbb{V}_B = \\dfrac{m_{1B}RT_{1B}}{P_{1B}} = \\dfrac{2 \\times 0.1889 \\times 500}{220} = 0.8586 \\ \\rm{m^3}[\/latex]<\/p>\n<p>The total volume of the tank is<\/p>\n<p style=\"padding-left: 40px\">[latex]\\mathbb{V}_{tot} = \\mathbb{V}_A + \\mathbb{V}_B = 1.1334 + 0.8586 = 1.992 \\ \\rm{m^3}[\/latex]<\/p>\n<p>&nbsp;<\/p>\n<p>Next, the final temperature can be calculated by applying the first law to the whole tank. Note that the tank is rigid and well insulated; therefore, [latex]\\Delta U = 0[\/latex].<\/p>\n<p style=\"padding-left: 40px\">[latex]\\because \\Delta U = (m_{1A} + m_{1B})u_2 - (m_{1A}u_{1A} + m_{1B}u_{1B})=0[\/latex]<\/p>\n<p style=\"padding-left: 40px\">[latex]\\therefore m_{1A}(u_2 - u_{1A}) + m_{1B}(u_2 - u_{1B}) = 0[\/latex]\u00a0\u00a0\u00a0 and\u00a0\u00a0\u00a0 [latex]\\Delta u =C_v \\Delta T[\/latex]<\/p>\n<p style=\"padding-left: 40px\">[latex]\\therefore m_{1A}C_{v}(T_2 - T_{1A}) + m_{1B}C_{v}(T_2 - T_{1B}) = 0[\/latex]<\/p>\n<p style=\"padding-left: 40px\">[latex]\\begin{align*} \\therefore T_2 &= \\dfrac{m_{1A}T_{1A} + m_{1B}T_{1B}}{m_{1A} + m_{1B}} \\\\&= \\dfrac{3 \\times 300 + 2 \\times 500}{3 + 2} = 380 \\ \\rm{K} \\end{align*}[\/latex]<\/p>\n<p>&nbsp;<\/p>\n<p>Then, the final pressure can be determined from the ideal gas law.<\/p>\n<p style=\"padding-left: 40px\">[latex]\\begin{align*} P_2 &= \\dfrac{(m_{1A} + m_{1B})RT_2}{\\mathbb{V}_{tot}} \\\\&= \\dfrac{(3+2) \\times 0.1889 \\times 380}{1.992} = 180.17 \\ \\rm{kPa} \\end{align*}[\/latex]<\/p>\n<p>&nbsp;<\/p>\n<p>Last, the entropy generation can be calculated from the second law.<\/p>\n<p style=\"padding-left: 40px\">[latex]\\begin{align*} S_{gen} &= \\Delta S \\\\&= (m_{1A} + m_{1B})s_2 - (m_{1A}s_{1A} + m_{1B}s_{1B}) \\\\&= m_{1A}(s_2 - s_{1A}) + m_{1B}(s_2 - s_{1B}) \\end{align*}[\/latex]<\/p>\n<p style=\"padding-left: 40px\">[latex]\\begin{align*} s_2 - s_{1A} &= C_pln\\dfrac{T_2}{T_{1A}} - Rln\\dfrac{P_2}{P_{1A}} \\\\&= 0.846ln\\dfrac{380}{300} - 0.1889ln\\dfrac{180.17}{150} = 0.16536 \\ \\rm{kJ\/kgK} \\ >\\\u00a0 0\\end{align*}[\/latex]<\/p>\n<p style=\"padding-left: 40px\">[latex]\\begin{align*} s_2 - s_{1B} &= C_pln\\dfrac{T_2}{T_{1B}} - Rln\\dfrac{P_2}{P_{1B}} \\\\&= 0.846ln\\dfrac{380}{500} - 0.1889ln\\dfrac{180.17}{220} = -0.19445 \\ \\rm{kJ\/kgK} \\ < \\ 0\\end{align*}[\/latex]<\/p>\n<p style=\"padding-left: 40px\">[latex]\\begin{align*} \\therefore S_{gen} &= m_{1A}(s_2 - s_{1A}) + m_{1B}(s_2 - s_{1B}) \\\\&= 3 \\times 0.16536 + 2 \\times (-0.19445) = 0.1072 \\ \\rm{kJ\/K}\\end{align*}[\/latex]<\/p>\n<p>&nbsp;<\/p>\n<p>Comment:<\/p>\n<p>The entropy in a process can increase or decrease. In this example, the entropy of CO<sub>2<\/sub> originally in compartment A increases and the entropy of CO<sub>2<\/sub> originally in compartment B decreases in this mixing process, but the entropy generation [latex]S_{gen} \\ge 0[\/latex] because the mixing process is irreversible.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox textbox--exercises\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Practice Problems<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<div id=\"h5p-47\">\n<div class=\"h5p-iframe-wrapper\"><iframe id=\"h5p-iframe-47\" class=\"h5p-iframe\" data-content-id=\"47\" style=\"height:1px\" src=\"about:blank\" frameBorder=\"0\" scrolling=\"no\" title=\"S_6.8_Q\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":175,"menu_order":9,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-1838","chapter","type-chapter","status-publish","hentry"],"part":286,"_links":{"self":[{"href":"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-json\/pressbooks\/v2\/chapters\/1838","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-json\/wp\/v2\/users\/175"}],"version-history":[{"count":27,"href":"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-json\/pressbooks\/v2\/chapters\/1838\/revisions"}],"predecessor-version":[{"id":4226,"href":"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-json\/pressbooks\/v2\/chapters\/1838\/revisions\/4226"}],"part":[{"href":"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-json\/pressbooks\/v2\/parts\/286"}],"metadata":[{"href":"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-json\/pressbooks\/v2\/chapters\/1838\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-json\/wp\/v2\/media?parent=1838"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-json\/pressbooks\/v2\/chapter-type?post=1838"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-json\/wp\/v2\/contributor?post=1838"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/thermo1\/wp-json\/wp\/v2\/license?post=1838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}