diff options
author | Prashant S | 2020-04-14 10:25:32 +0530 |
---|---|---|
committer | GitHub | 2020-04-14 10:25:32 +0530 |
commit | 06b09e7d29d252fb2f5a056eeb8bd1264ff6a333 (patch) | |
tree | 2b1df110e24ff0174830d7f825f43ff1c134d1af /Thermodynamics_Demystified_by_M_C_Potter/2-Properties_of_Pure_Substances.ipynb | |
parent | abb52650288b08a680335531742a7126ad0fb846 (diff) | |
parent | 476705d693c7122d34f9b049fa79b935405c9b49 (diff) | |
download | all-scilab-tbc-books-ipynb-master.tar.gz all-scilab-tbc-books-ipynb-master.tar.bz2 all-scilab-tbc-books-ipynb-master.zip |
Initial commit
Diffstat (limited to 'Thermodynamics_Demystified_by_M_C_Potter/2-Properties_of_Pure_Substances.ipynb')
-rw-r--r-- | Thermodynamics_Demystified_by_M_C_Potter/2-Properties_of_Pure_Substances.ipynb | 267 |
1 files changed, 267 insertions, 0 deletions
diff --git a/Thermodynamics_Demystified_by_M_C_Potter/2-Properties_of_Pure_Substances.ipynb b/Thermodynamics_Demystified_by_M_C_Potter/2-Properties_of_Pure_Substances.ipynb new file mode 100644 index 0000000..d26df2c --- /dev/null +++ b/Thermodynamics_Demystified_by_M_C_Potter/2-Properties_of_Pure_Substances.ipynb @@ -0,0 +1,267 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: Properties of Pure Substances" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1: saturated_water_is_vaporized.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//solution\n", +"// initialization of variables\n", +"m=10; // mass of saturated water in kg\n", +" // All the necessary values are taken from table C.2\n", +" // part (a)\n", +" \n", +"P=0.001; // Pressure in MPa\n", +"vf=0.001; // specific volume of saturated liquid at 0.001 Mpa in Kg/m^3\n", +"vg=129.2;// specific volume of saturated vapour at 0.001 Mpa in Kg/m^3\n", +"deltaV=m*(vg-vf)//properties of pure substance \n", +"printf('The Volume change at pressure '+string(P)+' MPa is %.0f m^3 \n',deltaV)\n", +"\n", +"// part (b) \n", +"P=0.26; // Pressure in MPa\n", +"vf=0.0011; // specific volume of saturated liquid at 0.26 MPa( it is same from at 0.2 and 0.3 MPa upto 4 decimals)\n", +"vg=(P-0.2)*(0.6058-0.8857)/(0.3-0.2)+0.8857; // specific volume of saturated vapour by interpolation of Values at 0.2 MPa and 0.3 MPa\n", +"deltaV=m*(vg-vf)\n", +"printf(' The Volume change at pressure '+string(P)+' MPa is %.2f m^3 \n',deltaV)\n", +"\n", +"// part (c) \n", +"P=10; // Pressure in MPa\n", +"vf=0.00145; // specific volume of saturated liquid at 10 MPa\n", +"vg=0.01803; //specific volume of saturated vapour at 10 MPa\n", +"deltaV=m*(vg-vf)\n", +"printf(' The Volume change at pressure '+string(P)+' MPa is %.4f m^3',deltaV)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2: volume_of_vapour.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//solution\n", +"// initialization of variables\n", +"m=4// mass of water in kg\n", +"V=1 // volume in m^3\n", +"T=150 // temperature of water in degree centigrade\n", +"\n", +"// TABLE C.1 is used for values in wet region\n", +"// Part (a)\n", +"P=475.8// pressure in KPa in wet region at temperature of 150 *C\n", +"printf('The pressure is %.1f kPa \n',P)\n", +"\n", +"// Part (b)\n", +"// first we determine the dryness fraction\n", +"v=V/m// specific volume of water\n", +"vg=0.3928 // specific volume of saturated vapour @150 degree celsius\n", +"vf=0.00109 // specific volume of saturated liquid @150 degree celsius\n", +"x=(v-vf)/(vg-vf); //dryness fraction\n", +"mg=m*x; // mass of vapour\n", +"printf(' The mass of vapour present is %.3f kg \n',mg)\n", +"\n", +"// Part(c) \n", +"Vg=mg*vg;// volume of vapour\n", +"printf(' The volume of vapour is %.3f m^3',Vg)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3: the_final_volume_of_mixture.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//solution\n", +"// initialization of variables\n", +"m=2 // mass of water in kg\n", +"P=220 // pressure in KPa\n", +"x=0.8 // quality of steam\n", +"// Table C.2 is used for values\n", +"vg=(P-200)*(0.6058-0.8857)/(300-200)+0.8857 // specific volume of saturated vapour @ given pressure by interpolating\n", +"vf=0.0011 // specific volume of saturated liquid @ 220 KPa\n", +"v=vf+x*(vg-vf)// property of pure substance\n", +"V=m*v // total volume\n", +"printf('The Total volume of the mixture is '+string(V)+' m^3')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4: constant_pressure_cylinder.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//solution\n", +"// initialization of variables\n", +"m=2 // mass of water in kg\n", +"P=2.2 // pressure in Mpa\n", +"T=800 // temperature in degree centigrade\n", +" // Table C.3 is used for values\n", +"v=0.2467+(P-2)*(0.1972-0.2467)/(2.5-2)// specific volue by interpolatin between 2 and 2.5 MPa\n", +"V=m*v // final volume\n", +"printf('The Final Volume is %.3f m^3',V)\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5: mass_of_air_in_the_tire.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//solution\n", +"// initialization of variables\n", +"V=0.6 // volume of tyre in m^3\n", +"Pgauge=200 // gauge pressure in KPa\n", +"T=20+273 // temperature converted to kelvin\n", +"Patm=100 // atmospheric pressure in KPa\n", +"R=287 // gas constant in Nm/kg.K\n", +"Pabs=(Pgauge+Patm)*1000 // calculating absolute pressue in Pa \n", +"\n", +"m=Pabs*V/(R*T)// mass from ideal gas equation\n", +"printf('The Mass of air is %.2f Kg',m)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.6: the_van_der_Waals_equation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//solution\n", +"// initialization of variables\n", +"T=500+273 // temperature of steam in kelvin\n", +"rho=24 // density in Kg/m^3\n", +"R=0.462 // gas constant from Table B.2\n", +"v=1/rho // specific volume and density relation\n", +"// PART (a)\n", +"P=rho*R*T // from Ideal gas equation\n", +"printf('PART (a) The Pressure is '+string(P)+' KPa \n')\n", +"// answer is approximated in textbook\n", +"\n", +"// PART (b)\n", +"a=1.703 // van der Waal's constant a value from Table B.7\n", +"b=0.00169 // van der Waal's constant b value from Table B.7\n", +"P=(R*T/(v-b))-(a/v**2) // Pressure from van der Waal's equation\n", +"printf(' PART (b) The Pressure is '+string(P)+' KPa \n')\n", +"// answer is approximated in textbook\n", +"\n", +"// PART (c)\n", +"a=43.9 // van der Waal's constant a value from Table B.7\n", +"b=0.00117 // van der Waal's constant b value from Table B.7\n", +"\n", +"P=(R*T/(v-b))-(a/(v*(v+b)*sqrt(T)))// Redlich-Kwong equation\n", +"printf(' PART (c) The Pressure is '+string(P)+' KPa \n')\n", +"// answer is approximated in textbook\n", +"\n", +"// PART (d)\n", +"Tcr=947.4 // compressibilty temperature from table B.3\n", +"Pcr=22100 // compressibility pressure from table B.3\n", +"\n", +"TR=T/Tcr // reduced temperature\n", +"PR=P/Pcr // reduced pressure\n", +"Z=0.93 // from compressiblility chart\n", +"P=Z*R*T/v // Pressure in KPa\n", +"printf(' PART (d) The Pressure is '+string(P)+' KPa \n')\n", +"// answer is approximated in textbook\n", +"\n", +"// PART (e)\n", +"P=8000 // pressure from steam table @ 500*c and v= 0.0417 m^3\n", +"printf(' PART (e) The Pressure is '+string(P)+' KPa \n')\n", +"// answer is approximated in textbook" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |