{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Cold-Air Standard Brayton Cycle Example\n", "\n", "## Imports" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from thermostate import State, Q_, units\n", "import numpy as np\n", "\n", "%matplotlib inline\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---\n", "\n", "## Definitions" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "substance = \"air\"\n", "p_1 = Q_(1.0, \"bar\")\n", "T_1 = Q_(300.0, \"K\")\n", "mdot = Q_(6.0, \"kg/s\")\n", "T_3 = Q_(1400.0, \"K\")\n", "p2_p1 = Q_(10.0, \"dimensionless\")\n", "T_3_low = Q_(1000.0, \"K\")\n", "T_3_high = Q_(1800.0, \"K\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---\n", "\n", "## Problem Statement" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "An ideal **cold** air-standard Brayton cycle operates at steady state with compressor inlet conditions of 300.0 kelvin and 1.0 bar and a fixed turbine inlet temperature of 1400.0 kelvin and a compressor pressure ratio of 10.0 dimensionless. The mass flow rate of the air is 6.0 kilogram / second. For the cycle,\n", "\n", "1. determine the back work ratio\n", "2. determine the net power output, in kW\n", "3. determine the thermal efficiency\n", "4. plot the net power output, in kW, and the thermal efficiency, as a function of the turbine inlet temperature from 1000.0 kelvin to 1800.0 kelvin. Discuss any trends you find." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---\n", "\n", "## Solution" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 1. the back work ratio" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In the ideal Brayton cycle, work occurs in the isentropic compression and expansion. Therefore, the works are\n", "\n", "$$\n", "\\begin{aligned}\n", "\\frac{\\dot{W}_c}{\\dot{m}} &= h_1 - h_2 = c_p(T_1 - T_2) & \\frac{\\dot{W}_t}{\\dot{m}} &= h_3 - h_4 = c_p(T_3 - T_4)\n", "\\end{aligned}\n", "$$\n", "\n", "First, fixing the four states using a cold air-standard analysis" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "st_amb = State(substance, T=T_1, p=p_1)\n", "c_v = st_amb.cv\n", "c_p = st_amb.cp\n", "k = c_p / c_v\n", "\n", "T_2 = T_1 * p2_p1 ** ((k - 1) / k)\n", "p_2 = p2_p1 * p_1\n", "\n", "p_3 = p_2\n", "\n", "p_4 = p_1\n", "T_4 = T_3 * (p_4 / p_3) ** ((k - 1) / k)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Summarizing the states,\n", "\n", "| State | T | p |\n", "|-------|---------------------------|---------------------------|\n", "| 1 | 300.00 K | 1.00 bar |\n", "| 2 | 580.34 K | 10.00 bar |\n", "| 3 | 1400.00 K | 10.00 bar |\n", "| 4 | 723.71 K | 1.00 bar |\n", "\n", "Then, the back work ratio can be found by" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "Wdot_c = (mdot * c_p * (T_1 - T_2)).to(\"kW\")\n", "Wdot_t = (mdot * c_p * (T_3 - T_4)).to(\"kW\")\n", "bwr = abs(Wdot_c) / Wdot_t" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "**Answer:** The power outputs are $\\dot{W}_c =$ -1692.75 kW, $\\dot{W}_t =$ 4083.53 kW, and the back work ratio is $\\mathrm{bwr} =$ 0.41 = 41.45%\n", "\n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2. the net power output" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "Wdot_net = Wdot_c + Wdot_t" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "**Answer:** The net power output is $\\dot{W}_{net} =$ 2390.78 kW\n", "\n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 3. the thermal efficiency" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "Qdot_23 = (mdot * c_p * (T_3 - T_2)).to(\"kW\")\n", "eta = Wdot_net / Qdot_23" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "**Answer:** The thermal efficiency is $\\eta =$ 0.48 = 48.31%\n", "\n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 4. plot the net power output and thermal efficiency" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "T_range = np.linspace(T_3_low, T_3_high, 200)\n", "Wdot_net_l = np.zeros(T_range.shape) * units.kW\n", "eta_l = np.zeros(T_range.shape) * units.dimensionless\n", "for i, T_3 in enumerate(T_range):\n", " T_4 = T_3 * (p_4 / p_3) ** ((k - 1) / k)\n", " Wdot_t = (mdot * c_p * (T_3 - T_4)).to(\"kW\")\n", " Wdot_net = Wdot_c + Wdot_t\n", " Wdot_net_l[i] = Wdot_net\n", "\n", " Qdot_23 = (mdot * c_p * (T_3 - T_2)).to(\"kW\")\n", " eta = Wdot_net / Qdot_23\n", " eta_l[i] = eta" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fig, power_ax = plt.subplots()\n", "power_ax.plot(T_range, Wdot_net_l, label=\"Net power output\", color=\"C0\")\n", "eta_ax = power_ax.twinx()\n", "eta_ax.plot(T_range, eta_l, label=\"Thermal efficiency\", color=\"C1\")\n", "power_ax.set_xlabel(\"Turbine Inlet Temperature (K)\")\n", "power_ax.set_ylabel(\"Net power output (kW)\")\n", "eta_ax.set_ylabel(\"Thermal efficiency\")\n", "lines, labels = power_ax.get_legend_handles_labels()\n", "lines2, labels2 = eta_ax.get_legend_handles_labels()\n", "power_ax.legend(lines + lines2, labels + labels2, loc=\"best\");" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "From this graph, we note that for a fixed compressor pressure ratio, the thermal efficiency is constant, while the net power output increases with increasing turbine temperature." ] } ], "metadata": { "anaconda-cloud": {}, "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.9.2" } }, "nbformat": 4, "nbformat_minor": 2 }