{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# 221 ランキンサイクル\n", "\n", "Example: Non-ideal Rankine cycle" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 読み込み" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import pandas as pd\n", "\n", "import CoolProp.CoolProp as CP\n", "\n", "import matplotlib.pyplot as plt\n", "%matplotlib inline\n", "import warnings\n", "warnings.filterwarnings(\"ignore\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## パラメータ定義" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "WF = 'water'\n", "\n", "T_H = 800 # K\n", "T_C = 325 # K\n", "P_b = 2.64 *10**6 # Pa\n", "ETA_turbine = 0.85\n", "ETA_pump = 0.65\n", "DT_cond = 7 # K\n", "DT_b = 35# K\n", "DP_cond = 4.5 *10**3 # Pa\n", "DP_b = 792 *10**3 # Pa" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### データフレーム用意" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "index = list(range(1,4+1))\n", "states = pd.DataFrame(columns=['T', 'P', 's', 'v', 'h', 'x', 's_s', 'h_s'], index=index)#K, Pa, J/kg/K, m3, J/kg, [-], [], []" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Point 2: Boiler exit/Turbine inlet" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "states.loc[2, 'P'] = P_b - DP_b\n", "states.loc[2, 'T'] = T_H - DT_b\n", "states.loc[2, 'h'] = CP.PropsSI('H', 'P', states.loc[2, 'P'], 'T', states.loc[2, 'T'], WF)\n", "states.loc[2, 's'] = CP.PropsSI('S', 'P', states.loc[2, 'P'], 'T', states.loc[2, 'T'], WF)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Point 4: Condenser exit/Pump inlet" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "states.loc[4, 'x'] = 0\n", "states.loc[4, 'T'] = T_C + DT_cond\n", "states.loc[4, 's'] = CP.PropsSI('S', 'Q', states.loc[4, 'x'], 'T', states.loc[4, 'T'], WF)\n", "states.loc[4, 'h'] = CP.PropsSI('H', 'Q', states.loc[4, 'x'], 'T', states.loc[4, 'T'], WF)\n", "states.loc[4, 'P'] = CP.PropsSI('P', 'Q', states.loc[4, 'x'], 'T', states.loc[4, 'T'], WF)\n", "states.loc[4, 'v'] = CP.PropsSI('V', 'Q', states.loc[4, 'x'], 'T', states.loc[4, 'T'], WF)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Point 1: Pump exit/Boiler inlet" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [], "source": [ "states.loc[1, 'P'] = P_b\n", "states.loc[1, 's_s'] = states.loc[4, 's']\n", "states.loc[1, 'h_s'] = CP.PropsSI('H', 'S', states.loc[1, 's_s'], 'P', states.loc[1, 'P'], WF)\n", "W_dot_s_p_m_dot = states.loc[1, 'h_s'] - states.loc[4, 'h']\n", "W_dot_p_m_dot = W_dot_s_p_m_dot / ETA_pump\n", "states.loc[1, 'h'] = states.loc[4, 'h'] + W_dot_p_m_dot\n", "states.loc[1, 's'] = CP.PropsSI('S', 'H', states.loc[1, 'h'], 'P', states.loc[1, 'P'], WF)\n", "states.loc[1, 'T'] = CP.PropsSI('T', 'H', states.loc[1, 'h'], 'P', states.loc[1, 'P'], WF)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Point 3: Turbine exit/Condenser inlet" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [], "source": [ "states.loc[3, 'P'] = states.loc[4, 'P'] + DP_cond\n", "states.loc[3, 's_s'] = states.loc[2, 's']\n", "states.loc[3, 'h_s'] = CP.PropsSI('H', 'S', states.loc[3, 's_s'], 'P', states.loc[3, 'P'], WF)\n", "W_dot_s_t_m_dot = states.loc[2, 'h'] - states.loc[3, 'h_s']\n", "W_dot_t_m_dot = W_dot_s_t_m_dot * ETA_turbine\n", "states.loc[3, 'h'] = states.loc[2, 'h'] - W_dot_t_m_dot\n", "states.loc[3, 's'] = CP.PropsSI('S', 'H', states.loc[3, 'h'], 'P', states.loc[3, 'P'], WF)\n", "states.loc[3, 'T'] = CP.PropsSI('T', 'H', states.loc[3, 'h'], 'P', states.loc[3, 'P'], WF)\n", "states.loc[3, 'x'] = CP.PropsSI('Q', 'H', states.loc[3, 'h'], 'P', states.loc[3, 'P'], WF)" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | T | \n", "P | \n", "s | \n", "v | \n", "h | \n", "x | \n", "s_s | \n", "h_s | \n", "
---|---|---|---|---|---|---|---|---|
1 | \n", "332.452 | \n", "2.64e+06 | \n", "821.138 | \n", "NaN | \n", "250464 | \n", "NaN | \n", "816.823 | \n", "249030 | \n", "
2 | \n", "765 | \n", "1.848e+06 | \n", "7448.51 | \n", "NaN | \n", "3.45198e+06 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
3 | \n", "341.67 | \n", "23408.6 | \n", "7881.91 | \n", "NaN | \n", "2.62477e+06 | \n", "-1 | \n", "7448.51 | \n", "2.47879e+06 | \n", "
4 | \n", "332 | \n", "18908.6 | \n", "816.823 | \n", "0.000474239 | \n", "246367 | \n", "0 | \n", "NaN | \n", "NaN | \n", "