Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new example of a cascade refrigeration cycle that uses EE units
Also fix a typo in the Rankine cycle example
- Loading branch information
1 parent
444bf73
commit 71419dc
Showing
3 changed files
with
329 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,327 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Cascade Refrigeration Cycle Example\n", | ||
"\n", | ||
"## Imports" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"from thermostate import State, Q_, units, EnglishEngineering as EE" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"---\n", | ||
"\n", | ||
"## Definitions" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"sub_hiT = 'R22'\n", | ||
"sub_loT = 'R134A'\n", | ||
"\n", | ||
"T_1 = Q_(-30.0, 'degF')\n", | ||
"x_1 = Q_(1.0, 'dimensionless')\n", | ||
"\n", | ||
"p_2 = Q_(50.0, 'psi')\n", | ||
"\n", | ||
"p_3 = p_2\n", | ||
"x_3 = Q_(0.0, 'dimensionless')\n", | ||
"\n", | ||
"delta_T_5 = Q_(-5.0, 'delta_degF')\n", | ||
"x_5 = Q_(1.0, 'dimensionless')\n", | ||
"\n", | ||
"p_6 = Q_(250.0, 'psi')\n", | ||
"\n", | ||
"p_7 = p_6\n", | ||
"x_7 = Q_(0.0, 'dimensionless')\n", | ||
"\n", | ||
"Qdot_in = Q_(20.0, 'refrigeration_tons')" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"---\n", | ||
"\n", | ||
"## Problem Statement" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"A two-stage cascade vapor-compression refrigeration system operates with R22 as the working fluid in the high-temperature cycle and R134A in the low-temperature cycle. For the R134A cycle, the working fluid enters the compressor as a saturated vapor at -30.0 fahrenheit and is compressed isentropically to 50 lbf/in.<sup>2</sup> Saturated liquid leaves the intermediate heat exchanger at 50 lbf/in.<sup>2</sup> and enters the expansion valve. For the R22 cycle, the working fluid enters the compressor as saturated vapor at a temperature 5 fahrenheit below that of the condensing temperature of the R134A in the intermediate heat exchanger. The R22 is compressed isentropically to 250 lbf/in.<sup>2</sup> Saturated liquid then enters the expansion valve at 250 lbf/in.<sup>2</sup>. The refrigerating capacity of the cascade system is 20 ton_of_refrigeration. Determine\n", | ||
"\n", | ||
"1. the power input to each compressor, in BTU/min\n", | ||
"2. the overall coefficient of performance of the cascade cycle" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"---\n", | ||
"\n", | ||
"## Solution" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"### 1. the power input to each compressor" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"The power input to each compressor can be found by\n", | ||
"\n", | ||
"$$\\dot{W}_{cv} = \\dot{m}(h_i - h_e)$$\n", | ||
"\n", | ||
"To find the enthalpies, we need to fix all of the states." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"st_1 = State(sub_loT, x=x_1, T=T_1)\n", | ||
"h_1 = st_1.h.to(EE.h)\n", | ||
"s_1 = st_1.s.to(EE.s)\n", | ||
"p_1 = st_1.p.to(EE.p)\n", | ||
"\n", | ||
"s_2 = s_1\n", | ||
"st_2 = State(sub_loT, p=p_2, s=s_1)\n", | ||
"h_2 = st_2.h.to(EE.h)\n", | ||
"T_2 = st_2.T.to(EE.T)\n", | ||
"\n", | ||
"st_3 = State(sub_loT, p=p_3, x=x_3)\n", | ||
"T_3 = st_3.T.to(EE.T)\n", | ||
"h_3 = st_3.h.to(EE.h)\n", | ||
"s_3 = st_3.s.to(EE.s)\n", | ||
"\n", | ||
"h_4 = h_3\n", | ||
"p_4 = p_1\n", | ||
"st_4 = State(sub_loT, p=p_4, h=h_4)\n", | ||
"T_4 = st_4.T.to(EE.T)\n", | ||
"s_4 = st_4.s.to(EE.s)\n", | ||
"x_4 = st_4.x\n", | ||
"\n", | ||
"T_5 = T_3 + delta_T_5\n", | ||
"st_5 = State(sub_hiT, T=T_5, x=x_5)\n", | ||
"h_5 = st_5.h.to(EE.h)\n", | ||
"p_5 = st_5.p.to(EE.p)\n", | ||
"s_5 = st_5.s.to(EE.s)\n", | ||
"\n", | ||
"s_6 = s_5\n", | ||
"st_6 = State(sub_hiT, s=s_6, p=p_6)\n", | ||
"h_6 = st_6.h.to(EE.h)\n", | ||
"T_6 = st_6.T.to(EE.T)\n", | ||
"\n", | ||
"st_7 = State(sub_hiT, p=p_7, x=x_7)\n", | ||
"T_7 = st_7.T.to(EE.T)\n", | ||
"h_7 = st_7.h.to(EE.h)\n", | ||
"s_7 = st_7.s.to(EE.s)\n", | ||
"\n", | ||
"h_8 = h_7\n", | ||
"p_8 = p_5\n", | ||
"st_8 = State(sub_hiT, p=p_8, h=h_8)\n", | ||
"T_8 = st_8.T.to(EE.T)\n", | ||
"s_8 = st_8.s.to(EE.s)\n", | ||
"x_8 = st_8.x" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": { | ||
"variables": { | ||
"format(T_1, '.2F')": "-30.00 degF", | ||
"format(T_2, '.2F')": "58.23 degF", | ||
"format(T_3, '.2F')": "40.27 degF", | ||
"format(T_4, '.2F')": "-30.00 degF", | ||
"format(T_5, '.2F')": "35.27 degF", | ||
"format(T_6, '.2F')": "146.75 degF", | ||
"format(T_7, '.2F')": "112.76 degF", | ||
"format(T_8, '.2F')": "35.27 degF", | ||
"format(h_1, '.2F')": "162.30 btu / pound", | ||
"format(h_2, '.2F')": "176.42 btu / pound", | ||
"format(h_3, '.2F')": "88.65 btu / pound", | ||
"format(h_4, '.2F')": "88.65 btu / pound", | ||
"format(h_5, '.2F')": "174.42 btu / pound", | ||
"format(h_6, '.2F')": "187.12 btu / pound", | ||
"format(h_7, '.2F')": "110.14 btu / pound", | ||
"format(h_8, '.2F')": "110.14 btu / pound", | ||
"format(p_1, '.2F')": "9.86 pound_force_per_square_inch", | ||
"format(p_2, '.2F')": "50.00 pound_force_per_square_inch", | ||
"format(p_3, '.2F')": "50.00 pound_force_per_square_inch", | ||
"format(p_4, '.2F')": "9.86 pound_force_per_square_inch", | ||
"format(p_5, '.2F')": "76.59 pound_force_per_square_inch", | ||
"format(p_6, '.2F')": "250.00 pound_force_per_square_inch", | ||
"format(p_7, '.2F')": "250.00 pound_force_per_square_inch", | ||
"format(p_8, '.2F')": "76.59 pound_force_per_square_inch", | ||
"format(s_1, '.4F')": "0.4196 btu / degR / pound", | ||
"format(s_2, '.4F')": "0.4196 btu / degR / pound", | ||
"format(s_3, '.4F')": "0.2442 btu / degR / pound", | ||
"format(s_4, '.4F')": "0.2482 btu / degR / pound", | ||
"format(s_5, '.4F')": "0.4175 btu / degR / pound", | ||
"format(s_6, '.4F')": "0.4175 btu / degR / pound", | ||
"format(s_7, '.4F')": "0.2834 btu / degR / pound", | ||
"format(s_8, '.4F')": "0.2876 btu / degR / pound", | ||
"format(x_1.magnitude, '.2%')": "100.00%", | ||
"format(x_3.magnitude, '.2%')": "0.00%", | ||
"format(x_4.magnitude, '.2%')": "22.96%", | ||
"format(x_5.magnitude, '.2%')": "100.00%", | ||
"format(x_7.magnitude, '.2%')": "0.00%", | ||
"format(x_8.magnitude, '.2%')": "26.55%", | ||
"st_1.phase": "twophase", | ||
"st_2.phase": "gas", | ||
"st_3.phase": "twophase", | ||
"st_4.phase": "twophase", | ||
"st_5.phase": "twophase", | ||
"st_6.phase": "gas", | ||
"st_7.phase": "twophase", | ||
"st_8.phase": "twophase" | ||
} | ||
}, | ||
"source": [ | ||
"Summarizing the states:\n", | ||
"\n", | ||
"\n", | ||
"| State | T | p | h | s | x | phase |\n", | ||
"|-------|------------------------|------------------------|------------------------|------------------------|------------------------|----------------|\n", | ||
"| 1 | -30.00 degF | 9.86 pound_force_per_square_inch | 162.30 btu / pound | 0.4196 btu / degR / pound | 100.00% | twophase |\n", | ||
"| 2 | 58.23 degF | 50.00 pound_force_per_square_inch | 176.42 btu / pound | 0.4196 btu / degR / pound | --- | gas |\n", | ||
"| 3 | 40.27 degF | 50.00 pound_force_per_square_inch | 88.65 btu / pound | 0.2442 btu / degR / pound | 0.00% | twophase |\n", | ||
"| 4 | -30.00 degF | 9.86 pound_force_per_square_inch | 88.65 btu / pound | 0.2482 btu / degR / pound | 22.96% | twophase |\n", | ||
"| 5 | 35.27 degF | 76.59 pound_force_per_square_inch | 174.42 btu / pound | 0.4175 btu / degR / pound | 100.00% | twophase |\n", | ||
"| 6 | 146.75 degF | 250.00 pound_force_per_square_inch | 187.12 btu / pound | 0.4175 btu / degR / pound | --- | gas |\n", | ||
"| 7 | 112.76 degF | 250.00 pound_force_per_square_inch | 110.14 btu / pound | 0.2834 btu / degR / pound | 0.00% | twophase |\n", | ||
"| 8 | 35.27 degF | 76.59 pound_force_per_square_inch | 110.14 btu / pound | 0.2876 btu / degR / pound | 26.55% | twophase |\n", | ||
"\n", | ||
"The mass flow rate of the R134a is found from the refrigeration capacity\n", | ||
"\n", | ||
"$$\\dot{m}_{\\text{R134A}} = \\frac{\\dot{Q}_{in}}{h_1 - h_4}$$\n", | ||
"\n", | ||
"while the mass flow rate of the R22 is found from the intermediate heat exchanger\n", | ||
"\n", | ||
"$$\\dot{m}_{\\text{R22}} = \\frac{\\dot{m}_{\\text{R134A}}\\left(h_2 - h_3\\right)}{h_5 - h_8}$$" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"mdot_r134a = (Qdot_in/(h_1 - h_4)).to('lb/min')\n", | ||
"Wdot_loT = (mdot_r134a*(h_1 - h_2)).to('BTU/min')\n", | ||
"\n", | ||
"mdot_r22 = mdot_r134a*(h_2 - h_3)/(h_5 - h_8)\n", | ||
"Wdot_hiT = (mdot_r22*(h_5 - h_6)).to('BTU/min')" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": { | ||
"variables": { | ||
"format(Wdot_hiT, '.2F')": "-941.38 btu / minute", | ||
"format(Wdot_loT, '.2F')": "-766.52 btu / minute" | ||
} | ||
}, | ||
"source": [ | ||
"<div class=\"alert alert-success\">\n", | ||
"\n", | ||
"**Answer:** The compressor work for the low-temperature cycle is $\\dot{W}_{\\text{R134A}} =$ -766.52 btu / minute and the work for the high temperature cycle is $\\dot{W}_{\\text{R22}} =$ -941.38 btu / minute\n", | ||
"\n", | ||
"</div>" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"### 2. The coefficient of performance" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"The coefficient of performance of this refrigeration cycle is defined as\n", | ||
"\n", | ||
"$$\\beta = \\frac{\\dot{Q}_{in}}{\\lvert\\dot{W}_{\\text{R134A}} + \\dot{W}_{\\text{R22}}\\rvert}$$" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"beta = (Qdot_in/abs(Wdot_loT + Wdot_hiT)).to('dimensionless')\n", | ||
"beta_max = (T_4/(T_7 - T_4)).to('dimensionless')" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": { | ||
"variables": { | ||
"format(T_4, '.2F')": "-30.00 degF", | ||
"format(T_7, '.2F')": "112.76 degF", | ||
"format(beta.magnitude, '.2F')": "2.34", | ||
"format(beta_max, '.2F')": "3.01 dimensionless" | ||
} | ||
}, | ||
"source": [ | ||
"<div class=\"alert alert-success\">\n", | ||
"\n", | ||
"**Answer:** The coefficient of performance is $\\beta =$ 2.34, while the maximum coefficient of performance for a refrigeration cycle operating between $T_C =$ -30.00 degF and $T_H =$ 112.76 degF is $\\beta_{\\text{max}} =$ 3.01 dimensionless. The actual cycle has a lower COP, so it is possible.\n", | ||
"\n", | ||
"</div>" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.7.0" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters