{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# 231 蒸気圧縮冷凍サイクル\n", "\n", "## 読み込み" ] }, { "cell_type": "code", "execution_count": 1, "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": 2, "metadata": {}, "outputs": [], "source": [ "WF = 'Ammonia'\n", "\n", "K = 273.16 # converter from degC to K\n", "T_C = -30 +K #freezer air temperature deg C\n", "DT_evap = 5 # evaporator approach temperature difference K\n", "DT_sh = 4 # degree of supergeat K\n", "T_H = 30 +K# Outdoor air temperature degC\n", "DT_cond = 10 # condenser approach temperature difference K\n", "DT_sc = 4 # degree of subcooling K\n", "ETA_c = 0.78 # compressor efficiency\n", "V_dot_disp = 16.52*1e-3 # compressor displacement m^3/sec\n", "ETA_vol = 0.75 # compressor volumetric efficiency" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## データフレーム用意\n", "\n", "### Nomenclature\n", "\n", "| Symbol | Description | Unit |\n", "| :--- | :---: | ---: |\n", "| $T$ | Temperature | $K$ |\n", "| $P$ | Pressure | $Pa$ |\n", "| $s$ | Specific entropy | $J/kg-K$ |\n", "| $v$ | Specific volume | $m^3/kg$ |\n", "| $h$ | Specific enthalpy | $J/kg$ |\n", "| $h_s$ | Specific enthalpy leaving reversible process | $J/kg$ |" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "states = pd.DataFrame(columns=['T', 'P', 's', 'v', 'h', 'h_s'], index=list(range(1,4+1)))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## State 4\n", "\n", "\\begin{align}\n", "T_4 = T_H + \\Delta T_{cond} \\\\\n", "T_{cond} = T_4 + \\Delta T_{sc}\n", "\\end{align}" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "states.loc[4, 'T'] = T_H + DT_cond\n", "T_cond = states.loc[4, 'T'] + DT_sc\n", "states.loc[4, 'P'] = CP.PropsSI('P', 'T', T_cond, 'Q', 0, WF)\n", "states.loc[4, 's'] = CP.PropsSI('S', 'T', states.loc[4, 'T'], 'P', states.loc[4, 'P'], WF)\n", "states.loc[4, 'h'] = CP.PropsSI('H', 'T', states.loc[4, 'T'], 'P', states.loc[4, 'P'], WF)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## State 2\n", "\n", "\\begin{align}\n", "T_2 = T_C - \\Delta T_{evap} \\\\\n", "T_{evap} = T_2 - \\Delta T_{sh}\n", "\\end{align}" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "states.loc[2, 'T'] = T_C - DT_evap\n", "T_evap = states.loc[2, 'T'] - DT_sh\n", "states.loc[2, 'P'] = CP.PropsSI('P', 'T', T_evap, 'Q', 1, WF)\n", "states.loc[2, 's'] = CP.PropsSI('S', 'T', states.loc[2, 'T'], 'P', states.loc[2, 'P'], WF)\n", "states.loc[2, 'h'] = CP.PropsSI('H', 'T', states.loc[2, 'T'], 'P', states.loc[2, 'P'], WF)\n", "states.loc[2, 'v'] = 1/CP.PropsSI('D', 'T', states.loc[2, 'T'], 'P', states.loc[2, 'P'], WF)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## State 3\n", "\n", "\\begin{align}\n", "\\frac{\\dot{W}_{s,c}}{\\dot{m}} = h_{s,3} - h_2 \\\\\n", "\\frac{\\dot{W}_c}{\\dot{m}} = \\frac{1}{\\eta_c}\\frac{\\dot{W}_{s,c}}{\\dot{m}} \\\\\n", "h_3 = h_2 + \\frac{\\dot{W}_c}{\\dot{m}}\n", "\\end{align}" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "states.loc[3, 'P'] = states.loc[4, 'P']\n", "states.loc[3, 'h_s'] = CP.PropsSI('H', 'P', states.loc[3, 'P'], 'S', states.loc[2, 's'], WF)\n", "W_dot_s_c_m_dot = states.loc[3, 'h_s'] - states.loc[2, 'h']\n", "W_dot_c_m_dot = W_dot_s_c_m_dot/ETA_c\n", "states.loc[3, 'h'] = states.loc[2, 'h'] + W_dot_c_m_dot\n", "states.loc[3, 's'] = CP.PropsSI('S', 'P', states.loc[3, 'P'], 'H', states.loc[3, 'h'], WF)\n", "states.loc[3, 'T'] = CP.PropsSI('T', 'P', states.loc[3, 'P'], 'H', states.loc[3, 'h'], WF)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## State 1\n", "\n", "\\begin{align}\n", "P_1 = P_2 \\\\\n", "h_1 = h_4\n", "\\end{align}" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "states.loc[1, 'P'] = states.loc[2, 'P']\n", "states.loc[1, 'h'] = states.loc[4, 'h']\n", "states.loc[1, 's'] = CP.PropsSI('S', 'P', states.loc[1, 'P'], 'H', states.loc[1, 'h'], WF)\n", "states.loc[1, 'T'] = CP.PropsSI('T', 'P', states.loc[1, 'P'], 'H', states.loc[1, 'h'], WF)" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | T | \n", "P | \n", "s | \n", "v | \n", "h | \n", "h_s | \n", "
---|---|---|---|---|---|---|
1 | \n", "234.16 | \n", "75654.7 | \n", "2345.06 | \n", "NaN | \n", "533872 | \n", "NaN | \n", "
2 | \n", "238.16 | \n", "75654.7 | \n", "6733.31 | \n", "1.50504 | \n", "1.5615e+06 | \n", "NaN | \n", "
3 | \n", "537.516 | \n", "1.7358e+06 | \n", "7021.6 | \n", "NaN | \n", "2.22854e+06 | \n", "2.08179e+06 | \n", "
4 | \n", "313.16 | \n", "1.7358e+06 | \n", "2115.4 | \n", "NaN | \n", "533872 | \n", "NaN | \n", "