From 92cca121f959c6616e3da431c1e2d23c4fa5e886 Mon Sep 17 00:00:00 2001 From: hardythe1 Date: Tue, 7 Apr 2015 15:58:05 +0530 Subject: added books --- Fundamentals_Of_Thermodynamics/Chapter14.ipynb | 295 +++++++++++++++++++++++++ 1 file changed, 295 insertions(+) create mode 100755 Fundamentals_Of_Thermodynamics/Chapter14.ipynb (limited to 'Fundamentals_Of_Thermodynamics/Chapter14.ipynb') diff --git a/Fundamentals_Of_Thermodynamics/Chapter14.ipynb b/Fundamentals_Of_Thermodynamics/Chapter14.ipynb new file mode 100755 index 00000000..6654362c --- /dev/null +++ b/Fundamentals_Of_Thermodynamics/Chapter14.ipynb @@ -0,0 +1,295 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b6f84d510db3595ba71244d9d44f7e9987d44c62ba0d0520a72da2384551019e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter14:THERMODYNAMIC RELATIONS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex14.1:Pg-567" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques1\n", + "#to determine the sublimation pressure of water\n", + "import math\n", + "#from table in appendix B.1.5\n", + "T1=213.2;#K, Temperature at state 1\n", + "P2=0.0129;#kPa, pressure at state 2\n", + "T2=233.2;#K, Temperature at state 2\n", + "hig=2838.9;#kJ/kg, enthalpy of sublimation \n", + "R=.46152;#Gas constant \n", + "#using relation log(P2/P1)=(hig/R)*(1/T1-1/T2) \n", + "P1=P2*math.exp(-hig/R*(1/T1-1/T2));\n", + "print\" Sublimation Pressure \",round(P1,5),\"kPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Sublimation Pressure 0.00109 kPa\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex14.4:Pg-579" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques4\n", + "#Volume expansivity, Isothermal and Adiabatic compressibility\n", + "\n", + "#known data\n", + "ap=5*10**-5;#K^-1 Volume expansivity\n", + "bt=8.6*10**-12;#m^2/N, Isothermal compressibility\n", + "v=0.000114;#m^3/kg, specific volume\n", + "P2=100*10**6;#pressure at state 2 in kPa\n", + "P1=100;#pressure at state 1 in kPa\n", + "w=-v*bt*(P2**2-P1**2)/2;#work done in J/kg\n", + "#q=T*ds and ds=-v*ap*(P2-P1)\n", + "#so q=-T*v*ap*(P2-P1)\n", + "T=288.2;#Temperature in K\n", + "q=-T*v*ap*(P2-P1);#heat in J/kg\n", + "du=q-w;#change in internal energy in J/kg\n", + "print\" Change in internal energy =\",round(du,3),\"J/kg\"\n", + "\n", + "#the answer is correct within given limts\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Change in internal energy = -159.372 J/kg\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex14.5:Pg-586" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques5\n", + "#adiabatic steady state processes\n", + "\n", + "#from table A.2\n", + "P1=20;#pressure at state 1 in MPa\n", + "P2=2;#pressure at state 2 in MPa\n", + "T1=203.2;#Temperature at state 1 in K\n", + "Pr1=P1/3.39;#Reduced pressure at state 1\n", + "Pr2=P2/3.39;#Reduced pressure at state 2\n", + "Tr1=T1/126.2;#Reduced temperature\n", + "#from compressibility chart h1*-h1=2.1*R*Tc\n", + "#from zero pressure specific heat data h1*-h2*=Cp*(T1a-T2a)\n", + "#h2*-h2=0.5*R*Tc\n", + "#this gives dh=h1-h2=-2.1*R*Tc+Cp*(T1a-T2a)+0.5*R*Tc\n", + "R=0.2968;#gas constant for given substance\n", + "Tc=126.2;#K, Constant temperature\n", + "Cp=1.0416;#heat enthalpy at constant pressure in kJ/kg\n", + "T2=146;#temperature at state 2\n", + "dh=-1.6*R*Tc+Cp*(T1-T2);#\n", + "print\" Enthalpy change =\",round(dh,3),\"kJ/kg \\n\"\n", + "print\" Since Enthalpy change is nearly \",-round(dh),\"kJ/kg so Temperature =\",round(T2,3),\"K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enthalpy change = -0.35 kJ/kg \n", + "\n", + " Since Enthalpy change is nearly 0.0 kJ/kg so Temperature = 146.0 K\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex14.6:Pg-589" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques6\n", + "#isothermal steady state processes\n", + "import math\n", + "#from table A.2\n", + "P1=8;#pressure at state 1 in MPa\n", + "P2=0.5;#pressure at state 2 in MPa\n", + "T1=150.0;#Temperature at state 1 in K\n", + "Pr1=P1/3.39;#Reduced pressure at state 1\n", + "Pr2=P2/3.39;#Reduced pressure at state 2\n", + "Tr1=T1/126.2;#Reduced temperature\n", + "T2=125.0;#temperature at state 2\n", + "#from compressibility chart h1*-h1=2.1*R*Tc\n", + "#from zero pressure specific heat data h1*-h2*=Cp*(T1a-T2a)\n", + "#h2*-h2=0.5*R*Tc\n", + "#this gives dh=h1-h2=-2.1*R*Tc+Cp*(T1a-T2a)+0.15*R*Tc\n", + "R=0.2968;#gas constant for given substance\n", + "Tc=126.2;#K, Constant temperature\n", + "Cp=1.0416;#heat enthalpy at constant pressure in kJ/kg\n", + "dh=(2.35)*R*Tc+Cp*(T2-T1);#\n", + "print\" Enthalpy change =\",round(dh),\"kJ/kg\"\n", + "#change in entropy \n", + "#ds= -(s2*-s2)+(s2*-s1*)+(s1*-s1)\n", + "#s1*-s1=1.6*R\n", + "#s2*-s2=0.1*R\n", + "#s2*-s1*=Cp*log(T2/T1)-R*log(P2/P1)\n", + "#so\n", + "ds=1.6*R-0.1*R+Cp*math.log(T2/T1)-R*math.log(P2/P1);\n", + "print\" Entropy Change =\",round(ds,3),\"kJ/kg.K \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Enthalpy change = 62.0 kJ/kg\n", + " Entropy Change = 1.078 kJ/kg.K \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex14.7:Pg-596" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#ques7\n", + "#percent deviation using specific volume calculated by kays rule and vander waals rule\n", + "import math\n", + "\n", + "#a-denotes C02\n", + "#b-denotes CH4\n", + "T=310.94;#Temperature of mixture K\n", + "P=86.19;#Pressure of mixture in MPa\n", + "#Tc- critical Temperature\n", + "#Pc-critical pressure\n", + "Tca=304.1;#K\n", + "Tcb=190.4;#K\n", + "Pca=7.38;#MPa\n", + "Pcb=4.60;#MPa\n", + "Ra=0.1889;#gas constant for a in kJ/kg.K\n", + "Rb=0.5183;#gas constant for b in kJ/kg.K\n", + "xa=0.8;#fraction of CO2\n", + "xb=0.2;#fraction of CH4\n", + "Rm=xa*Ra+xb*Rb;#mean gas constant in kJ/kg.K\n", + "Ma=44.01;#molecular mass of a\n", + "Mb=16.043;#molecular mass of b\n", + "#1.Kay's rule\n", + "ya=xa/Ma/(xa/Ma+xb/Mb);#mole fraction of a\n", + "yb=xb/Mb/(xa/Ma+xb/Mb);#mole fraction of b\n", + "Tcm=ya*Tca+yb*Tcb;#mean critical temp in K\n", + "Pcm=ya*Pca+yb*Tcb;#mean critical pressure n MPa\n", + "#therefore pseudo reduced property of mixture\n", + "Trm=T/Tcm;\n", + "Prm=P/Pcm;\n", + "Zm=0.7;#Compressiblity from generalised compressibility chart\n", + "vc=Zm*Rm*T/P/1000;#specific volume calculated in m^3/kg\n", + "ve=0.0006757;#experimental specific volume in m^3/kg\n", + "pd1=(ve-vc)/ve*100;#percent deviation\n", + "print\" Percentage deviation in specific volume using Kays rule =\",round(pd1,1),\"percent \\n\"\n", + "\n", + "#2. using vander waals equation\n", + "#values of vander waals constant\n", + "Aa=27*(Ra**2)*(Tca**2)/(64*Pca*1000);\n", + "Ba=Ra*Tca/(8*Pca*1000);\n", + "Ab=27*(Rb**2)*(Tcb**2)/(64*Pcb*1000);\n", + "Bb=Rb*Tcb/(8*Pcb*1000);\n", + "#mean vander waals constant\n", + "Am=(xa*math.sqrt(Aa)+xb*math.sqrt(Ab))**2;\n", + "Bm=(xa*Ba+xb*Bb);\n", + "#using vander waals equation we get cubic equation \n", + "#solving we get\n", + "vc=0.0006326;#calculated specific volume in m^3/kg\n", + "pd2=((ve-vc)/ve)*100;\n", + "print\" Percentage deviation in specific volume using vander waals eqn =\",round(pd2,1),\"percent\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Percentage deviation in specific volume using Kays rule = 4.8 percent \n", + "\n", + " Percentage deviation in specific volume using vander waals eqn = 6.4 percent\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file -- cgit