diff options
Diffstat (limited to '_Engineering_Thermodynamics_by__O._Singh/chapter11_2.ipynb')
-rw-r--r-- | _Engineering_Thermodynamics_by__O._Singh/chapter11_2.ipynb | 1309 |
1 files changed, 1309 insertions, 0 deletions
diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter11_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter11_2.ipynb new file mode 100644 index 00000000..31f593f0 --- /dev/null +++ b/_Engineering_Thermodynamics_by__O._Singh/chapter11_2.ipynb @@ -0,0 +1,1309 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 11:Introduction to refrigeration and Air Conditioning"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.1;pg no: 435"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.1, Page:435 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 1\n",
+ "for refrigerator working on reversed carnot cycle.\n",
+ "Q1/T1=Q2/T2\n",
+ "so Q2=Q1*T2/T1 in KJ/min\n",
+ "and work input required,W in KJ/min\n",
+ "W=Q2-Q1 83.66\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of work input\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.1, Page:435 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 1\")\n",
+ "T1=(-16.+273.);#temperature of refrigerated space in K\n",
+ "T2=(27.+273.);#temperature of atmosphere in K\n",
+ "Q1=500.;#heat extracted from refrigerated space in KJ/min\n",
+ "print(\"for refrigerator working on reversed carnot cycle.\")\n",
+ "print(\"Q1/T1=Q2/T2\")\n",
+ "print(\"so Q2=Q1*T2/T1 in KJ/min\")\n",
+ "Q2=Q1*T2/T1\n",
+ "print(\"and work input required,W in KJ/min\")\n",
+ "W=Q2-Q1\n",
+ "print(\"W=Q2-Q1\"),round(W,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.2;pg no: 435"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.2, Page:435 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 2\n",
+ "refrigeration capacity or heat extraction rate(Q)in KJ/s\n",
+ "let the ice formation rate be m kg/s\n",
+ "heat to be removed from per kg of water for its transformation into ice(Q1)in KJ/kg.\n",
+ "ice formation rate(m)in kg=refrigeration capacity/heat removed for getting per kg of ice= 6.25\n",
+ "COP of refrigerator,=T1/(T2-T1)=refrigeration capacity/work done\n",
+ "also COP=Q/W\n",
+ "so W=Q/COP in KJ/s\n",
+ "HP required 643.62\n",
+ "NOTE=>In book,this question is solved by taking T1=-5 degree celcius,but according to question T1=-7 degree celcius so this question is correctly solved above by considering T1=-7 degree celcius.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of HP required\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.2, Page:435 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 2\")\n",
+ "Q=800.;#refrigeration capacity in tons\n",
+ "Q_latent=335.;#latent heat for ice formation from water in KJ/kg\n",
+ "T1=(-7.+273.);#temperature of reservoir 1 in K\n",
+ "T2=(27.+273.);#temperature of reservoir 2 in K\n",
+ "print(\"refrigeration capacity or heat extraction rate(Q)in KJ/s\")\n",
+ "Q=Q*3.5\n",
+ "print(\"let the ice formation rate be m kg/s\")\n",
+ "print(\"heat to be removed from per kg of water for its transformation into ice(Q1)in KJ/kg.\")\n",
+ "Q1=4.18*(27-0)+Q_latent\n",
+ "m=Q/Q1\n",
+ "print(\"ice formation rate(m)in kg=refrigeration capacity/heat removed for getting per kg of ice=\"),round(Q/Q1,2)\n",
+ "print(\"COP of refrigerator,=T1/(T2-T1)=refrigeration capacity/work done\")\n",
+ "COP=T1/(T2-T1)\n",
+ "print(\"also COP=Q/W\")\n",
+ "print(\"so W=Q/COP in KJ/s\")\n",
+ "W=Q/COP\n",
+ "W=W/0.7457\n",
+ "print(\"HP required\"),round(W/0.7457,2)\n",
+ "print(\"NOTE=>In book,this question is solved by taking T1=-5 degree celcius,but according to question T1=-7 degree celcius so this question is correctly solved above by considering T1=-7 degree celcius.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.3;pg no: 436"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.3, Page:436 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 3\n",
+ "COP=T1/(T2-T1)=Q/W 1.56\n",
+ "equating,COP=T1/(T2-T1)\n",
+ "so temperature of surrounding(T2)in K\n",
+ "T2= 403.69\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of COP and temperature of surrounding\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.3, Page:436 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 3\")\n",
+ "T1=(-27+273);#temperature of refrigerator in K\n",
+ "W=3*.7457;#work input in KJ/s\n",
+ "Q=1*3.5;#refrigeration effect in KJ/s\n",
+ "COP=Q/W\n",
+ "print(\"COP=T1/(T2-T1)=Q/W\"),round(COP,2)\n",
+ "COP=1.56;#approx.\n",
+ "print(\"equating,COP=T1/(T2-T1)\")\n",
+ "print(\"so temperature of surrounding(T2)in K\")\n",
+ "T2=T1+(T1/COP)\n",
+ "print(\"T2=\"),round(T2,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.4;pg no: 436"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.4, Page:436 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 4\n",
+ "during process 1-2_a\n",
+ "p2/p1=(T2_a/T1)^(y/(y-1))\n",
+ "so T2_a=T1*(p2/p1)^((y-1)/y)in K\n",
+ "theoretical temperature after compression,T2_a=440.18 K\n",
+ "for compression process,\n",
+ "n1=(T2_a-T1)/(T2-T1)\n",
+ "so T2=T1+(T2_a-T1)/n1 in K\n",
+ "for expansion process,3-4_a\n",
+ "T4_a/T3=(p1/p2)^((y-1)/y)\n",
+ "so T4_a=T3*(p1/p2)^((y-1)/y) in K\n",
+ "n2=0.9=(T3-T4)/(T3-T4_a)\n",
+ "so T4=T3-(n2*(T3-T4_a))in K\n",
+ "so work during compression,W_C in KJ/s\n",
+ "W_C=m*Cp*(T2-T1)\n",
+ "work during expansion,W_T in KJ/s\n",
+ "W_T=m*Cp*(T3-T4)\n",
+ "refrigeration effect is realized during process,4-1.so refrigeration shall be,\n",
+ "Q_ref=m*Cp*(T1-T4) in KJ/s\n",
+ "Q_ref in ton 18.36\n",
+ "net work required(W)=W_C-W_T in KJ/s 111.59\n",
+ "COP= 0.58\n",
+ "so refrigeration capacity=18.36 ton or 64.26 KJ/s\n",
+ "and COP=0.57\n",
+ "NOTE=>In book this question is solve by taking T1=240 K which is incorrect,hence correction is made above according to question by taking T1=-30 degree celcius or 243 K,so answer may vary slightly.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of refrigeration capacity and COP\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.4, Page:436 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 4\")\n",
+ "T1=(-30.+273.);#temperature of air at beginning of compression in K\n",
+ "T3=(27.+273.);#temperature of air after cooling in K\n",
+ "r=8.;#pressure ratio\n",
+ "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n",
+ "y=1.4;#expansion constant \n",
+ "m=1.;#air flow rate in kg/s\n",
+ "n1=0.85;#isentropic efficiency for compression process\n",
+ "n2=.9;#isentropic efficiency for expansion process\n",
+ "print(\"during process 1-2_a\")\n",
+ "print(\"p2/p1=(T2_a/T1)^(y/(y-1))\")\n",
+ "print(\"so T2_a=T1*(p2/p1)^((y-1)/y)in K\")\n",
+ "T2_a=T1*(r)**((y-1)/y)\n",
+ "print(\"theoretical temperature after compression,T2_a=440.18 K\")\n",
+ "print(\"for compression process,\")\n",
+ "print(\"n1=(T2_a-T1)/(T2-T1)\")\n",
+ "print(\"so T2=T1+(T2_a-T1)/n1 in K\")\n",
+ "T2=T1+(T2_a-T1)/n1\n",
+ "print(\"for expansion process,3-4_a\")\n",
+ "print(\"T4_a/T3=(p1/p2)^((y-1)/y)\")\n",
+ "print(\"so T4_a=T3*(p1/p2)^((y-1)/y) in K\")\n",
+ "T4_a=T3*(1/r)**((y-1)/y)\n",
+ "print(\"n2=0.9=(T3-T4)/(T3-T4_a)\")\n",
+ "print(\"so T4=T3-(n2*(T3-T4_a))in K\")\n",
+ "T4=T3-(n2*(T3-T4_a))\n",
+ "print(\"so work during compression,W_C in KJ/s\")\n",
+ "print(\"W_C=m*Cp*(T2-T1)\")\n",
+ "W_C=m*Cp*(T2-T1)\n",
+ "print(\"work during expansion,W_T in KJ/s\")\n",
+ "print(\"W_T=m*Cp*(T3-T4)\")\n",
+ "W_T=m*Cp*(T3-T4)\n",
+ "print(\"refrigeration effect is realized during process,4-1.so refrigeration shall be,\")\n",
+ "print(\"Q_ref=m*Cp*(T1-T4) in KJ/s\")\n",
+ "Q_ref=m*Cp*(T1-T4)\n",
+ "Q_ref=Q_ref/3.5\n",
+ "print(\"Q_ref in ton\"),round(Q_ref,2)\n",
+ "W=W_C-W_T\n",
+ "print(\"net work required(W)=W_C-W_T in KJ/s\"),round(W,2)\n",
+ "Q_ref=64.26;\n",
+ "COP=Q_ref/(W_C-W_T)\n",
+ "print(\"COP=\"),round(COP,2)\n",
+ "print(\"so refrigeration capacity=18.36 ton or 64.26 KJ/s\")\n",
+ "print(\"and COP=0.57\")\n",
+ "print(\"NOTE=>In book this question is solve by taking T1=240 K which is incorrect,hence correction is made above according to question by taking T1=-30 degree celcius or 243 K,so answer may vary slightly.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.5;pg no: 437"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.5, Page:437 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 5\n",
+ "for isentropic compression process:\n",
+ "(p2/p1)^((y-1)/y)=T2/T1\n",
+ "so T2=T1*(p2/p1)^((y-1)/y) in K\n",
+ "for isenropic expansion process:\n",
+ "(p3/p4)^((y-1)/y)=(T3/T4)=(p2/p1)^((y-1)/y)\n",
+ "so T4=T3/(p2/p1)^((y-1)/y) in K\n",
+ "heat rejected during process 2-3,Q23=Cp*(T2-T3)in KJ/kg\n",
+ "refrigeration process,heat picked during process 4-1,Q41=Cp*(T1-T4) in KJ/kg\n",
+ "so net work(W)=Q23-Q41 in KJ/kg\n",
+ "so COP=refrigeration effect/net work= 1.71\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of COP\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.5, Page:437 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 5\")\n",
+ "T1=(7+273);#temperature of refrigerated space in K\n",
+ "T3=(27+273);#temperature after compression in K\n",
+ "p1=1*10**5;#pressure of refrigerated space in pa\n",
+ "p2=5*10**5;#pressure after compression in pa\n",
+ "y=1.4;#expansion constant\n",
+ "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n",
+ "print(\"for isentropic compression process:\")\n",
+ "print(\"(p2/p1)^((y-1)/y)=T2/T1\")\n",
+ "print(\"so T2=T1*(p2/p1)^((y-1)/y) in K\")\n",
+ "T2=T1*(p2/p1)**((y-1)/y)\n",
+ "print(\"for isenropic expansion process:\")\n",
+ "print(\"(p3/p4)^((y-1)/y)=(T3/T4)=(p2/p1)^((y-1)/y)\")\n",
+ "print(\"so T4=T3/(p2/p1)^((y-1)/y) in K\")\n",
+ "T4=T3/(p2/p1)**((y-1)/y)\n",
+ "print(\"heat rejected during process 2-3,Q23=Cp*(T2-T3)in KJ/kg\")\n",
+ "Q23=Cp*(T2-T3)\n",
+ "print(\"refrigeration process,heat picked during process 4-1,Q41=Cp*(T1-T4) in KJ/kg\")\n",
+ "Q41=Cp*(T1-T4)\n",
+ "print(\"so net work(W)=Q23-Q41 in KJ/kg\")\n",
+ "W=Q23-Q41\n",
+ "COP=Q41/W\n",
+ "print(\"so COP=refrigeration effect/net work=\"),round(COP,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.6;pg no: 438"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.6, Page:438 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 6\n",
+ "for process 1-2\n",
+ "(p2/p1)^((y-1)/y)=T2/T1\n",
+ "so T2=T1*(p2/p1)^((y-1)/y) in K\n",
+ "for process 3-4\n",
+ "(p3/p4)^((y-1)/y)=T3/T4\n",
+ "so T4=T3/(p3/p4)^((y-1)/y)=T3/(p2/p1)^((y-1)/y)in K\n",
+ "refrigeration capacity(Q) in KJ/s= 63.25\n",
+ "Q in ton\n",
+ "work required to run compressor(w)=(m*n)*(p2*v2-p1*v1)/(n-1)\n",
+ "w=(m*n)*R*(T2-T1)/(n-1) in KJ/s\n",
+ "HP required to run compressor 177.86\n",
+ "so HP required to run compressor=177.86 hp\n",
+ "net work input(W)=m*Cp*{(T2-T3)-(T1-T4)}in KJ/s\n",
+ "COP=refrigeration capacity/work=Q/W 1.59\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of refrigeration capacity,HP required to run compressor,COP\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.6, Page:438 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 6\")\n",
+ "T1=(-10.+273.);#air entering temperature in K\n",
+ "p1=1.*10**5;#air entering pressure in pa\n",
+ "T3=(27.+273.);#compressed air temperature after cooling in K\n",
+ "p2=5.5*10**5;#pressure after compression in pa\n",
+ "m=0.8;#air flow rate in kg/s\n",
+ "Cp=1.005;#specific heat capacity at constant pressure in KJ/kg K\n",
+ "y=1.4;#expansion constant\n",
+ "R=0.287;#gas constant in KJ/kg K\n",
+ "print(\"for process 1-2\")\n",
+ "print(\"(p2/p1)^((y-1)/y)=T2/T1\")\n",
+ "print(\"so T2=T1*(p2/p1)^((y-1)/y) in K\")\n",
+ "T2=T1*(p2/p1)**((y-1)/y)\n",
+ "print(\"for process 3-4\")\n",
+ "print(\"(p3/p4)^((y-1)/y)=T3/T4\")\n",
+ "print(\"so T4=T3/(p3/p4)^((y-1)/y)=T3/(p2/p1)^((y-1)/y)in K\")\n",
+ "T4=T3/(p2/p1)**((y-1)/y)\n",
+ "Q=m*Cp*(T1-T4)\n",
+ "print(\"refrigeration capacity(Q) in KJ/s=\"),round(Q,2)\n",
+ "print(\"Q in ton\")\n",
+ "Q=Q/3.5\n",
+ "print(\"work required to run compressor(w)=(m*n)*(p2*v2-p1*v1)/(n-1)\")\n",
+ "print(\"w=(m*n)*R*(T2-T1)/(n-1) in KJ/s\")\n",
+ "n=y;\n",
+ "w=(m*n)*R*(T2-T1)/(n-1)\n",
+ "print(\"HP required to run compressor\"),round(w/0.7457,2)\n",
+ "print(\"so HP required to run compressor=177.86 hp\")\n",
+ "print(\"net work input(W)=m*Cp*{(T2-T3)-(T1-T4)}in KJ/s\")\n",
+ "W=m*Cp*((T2-T3)-(T1-T4))\n",
+ "Q=63.25;#refrigeration capacity in KJ/s\n",
+ "COP=Q/W\n",
+ "print(\"COP=refrigeration capacity/work=Q/W\"),round(COP,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.7;pg no: 440"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.7, Page:440 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 7\n",
+ "for process 1-2,n=1.45\n",
+ "T2/T1=(p2/p1)^((n-1)/n)\n",
+ "so T2=T1*(p2/p1)^((n-1)/n) in K\n",
+ "for process 3-4,n=1.3\n",
+ "T4/T3=(p4/p3)^((n-1)/n)\n",
+ "so T4=T3*(p4/p3)^((n-1)/n)in K\n",
+ "refrigeration effect in passenger cabin with m kg/s mass flow rate of air.\n",
+ "Q=m*Cp*(T5-T4)\n",
+ "m in kg/s= 0.55\n",
+ "so air mass flow rate in cabin=0.55 kg/s\n",
+ "let the mass flow rate through intercooler be m1 kg/s then the energy balance upon intercooler yields,\n",
+ "m1*Cp*(T8-T7)=m*Cp*(T2-T3)\n",
+ "during process 6-7,T7/T6=(p7/p6)^((n-1)/n)\n",
+ "so T7=T6*(p7/p6)^((n-1)/n) in K\n",
+ "substituting T2,T3,T7,T8 and m in energy balance on intercooler,\n",
+ "m1=m*(T2-T3)/(T8-T7)in kg/s\n",
+ "total ram air mass flow rate=m+m1 in kg/s 2.11\n",
+ "ram air mass flow rate=2.12 kg/s\n",
+ "work input to compressor(W)=m*Cp*(T2-T1)in KJ/s\n",
+ "COP=refrigeration effect/work input=Q/W 0.485\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of air mass flow rate in cabin,ram air mass flow rate,COP\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.7, Page:440 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 7\")\n",
+ "p1=1.2*10**5;#pressure of ram air in pa\n",
+ "p6=p1;\n",
+ "T1=(15.+273.);#temperature of ram air in K\n",
+ "T6=T1;\n",
+ "p7=0.9*10**5;#pressure of ram air after expansion in pa\n",
+ "p3=4.*10**5;#pressure of ram air after compression in pa\n",
+ "p2=p3;\n",
+ "p4=1.*10**5;#pressure of ram air after expansion in second turbine in pa\n",
+ "T5=(25.+273.);#temperature of air when exhausted from cabin in K\n",
+ "T3=(50.+273.);#temperature of compressed air in K\n",
+ "T8=(30.+273.);#limited temperaure of ram air in K\n",
+ "Q=10.*3.5;#refrigeration capacity in KJ/s\n",
+ "Cp=1.005;#specific heat capacity at constant pressure in KJ/kg K\n",
+ "print(\"for process 1-2,n=1.45\")\n",
+ "n=1.45;\n",
+ "print(\"T2/T1=(p2/p1)^((n-1)/n)\")\n",
+ "print(\"so T2=T1*(p2/p1)^((n-1)/n) in K\")\n",
+ "T2=T1*(p2/p1)**((n-1)/n)\n",
+ "print(\"for process 3-4,n=1.3\")\n",
+ "n=1.3;\n",
+ "print(\"T4/T3=(p4/p3)^((n-1)/n)\")\n",
+ "print(\"so T4=T3*(p4/p3)^((n-1)/n)in K\")\n",
+ "T4=T3*(p4/p3)**((n-1)/n)\n",
+ "print(\"refrigeration effect in passenger cabin with m kg/s mass flow rate of air.\")\n",
+ "print(\"Q=m*Cp*(T5-T4)\")\n",
+ "m=Q/(Cp*(T5-T4))\n",
+ "print(\"m in kg/s=\"),round(m,2)\n",
+ "print(\"so air mass flow rate in cabin=0.55 kg/s\")\n",
+ "print(\"let the mass flow rate through intercooler be m1 kg/s then the energy balance upon intercooler yields,\")\n",
+ "print(\"m1*Cp*(T8-T7)=m*Cp*(T2-T3)\")\n",
+ "print(\"during process 6-7,T7/T6=(p7/p6)^((n-1)/n)\")\n",
+ "print(\"so T7=T6*(p7/p6)^((n-1)/n) in K\")\n",
+ "T7=T6*(p7/p6)**((n-1)/n)\n",
+ "print(\"substituting T2,T3,T7,T8 and m in energy balance on intercooler,\")\n",
+ "print(\"m1=m*(T2-T3)/(T8-T7)in kg/s\")\n",
+ "m1=m*(T2-T3)/(T8-T7)\n",
+ "print(\"total ram air mass flow rate=m+m1 in kg/s\"),round(m+m1,2)\n",
+ "print(\"ram air mass flow rate=2.12 kg/s\")\n",
+ "print(\"work input to compressor(W)=m*Cp*(T2-T1)in KJ/s\")\n",
+ "m=0.55;#approx.\n",
+ "W=m*Cp*(T2-T1)\n",
+ "COP=Q/W\n",
+ "print(\"COP=refrigeration effect/work input=Q/W\"),round(Q/W,3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.8;pg no: 441"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.8, Page:441 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 8\n",
+ "considering index of compression and expansion as 1.4\n",
+ "during ramming action,process 0-1,\n",
+ "T1/To=(p1/po)^((y-1)/y)\n",
+ "T1=To*(p1/po)^((y-1)/y)in K\n",
+ "during compression process 1-2_a\n",
+ "T2_a/T1=(p2/p1)^((y-1)/y)\n",
+ "T2_a=T1*(p2/p1)^((y-1)/y)in K\n",
+ "n1=(T2_a-T1)/(T2-T1)\n",
+ "so T2=T1+(T2_a-T1)/n1 in K\n",
+ "In heat exchanger 66% of heat loss shall result in temperature at exit from heat exchanger to be,T3=0.34*T2 in K\n",
+ "subsequently for 10 degree celcius temperature drop in evaporator,\n",
+ "T4=T3-10 in K\n",
+ "expansion in cooling turbine during process 4-5;\n",
+ "T5_a/T4=(p5/p4)^((y-1)/y)\n",
+ "T5_a=T4*(p5/p4)^((y-1)/y)in K\n",
+ "n2=(T4-T5)/(T4-T5_a)\n",
+ "T5=T4-(T4-T5_a)*n2 in K\n",
+ "let the mass flow rate of air through cabin be m kg/s.using refrigeration capacity heat balance yields.\n",
+ "Q=m*Cp*(T6-T5)\n",
+ "so m=Q/(Cp*(T6-T5))in kg/s\n",
+ "work input to compressor(W)=m*Cp*(T2-T1)in KJ/s 41.4\n",
+ "W in Hp\n",
+ "COP=refrigeration effect/work input=Q/W= 1.27\n",
+ "so COP=1.27\n",
+ "and HP required=55.48 hp\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of COP and HP required\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.8, Page:441 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 8\")\n",
+ "po=0.9*10**5;#atmospheric air pressure in pa\n",
+ "To=(3.+273.);#temperature of atmospheric air in K\n",
+ "p1=1.*10**5;#pressure due to ramming air in pa\n",
+ "p2=4.*10**5;#pressure when air leaves compressor in pa\n",
+ "p3=p2;\n",
+ "p4=p3;\n",
+ "p5=1.03*10**5;#pressure maintained in passenger cabin in pa\n",
+ "T6=(25.+273.);#temperature of air leaves cabin in K\n",
+ "Q=15.*3.5;#refrigeration capacity of aeroplane in KJ/s\n",
+ "n1=0.9;#isentropic efficiency of compressor\n",
+ "n2=0.8;#isentropic efficiency of turbine\n",
+ "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n",
+ "print(\"considering index of compression and expansion as 1.4\")\n",
+ "y=1.4;\n",
+ "print(\"during ramming action,process 0-1,\")\n",
+ "print(\"T1/To=(p1/po)^((y-1)/y)\")\n",
+ "print(\"T1=To*(p1/po)^((y-1)/y)in K\")\n",
+ "T1=To*(p1/po)**((y-1)/y)\n",
+ "print(\"during compression process 1-2_a\")\n",
+ "print(\"T2_a/T1=(p2/p1)^((y-1)/y)\")\n",
+ "print(\"T2_a=T1*(p2/p1)^((y-1)/y)in K\")\n",
+ "T2_a=T1*(p2/p1)**((y-1)/y)\n",
+ "print(\"n1=(T2_a-T1)/(T2-T1)\")\n",
+ "print(\"so T2=T1+(T2_a-T1)/n1 in K\")\n",
+ "T2=T1+(T2_a-T1)/n1\n",
+ "print(\"In heat exchanger 66% of heat loss shall result in temperature at exit from heat exchanger to be,T3=0.34*T2 in K\")\n",
+ "T3=0.34*T2\n",
+ "print(\"subsequently for 10 degree celcius temperature drop in evaporator,\")\n",
+ "print(\"T4=T3-10 in K\")\n",
+ "T4=T3-10\n",
+ "print(\"expansion in cooling turbine during process 4-5;\")\n",
+ "print(\"T5_a/T4=(p5/p4)^((y-1)/y)\")\n",
+ "print(\"T5_a=T4*(p5/p4)^((y-1)/y)in K\")\n",
+ "T5_a=T4*(p5/p4)**((y-1)/y)\n",
+ "print(\"n2=(T4-T5)/(T4-T5_a)\")\n",
+ "print(\"T5=T4-(T4-T5_a)*n2 in K\")\n",
+ "T5=T4-(T4-T5_a)*n2\n",
+ "print(\"let the mass flow rate of air through cabin be m kg/s.using refrigeration capacity heat balance yields.\")\n",
+ "print(\"Q=m*Cp*(T6-T5)\")\n",
+ "print(\"so m=Q/(Cp*(T6-T5))in kg/s\")\n",
+ "m=Q/(Cp*(T6-T5))\n",
+ "W=m*Cp*(T2-T1)\n",
+ "print(\"work input to compressor(W)=m*Cp*(T2-T1)in KJ/s\"),round(W,2)\n",
+ "print(\"W in Hp\")\n",
+ "W=W/.7457\n",
+ "W=41.37;#work input to compressor in KJ/s\n",
+ "COP=Q/W\n",
+ "print(\"COP=refrigeration effect/work input=Q/W=\"),round(COP,2)\n",
+ "print(\"so COP=1.27\")\n",
+ "print(\"and HP required=55.48 hp\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.9;pg no: 443"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.9, Page:443 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 9\n",
+ "properties of NH3,\n",
+ "at 15 degree celcius,h9=-54.51 KJ/kg,hg=1303.74 KJ/kg,s9=-0.2132 KJ/kg K,sg=5.0536 KJ/kg K\n",
+ "and at 25 degree celcius,h3=99.94 KJ/kg,h2=1317.95 KJ/kg,s3=0.3386 KJ/kg K,s2=4.4809 KJ/kg K\n",
+ "here work done,W=Area 1-2-3-9-1\n",
+ "refrigeration effect=Area 1-5-6-4-1\n",
+ "Area 3-8-9 =(Area 3-11-7)-(Area 9-11-10)-(Area 9-8-7-10)\n",
+ "so Area 3-8-9=h3-h9-T1*(s3-s9)in KJ/kg\n",
+ "during throttling process between 3 and 4,h3=h4\n",
+ "(Area=3-11-7-3)=(Area 4-9-11-6-4)\n",
+ "(Area 3-8-9)+(Area 8-9-11-7-8)=(Area 4-6-7-8-4)+(Area 8-9-11-7-8)\n",
+ "(Area 3-8-9)=(Area 4-6-7-8-4)\n",
+ "so (Area 4-6-7-8-4)=12.09 KJ/kg\n",
+ "also,(Area 4-6-7-8-4)=T1*(s4-s8)\n",
+ "so (s4-s8)in KJ/kg K=\n",
+ "also s3=s8=0.3386 KJ/kg K\n",
+ "so s4 in KJ/kg K=\n",
+ "also s1=s2=4.4809 KJ/kg K\n",
+ "refrigeration effect(Q)=Area (1-5-6-4-1)=T1*(s1-s4)in KJ/kg\n",
+ "work done(W)=Area (1-2-3-9-1)=(Area 3-8-9)+((T2-T1)*(s1-s8))in KJ/kg\n",
+ "so COP=refrigeration effect/work done= 5.94\n",
+ "so COP=5.94\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of COP\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.9, Page:443 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 9\")\n",
+ "print(\"properties of NH3,\")\n",
+ "print(\"at 15 degree celcius,h9=-54.51 KJ/kg,hg=1303.74 KJ/kg,s9=-0.2132 KJ/kg K,sg=5.0536 KJ/kg K\")\n",
+ "T1=(-15+273);\n",
+ "h9=-54.51;\n",
+ "hg=1303.74;\n",
+ "s9=-0.2132;\n",
+ "sg=5.0536;\n",
+ "print(\"and at 25 degree celcius,h3=99.94 KJ/kg,h2=1317.95 KJ/kg,s3=0.3386 KJ/kg K,s2=4.4809 KJ/kg K\")\n",
+ "T2=(25+273);\n",
+ "h3=99.94;\n",
+ "h2=1317.95;\n",
+ "s3=0.3386;\n",
+ "s2=4.4809;\n",
+ "print(\"here work done,W=Area 1-2-3-9-1\")\n",
+ "print(\"refrigeration effect=Area 1-5-6-4-1\")\n",
+ "print(\"Area 3-8-9 =(Area 3-11-7)-(Area 9-11-10)-(Area 9-8-7-10)\")\n",
+ "print(\"so Area 3-8-9=h3-h9-T1*(s3-s9)in KJ/kg\")\n",
+ "h3-h9-T1*(s3-s9)\n",
+ "print(\"during throttling process between 3 and 4,h3=h4\")\n",
+ "print(\"(Area=3-11-7-3)=(Area 4-9-11-6-4)\")\n",
+ "print(\"(Area 3-8-9)+(Area 8-9-11-7-8)=(Area 4-6-7-8-4)+(Area 8-9-11-7-8)\")\n",
+ "print(\"(Area 3-8-9)=(Area 4-6-7-8-4)\")\n",
+ "print(\"so (Area 4-6-7-8-4)=12.09 KJ/kg\")\n",
+ "print(\"also,(Area 4-6-7-8-4)=T1*(s4-s8)\")\n",
+ "print(\"so (s4-s8)in KJ/kg K=\")\n",
+ "12.09/T1\n",
+ "print(\"also s3=s8=0.3386 KJ/kg K\")\n",
+ "s8=s3;\n",
+ "print(\"so s4 in KJ/kg K=\")\n",
+ "s4=s8+12.09/T1\n",
+ "print(\"also s1=s2=4.4809 KJ/kg K\")\n",
+ "s1=s2;\n",
+ "print(\"refrigeration effect(Q)=Area (1-5-6-4-1)=T1*(s1-s4)in KJ/kg\")\n",
+ "Q=T1*(s1-s4)\n",
+ "print(\"work done(W)=Area (1-2-3-9-1)=(Area 3-8-9)+((T2-T1)*(s1-s8))in KJ/kg\")\n",
+ "W=12.09+((T2-T1)*(s1-s8))\n",
+ "COP=Q/W\n",
+ "print(\"so COP=refrigeration effect/work done=\"),round(COP,2)\n",
+ "print(\"so COP=5.94\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.10;pg no: 445"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.10, Page:445 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 10\n",
+ "properties of Freon-12,\n",
+ "at -20 degree celcius,P1=1.51 bar,vg=0.1088 m^3/kg,hf=17.8 KJ/kg,h1=178.61 KJ/kg,sf=0.0730 KJ/kg K,s1=0.7082 KJ/kg K,Cpg=0.605 KJ/kg K\n",
+ "at 40 degree celcius,P2=9.61 bar,h3=74.53 KJ/kg,hg=203.05 KJ/kg,sf=0.2716 KJ/kg K,sg=0.682 KJ/kg K,Cpf=0.976 KJ/kg K,Cpg=0.747 KJ/kg K\n",
+ "during expansion(throttling)between 3 and 4\n",
+ "h3=h4=hf_40oc=74.53 KJ/kg=h4\n",
+ "process 1-2 is adiabatic compression so,\n",
+ "s1=s2,s1=sg_-20oc=0.7082 KJ/kg K\n",
+ "at 40 degree celcius or 313 K,s1=sg+Cpg*log(T2/313)\n",
+ "T2=313*exp((s1-sg)/Cpg)in K\n",
+ "so temperature after compression,T2=324.17 K\n",
+ "enthalpy after compression,h2=hg+Cpg*(T2-313)in KJ/kg\n",
+ "compression work required,per kg(Wc)=h2-h1 in KJ/kg\n",
+ "refrigeration effect during cycle,per kg(q)=h1-h4 in KJ/kg\n",
+ "mass flow rate of refrigerant,m=Q/q in kg/s\n",
+ "COP=q/Wc 3.17452\n",
+ "volumetric efficiency of reciprocating compressor,given C=0.02\n",
+ "n_vol=1+C-C*(P2/P1)^(1/n)\n",
+ "let piston printlacement by V,m^3\n",
+ "mass flow rate,m=(V*n_vol*N)/(60*vg_-20oc)\n",
+ "so V in cm^3= 569.43\n",
+ "so COP=3.175\n",
+ "and piston printlacement=569.45 cm^3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of COP and piston printlacement\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.10, Page:445 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 10\")\n",
+ "Q=2.86*3.5;#refrigeration effect in KJ/s\n",
+ "N=1200;#compressor rpm\n",
+ "n=1.13;#compression index\n",
+ "print(\"properties of Freon-12,\")\n",
+ "print(\"at -20 degree celcius,P1=1.51 bar,vg=0.1088 m^3/kg,hf=17.8 KJ/kg,h1=178.61 KJ/kg,sf=0.0730 KJ/kg K,s1=0.7082 KJ/kg K,Cpg=0.605 KJ/kg K\")\n",
+ "P1=1.51;\n",
+ "T1=(-20+273);\n",
+ "vg=0.1088;\n",
+ "h1=178.61;\n",
+ "s1=0.7082;\n",
+ "s2=s1;\n",
+ "print(\"at 40 degree celcius,P2=9.61 bar,h3=74.53 KJ/kg,hg=203.05 KJ/kg,sf=0.2716 KJ/kg K,sg=0.682 KJ/kg K,Cpf=0.976 KJ/kg K,Cpg=0.747 KJ/kg K\")\n",
+ "P2=9.61;\n",
+ "h3=74.53;\n",
+ "h4=h3;\n",
+ "hg=203.05;\n",
+ "sf=0.2716;\n",
+ "sg=0.682;\n",
+ "Cpf=0.976;\n",
+ "Cpg=0.747;\n",
+ "print(\"during expansion(throttling)between 3 and 4\")\n",
+ "print(\"h3=h4=hf_40oc=74.53 KJ/kg=h4\")\n",
+ "print(\"process 1-2 is adiabatic compression so,\")\n",
+ "print(\"s1=s2,s1=sg_-20oc=0.7082 KJ/kg K\")\n",
+ "print(\"at 40 degree celcius or 313 K,s1=sg+Cpg*log(T2/313)\")\n",
+ "print(\"T2=313*exp((s1-sg)/Cpg)in K\")\n",
+ "T2=313*math.exp((s1-sg)/Cpg)\n",
+ "print(\"so temperature after compression,T2=324.17 K\")\n",
+ "print(\"enthalpy after compression,h2=hg+Cpg*(T2-313)in KJ/kg\")\n",
+ "h2=hg+Cpg*(T2-313)\n",
+ "print(\"compression work required,per kg(Wc)=h2-h1 in KJ/kg\")\n",
+ "Wc=h2-h1\n",
+ "print(\"refrigeration effect during cycle,per kg(q)=h1-h4 in KJ/kg\")\n",
+ "q=h1-h4\n",
+ "print(\"mass flow rate of refrigerant,m=Q/q in kg/s\")\n",
+ "m=Q/q\n",
+ "m=0.096;#approx.\n",
+ "COP=q/Wc\n",
+ "print(\"COP=q/Wc\"),round(COP,5)\n",
+ "print(\"volumetric efficiency of reciprocating compressor,given C=0.02\")\n",
+ "C=0.02;\n",
+ "print(\"n_vol=1+C-C*(P2/P1)^(1/n)\")\n",
+ "n_vol=1+C-C*(P2/P1)**(1/n)\n",
+ "print(\"let piston printlacement by V,m^3\")\n",
+ "print(\"mass flow rate,m=(V*n_vol*N)/(60*vg_-20oc)\")\n",
+ "V=(m*60*vg)*10**6/(N*n_vol)\n",
+ "print(\"so V in cm^3=\"),round(V,2)\n",
+ "print(\"so COP=3.175\")\n",
+ "print(\"and piston printlacement=569.45 cm^3\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.11;pg no: 447"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.11, Page:447 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 11\n",
+ "properties of CO2,\n",
+ "at 20 degree celcius,P1=57.27 bar,hf=144.11 KJ/kg,hg=299.62 KJ/kg,sf=0.523 KJ/kg K,sg_20oc=1.0527 KJ/kg K,Cpf=2.889 KJ/kg K,Cpg=2.135 KJ/kg K\n",
+ "at -10 degree celcius,P2=26.49 bar,vg=0.014 m^3/kg,hf=60.78 KJ/kg,hg=322.28 KJ/kg,sf=0.2381 KJ/kg K,sg=1.2324 KJ/kg K\n",
+ "processes of vapour compression cycle are shown on T-s diagram\n",
+ "1-2:isentropic compression process\n",
+ "2-3-4:condensation process\n",
+ "4-5:isenthalpic expansion process\n",
+ "5-1:refrigeration process in evaporator\n",
+ "h1=hg at -10oc=322.28 KJ/kg\n",
+ "at 20 degree celcius,h2=hg+Cpg*(40-20)in KJ/kg\n",
+ "entropy at state 2,at 20 degree celcius,s2=sg_20oc+Cpg*log((273+40)/(273+20))in KJ/kg K\n",
+ "entropy during isentropic process,s1=s2\n",
+ "at -10 degree celcius,s2=sf+x1*sfg\n",
+ "so x1=(s2-sf)/(sg-sf)\n",
+ "enthalpy at state 1,at -10 degree celcius,h1=hf+x1*hfg in KJ/kg\n",
+ "h3=hf at 20oc=144.11 KJ/kg\n",
+ "since undercooling occurs upto 10oc,so,h4=h3-Cpf*deltaT in KJ/kg\n",
+ "also,h4=h5=115.22 KJ/kg\n",
+ "refrigeration effect per kg of refrigerant(q)=(h1-h5)in KJ/kg\n",
+ "let refrigerant flow rate be m kg/s\n",
+ "refrigerant effect(Q)=m*q\n",
+ "m=Q/q in kg/s 0.01016\n",
+ "compressor work,Wc=h2-h1 in KJ/kg\n",
+ "COP=refrigeration effect per kg/compressor work per kg= 6.51\n",
+ "so COP=6.51,mass flow rate=0.01016 kg/s\n",
+ "NOTE=>In book,mass flow rate(m) which is 0.1016 kg/s is calculated wrong and it is correctly solve above and comes out to be m=0.01016 kg/s. \n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of COP and mass flow rate\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.11, Page:447 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 11\")\n",
+ "Q=2;#refrigeration effect in KW\n",
+ "print(\"properties of CO2,\")\n",
+ "print(\"at 20 degree celcius,P1=57.27 bar,hf=144.11 KJ/kg,hg=299.62 KJ/kg,sf=0.523 KJ/kg K,sg_20oc=1.0527 KJ/kg K,Cpf=2.889 KJ/kg K,Cpg=2.135 KJ/kg K\")\n",
+ "T1=(20.+273.);#condensation temperature in K\n",
+ "P1=57.27;\n",
+ "h3=144.11;\n",
+ "hg=299.62;\n",
+ "sf=0.523;\n",
+ "sg_20oc=1.0527;\n",
+ "Cpf=2.889;\n",
+ "Cpg=2.135;\n",
+ "print(\"at -10 degree celcius,P2=26.49 bar,vg=0.014 m^3/kg,hf=60.78 KJ/kg,hg=322.28 KJ/kg,sf=0.2381 KJ/kg K,sg=1.2324 KJ/kg K\")\n",
+ "T2=(-10+273);#evaporator temperature in K\n",
+ "P2=26.49;\n",
+ "vg=0.014;\n",
+ "hf=60.78;\n",
+ "h1=322.28;\n",
+ "sf=0.2381;\n",
+ "sg=1.2324;\n",
+ "print(\"processes of vapour compression cycle are shown on T-s diagram\")\n",
+ "print(\"1-2:isentropic compression process\")\n",
+ "print(\"2-3-4:condensation process\")\n",
+ "print(\"4-5:isenthalpic expansion process\")\n",
+ "print(\"5-1:refrigeration process in evaporator\")\n",
+ "print(\"h1=hg at -10oc=322.28 KJ/kg\")\n",
+ "print(\"at 20 degree celcius,h2=hg+Cpg*(40-20)in KJ/kg\")\n",
+ "h2=hg+Cpg*(40.-20.)\n",
+ "print(\"entropy at state 2,at 20 degree celcius,s2=sg_20oc+Cpg*log((273+40)/(273+20))in KJ/kg K\")\n",
+ "s2=sg_20oc+Cpg*math.log((273.+40.)/(273.+20.))\n",
+ "print(\"entropy during isentropic process,s1=s2\")\n",
+ "print(\"at -10 degree celcius,s2=sf+x1*sfg\")\n",
+ "print(\"so x1=(s2-sf)/(sg-sf)\")\n",
+ "x1=(s2-sf)/(sg-sf)\n",
+ "print(\"enthalpy at state 1,at -10 degree celcius,h1=hf+x1*hfg in KJ/kg\")\n",
+ "h1=hf+x1*(h1-hf)\n",
+ "print(\"h3=hf at 20oc=144.11 KJ/kg\")\n",
+ "print(\"since undercooling occurs upto 10oc,so,h4=h3-Cpf*deltaT in KJ/kg\")\n",
+ "h4=h3-Cpf*(20.-10.)\n",
+ "print(\"also,h4=h5=115.22 KJ/kg\")\n",
+ "h5=h4;\n",
+ "print(\"refrigeration effect per kg of refrigerant(q)=(h1-h5)in KJ/kg\")\n",
+ "q=(h1-h5)\n",
+ "print(\"let refrigerant flow rate be m kg/s\")\n",
+ "print(\"refrigerant effect(Q)=m*q\")\n",
+ "m=Q/q\n",
+ "print(\"m=Q/q in kg/s\"),round(m,5)\n",
+ "print(\"compressor work,Wc=h2-h1 in KJ/kg\")\n",
+ "Wc=h2-h1\n",
+ "COP=q/Wc\n",
+ "print(\"COP=refrigeration effect per kg/compressor work per kg=\"),round(COP,2)\n",
+ "print(\"so COP=6.51,mass flow rate=0.01016 kg/s\")\n",
+ "print(\"NOTE=>In book,mass flow rate(m) which is 0.1016 kg/s is calculated wrong and it is correctly solve above and comes out to be m=0.01016 kg/s. \")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.12;pg no: 448"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.12, Page:448 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 12\n",
+ "here pressure of atmospheric air(P)may be taken as 1.013 bar\n",
+ "specific humidity,omega=0.622*(Pv/(P-Pv))\n",
+ "so partial pressure of vapour(Pv)in bar\n",
+ "Pv in bar= 0.0254\n",
+ "relative humidity(phi)=(Pv/Pv_sat)\n",
+ "from pychrometric properties of air Pv_sat at 25 degree celcius=0.03098 bar\n",
+ "so phi=Pv/Pv_sat 0.82\n",
+ "in percentage 81.99\n",
+ "so partial pressure of vapour=0.0254 bar\n",
+ "relative humidity=81.98 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of partial pressure of vapour and relative humidity\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.12, Page:448 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 12\")\n",
+ "omega=0.016;#specific humidity in gm/gm of air\n",
+ "print(\"here pressure of atmospheric air(P)may be taken as 1.013 bar\")\n",
+ "P=1.013;#pressure of atmospheric air in bar\n",
+ "print(\"specific humidity,omega=0.622*(Pv/(P-Pv))\")\n",
+ "print(\"so partial pressure of vapour(Pv)in bar\")\n",
+ "Pv=P/(1+(0.622/omega))\n",
+ "print(\"Pv in bar=\"),round(Pv,4)\n",
+ "Pv=0.0254;#approx.\n",
+ "print(\"relative humidity(phi)=(Pv/Pv_sat)\")\n",
+ "print(\"from pychrometric properties of air Pv_sat at 25 degree celcius=0.03098 bar\")\n",
+ "Pv_sat=0.03098;\n",
+ "phi=Pv/Pv_sat\n",
+ "print(\"so phi=Pv/Pv_sat\"),round(phi,2)\n",
+ "print(\"in percentage\"),round(phi*100,2)\n",
+ "print(\"so partial pressure of vapour=0.0254 bar\")\n",
+ "print(\"relative humidity=81.98 %\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.13;pg no: 449"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.13, Page:449 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 13\n",
+ "at 30 degree celcius from steam table,saturation pressure,Pv_sat=0.0425 bar\n",
+ "partial pressure of vapour(Pv)=relative humidity*Pv_sat in bar 0.03\n",
+ "partial pressure of air(Pa)=total pressure of mixture-partial pressure of vapour 0.99\n",
+ "so partial pressure of air=0.9875 bar\n",
+ "humidity ratio,omega in kg/kg of dry air= 0.01606\n",
+ "so humidity ratio=0.01606 kg/kg of air\n",
+ "Dew point temperature may be seen from the steam table.The saturation temperature corresponding to the partial pressure of vapour is 0.0255 bar.Dew point temperature can be approximated as 21.4oc by interpolation\n",
+ "so Dew point temperature=21.4 degree celcius\n",
+ "density of mixture(rho_m)=density of air(rho_a)+density of vapour(rho_v)\n",
+ "rho_m=(rho_a)+(rho_v)=rho_a*(1+omega)\n",
+ "rho_m in kg/m^3= 1.1836\n",
+ "so density = 1.1835 kg/m^3\n",
+ "enthalpy of mixture,h in KJ/kg of dry air= 71.21\n",
+ "enthalpy of mixture =71.2 KJ/kg of dry air\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of partial pressure,humidity ratio,Dew point temperature,density and enthalpy of mixture\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.13, Page:449 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 13\")\n",
+ "r=0.6;#relative humidity\n",
+ "P=1.013;#total pressure of mixture in bar\n",
+ "R=0.287;#gas constant in KJ/kg K\n",
+ "Ta=(30+273);#room temperature in K\n",
+ "Cp=1.005;#specific heat at constant pressure in KJ/kg degree celcius\n",
+ "print(\"at 30 degree celcius from steam table,saturation pressure,Pv_sat=0.0425 bar\")\n",
+ "Pv_sat=0.0425;\n",
+ "Pv=r*Pv_sat\n",
+ "print(\"partial pressure of vapour(Pv)=relative humidity*Pv_sat in bar\"),round(Pv,2)\n",
+ "Pa=P-Pv\n",
+ "print(\"partial pressure of air(Pa)=total pressure of mixture-partial pressure of vapour\"),round(Pa,2)\n",
+ "print(\"so partial pressure of air=0.9875 bar\")\n",
+ "omega=0.622*Pv/(P-Pv)\n",
+ "print(\"humidity ratio,omega in kg/kg of dry air=\"),round(omega,5)\n",
+ "print(\"so humidity ratio=0.01606 kg/kg of air\")\n",
+ "print(\"Dew point temperature may be seen from the steam table.The saturation temperature corresponding to the partial pressure of vapour is 0.0255 bar.Dew point temperature can be approximated as 21.4oc by interpolation\")\n",
+ "print(\"so Dew point temperature=21.4 degree celcius\")\n",
+ "print(\"density of mixture(rho_m)=density of air(rho_a)+density of vapour(rho_v)\")\n",
+ "print(\"rho_m=(rho_a)+(rho_v)=rho_a*(1+omega)\")\n",
+ "rho_m=P*100*(1+omega)/(R*Ta)\n",
+ "print(\"rho_m in kg/m^3=\"),round(rho_m,4)\n",
+ "print(\"so density = 1.1835 kg/m^3\")\n",
+ "T=30;#room temperature in degree celcius\n",
+ "hg=2540.1;#enthalpy at 30 degree celcius in KJ/kg\n",
+ "h=Cp*T+omega*(hg+1.860*(30-21.4))\n",
+ "print(\"enthalpy of mixture,h in KJ/kg of dry air=\"),round(h,2)\n",
+ "print(\"enthalpy of mixture =71.2 KJ/kg of dry air\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.14;pg no: 449"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.14, Page:449 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 14\n",
+ "initial state at 15 degree celcius and 80% relative humidity is shown by point 1 and final state at 25 degree celcius and 50% relative humidity is shown by point 2 on psychrometric chart.\n",
+ "omega1=0.0086 kg/kg of air,h1=37 KJ/kg,omega2=0.01 kg/kg of air,h2=50 KJ/kg,v2=0.854 m^3/kg\n",
+ "mass of water added between states 1 and 2 omega2-omega1 in kg/kg of air\n",
+ "mass flow rate of air(ma)=0.8/v2 in kg/s\n",
+ "total mass of water added=ma*(omega2-omega1)in kg/s 0.001311\n",
+ "heat transferred in KJ/s= 12.18\n",
+ "so mass of water added=0.001312 kg/s,heat transferred=12.18 KW\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of mass of water added and heat transferred\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.14, Page:449 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 14\")\n",
+ "print(\"initial state at 15 degree celcius and 80% relative humidity is shown by point 1 and final state at 25 degree celcius and 50% relative humidity is shown by point 2 on psychrometric chart.\")\n",
+ "print(\"omega1=0.0086 kg/kg of air,h1=37 KJ/kg,omega2=0.01 kg/kg of air,h2=50 KJ/kg,v2=0.854 m^3/kg\")\n",
+ "omega1=0.0086;\n",
+ "h1=37.;\n",
+ "omega2=0.01;\n",
+ "h2=50.;\n",
+ "v2=0.854;\n",
+ "print(\"mass of water added between states 1 and 2 omega2-omega1 in kg/kg of air\")\n",
+ "omega2-omega1\n",
+ "print(\"mass flow rate of air(ma)=0.8/v2 in kg/s\")\n",
+ "ma=0.8/v2\n",
+ "print(\"total mass of water added=ma*(omega2-omega1)in kg/s\"),round(ma*(omega2-omega1),6)\n",
+ "print(\"heat transferred in KJ/s=\"),round(ma*(h2-h1),2)\n",
+ "print(\"so mass of water added=0.001312 kg/s,heat transferred=12.18 KW\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.15;pg no: 451"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.15, Page:451 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 15\n",
+ "Let temperature after mixing be Toc.For getting final enthalpy after adiabatic mixing the enthalpy of two streams are required.\n",
+ "For moist air stream at 30 degree celcius and 30% relative humidity.\n",
+ "phi1=Pv1/Pv_sat_30oc\n",
+ "here Pv_sat_30oc=0.04246 bar\n",
+ "so Pv1=phi1*Pv_sat_30oc in bar\n",
+ "corresponding to vapour pressure of 0.01274 bar the dew point temperature shall be 10.5 degree celcius\n",
+ "specific humidity,omega1 in kg/kg of air= 0.00792\n",
+ "at dew point temperature of 10.5 degree celcius,enthalpy,hg at 10.5oc=2520.7 KJ/kg\n",
+ "h1=Cp_air*T1+omega1*{hg-Cp_stream*(T1-Tdp1)}in KJ/kg of dry air\n",
+ "for second moist air stream at 35oc and 85% relative humidity\n",
+ "phi2=Pv2/Pv_sat_35oc\n",
+ "here Pv_sat_35oc=0.005628 bar\n",
+ "so Pv2=phi2*Pv_sat_35oc in bar\n",
+ "specific humidity,omega2 in kg/kg of air= 0.00295\n",
+ "corresponding to vapour pressure of 0.004784 bar the dew point temperature is 32 degree celcius\n",
+ "so,enthalpy of second stream,\n",
+ "h2=Cp_air*T2+omega2*{hg+Cp_stream*(T2-Tdp2)}in KJ/kg of dry air\n",
+ "enthalpy of mixture after adiabatic mixing,\n",
+ "=(1/(m1+m2))*((h1*m1/(1+omega1))+(h2*m2/(1+omega2))) in KJ/kg of moist air\n",
+ "mass of vapour per kg of moist air=(1/5)*((omega1*m1/(1+omega1))+(omega2*m2/(1+omega2)))in kg/kg of moist air\n",
+ "specific humidity of mixture(omega)in kg/kg of dry air= 0.00592\n",
+ "omega=0.622*Pv/(P-Pv)\n",
+ "Pv in bar= 0.00956\n",
+ "partial pressure of water vapour=0.00957 bar\n",
+ "so specific humidity of mixture=0.00593 kg/kg dry air\n",
+ "and partial pressure of water vapour in mixture=0.00957 bar\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of specific humidity and partial pressure of water vapour in mixture\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.15, Page:451 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 15\")\n",
+ "P=1.013;#atmospheric pressure in bar\n",
+ "Cp_air=1.005;#specific heat of air at constant pressure in KJ/kg K\n",
+ "Cp_stream=1.86;#specific heat of stream at constant pressure in KJ/kg K\n",
+ "T1=30.;#temperature of first stream of moist air in K\n",
+ "m1=3.;#mass flow rate of first stream in kg/s \n",
+ "T2=35.;#temperature of second stream of moist air in K\n",
+ "m2=2.;#mass flow rate of second stream in kg/s \n",
+ "print(\"Let temperature after mixing be Toc.For getting final enthalpy after adiabatic mixing the enthalpy of two streams are required.\")\n",
+ "print(\"For moist air stream at 30 degree celcius and 30% relative humidity.\")\n",
+ "phi1=0.3;\n",
+ "print(\"phi1=Pv1/Pv_sat_30oc\")\n",
+ "print(\"here Pv_sat_30oc=0.04246 bar\")\n",
+ "Pv_sat_30oc=0.04246;\n",
+ "print(\"so Pv1=phi1*Pv_sat_30oc in bar\")\n",
+ "Pv1=phi1*Pv_sat_30oc\n",
+ "print(\"corresponding to vapour pressure of 0.01274 bar the dew point temperature shall be 10.5 degree celcius\")\n",
+ "Tdp1=10.5;\n",
+ "omega1=0.622*Pv1/(P-Pv1)\n",
+ "print(\"specific humidity,omega1 in kg/kg of air=\"),round(omega1,5)\n",
+ "print(\"at dew point temperature of 10.5 degree celcius,enthalpy,hg at 10.5oc=2520.7 KJ/kg\")\n",
+ "hg=2520.7;#enthalpy at 10.5 degree celcius in KJ/kg\n",
+ "print(\"h1=Cp_air*T1+omega1*{hg-Cp_stream*(T1-Tdp1)}in KJ/kg of dry air\")\n",
+ "h1=Cp_air*T1+omega1*(hg-Cp_stream*(T1-Tdp1))\n",
+ "print(\"for second moist air stream at 35oc and 85% relative humidity\")\n",
+ "phi2=0.85;\n",
+ "print(\"phi2=Pv2/Pv_sat_35oc\")\n",
+ "print(\"here Pv_sat_35oc=0.005628 bar\")\n",
+ "Pv_sat_35oc=0.005628;\n",
+ "print(\"so Pv2=phi2*Pv_sat_35oc in bar\")\n",
+ "Pv2=phi2*Pv_sat_35oc\n",
+ "omega2=0.622*Pv2/(P-Pv2)\n",
+ "print(\"specific humidity,omega2 in kg/kg of air=\"),round(omega2,5)\n",
+ "print(\"corresponding to vapour pressure of 0.004784 bar the dew point temperature is 32 degree celcius\")\n",
+ "Tdp2=32.;\n",
+ "print(\"so,enthalpy of second stream,\")\n",
+ "print(\"h2=Cp_air*T2+omega2*{hg+Cp_stream*(T2-Tdp2)}in KJ/kg of dry air\")\n",
+ "hg=2559.9;#enthalpy at 32 degree celcius in KJ/kg\n",
+ "h2=Cp_air*T2+omega2*(hg+Cp_stream*(T2-Tdp2))\n",
+ "print(\"enthalpy of mixture after adiabatic mixing,\")\n",
+ "print(\"=(1/(m1+m2))*((h1*m1/(1+omega1))+(h2*m2/(1+omega2))) in KJ/kg of moist air\")\n",
+ "(1./(m1+m2))*((h1*m1/(1+omega1))+(h2*m2/(1+omega2)))\n",
+ "print(\"mass of vapour per kg of moist air=(1/5)*((omega1*m1/(1+omega1))+(omega2*m2/(1+omega2)))in kg/kg of moist air\")\n",
+ "(1./5.)*((omega1*m1/(1+omega1))+(omega2*m2/(1+omega2)))\n",
+ "omega=0.00589/(1-0.005893)\n",
+ "print(\"specific humidity of mixture(omega)in kg/kg of dry air=\"),round(omega,5)\n",
+ "print(\"omega=0.622*Pv/(P-Pv)\")\n",
+ "Pv=omega*P/(omega+0.622)\n",
+ "print(\"Pv in bar=\"),round(Pv,5)\n",
+ "print(\"partial pressure of water vapour=0.00957 bar\")\n",
+ "print(\"so specific humidity of mixture=0.00593 kg/kg dry air\")\n",
+ "print(\"and partial pressure of water vapour in mixture=0.00957 bar\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.16;pg no: 452"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.16, Page:452 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 16\n",
+ "The type of heating involved is sensible heating.Locating satte 1 on psychrometric chart corresponding to 15 degree celcius dbt and 80% relative humidity the other property values shall be,\n",
+ "h1=36.4 KJ/kg,omega1=0.0086 kg/kg of air,v1=0.825 m^3/kg\n",
+ "final state 2 has,h2=52 KJ/kg\n",
+ "mass of air(m)=m1/v1 in kg/s\n",
+ "amount of heat added(Q)in KJ/s\n",
+ "Q=m*(h2-h1) 56.78\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of amount of heat added\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.16, Page:452 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 16\")\n",
+ "m1=3;#rate at which moist air enter in heating coil in m^3/s\n",
+ "print(\"The type of heating involved is sensible heating.Locating satte 1 on psychrometric chart corresponding to 15 degree celcius dbt and 80% relative humidity the other property values shall be,\")\n",
+ "print(\"h1=36.4 KJ/kg,omega1=0.0086 kg/kg of air,v1=0.825 m^3/kg\")\n",
+ "h1=36.4;\n",
+ "omega1=0.0086;\n",
+ "v1=0.825;\n",
+ "print(\"final state 2 has,h2=52 KJ/kg\")\n",
+ "h2=52;\n",
+ "print(\"mass of air(m)=m1/v1 in kg/s\")\n",
+ "m=m1/v1\n",
+ "m=3.64;#approx.\n",
+ "print(\"amount of heat added(Q)in KJ/s\")\n",
+ "Q=m*(h2-h1)\n",
+ "print(\"Q=m*(h2-h1)\"),round(Q,2)"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
|