{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 5: Gases" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.10: Computation_of_Molar_Mass.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Computation of Molar Mass\n", "\n", "clear;\n", "clc;\n", "\n", "printf('\t Example 5.10\n');\n", "\n", "percentSi=33;//percent of Si in compound\n", "percentF=67;//percent of F in compound\n", "nSi=percentSi/28.01;//moles of Si in 100g compound\n", "nF=percentF/19;//moles of F in 100g compound\n", "\n", "P=1.7;//pressure, atm\n", "T=35+273;//temp. in K\n", "m=2.38;//mass, g\n", "V=0.21;//volume, L\n", "R=0.0821;//universal Gas constant, L.atm/K.mol\n", "n=P*V/(R*T);//moles\n", "M=m/n;//mol. mass=mass/moles, g/mol\n", "\n", "printf('\t the molecular mass of given compound is : %4.0f g/mol\n',M);\n", "\n", "\n", "//End" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.11: Gas_Stoichiometry.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Gas Stoichiometry\n", "\n", "clear;\n", "clc;\n", "\n", "printf('\t Example 5.11\n');\n", "\n", "VC2H2=7.64;//volume of acetylene, L\n", "VO2=VC2H2*5/2;//volume of O2 required for complete combustion as 5mol O2 react with 2mol acetylene for complete combustion\n", "\n", "printf('\t the volume of O2 required for complete combustion of acetylene is : %4.1f L\n',VO2);\n", "\n", "\n", "//End" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.12: Gas_Stoichiometry.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Gas Stoichiometry\n", "\n", "clear;\n", "clc;\n", "\n", "printf('\t Example 5.12\n');\n", "\n", "R=0.0821;//universal Gas constant, L.atm/K.mol\n", "T=80+273;//temp in K\n", "P=823/760;//pressure in atm\n", "m=60;//mass of NaN3, g\n", "NaN3=65.02;//mol. mass of NaN3, g\n", "nN2=m*3/(2*NaN3);//moles of N2\n", "VN2=nN2*R*T/P;//from ideal gas law\n", "\n", "printf('\t the volume of N2 generated is : %4.1f L\n',VN2);\n", "\n", "\n", "//End" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.13: Gas_Stoichiometry.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Gas Stoichiometry\n", "\n", "clear;\n", "clc;\n", "\n", "printf('\t Example 5.13\n');\n", "\n", "R=0.0821;//universal Gas constant, L.atm/K.mol\n", "T=312;//temp in K\n", "V=2.4*10^5;//volume, L\n", "P1=7.9*10^-3;//pressure initial in atm\n", "P2=1.2*10^-4;//pressure final in atm\n", "Pdrop=P1-P2;//pressure drop, atm\n", "n=Pdrop*V/(R*T);//moles of Co2 reacted\n", "Li2CO3=73.89;//mol. mass of Li2CO3, g\n", "mLi2CO3=n*Li2CO3;//mass of Li2CO3, g\n", "\n", "printf('\t the mass of Li2CO3 formed is : %4.1f *10^3 g\n',mLi2CO3*10^-3);\n", "\n", "\n", "//End" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.14: Daltons_Law_of_Partial_Pressures.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Dalton's Law of Partial Pressures\n", "\n", "clear;\n", "clc;\n", "\n", "printf('\t Example 5.14\n');\n", "\n", "nNe=4.46;//moles of Ne\n", "nXe=2.15;//moles of Xe\n", "nAr=0.74;//moles of Ar\n", "PT=2;//total pressure in atm\n", "XNe=nNe/(nNe+nAr+nXe);//mole fraction of Ne\n", "XAr=nAr/(nNe+nAr+nXe);//mole fraction of Ar\n", "XXe=nXe/(nNe+nAr+nXe);//mole fraction of Xe\n", "PNe=XNe*PT;//partial pressure of Ne\n", "PAr=XAr*PT;//partial pressure of Ar\n", "PXe=XXe*PT;//partial pressure of Xe\n", "\n", "printf('\t the partial pressures of Ne, Ar and Xe are : %4.2f atm, %4.2f atm and %4.3f atm respectively\n',PNe,PAr,PXe);\n", "\n", "\n", "//End" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.15: Daltons_Law_of_Partial_Pressures.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Dalton's Law of Partial Pressures\n", "\n", "clear;\n", "clc;\n", "\n", "printf('\t Example 5.15\n');\n", "\n", "PT=762;//pressure total, mmHg\n", "PH2O=22.4;//pressure of water vapor, mmHg\n", "PO2=PT-PH2O;//pressure of O2, frm Dalton's law, mmHg\n", "M=32;//mol mass of O2, g\n", "R=0.0821;//universal Gas constant, L.atm/K.mol\n", "T=24+273;//temp in K\n", "V=0.128;//volume in L\n", "m=(PO2/760)*V*M/(R*T);//mass of mass of O2 collected, g\n", "\n", "printf('\t the mass of O2 collected is : %4.3f g\n',m);\n", "\n", "\n", "//End" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.16: Root_Mean_Square_velocity.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Root Mean Square velocity\n", "\n", "clear;\n", "clc;\n", "\n", "printf('\t Example 5.16\n');\n", "\n", "R=8.314;//universal Gas constant, J/K mol\n", "T=25+273;//temp in K\n", "\n", "//for O2\n", "M=4.003*10^-3;//mol mass in kg\n", "Urms=sqrt(3*R*T/M);//rms velocity, m/s\n", "\n", "printf('\t the rms velocity of O2 collected is : %4.2f *10^3 m/s\n',Urms*10^-3);\n", "\n", "//for N2\n", "M=28.02*10^-3;//mol mass in kg\n", "Urms=sqrt(3*R*T/M);//rms velocity, m/s\n", "\n", "printf('\t the rms velocity of N2 collected is : %4.0f m/s\n',Urms);\n", "\n", "//End" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.17: Gas_Effusio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Gas Effusion\n", "\n", "clear;\n", "clc;\n", "\n", "printf('\t Example 5.17\n');\n", "\n", "t2=1.5;//diffusion time of compound, min\n", "t1=4.73;//diffusion time of Br, min\n", "M2=159.8;//mol mass of Br gas, g\n", "M=(t2/t1)^2*M2;//molar gas of unknown gas, g(from Graham's Law of Diffusion)\n", "\n", "printf('\t the molar mass of unknown gas is : %4.1f g/mol\n',M);\n", "\n", "//End" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.18: deviation_from_ideal_behaviour.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//deviation from ideal behaviour\n", "\n", "clear;\n", "clc;\n", "\n", "printf('\t Example 5.18\n');\n", "\n", "//(a)\n", "V=5.2;//volume, L\n", "T=47+273;\n", "n=3.5;\n", "R=0.0821;//universal Gas constant, L.atm/K.mol\n", "P=n*R*T/V;\n", "\n", "printf('\t the pressure of NH3 gas from ideal gas equation is : %4.1f atm\n',P);\n", "\n", "//(b)\n", "a=4.17;//constant, atm.L2/mol2\n", "b=0.0371;//constant, L/mol\n", "Pc=a*n^2/V^2;//pressure correction term, atm\n", "Vc=n*b;//volume correction term, L\n", "P=n*R*T/(V-Vc)-Pc;//from van der waals equation, pressure, atm\n", "\n", "printf('\t the pressure of NH3 gas from van der waals equation is : %4.1f atm\n',P);\n", "\n", "//End" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.1: Pressure_Units.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Pressure Units\n", "\n", "clear;\n", "clc;\n", "\n", "printf('\t Example 5.1\n');\n", "\n", "Pbaro=688;//pressure in mm Hg\n", "Patm=Pbaro/760;//pressure in atm\n", "\n", "printf('\t the presuure in atmospheres is : %4.3f atm\n',Patm);\n", "\n", "//End" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.2: Pressure_Units.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Pressure Units\n", "\n", "clear;\n", "clc;\n", "\n", "printf('\t Example 5.2\n');\n", "\n", "Pbaro=732;//pressure in mm Hg\n", "Patm=Pbaro/760;//pressure in atm\n", "P=Patm*1.01325*10^2;//pressure in kilo Pascal\n", "\n", "printf('\t the presuure in kilo pascals is : %4.1f kPa\n',P);\n", "\n", "//End" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.3: Ideal_Gas_Equatio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Ideal Gas Equation\n", "\n", "clear;\n", "clc;\n", "\n", "printf('\t Example 5.3\n');\n", "\n", "V=5.43;//volume, L\n", "t=69.5;//temperature, C\n", "T=t+273;//temperature, K\n", "n=1.82;//moles\n", "R=0.0821;//universal gas constant, L.atm/(K.mol)\n", "P=n*R*T/V;//pressure, atm\n", "\n", "printf('\t the presuure in atmospheres is : %4.2f atm\n',P);\n", "\n", "//End" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.4: Ideal_Gas_Equatio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Ideal Gas Equation\n", "\n", "clear;\n", "clc;\n", "\n", "printf('\t Example 5.4\n');\n", "\n", "m=7.4;//mass of NH3, g\n", "\n", "//at STP for NH3 for 1mole of NH3\n", "V1=22.41;// volume, L\n", "NH3=17.03;//molar mass of NH3, g\n", "\n", "n=m/NH3;//moles of NH3\n", "V=n*V1;//volume, L\n", "\n", "printf('\t the volume of NH3 under given conditions is : %4.2f L\n',V);\n", "\n", "//End" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.5: Ideal_Gas_Equatio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Ideal Gas Equation\n", "\n", "clear;\n", "clc;\n", "\n", "printf('\t Example 5.5\n');\n", "\n", "V1=0.55;//volume, L\n", "P1=1;//pressure at sea level, atm\n", "P2=0.4;//pressurea at 6.5km height, atm\n", "\n", "//n1=n2 and T1=T2 given hence P1V1=P2V2\n", "\n", "V2=P1*V1/P2;\n", "\n", "printf('\t the volume of He balloon at height 6.5km above sea level is : %4.1f L\n',V2);\n", "\n", "//End" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.6: Ideal_Gas_Equatio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Ideal Gas Equation\n", "\n", "clear;\n", "clc;\n", "\n", "printf('\t Example 5.6\n');\n", "\n", "P1=1.2;// pressure initial, atm\n", "T1=18+273;//temperature initial, K\n", "T2=85+273;//temperature final, K\n", "//volume is constant\n", "\n", "P2=P1*T2/T1;// pressure final,atm\n", "\n", "printf('\t the final pressure is : %4.2f atm\n',P2);\n", "\n", "//End" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.7: Ideal_Gas_Equatio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Ideal Gas Equation\n", "\n", "clear;\n", "clc;\n", "\n", "printf('\t Example 5.7\n');\n", "\n", "P1=6.4;// pressure initial, atm\n", "P2=1.0;// pressure final, atm\n", "T1=8+273;//temperature initial, K\n", "T2=25+273;//temperature final, K\n", "V1=2.1;//volume initial, mL\n", "\n", "V2=P1*V1*T2/(T1*P2);// volume final, mL\n", "\n", "printf('\t the final volume is : %4.0f mL\n',V2);\n", "\n", "//End" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.8: Density_Calulations.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Density Calulations\n", "\n", "clear;\n", "clc;\n", "\n", "printf('\t Example 5.8\n');\n", "\n", "//taking 1 mole of CO2\n", "n=1;\n", "R=0.0821;//universal gas constant, L. atm/K.mol\n", "t=55;//temperature, C\n", "T=t+273;//temperature, K\n", "P=0.99;//.pressure, atm\n", "M=44.01;//molar mass of CO2, g\n", "d1=P*M/(R*T);//density of CO2, g/L\n", "\n", "printf('\t the density of CO2 is : %4.2f g/L\n',d1);\n", "\n", "//altenate method\n", "//taking 1 mole of CO2\n", "mass=M;//mass of CO2 in g =mol mass since we are considering 1 mole of CO2\n", "V=n*R*T/P;//volume, L\n", "d2=mass/V;//density=mass/volume, g/L\n", "\n", "\n", "printf('\t (Alternate Method)the density of CO2 is : %4.2f g/L\n',d2);\n", "\n", "//End" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.9: Computation_of_Molar_Mass_of_Gaseous_substance.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Computation of Molar Mass of Gaseous substance\n", "\n", "clear;\n", "clc;\n", "\n", "printf('\t Example 5.9\n');\n", "\n", "d=7.71;// density, g/mL(given)\n", "R=0.0821;//universal gas constant, L. atm/K.mol\n", "T=36+273;// temp, K\n", "P=2.88;//pressure, atm\n", "M1=d*R*T/P;// mol. mass, g/mol\n", "printf('\t the molecular mass of given compound is : %4.1f g/mol\n',M1);\n", "\n", "//alternate method\n", "//considering 1 L of compound\n", "V=1;//volume, L\n", "n=P*V/(R*T);//no of moles\n", "m=7.71;//mass per 1 L, g\n", "M2=m/n;// mol. mass, g/mol\n", "\n", "printf('\t {alternate method} the molecular mass of given compound is : %4.1f g/mol\n',M2);\n", "printf('\t the molecular formula can be only found by trial and error method as given in the book \n');\n", "//End" ] } ], "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 }