diff options
Diffstat (limited to 'Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty')
11 files changed, 7503 insertions, 0 deletions
diff --git a/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/10-Material_Balance_with_Chemical_Reaction.ipynb b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/10-Material_Balance_with_Chemical_Reaction.ipynb new file mode 100644 index 0000000..72e6bfb --- /dev/null +++ b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/10-Material_Balance_with_Chemical_Reaction.ipynb @@ -0,0 +1,1094 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10: Material Balance with Chemical Reaction" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.10: Burning_of_limestone_mixed_with_coke.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"mlime = 5;//kg\n", +"mcoke = 1;//kg\n", +"PCaCO3l = 84.5;//%\n", +"PMgCO3l = 11.5;//%\n", +"NCaCO3l = PCaCO3l * mlime / (100.09*100);\n", +"NMgCO3l = PMgCO3l * mlime / (84.312*100);\n", +"mInertsl = mlime * ( 100 - PCaCO3l - PMgCO3l ) / 100;\n", +"PCc = 76;//%\n", +"Pashc = 21;//%\n", +"Pwaterc = 3;//%\n", +"NCc = mcoke * PCc /(100*12);\n", +"Nwaterc = mcoke * Pwaterc / ( 100 * 18.016 );\n", +"mash = Pashc * mcoke / 100;\n", +"//CaCO3 + C + O2 = CaO + 2CO2\n", +"//MgCO3 + C + O2 = MgO + 2CO2\n", +"PCaCO3conv = 95;//(Percent calcination of CaCO3)\n", +"PMgCO3conv = 90;//(Percent calcination of MgCO3)\n", +"NCaO = PCaCO3conv * NCaCO3l / 100;\n", +"mCaO = NCaO * 56.08;\n", +"NMgO = PMgCO3conv * NMgCO3l / 100;\n", +"mMgO = NMgO * 40.312;\n", +"mCaCO3 = (NCaCO3l * (1-PCaCO3conv/100)*100.09);\n", +"mMgCO3 = (NMgCO3l * (1-PMgCO3conv/100)*84.312);\n", +"mtotal = mCaO + mMgO + mCaCO3 + mMgCO3 + mInertsl + mash;\n", +"PCaO = mCaO * 100 / mtotal;\n", +"disp('%',PCaO,'The weight percent of CaO in the product leaving the kiln = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.11: treating_limestone_with_aqueous_H2SO4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"R = 100;//kg ( basis - residue )\n", +"MCaSO4 = 136.144;\n", +"MMgSO4 = 120.376;\n", +"mCaSO4r = 9;//kg\n", +"mMgSO4r = 5;//kg\n", +"mH2SO4r = 1.2;//kg\n", +"minertr = 0.5;//kg\n", +"mCO2r = 0.2;//kg\n", +"mH2O = 84.10;//kg\n", +"NCaSO4 = mCaSO4r / MCaSO4;\n", +"NMgSO4 = mMgSO4r / MMgSO4;\n", +"//CaCO3 + H2SO4 = CaSO4 + H2O + CO2\n", +"//MgSO4 + H2SO4 = MgSO4 + H2O + CO2\n", +"mCaCO3 = NCaSO4 * 100.08;\n", +"mMgCO3 = NMgSO4 * 84.312;\n", +"mtotallime = minertr + mCaCO3 + mMgCO3;\n", +"PCaCO3 = mCaCO3 * 100/ mtotallime;\n", +"PMgCO3 = mMgCO3 *100/ mtotallime;\n", +"Pinerts = minertr *100/ mtotallime;\n", +"disp('%',PCaCO3,'(a)Percentage of CaCO3 in limestone = ')\n", +"disp('%',PMgCO3,' Percentage of MgCO3 in limestone = ')\n", +"disp('%',Pinerts,' Percentage of inerts in limestone = ')\n", +"NH2SO4 = NCaSO4 + NMgSO4;\n", +"mH2SO4 = NH2SO4 * 98.08;\n", +"Pexcess = mH2SO4r * 100 / ( mH2SO4);\n", +"disp('%',Pexcess,'(b)The percentage excess of acid used = ')\n", +"macidt = mH2SO4 + mH2SO4r;\n", +"Pacidic = 12;//%\n", +"mwaterin = macidt * (100 - Pacidic)/ Pacidic;\n", +"mwaterr = (NCaSO4 + NMgSO4)*18.016;\n", +"mwatert = mwaterin + mwaterr;\n", +"mvaporized = mwatert - mH2O;\n", +"m = mvaporized * 100/mtotallime;//water vaporized per 100kg of limestone\n", +"disp('kg',m,'(c)the mass of water vaporized per 100kg of limestone = ')\n", +"mCO2pr = (NCaSO4 + NMgSO4)*44;\n", +"mCO2rel = mCO2pr - mCO2r;\n", +"m1 = mCO2rel * 100 / mtotallime;//CO2 per 100kg of limestone\n", +"disp('kg',m1,'(d)the mass of CO2 per 100kg of limestone = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.12: Production_of_TSP.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"macid = 1000;//kg ( basis - dilute phosphoric acid )\n", +"Mphacid = 97.998;\n", +"P = 1.25;//% ( dilute % )\n", +"mphacid = macid * P /100;\n", +"Nphacid = mphacid / Mphacid;\n", +"//1mole of phosphoric acid - 1mole of trisodium phosphate\n", +"NTSP = Nphacid;\n", +"MTSP = 380.166;\n", +"mTSP = NTSP * MTSP;\n", +"disp('kg',mTSP,'(a)Maximum weight of TSP obtained = ')\n", +"NCO2 = NTSP;\n", +"Pwater = 6.27//kPa\n", +"//since gas is saturated with water vapour, vapour pressure = partial pressure\n", +"Nwater = NCO2 * Pwater / ( 100 - Pwater );\n", +"Ntotal = Nwater + NCO2;\n", +"P = 100;//kPa\n", +"T = 310;//K\n", +"V = Ntotal * 101.3 * T *22.4143 / ( P * 273.15 );\n", +"disp('m^3',V,'(b)Volume of CO2 = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.13: Production_of_sodium_phosphate.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"mTSPd = 1000;//kg ( basis - 20% dilute TSP )\n", +"P = 20;//%\n", +"mTSP = mTSPd * P / 100;\n", +"NTSP = mTSP / 163.974;\n", +"msodaashd = NTSP * 106;\n", +"mphacidd = NTSP * 97.998;\n", +"mNaOHd = NTSP * 40.008;\n", +"Pphacid = 85;//% (85% solution phosphoric acid)\n", +"PNaOH = 50;//% (50% solution NaOH)\n", +"//let x be the water in soda ash,\n", +"//taking water balance,\n", +"x = (mTSPd - mTSP) - mNaOHd * PNaOH /(100 - PNaOH) - mphacidd * (100 - Pphacid) / Pphacid;\n", +"msodaash = msodaashd + x;\n", +"C = msodaashd *100 / msodaash;\n", +"disp('%',C,'(a)Concentration of soda ash solution = ')\n", +"mphacid = mphacidd * 100 / Pphacid;\n", +"R = msodaash / mphacid;\n", +"disp(R,'(b)Weight ratio in which soda ash and commercial phosphoric acid are mixed = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.14: Production_of_pig_iron.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m = 1000;//kg ( basis - pig iron produced )\n", +"//let x be the iron ore charged and y be the amount of flux added and z be the weight of slag produced\n", +"PFepg = 95;//% ( Fe% in product )\n", +"PCpg = 4;//%\n", +"PSipg = 1;//%\n", +"PFech = 85;//% (Fe% in feed )\n", +"mcoke = 1000;//kg\n", +"PCcoke = 90;//%\n", +"PSicoke = 10;//%\n", +"PSislag = 60;//%\n", +"PSiflux = 5;//%\n", +"PCaCO3fx = 90;//%\n", +"PMgCO3fx = 5;//%\n", +"PCMslag = 40;//% \n", +"//iron balance gives,\n", +"x = PFepg * m *159.694 / ( PFech * 111.694);\n", +"//silicon balance gives,\n", +"//x*(100 - PFech)*28.086/(100*60.086)+mcoke*Psicoke*28.086/(100*60.086)+y*PSiflux*28.086/(100*60.086) = 10 + z*Psislag*28.086 / ( 100*60.086 )\n", +"//taking (CaO + MgO) balance\n", +"//y * ((PCaCO3fx)*56.88/(100*100.88)+(PMgCO3fx*40.312/(100*84.312))=z*PCMslag/100\n", +"//solving above 2 equations , we get\n", +"y = 403.31;\n", +"disp('kg',y,'the amount of flux required to produce 1000kg of pig iron = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.15: Production_of_nitric_acid.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"N = 100;//mol(basis - scrubber)\n", +"NNOs = 2.4;//mol\n", +"NN2s = 92;//mol\n", +"NO2s = 5.6;//mol\n", +"PNOs = 20;//% ( Percentage NO leaving scrubber)\n", +"NNOreac = NNOs * 100 / PNOs;\n", +"//let x mol of nitroge be produced in the reaction, then the amount of N2 present in the air = NN2s - x mol - (1)\n", +"//4NH3 + 5O2 = 4NO + 6H2O\n", +"//4NH3 + 3O2 = 2N2 + 6H2O\n", +"//4moles of NO - 5 moles of O2, 2moles of N2 - 3 moles of O2\n", +"//Total oxygen used up, O = NNOreac * 5/4 + x*3/2\n", +"//total oxygen supplied, NOtotal= (O) + NO2s\n", +"//Nitrogen associated with O2 supplied NN2 = NOtotal*79/21 - (2)\n", +"//comparing 1 and 2,\n", +"x = 2.1835;\n", +"//12moles NO requires 12moles ammonia, 1 mole N2 requires 2 mole ammonia\n", +"Nammonia = x*2 + NNOreac;\n", +"Oreq = Nammonia * 5 / 4;\n", +"Osupp = NNOreac * 5/4 + x*3/2 + NO2s;\n", +"Pexcess = (Osupp - Oreq)*100/Oreq ;\n", +"disp('%',Pexcess,'(a)Percentage excess oxygen = ')\n", +"fr = x * 2 / Nammonia;\n", +"disp(fr,'Fraction of ammonia taking part in side reaction = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.16: Material_balance_in_nitric_acid_production.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m = 100;//kg (basis sodium nitrate reacted)\n", +"NNaNO3 = m/85;\n", +"//2NaNO3 + H2SO4 = 2HNO3 + Na2SO4\n", +"mh2so4 = NNaNO3 * 98.08/2;\n", +"mhno3 = NNaNO3*63.008;\n", +"mna2so4 = NNaNO3 * 142.064 /2;\n", +"Phno3 = 2;//%(percent nitric acid remaining in the cake)\n", +"mhno3cake = mhno3 * Phno3 / 100;\n", +"Ph2so4 = 35;//%\n", +"Pwater = 1.5;//%\n", +"mtotal = (mna2so4 + mhno3cake)*100/(100 - Ph2so4 - Pwater);\n", +"mwater = Pwater * mtotal / 100;\n", +"mh2so4c = Ph2so4 * mtotal / 100;\n", +"Pna2so4 = mna2so4 *100/mtotal;\n", +"Phno3c = mhno3cake * 100 / mtotal;\n", +"disp('kg',mna2so4,'(a)Mass of Na2SO4 in the cake = ')\n", +"disp('kg',mhno3,'Mass of HNO3 in the cake = ')\n", +"disp('kg',mwater,'Mass of water in the cake = ')\n", +"disp('kg',mh2so4c,'Mass of H2SO4 in the cake = ')\n", +"disp('%',Pna2so4,'Percentage of Na2SO4 in the cake = ')\n", +"disp('%',Phno3c,'Percentage of HNO3 in the cake = ')\n", +"disp('%',Pwater,'Percentage of water in the cake = ')\n", +"disp('%',Ph2so4,'Percentage of H2SO4 in the cake = ')\n", +"mh2so4req = mh2so4 + mh2so4c;\n", +"P = 95;//% (95% dilute sulphuric acid)\n", +"w = mh2so4req * 100 / P;\n", +"disp(mh2so4)\n", +"disp('kg',w,'(b)Weight of 95% sulphuric acid required = ')\n", +"mnitric = mhno3 - mhno3cake;\n", +"disp('kg',mnitric,'(c)weight of nitric acid product obtained = ')\n", +"mwaterd = w*(1-P/100)-mwater;\n", +"disp('kg',mwaterd,'(d)the water vapour tha tis distilled from the nitre cake = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.17: Electrolysis_of_brine.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m = 50;//kg ( basis - mass of brine charged )\n", +"//let x be the amount of NaCl in the brine\n", +"Pelect = 50;//% ( electrolyzed )\n", +"//2NaCl + 2H2O = 2NaOH + Cl2 + H2\n", +"//amount of NaCl reacted =x*Pelect/(100*58.45)kmol=x*Pelect/100kg ( 1 )\n", +"//amount of water reacted = x * Pelect * 18.016 / ( 100 * 58.45 )kg ( 2 )\n", +"//Gases produced, Cl2 = x * Pelect / (100 * 58.45 * 2 )kmol = x * Pelect *71/ (100 * 58.45 * 2 )kg ( 3 )\n", +"//H2 = x * Pelect / (100 * 58.45 * 2 )kmol = x * Pelect *2.016/ (100 * 58.45 * 2 )kg ( 4 )\n", +"Nwater = 0.03;//mol water vapour/mol of gas\n", +"//water vapour present = Nwater * 2*(Cl2 + H2)kmol = Nwater * 2*(Cl2 + H2)*18.016 kg ( 5 )\n", +"//NaoH = x * Pelect * 40.008/ (100 * 58.45 )kg ( 6 )\n", +"//water = water in brine - water reacted - water present in gas ( 7 )\n", +"//= (m - Pelect/100) - water reacted ( 2 ) - water present in the gas( 5 )\n", +"//Total weight of solution = NaCl ( 1 ) + NaOH ( 6 ) + Water ( 7 )\n", +"//since NaOH is 10 percent of the total weight, we have NaOH = 0.1 * total weight, from these we get, \n", +"x = 0.1 * 50 / (0.1* 0.3165 + 0.3422 );\n", +"NaOH = x * Pelect * 40.008/ (100 * 58.45 );\n", +"NaCl = x * Pelect / 100;\n", +"water = 34.5032;//kg\n", +"Pevap = 50;//NaOh percentage in solution leaving evaporator\n", +"//taking NaOH balance\n", +"mevap = NaOH * 100 / Pevap;\n", +"disp('kg',mevap,'(a)amount of 50% NaOH solution produced = ')\n", +"Cl2 = x * Pelect *71/ (100 * 58.45 * 2 );//kg\n", +"H2 = x * Pelect *2.016/ (100 * 58.45 * 2 );//kg\n", +"disp('kg',Cl2,'(b)Chlorine produced = ')\n", +"disp('kg',H2,' Hydrogen produced = ')\n", +"Pleav = 1.5;//% NaCl leaving the evaporator\n", +"NaClleav = mevap * Pleav / 100;\n", +"mcrystal = NaCl - NaClleav;\n", +"disp('kg/h',mcrystal,'(c)Amount of NaCl crystallized = ')\n", +"mwaterleav = mevap - NaOH - NaClleav;\n", +"Mwaterevap = water - mwaterleav;\n", +"disp('kg',Mwaterevap,'(d)Weight of water evaporated = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.18: Preparation_of_Formaldehyde.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m = 100;//mol ( basis reactore exit gas )\n", +"//CH3OH + O2 = HCOOH + H2O\n", +"//CH3OH + O2 / 2 = HCHO + H2O\n", +"Nn2 = 64.49;//mol\n", +"No2 = 13.88;//mol\n", +"Nh2o = 5.31;//mol\n", +"Nch3oh = 11.02;//mol\n", +"Nhcho = 4.08;//mol\n", +"Nhcooh = 1.22;//mol\n", +"//x be the moles of methanol reacted, taking C balance, we get,\n", +"x = Nch3oh + Nhcho + Nhcooh;\n", +"Pconv = Nhcho * 100 / x ;\n", +"disp('%',Pconv,'(a)Percent conversion of formaldehyde = ')\n", +"Nair = Nn2 * 100 / 79;\n", +"R = Nair / x;\n", +"disp(R,'(b)Ratio of air to methanol in the feed = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.19: Recycle_operation_reactor_and_separator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"NA = 100;//mol ( basi - 100 mol A in the fresh feed )\n", +"Pconv = 95;//%\n", +"NApro = NA * (100 - Pconv)/100;\n", +"//A = 2B + C \n", +"NB = NA * Pconv * 2 / 100;\n", +"NC = NA * Pconv/100;\n", +"PAent = 0.5;//%\n", +"NAent = NApro * 100 / PAent;\n", +"PBrec = 1;//%\n", +"NBent = NB * 100 / (100 - PBrec);\n", +"m = (NAent - NApro + NA);\n", +"conv = ((NAent - NApro + NA) - NAent)*100/(NAent - NApro + NA);\n", +"disp('%',conv,'(a)single pass converion = ')\n", +"Nrecycled = (NAent - NApro) + (NBent - NB);\n", +"R = Nrecycled/NA;\n", +"disp(R,'(b)recycle ratio = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.1: Combustion_of_propane.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"mair = 500;//kg\n", +"mCO2 = 55;//kg\n", +"mCO = 15;//kg\n", +"//C3H8 + 5O2 = 3CO2 + 4H20\n", +"MCO2 = 44;\n", +"MCO = 28;\n", +"NCO2 = mCO2 / MCO2;\n", +"NCO = mCO / MCO;\n", +"Mair = 29;\n", +"Nair = mair / Mair;\n", +"//carbon balance gives,\n", +"F = (NCO2 + NCO)/3;\n", +"MC3H8 = 44.064;\n", +"mC3H8 = MC3H8 * F ;\n", +"disp('kg',mC3H8,'(a)mass of propane burnt = ')\n", +"//one mole of propane requres 5 moles of oxygen for combustion\n", +"NO2 = F * 5;\n", +"Nairt = NO2 * 100 /21;//theoretical air required\n", +"Pexcess = (Nair - Nairt) * 100 / Nairt;\n", +"disp('%',Pexcess,'(b)The percent excess air = ')\n", +"//C3H8 + 7/2 * O2 = 3CO + 4H2O\n", +"NH2O = F * 4;\n", +"//Taking oxygen balance, unburned oxygen is calculated,\n", +"//O2 supplied = O2 present in form of CO2, CO and H2O + unburned O2\n", +"Nunburnt = Nair * 21 / 100 - NCO2 - NCO/2 - NH2O/2;\n", +"NN2 = Nair * 79 / 100;\n", +"Ntotal = NCO2 + NCO + NH2O + NN2 + Nunburnt;\n", +"PCO2 = NCO2 * 100 / Ntotal;\n", +"PCO = NCO *100/ Ntotal;\n", +"PH2O = NH2O *100/ Ntotal;\n", +"PN2 = NN2 *100/ Ntotal;\n", +"PO2 = Nunburnt *100 / Ntotal;\n", +"disp('%',PCO2,'(c)Percent composition of CO2 = ')\n", +"disp('%',PCO,'Percent composition of CO = ')\n", +"disp('%',PH2O,'Percent composition of H2O = ')\n", +"disp('%',PN2,'Percent composition of N2 = ')\n", +"disp('%',PO2,'Percent composition of O2 = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.20: Conversion_of_sugar_to_glucose_and_fructose.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m = 100;//kg ( basis - sucrose solution as fresh feed )\n", +"//R - recycle reactor exit, let x be the weight fraction of sucrose and y be the weight fracton of inversion sugar in the recycle stream, for combined stream fraction of Glucose + fructose = 0.04\n", +"//z be the weight fraction of sucrose in the combined stream entering the reactor\n", +"Psfeed = 25;//% percent sucrose in fresh feed\n", +"//sucrose balance gives, 25 + R*x = (100+R)* z (A)\n", +"//Glucose + fructose balance, R * y = (100 + R )*0.04 (B)\n", +"Sucrosecon = 71.7;//% sucrose consumed\n", +"//sucrose balance around the reactor,(100+R)z=0.717*(100+R)z+(100+R)x (C)\n", +"//From (C) , x = 0.283*z (D)\n", +"//Amount converted to Glucose + fructose = 0.717 ( 100 + R )* z \n", +"// = 0.717 ( 100 + R )* z * 360.192 / 342.176 kg\n", +"//Glucose and fructose balance around the reactor,\n", +"//(100+R)*0.04 + 0.717(100+R)*z*360.192/342.176 = (100+R)*y (E)\n", +"//Solving (E), y = 0.04 + 0.7548*z (F)\n", +"//Solving, (A), (B), (C) and (F)\n", +"x = 0.06;\n", +"y = 0.2;\n", +"z = 0.212;\n", +"R = 25;\n", +"disp('kg',R,'(a)Recycle flow = ')\n", +"disp('%',y*100,'(b)Combined concentration of Glucose and Fructose in the recycle stream = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.21: Purging_operation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"N = 1;//mol ( basis - combined feed )\n", +"//F - moles of fresh feed\n", +"Pinert = 0.5;//%\n", +"Pconv = 60;//%\n", +"P1inert = 2;//%\n", +"NA1 = N * ( 1- P1inert/100 );\n", +"NA2 = NA1 * ( 1 - Pconv / 100 );\n", +"NB2 = NA1 - NA2;\n", +"N1inert = N * P1inert / 100;\n", +"N2inert = N1inert;\n", +"//Let R be the moles recycled and P be the moles purged\n", +"//W = R + P\n", +"W = NA2 + N2inert;// (A)\n", +"PWinert = N2inert * 100/ ( NA2 + N2inert);\n", +"//component A balance, A fresh feed = A purge stream + A recycle stream\n", +"//F * 0.9 = P * 0.9515 + 0.588 (B)\n", +"//inert balance at the point where fresh feed is mixed with the recycle,\n", +"//F*0.005 + R*0.0485 = 1* 0.02 (C)\n", +"//Solving (A),(B) and (C)\n", +"F = 0.6552;//mol\n", +"P = 0.0671;//mol\n", +"R = 0.3448;//mol\n", +"disp('mol',R,'(a)moles of recycle stream = ')\n", +"disp('mol',P,'(b)moles of purge stream = ')\n", +"NAconv = NA1 - NA2;\n", +"NAf = F * (1 - Pinert / 100);\n", +"Conv = NAconv *100/ NAf;\n", +"disp('%',Conv,'(c)Overall conversion = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.22: Purging_operation_for_production_of_methanol.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"N = 100;//moles ( Basis - Fresh feed )\n", +"Pconv = 20;//%\n", +"xco = 0.33;\n", +"xh2 = 0.665;\n", +"xch4 = 0.005;\n", +"//R - recycle stream, P - purge stream\n", +"//x - mole fraction of CO in recycle stream , \n", +"xch4r = 0.03;\n", +"//CO = x, H2 = 1 - xch4r - CO = 0.97- x;\n", +"//methane balance over the entire system, \n", +"P = xch4 * N / xch4r;\n", +"//taking caron balance, 33.5 = M + P ( 0.03 + x )\n", +"//Hydrogen balance, 66.5 + 2*0.5 = 2M + P(2*0.03 + 0.97 - x) \n", +"//substituting P, M + 16.67x = 33.0 and 2M - 16.67x = 50.33\n", +"M = (33.0 + 50.33)/3;\n", +"x = ((xco + xch4)*N - M ) / P - xch4r;\n", +"//methanol balance,(xco*N+Rx) * Poncv/100 = M\n", +"R = (M*100 / Pconv - (xco*N))/x;\n", +"disp('mol',R,'(a)moles of recycle stream = ')\n", +"disp('mol',P,'(b)moles of purge stream = ')\n", +"H2 = 1 - xch4r - x;\n", +"disp('%',xch4r*100,'(c)CH4 in purge stream = ')\n", +"disp('%',x*100,'CO in purge stream = ')\n", +"disp('%',H2*100,'hydrogen in purge stream = ')\n", +"disp('mol',M,'(d)Methanol produced = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.2: Combustion_of_hydrogen_free_coke.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Nflue = 100;//kmol\n", +"NCO2 = 14.84;\n", +"NCO = 1.65;\n", +"NO2 = 5.16;\n", +"NN2 = 78.35;\n", +"PCF = 85;//PERCENT CARBON IN FEED\n", +"PIF = 15;//PERCENT INERT IN FEED\n", +"//F - amount of coke charged, W - mass of coke left,W = 0.05F\n", +"NCflue = NCO2 + NCO ;\n", +"MC = 12;\n", +"mC = MC * NCflue ;\n", +"//carbon balance gives, F * PCF / 100 = W * PCF + mC \n", +"F = mC / ( PCF / 100 - 0.05*PCF / 100);\n", +"//let A kmol air supplied, taking N2 balance,\n", +"Nair = NN2 * 100/79;\n", +"NO2supplied = Nair - NN2;\n", +"Ntheoretical = F * PCF / (100 * MC);\n", +"Pexcess = ( NO2supplied - Ntheoretical ) * 100 / ( Ntheoretical );\n", +"disp('%',Pexcess,'(a)Percentage excess air = ')\n", +"mair = Nair * 29;\n", +"m = mair / F ;//air supplied per kg of coke charged\n", +"disp('kg',m,'(b)air supplied per kg of coke charged = ')\n", +"P = 100;//kPa\n", +"T = 500;//K\n", +"V = Nflue *22.4143*101.325 * T / (F * P * 273.15);\n", +"disp('m^3',V,'(c)volume of flue gas per kg of coke = ')\n", +"W = 0.05*F;\n", +"mCr = W * PCF/100;//carbon in refuse\n", +"mir = F * (1-PCF/100);//inert in refuse\n", +"mr = mCr + mir;\n", +"C = mCr * 100 / mr;\n", +"I = mir *100/ mr;\n", +"disp('%',C,'(d)Carbon = ')\n", +"disp('%',I,'Inert = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.3: Combustion_of_fuel_oil.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Nflue = 100;//kmol\n", +"NCO2 = 9;\n", +"NCO = 2;\n", +"NO2 = 3;\n", +"NN2 = 86;\n", +"NCflue = NCO2 + NCO ;\n", +"MC = 12;\n", +"mC = MC * NCflue ;\n", +"//let A kmol air supplied, taking N2 balance,\n", +"Nair = NN2 * 100/79;\n", +"NO2supplied = Nair - NN2;\n", +"// if CO in the flue gas was to be completely converted to CO2, then, the moles of oxygen present in the flue gas would be 3-1 =2kmol\n", +"Noexcess = NO2 - NCO/2;\n", +"Pexcess = Noexcess * 100 / ( NO2supplied - Noexcess);\n", +"disp('%',Pexcess,'(a)Percentage excess air = ')\n", +"NwaterO = NO2supplied - NCO2 - NCO/2 - NO2;\n", +"NH2 = NwaterO*2;\n", +"mH2 = NH2 * 2;\n", +"xCF = 0.7\n", +"R = mC / mH2;\n", +"disp(R,'(b)Ratio of carbon to hydrogen in the fuel = ')\n", +"//let x be the amount of moisture in the feed, n it is given that 70% is carbon,therefore,\n", +"//0.7 = 3.32 / ( 1 + 3.32 + x )\n", +"x = R / xCF - 1 - R;\n", +"mH = x * 2.016 / 18.016;\n", +"mHtotal = mH + mH2;\n", +"Rtotal = mC / mHtotal;\n", +"disp(Rtotal,'(c)Ratio of carbon to total hydrogen in the fuel = ')\n", +"ntotal = R + 1 +x;\n", +"PH2 = 1*100/ntotal;\n", +"PH2O = x * 100 / ntotal;\n", +"disp('%',PH2,'(d)percentage of combustible hydrogen in the fuel = ')\n", +"disp('%',PH2O,'percentage of moisture in the fuel = ')\n", +"nH2Ototal = (PH2O + PH2 * 18.016 / 2.016)/100;\n", +"disp('kg',nH2Ototal,'(e)The mass of moisture in the flue gas per kg of fuel burned = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.4: Combustion_of_producer_gas.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Nflue = 100;//kmoles\n", +"NCO2 = 9.05;\n", +"NCO = 1.34;\n", +"NO2 = 9.98;\n", +"NN2 = 79.63;\n", +"PCO2F = 9.2;//% ( Feed )\n", +"PCOF = 21.3;//%\n", +"PH2F = 18;//%\n", +"PCH4F = 2.5;//%\n", +"PN2F = 49;//%\n", +"//Taking carbon balance, \n", +"F = (NCO2 + NCO )/ ( (PCO2F + PCOF + PCH4F)/100);\n", +"//Nitrogen balance gives,\n", +"Nair = (NN2 - F*PN2F/(100) )* 100 / 79;\n", +"R = Nair/F;\n", +"disp(R,'(a)molar Ratio of air to fuel = ')\n", +"Oexcess = NO2 - NCO / 2;\n", +"Pexcess = Oexcess *100/ (Nair*21/100 - Oexcess);\n", +"disp('%',Pexcess,'(b)Percent excess of air = ')\n", +"NN2F = F * PN2F / 100;\n", +"PN2F = NN2F *100/ NN2;\n", +"disp('%',PN2F,'(c)Percent of nitrogen in the flue gas that came from fuel = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.5: Combustion_of_coal.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Nflue = 100;//kmole\n", +"NCO2 = 16.4;\n", +"NCO = 0.4;\n", +"NO2 = 2.3;\n", +"NN2 = 80.9;\n", +"PCF = 80.5;//% ( Feed )\n", +"PO = 5.0;//%\n", +"PHF = 4.6;//%\n", +"PN = 1.1;//%\n", +"Pash = 8.8;//%\n", +"//Taking Carbon balance,\n", +"W = (NCO2 + NCO)*12 / (PCF / 100);\n", +"mCO2 = NCO2 * 44;\n", +"mCO = NCO * 32;\n", +"mO2 = NO2 * 28;\n", +"mN2 = NN2 * 28.014;\n", +"mtotal = mCO2 + mCO + mO2 + mN2;\n", +"Mdryflue = mtotal * 100/ W;\n", +"disp('kg',Mdryflue,'(a)The weight of dry gaseous products formed per 100 kg of coal fired = ')\n", +"//taking nitrogen balance,\n", +"x = (mN2 - W*PN/100)/28.014;\n", +"Noxygen = x * 21 / 79;\n", +"Nrequired = W * (PCF /12 + PHF/(2*2.016) - PO/32)/100;\n", +"Pexcess = (Noxygen - Nrequired)*100/Nrequired ;\n", +"disp('%',Pexcess,'(b)Percent excess air supplied for combustion = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.6: Stoichiometric_analysis_of_combustion_of_coal.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"mcoal = 100;//kg\n", +"mC = 63;//kg\n", +"mH = 12;//kg\n", +"mO = 16;//kg\n", +"mash =9;//kg\n", +"mfixC = 39;//kg\n", +"mH2O = 10;//kg\n", +"mCvolatile = mC - mfixC;\n", +"mHH2O = mH2O *2.016/18.016;//(mass of hydrogen in moisture)\n", +"mHvolatile = mH - mHH2O;\n", +"mOH2O = mH2O - mHH2O;\n", +"mOvolatile = mO - mOH2O;\n", +"mtvolatile = mCvolatile + mHvolatile + mOvolatile;\n", +"PC = mCvolatile * 100 / mtvolatile;\n", +"PH = mHvolatile * 100 / mtvolatile;\n", +"PO = mOvolatile * 100 / mtvolatile;\n", +"disp('%',PC,'(a)percent carbon in volatile matter = ')\n", +"disp('%',PH,' percent hydrogen in volatile matter = ')\n", +"disp('%',PO,' percent oxygen in volatile matter = ')\n", +"PCflue = 10.8;//%\n", +"Pvflue = 9.0;//%\n", +"Pashflue = 80.2;//%\n", +"//taking ash balance, Wis the weight of the refuse,\n", +"W = mash *100 / Pashflue;\n", +"mvflue = Pvflue * W /100;\n", +"mCflue = W * PCflue / 100;\n", +"Ctflue = mCflue + mvflue * PC / 100;//total carbon in flue\n", +"Htflue = mvflue * PH / 100;\n", +"Otflue = mvflue * PO / 100;\n", +"PCflue = Ctflue *100/W;\n", +"PHflue = Htflue *100/W;\n", +"POflue = Otflue *100/W;\n", +"disp('%',PCflue,'(b)percent Carbon in refuse = ')\n", +"disp('%',PHflue,' percent Hydrogen in refuse = ')\n", +"disp('%',POflue,' percent Oxygen in refuse = ')\n", +"disp('%',Pashflue,' percent Ash in refuse = ')\n", +"Coalburnt = mcoal - W;\n", +"NCburnt = (mC - Ctflue)/12;\n", +"NHburnt = (mH - Htflue)/2.016;\n", +"NOburnt = (mO - Otflue)/32;\n", +"PCO2 = 80;//Percentage of carbon burnt\n", +"NCO2 = PCO2 * NCburnt / 100;\n", +"NCO = ( 1 - PCO2/100 )*NCburnt;\n", +"Vair = 1000;//m^3\n", +"Nair = Vair / 22.4143;\n", +"NN2 = Nair * 79 / 100;\n", +"NO2 = Nair * 21 / 100;\n", +"Ocompounds = NCO2 + NCO/2 + NHburnt/2;//Oxygen present in CO2,CO and H2O\n", +"//Oxygen balance gives free oxygen as,\n", +"Ofree = NO2 + mO/32 - Otflue/32 - Ocompounds;\n", +"Ntotal = NN2 + Ofree + NCO2 + NCO;//dry basis\n", +"PCO21 = NCO2 *100/Ntotal;\n", +"PCO1 = NCO * 100/Ntotal;\n", +"PO21 = Ofree * 100/Ntotal;\n", +"PN21 = NN2 * 100/Ntotal;\n", +"disp('%',PCO21,'(c)percent CO2 in flue = ')\n", +"disp('%',PCO1,' percent CO in flue = ')\n", +"disp('%',PO21,' percent O2 in flue = ')\n", +"disp('%',PN21,' percent N2 in flue = ')\n", +"NOrequired = mC/12 + mH/(2.016*2) - mO/32;\n", +"Oexcess = NO2 - NOrequired;\n", +"Pexcess = Oexcess * 100 / NOrequired;\n", +"disp('%',Pexcess,'(d)Percent excess air supplied = ')\n", +"NH2Oflue = NHburnt;\n", +"mH2O = NH2Oflue * 18.016;\n", +"m = mH2O * 100/Ntotal;\n", +"disp('g water vapour / 100kmol dry flue gas',m,'(e)mass of water vapour per 100 moles of dry flue gas = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.7: Orsat_analysis.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Pexcess = 20;//%\n", +"PSO3 = 5;//% ( Percent of sulphur burnt to SO3 )\n", +"//S + O2 = SO2\n", +"N = 1;//kmol sulphur\n", +"Orequired = N;//kmol\n", +"Osupplied = Orequired * ( 1 + Pexcess/100);\n", +"Nsupplied = Osupplied * 79/21;\n", +"NSO2 = (1-PSO3/100)*N;\n", +"NSO3 = PSO3 * N /100;\n", +"Oconsumed = NSO2 + 3/2 * PSO3/100;\n", +"Oremaining = Osupplied - Oconsumed;\n", +"Ntotal = NSO2 + NSO3 + Oremaining + Nsupplied;\n", +"PSO2 = NSO2 * 100 / Ntotal;\n", +"PSO3 = NSO3 * 100 / Ntotal;\n", +"PO2 = Oremaining * 100 / Ntotal;\n", +"PN2 = Nsupplied * 100 / Ntotal;\n", +"disp('%',PSO2,'Percent SO2 in burner gas = ')\n", +"disp('%',PSO3,'Percent SO3 in burner gas = ')\n", +"disp('%',PO2,'Percent O2 in burner gas = ')\n", +"disp('%',PN2,'Percent N2 in burner gas = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.8: Burning_of_pyrites.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Nburner = 100;//kmol\n", +"NSO2b = 9.5;//kmol\n", +"NO2b = 7;//kmol\n", +"NN2 = Nburner - NSO2b - NO2b;\n", +"NOsupplied = NN2 * 21 / 79;//Oxygen supplied\n", +"//4FeS2 + 11O2 = 2Fe2O3 + 8SO2\n", +"//4FeS2 + 15O2 = 2Fe2O3 + 8SO3\n", +"NOtotal = NO2b + NSO2b + NSO2b * 3 / 8;\n", +"NOunaccounted = NOsupplied - NOtotal;\n", +"NSO31 = NOunaccounted * 8 /15;\n", +"NStotal = NSO2b + NSO31;\n", +"mS = NStotal * 32.064;\n", +"Pburnt = 50;//% ( percentage of pyrites burnt )\n", +"mFeS2 = mS * 100/ Pburnt;\n", +"disp('kg',mFeS2,'(a)Total pyrites burnt = ')\n", +"NFeS2 = NStotal / 2;\n", +"MFeS2 = 119.975;\n", +"mFeS21 = MFeS2 * NFeS2;\n", +"mgangue = mFeS2 - mFeS21;\n", +"NFe2O3 = NFeS2 * Pburnt / 100;\n", +"MFe2O3 = 159.694;\n", +"mFe2O3 = MFe2O3 * NFe2O3;\n", +"PSO3c = 2.5;//% ( percentage sulphur as SO3 in cinder )\n", +"mc = 100;//kg ( basis )\n", +"NSO3 = PSO3c / 32.064;\n", +"mSO3 = NSO3 * 80.064;\n", +"mremaining = mc - mSO3;// ( Fe2O3 + gangue )\n", +"//x be the weight of the cinder \n", +"x = (mFe2O3 + mgangue)*100/mremaining ;\n", +"disp('kg',x,'(b)weight of cinder produced = ')\n", +"Slost = x * NSO3 / 100;\n", +"PSlost = Slost *100/ NStotal;\n", +"disp('%',PSlost,'(c)Percent of total S lost in the cinder = ')\n", +"mSO3c = mSO3 * x / 100;\n", +"NSO3b = NSO31 - Slost;\n", +"P = NSO3b * 100 / NStotal;\n", +"disp('%',P,'(d)Percentage of S charged that is present as SO3 in the burner gas = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.9: Production_of_sulphuric_acid.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Ncgas = 100;//kmol ( basis - SO3 free converter gas )\n", +"NSO2 = 4.5;//kmol\n", +"NO2 = 7.5;//kmol\n", +"NN2 = 88.0;//kmol\n", +"NOsupplied = NN2 * 21/ 79;\n", +"NOconverter = NO2 + NSO2;\n", +"NOconsumed = NOsupplied - NOconverter;//(Oxygen consumed for SO3)\n", +"NSO3c = NOconsumed / 1.5;\n", +"NStotal = NSO3c + NSO2;\n", +"Nbgas = 100;//kmol ( basis - SO3 free burner gas )\n", +"NSO21 = 15;//%\n", +"NO21 = 5;//%\n", +"NN21 = 80;//%\n", +"NOburner = NO21 + NSO21;\n", +"NOsupplied1 = NN21 * 21 / 79;\n", +"NOconsumed1 = NOsupplied1 - NOburner;//(Oxygen consumed for SO3)\n", +"NSO3b = NOconsumed1 / 1.5;\n", +"NStotal1 = NSO3b + NSO21;\n", +"mS = 100;//kg ( basis - sulphur charged )\n", +"Pburned = 95;//%\n", +"mburned = mS * Pburned / 100;\n", +"Nburned = mburned / 32.064;\n", +"//let x be the SO3 free burner gas produced, then sulphur balance gives,\n", +"x = Nburned * Nbgas / NStotal1;\n", +"NSO2b = NSO21 * x / 100;\n", +"NO2b = NO21 * x / 100;\n", +"NN2b = NN21 * x / 100;\n", +"Ntotalb = NSO2b + NO2b + NN2b;\n", +"NSO3b1 = NSO3b * x / 100;\n", +"//let y be the no. of converter gas produced\n", +"y = Nburned * Ncgas / NStotal;\n", +"NSO2c = NSO2 * y / 100;\n", +"NO2c = NO2 * y / 100;\n", +"NN2c = NN2 * y / 100;\n", +"Ntotalc = NSO2c + NO2c + NN2c;\n", +"NSO3c1 = NSO3c * y / 100;\n", +"Nairsec = (NN2c - NN2b ) * 100 / 79;\n", +"P = 100;//kPa\n", +"T = 300;//K\n", +"V = Nairsec * 22.414 * 101.3 * T / (P * 273.15);\n", +"disp('m^3/h',V,'(a)The volume of secondary air at 100kPa and 300K = ')\n", +"NSabsorbed = 95;//%\n", +"mSO3abs = NSabsorbed * NSO3c1 * 80.064 / 100;\n", +"//let z be the amount of 98% H2SO4, therefore , 100% H2SO4 produced = z + mSO3abs\n", +"// taking SO3 balance\n", +"z = (mSO3abs - mSO3abs * 80.064 / 98.08) / ( 80.064 / 98.08 - 0.98 * 80.064/98.08);\n", +"disp('kg',z,'(b)98% H2SO4 required per hour = ')\n", +"w = z + mSO3abs;\n", +"disp('kg',w,'(c)100% H2SO4 produced per hour = ')" + ] + } +], +"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 +} diff --git a/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/11-Energy_Balance_Thermophysics.ipynb b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/11-Energy_Balance_Thermophysics.ipynb new file mode 100644 index 0000000..0b631d0 --- /dev/null +++ b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/11-Energy_Balance_Thermophysics.ipynb @@ -0,0 +1,1346 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11: Energy Balance Thermophysics" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.10: Heat_capacity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//Cp = 26.54 + 42.454*10^-3 * T - 14.298 * 10^-6 * T^2;\n", +"T1 = 300;//K\n", +"T2 = 1000;//K\n", +"m = 1;//kg\n", +"N = m/44;//kmol\n", +"x = integrate('26.54 + 42.454*10^-3 * T - 14.298 * 10^-6 * T^2','T',T1,T2);\n", +"Q = N*x;\n", +"disp('kJ',Q,'(a)Heat required = ')\n", +"//for temperature in t degree celsius\n", +"//Cp = 26.54 + 42.454*10^-3 * (t + 273.15) - 14.298 * 10^-6 * (t + 273.15)^2\n", +"//Cp = 37.068 + 34.643 * 10^-3*t - 14.298* 10^-6 * t^2 (kJ/kmolC)\n", +"//Cp = 8.854 + 8.274*10^-3*t -3.415*10^-6*t^2 ( Kcal/kmolC)\n", +"//For degree Fehreneit scale,replacet by ( t1 - 32)/18, we get\n", +"//Cp = 8.7058 + 4.6642 * 10^-3 *t1 - 1.0540 * 10^-6 * t1^2 ( Btu/lbmolF)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.11: Enthalpy_change_when_chlorine_gas_is_heated.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"T = [273 373 473 573 673 773 873 973 1073 1173 1273];\n", +"Cp = [33.6 35.1 36 36.6 37 37.3 37.5 37.6 37.7 37.8 37.9];\n", +"plot2d(T,Cp,rect=[273,33,1273,38])\n", +"xtitle(' T vs Cp','Temperature K','Heat Capacity, kJ/kmolK')\n", +"// at constant Pressure, H = integration(Cp,T,T1,T2)\n", +"//Area under the curve form the graph ,is obtained as Area = 36828\n", +"H = 36828;//kJ/kmol\n", +"disp('kJ/kmol',H,'Enthalpy change = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.12: Molal_heat_capacity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//Cp = 26.586 + 7.582 * 10 ^-3 * T - 1.12 * 10^-6 * T^2\n", +"T1 = 500;//K\n", +"T2 = 1000;//K\n", +"x = integrate('26.586 + 7.582 * 10^-3 * T - 1.12 * 10^-6 * T^2','T',T1,T2);\n", +"Cpm = 1 *x / ( T2 - T1 ) ;\n", +"disp('kJ/kmolK',Cpm,'(a)Mean molal heat capacity = ')\n", +"V = 500;//m^3;\n", +"N = V / 22.4143;\n", +"Q = N * Cpm * ( T2 - T1 );\n", +"disp('kJ/h',Q,'(b)Heat to be supplied = ')\n", +"T3 = 1500;//K\n", +"Q1 = Cpm * (T3 - T1);\n", +"y = integrate('26.586 + 7.582 * 10 ^-3 * T - 1.12 * 10^-6 * T^2','T',T1,T3);\n", +"Q2 = y ;\n", +"disp(Q2)\n", +"Perror = (Q2 - Q1) * 100 / Q2;\n", +"disp('%',Perror,'(c)Percent error = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.13: Enthalpy_change_of_a_gas.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"T1 = 1500;//K\n", +"Tr = 273;//K\n", +"T2 = 400;//K\n", +"Cpm1 = 50;//kJ/kmol\n", +"Cpm2 = 35;//kJ/mol\n", +"H = Cpm1 * ( T1 - Tr ) - Cpm2 * ( T2 - Tr );\n", +"disp('kJ/kmol',H,'Enthalpy change = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.14: Combustion_of_solid_waste.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//CO, 26.586 + 7.582*10^-3*T - 1.12*10^-6*T^2\n", +"//CO2, 26.540 + 42.454*10^-3*T - 14.298*10^-6*T^2\n", +"//O2, 25.74 + 12.987*10^-3*T - 3.864*10^-6*T^2\n", +"//N2, 27.03 + 5.815*10^-3*T - 0.289*10^-6*T^2\n", +"//Cpmix = summation ( yi*Cpi ) = summation(yi*ai + yi*bi*T + yi*ci*T^2)\n", +"xco2 = 0.09;\n", +"xco = 0.02;\n", +"xo2 = 0.07;\n", +"xn2 = 0.82;\n", +"T1 = 600;//K\n", +"T2 = 375;//K\n", +"sumai = xco * 26.586 +xco2 * 26.540 + xo2 * 25.74 + xn2*27.03;\n", +"sumbi = xco * 7.582*10^-3 + xco2*2.454*10^-3+xo2*12.987*10^-3 + xn2*5.815*10^-3;\n", +"sumci = -(xco * 1.12*10^-6 + xco2*14.298*10^-6+xo2*3.864*10^-6+xn2*0.289*10^-6);\n", +"H = integrate('sumai+sumbi*T+sumci*T^2','T',T1,T2);\n", +"disp('kJ/kmol',H,'Enthalpy change = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.15: Heat_capacity_calculation_for_Na2SO4_10H2O.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Hna = 26.04;//J/g-atomK\n", +"Hs = 22.6;//J/g-atomK\n", +"Ho = 16.8;//J/g-atomK\n", +"Hh = 9.6;//J/g-atomK\n", +"Hna2so410h2o = 2*Hna + Hs + 14*Ho + 20*Hh;\n", +"Hexp = 592.2;//J/molK\n", +"Deviation = (Hexp - Hna2so410h2o)*100/Hexp;\n", +"disp('%',Deviation,'Deviation in heat capacity = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.16: Heat_of_vaporization_calculation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P1 = 75;//kPa\n", +"T1 = 573;//K\n", +"Tvap = 365;//K\n", +"Tbasis = 273;//K\n", +"//Since, the boiling point of water at 75kPa is 375K, the vapour at 573K is superheated;\n", +"H1 = 3075;//kJ/kg\n", +"Cliq = 4.2;//kJ/kgK\n", +"Cvap = 1.97;//kJ/kg/K\n", +"m = 1;//kg\n", +"//let assume converting liq. water into superheated stream occurs in 3 steps,\n", +"//step1 - water is heated from 273K to 365 K at constant pressure,enthalpy change is the heat required to change the temperature,\n", +"Hc1 = m*Cliq * ( Tvap - Tbasis );\n", +"//step2 - the liq is vapurized at constant pressure and constant temperature, enthalpy change is equal to the heat of vapourisation, say Hc2\n", +"//step3 - the saturated vapour at 365K is heated to 573K at constant pressure, the enthalpy change is the heat required to raise the temperature\n", +"Hc3 = m*Cvap*(T1 - Tvap);\n", +"//total enthalpy = 3075 = Hc1 + Hc2 + Hc3, therefore\n", +"Hc2 = H1 - Hc1 - Hc3;\n", +"disp('kJ/kg',Hc2,'Heat of vapourisation = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.17: Heat_requirement.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"T1 = 250;//K\n", +"T = 273.15;//K\n", +"T2 = 400;//K\n", +"Cice = 2.037;//kJ/kgK\n", +"T3 = 373.15;//K\n", +"Cliq = 75.726;//kJ/kmolK\n", +"//Cp = 30.475 + 9.652*10^-3*T + 1.189*10^-6*T^2\n", +"Hfusion = 6012;//kJ/kmol\n", +"Hvap = 40608;//kJ/kmol\n", +"//1 - Heat for raising the temperature of ice, H1\n", +"H1 = Cice * (T - T1);\n", +"//2 - Latent heat of fusion of ice, Hf\n", +"Hf = Hfusion / 18.016;//kJ\n", +"//3 - Sensible heat of raising the temperature of water, H2\n", +"H2 = Cliq * ( T3 - T)/18.016;\n", +"//4 - Latent heat of vaporization of water, Hv\n", +"Hv = Hvap / 18.016;\n", +"//5 - Sensible heat of raising the temperature of water vapou, H3\n", +"H3 = (integrate('30.475 + 9.652*10^-3*T + 1.189*10^-6*T^2','T',T3,T2))/18.016;\n", +"Q = H1 + H2 + H3 + Hf + Hv;\n", +"disp('kJ',Q,'Heat required = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.18: Equilibrium_temperature_of_mixture.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//Cp = 0.16 + 4.78 * (10^-3) * T ( organic liquid )\n", +"//Cp = 0.7935 + 1.298 * (10^-4) * T ( CCL4 )\n", +"Tb = 349.9;//K\n", +"Hv = 195;//kJ/kg\n", +"Cp = 0.4693;//kJ/kgK\n", +"//Let T be the final temperature\n", +"//integration(T - 650)(0.16 + 4.78 * (10^-3) * T)dt = integration(295 - T)(0.7935 + 1.298 * (10^-4) * T)dt\n", +"// the above equation yields, 2.4549*(10^-3)*T^2 + 0.9535*T - 1353.51 = 0, from this we get\n", +"T = 573.3;//K\n", +"//since this temperature is above boiling point of CCl4,\n", +"//heat balance is, integration(T - 650)(0.16 + 4.78 * (10^-3) * T)dt = integration(295 - 349.9)(0.7935 + 1.298 * (10^-4) * T)dt + Hv + integration(349.9 - T)*0.4693*dT\n", +"//solving above equation, we get,\n", +"T1 = 540.1;//K\n", +"disp('K',T1,'equilibrium temperature of the mixture = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.19: Estimation_of_mean_heat_of_vaporisation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"T1 = 363;//K\n", +"T2 = 373;//K\n", +"P1s = 70.11;//kPa\n", +"P2s = 101.3;//kPa\n", +"R = 8.314;//kJ/kmolK\n", +"// ln(P2s / P1s) = Hv / R * (1/T1 - 1/T2);\n", +"Hv = (log(P2s/P1s)*R)/(1/T1 - 1/T2);\n", +"Hv1 = Hv / (18);\n", +"disp('kJ/kg',Hv1,'Mean heat of vaporization = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.1: Power_calculatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m = 75;//kg\n", +"g = 9.81//m^2/s\n", +"d = 10;//m\n", +"t = 2.5*60;//s\n", +"f = m*g;\n", +"w = f * d;\n", +"P = w / t;\n", +"disp('Nm',w,'The work done = ')\n", +"disp('W',P,'Power required = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.20: Heat_of_vaporization_of_methyl_chloride.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"T = 273.15 - 30;//K\n", +"//lnPs = 14.2410 - 2137.72 / (T-26.72)\n", +"//dlnPs/dT = Hv / RT2\n", +"Hv = 2137.72 * R * T^2 / ( T - 26.72 )^2;\n", +"disp('kJ/kmol',Hv,'Heat of vaporization = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.21: Watson_equation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Hv1 = 2256;//kJ/kg\n", +"T1 = 373;//K\n", +"T2 = 473;//K\n", +"Tc = 647;//K\n", +"Tr1 = T1 / Tc;\n", +"Tr2 = T2 / Tc;\n", +"//Hv2 / Hv1 = ((1-Tr2)/(1-Tr1))^0.38\n", +"Hv2 = Hv1*(((1-Tr2)/(1-Tr1))^0.38);\n", +"disp('kJ/kg',Hv2,'Latent heat of vaporization of water at 473K = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.22: Kistyakowsky_equatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//Cp = a + b*T\n", +"T1 = 293.15;//K\n", +"Cp1 = 131.05;//J/molK\n", +"T2 = 323;//K\n", +"Cp2 = 138.04;//J/molK\n", +"//a + 293*b = 131.05\n", +"//a + 323*b = 138.04\n", +"b = (Cp1 - Cp2)/(T1 - T2);\n", +"a = Cp1 - b * T1;\n", +"//Cp = 62.781 + 0.233*T\n", +"// Hvb / Tb = 36.63 + 8.31lnTb\n", +"Tb = 273.15 + 80.1;//K\n", +"Hvb = (36.63 + 8.31*log(Tb)) * Tb;\n", +"m = 100;//kg\n", +"H = m*(10^3) * (integrate('62.781 + 0.233*T','T',T1,Tb))/78.048 + m*(10^3)*Hvb/78.048;\n", +"disp('J',H,'Heat required = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.23: Quality_of_steam.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P = 10;//kPa\n", +"T1 = 323.15;//K\n", +"T2 = 373.15;//K\n", +"T = 358.15;//K\n", +"H1 = 2592.6;//kJ/kg\n", +"H2 = 2687.5;//kJ/kg\n", +"//H by interpolation,\n", +"H = H1 + ((H2 - H1)/(T2 - T1))*(T - T1);\n", +"Hl = 697.061;//kJ/kg\n", +"Hg = 2762;//kJ/kg\n", +"//H = x*Hl + ( 1 - x )* Hg\n", +"x = (H - Hg)/(Hl - Hg) ;\n", +"Pmois = x*100;\n", +"Psteam = ( 1 - x )*100;\n", +"disp('%',Pmois,'Percentage of moisture = ')\n", +"disp('%',Psteam,'Percentage of dry saturated steam = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.24: Heat_calculatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P = 3500;//kPa\n", +"T = 673.15;//K\n", +"SV = 0.08453;//m^3/kg\n", +"Vcondensed = 1/2;\n", +"m = 100;//kg\n", +"V = m * SV / (m/2);\n", +"//m*(Vl+Vg)*Vcondensed = m * SV\n", +"//But Vl is negligible,\n", +"Vg = m * SV / (m * Vcondensed);\n", +"//using steam table\n", +"T1 = 459.5;//K\n", +"P1 = 1158;//kPa\n", +"//internal energy of superheated steam from steam table\n", +"I = 2928.4;//kJ/kg\n", +"U1 = m * I;\n", +"Ul = 790;//kJ/kg\n", +"Ug = 2585.9;//kJ/kg\n", +"U2 = m*Vcondensed*Ul + m*(1-Vcondensed)*Ug;\n", +"Q = U2 - U1;\n", +"disp('kJ',Q,'The amount of heat removed fromt he system = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.25: Enthalpy_balance_for_evaporation_process.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m = 1000;//kg/h ( basis mass of 10% NaOH solution )\n", +"Pfeed = 10;//%\n", +"Ppro = 50;//(Percentage NaOH in product)\n", +"//Taking NaOH balance,P being the weight of the product\n", +"P = Pfeed * m / Ppro;\n", +"//W be the weight of water evaporized\n", +"W = m - P;\n", +"//step1 - cooling 1000kg/h of 10% solution from 305K to 298K\n", +"T1 = 305;//K\n", +"T2 = 298;//K\n", +"Cliq = 3.67;//kJ/kgK\n", +"H1 = m*Cliq * (T2 - T1);\n", +"//step2 - separation into pure components\n", +"Hsolution = -42.85;//kJ/mol\n", +"H2 = -Pfeed * m *1000 *Hsolution/ (40*100);\n", +"//step3 - W kg water is converted to water vapour\n", +"Hvap = 2442.5;//kJ/kg\n", +"H3 = W * Hvap;\n", +"//step4 - water vapour at 298K is heated to 373.15K\n", +"Cvap = 1.884;//kJ/kgK\n", +"T3 = 373.15;//K\n", +"H4 = W * Cvap * ( T3 - T2 );\n", +"//step5 - formation of 200kg of 50% NaOH solution at 298K\n", +"Hsolu = -25.89;//kJ/mol\n", +"H5 = Pfeed * m *1000 *Hsolu/ (40*100);\n", +"//step6 - Heating the solution from 298K to 380K\n", +"Csolu = 3.34;//kJ/kg\n", +"T4 = 380;//K\n", +"H6 = P * Csolu * (T4 - T2);\n", +"Htotal = H1 + H2 + H3 + H4 + H5 + H6;\n", +"disp('kJ',Htotal,'The enthalpy change accompanying the complete process = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.26: Mean_heat_capacity_of_ethanol_water_solution.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Nwater = 0.8;//moles\n", +"Nethanol = 0.2;//moles\n", +"T = 323;//K\n", +"Cwater = 4.18*10^3;//J/kgK\n", +"Cethanol = 2.58*10^3;//J/kgK\n", +"Hmixing1 = -758;//J/mol ( at 298K )\n", +"Hmixing2 = -415;//J/mol ( at 323K )\n", +"T1 = 298;//K\n", +"T2 = 523;//K\n", +"//step1 - 0.8 mol of water is cooled from 323 K to 298K\n", +"H1 = Nwater * 18 * Cwater * ( T1 - T )/ 1000;\n", +"//step2 - 0.2 mol ethanol cooled from 323K to 298K\n", +"H2 = Nethanol * 46 * Cethanol * ( T1 - T )/1000;\n", +"//step3 - 0.8 mol water and 0.2 mol ethanol are mixed together,\n", +"H3 = Hmixing1;\n", +"//step4 solution is heated to 323K, H4 = Cpm * (T - T1)\n", +"//Hmixing2 = H1 + H2 + H3 + H4\n", +"H4 = Hmixing2 - H1 - H2 - H3;\n", +"Cpm = H4 / ( T - T1 );\n", +"disp('J/molK',Cpm,'The mean heat capacity of a 20 percent solution = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.27: Evaporation_of_NaOH_solution.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"F = 1000;//kg/h\n", +"H1 = 116.3;//kJ/kg ( enthalpy of feed solution - 10% NaOH, 305 K )\n", +"H2 = 560.57;//kJ/kg ( enthalpy of thick liquor - 50% NaOH, 380 K )\n", +"Hsteam = 2676;//kJ/kg ( 1atm , 373.15K )\n", +"//by doing material balances,\n", +"P = 200;//kg/h\n", +"mvap = 800;//kg/h\n", +"//Enthalpy balance gives, F*H1 + Q = mvap*Hsteam + P*H2\n", +"Q = (mvap*Hsteam + P*H2)-F*H1;\n", +"disp('kJ/h',Q,'Heat to be supplied = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.28: Heat_transfer_to_air.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"U2 = 0.35*10^3;//kJ\n", +"U1 = 0.25*10^3;//kJ\n", +"//since the tank is rigid the volume does not change during heating, Under constant volume, the change in the internal energy is equal to the heat supplied\n", +"Q = U2 - U1;\n", +"disp('kJ',Q,'Heat transferred to the air = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.29: change_in_internal_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"W = -2.25*745.7;//W ( work done on the system and 1hp = 745.7W)\n", +"Q = -3400;//kJ/h ( Heat transferred to the surrounding )\n", +"U = Q*1000/3600 - W;\n", +"disp('J/s',U,'Rise in the Internal energy of the system = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.2: Kinetic_energy_calculation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"PE = 1.5*10^3;//J\n", +"m = 10;//kg\n", +"g = 9.81;//m/s^2\n", +"v = 50;//m/s\n", +"//PE = mgz\n", +"z = PE / (m*g);\n", +"KE = m* (v^2) / 2;\n", +"disp('m',z,'Height of the body from the ground = ')\n", +"disp('kJ',KE/1000,'Kinetic energy of the body = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.30: Heat_liberation_in_oxidation_of_iron_fillings.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//2Fe + 3/2O2 = Fe2O3\n", +"Hliberated = 831.08;//kJ\n", +"Q = -Hliberated*1000;\n", +"disp('J',Q,'Q = ')\n", +"//P(V) = (n)RT\n", +"//W = P(V) = (n)RT\n", +"n = -1.5;\n", +"R = 8.314;\n", +"T = 298;//K\n", +"W = (n) * R * T;\n", +"disp('J',W,'W = ')\n", +"U = Q - W;\n", +"disp('J',U,'U = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.31: Saturated_steam_and_saturated_water.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Vgas = 0.09;//m^3\n", +"Vliq = 0.01;//m^3\n", +"SVliq = 1.061*10^-3;//m^3/kg\n", +"SVvap = 0.8857;//m^3/kg\n", +"mvap = Vgas / SVvap;\n", +"mliq = Vliq / SVliq;\n", +"Ul = 504.5;//kJ/kg\n", +"Ug = 2529.5;//kJ/kg\n", +"U1 = Ul * mliq + Ug * mvap;\n", +"SVtotal = (Vgas + Vliq)/(mvap + mliq);\n", +"//using steam table , these value of specific volume corresponds to pressure of 148.6bar and internal energy of 2464.6kJ/kg\n", +"U = 2464;//kJ/kg\n", +"Utotal = U * (mvap + mliq);\n", +"//Utotal - U1 = Q - W,but W = o, hence, \n", +"Q = Utotal - U1;\n", +"disp('kJ',Q,'Heat to be added = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.32: constant_volume_and_constant_pressure_process.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m = 10;//kg(air)\n", +"N = m / 29;//kmol\n", +"P1 = 100;//kPa\n", +"T1 = 300;//K\n", +"R = 8.314;\n", +"V1 = N * R * T1 / P1;\n", +"V2 = V1;\n", +"T2 = 600;//K\n", +"Cv = 20.785;//kJ/kmolK\n", +"Cp = 29.099;//kJ/kmolK\n", +"U = N * Cv * (T2 - T1);\n", +"Q = U;\n", +"W = Q - U;\n", +"H = U + N * R * ( T2 - T1 );\n", +"disp('kJ',U,'(a)Change in internal energy at constant volume = ')\n", +"disp('kJ',Q,'heat supplied at constant volume = ')\n", +"disp('kJ',W,'Work done at constant volume = ')\n", +"disp('kJ',H,'Change in Enthalpy at constant volume = ')\n", +"P2 = P1;\n", +"H2 = N * Cp * ( T2 - T1 );\n", +"Q2 = H2;\n", +"U2 = H2 - N * R * (T2 - T1);\n", +"W2 = Q2 - U2;\n", +"disp('kJ',U2,'(b)Change in internal energy at constant Pressure = ')\n", +"disp('kJ',Q2,'heat supplied at constant Pressure = ')\n", +"disp('kJ',W2,'Work done at constant Pressure = ')\n", +"disp('kJ',H2,'Change in Enthalpy at constant Pressure = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.33: series_of_operations.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Cp = 29.3;//kJ/kmol\n", +"R = 8.314;\n", +"Cv = Cp - R;\n", +"T1 = 300;//K\n", +"P1 = 1;//bar\n", +"P2 = 2;//bar\n", +"//step1 - Volume remains constant, therefore the work done is zero and heat supplied is Cv, Also T2/T1 = P2/P1\n", +"T2 = P2 * T1 / P1;\n", +"Q1 = Cv * ( T2 - T1 );\n", +"W1 = 0;\n", +"disp('kJ',W1,'Work done at constant volume = ')\n", +"disp('kJ',Q1,'Heat supplied at constant volume = ')\n", +"//step2 - Process is abdiabatic\n", +"Q2 = 0;\n", +"r = 1.4;\n", +"T3 = T2 * (( P1 / P2 )^((r - 1)/r));\n", +"W2 = Cv * ( T2 - T3 ); \n", +"disp(T3)\n", +"disp('kJ',W2,'Work done in adiabatic process = ')\n", +"disp('kJ',Q2,'Heat supplied in adiabatic process = ')\n", +"//step3 - process is isobaric\n", +"Q3 = Cp * (T1 - T3);\n", +"U3 = Cv * (T1 - T3);\n", +"W3 = Q3 - U3;\n", +"disp('kJ',W3,'Work done at constant pressure = ')\n", +"disp('kJ',Q3,'Heat supplied at constant pressure = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.34: change_in_internal_energy_and_enthalpy_and_heat_supplied_and_work_done.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P1 = 5;//bar\n", +"P2 = 4;//bar\n", +"T1 = 600;//K\n", +"V = 0.1;//m^3\n", +"T2 = 400;//K\n", +"T = 298;//K\n", +"Cp = 30;//J/molK\n", +"//step1 - isothermal condition\n", +"U1 = 0;\n", +"H1 = 0;\n", +"P = 1;//bar\n", +"R = 8.314;\n", +"W1 = R*T1*log(P1/P2);\n", +"Q1 = W1;\n", +"disp('kJ/kmol',U1,'(a)Change in the internal energy in isothermal condition = ')\n", +"disp('kJ/kmol',H1,'Change in the enthalpy energy in isothermal condition = ')\n", +"disp('kJ/kmol',W1,'Work done in isothermal condition = ')\n", +"disp('kJ/kmol',Q1,'Heat supplied in isothermal condition = ')\n", +"N = P * (1.01325 * 10^5) * V / ( R * T );\n", +"Cv = Cp - R;\n", +"U2 = Cv * (T2 - T)*N;\n", +"H2 = Cp * (T2 - T)*N;\n", +"W2 = 0;\n", +"Q2 = U2 + W2;\n", +"disp('kJ/kmol',U2,'(b)Change in the internal energy at constant volume condition = ')\n", +"disp('kJ/kmol',H2,'Change in the enthalpy energy at constant volume condition = ')\n", +"disp('kJ/kmol',W2,'Work done at constant volume condition = ')\n", +"disp('kJ/kmol',Q2,'Heat supplied at constant volume condition = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.35: Heat_removed_in_condenser.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m = 1;//kg\n", +"u2 = 0.5;//m/s\n", +"u1 = 60;//m/s\n", +"H = -3000;//kJ/kg\n", +"//KE = (u^2)/2\n", +"KE = ((u2 ^ 2) - (u1^2))/2000;\n", +"g = 9.81;//m/s^2\n", +"Z1 = 7.5;//m\n", +"Z2 = 2;//m\n", +"//PE = g * (Z)\n", +"PE = g * (Z2 - Z1)/1000;\n", +"W = 800;//kJ/kg\n", +"Q = H + PE + KE + W;\n", +"disp('kJ/kg',Q,'Heat removed from the fluid = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.36: Throttling_process.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"PE = 0;\n", +"W = 0;\n", +"Q = 0;\n", +"//(H) + (u^2)/2 = 0\n", +"//according to the realtion u1 * v1 = u2 * v2\n", +"//(u^2)/2 is negligible, change in enthalpy is 0\n", +"T1 = 623;//K\n", +"P1 = 6000;//kPa\n", +"H1 = 3045.8;//kJ/kg ( Enthalpy of the steam using steam table )\n", +"P2 = 1000;//kPa\n", +"T2 = 570;//K ( value of temperature corresponding to the enthalpy and pressure using the steam table )\n", +"disp('K',T2,'Temperature of superheated steam = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.37: water_pumping_and_energy_balances.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"g = 9.81;//m/s^2\n", +"z = 55;\n", +"PE = g * z;\n", +"KE = 0;\n", +"T2 = 288;//K\n", +"f = 1.5*10^-2;//m^3/min\n", +"D = 1000;//kg/m^3\n", +"m = f * D;\n", +"Qsupp = 500;//kJ/min\n", +"Qlost = 400;//kJ/min\n", +"Qnet = (Qsupp - Qlost) * D / m ;\n", +"W = 2*745.7;//W\n", +"Ws = -W * 0.6 / (m/60);\n", +"H = Qnet - Ws - PE - KE;\n", +"Cp = 4200;\n", +"T1 = H / Cp;\n", +"T = T1 + T2;\n", +"disp('K',T,'The temperature of exit water = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.38: Energy_balance_on_rotary_drier.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m = 1000;//kg/h (dried product)\n", +"// S be the amount of dry solid in the product stream \n", +"Pmoisture1 = 4;//%\n", +"Pmoisture2 = 0.2;//%\n", +"S = m *(1 - P/1000);\n", +"X1 = Pmoisture1/(100 - Pmoisture1);\n", +"X2 = Pmoisture2/(100 - Pmoisture2);\n", +"//let G be the weight of dry air in the air stream \n", +"Y1 = 0.01;//kg water/kg dry solid\n", +"Cp = 1.507;\n", +"Cw = 4.2;\n", +"T1 = 298;//K\n", +"T = 273;//K\n", +"T2 = 333;//K\n", +"Tg1 = 363;//K\n", +"Tg2 = 305;//K\n", +"Hs1 = (Cp + X1 * Cw) * (T1 - T);\n", +"Hs2 = (Cp + X2 * Cw) * (T2 - T);\n", +"//Hg = Cs(Tg - To) + Y*L\n", +"//Cs = 1.005 + 1.884*Y\n", +"L = 2502.3;//kJ/kg dry air\n", +"Hg1 = (1.005 + 1.884 * Y1)*(Tg1 - T) + Y1 * L;\n", +"Q = -40000;//kJ/h\n", +"//Calculating for T2, Hg2 = 32.16 + 2562.59*Y \n", +"//change in enthalpy = Q\n", +"//H1 = S * Hs1 + G * HG1 = 37814.22 + 117.17G\n", +"//H2 = 100728.14 + G* (32.16 + 2561.59*Y)\n", +"//change in enthalpy = Q\n", +"//62913.92 + G *(-85.01 + 2561.59*Y) + 40000 = 0\n", +"//102913.92 + G *(-85.01 + 2561.59*Y) = 0 (1)\n", +"//moisture balance, S*X1 + G*Y1 = S*X2 + G*Y2\n", +"//G*(Y-0.01) = 39.62 (2)\n", +"//solving simultaneously ( 1 ) and ( 2 ), \n", +"Gdry = 3443;//kg/h\n", +"G = Gdry*(1 + Y1);\n", +"disp('kg/h',G,'Air requirement = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.39: Energy_balance_on_the_fractionator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m = 1000;//kg/h ( feed solution )\n", +"//F - mass of feed distilled, W - mass of the bottom product, D - mass of the distillate, xf, xd and xw - weight fraction of actone in feed, distillate and residue resp.\n", +"//total balance, F = D + W\n", +"//Acetone balance, F*xf = D*xd + w*xw\n", +"F = 1000;\n", +"xf = 0.10;\n", +"xd = 0.9;\n", +"xw = 0.01;\n", +"//substituting in above equations,\n", +"D = F * (xf - xw) / (xd - xw);\n", +"W = F - D;\n", +"R = 8;\n", +"L = R * D;\n", +"//material balance around the condenser,G vapour reaching the condenser\n", +"G = L + D;\n", +"Td = 332;//K\n", +"T2 = 300;//K\n", +"Tw = 370;//K\n", +"Tf = 340;//K\n", +"Lacetone1 = 620;//kJ/kg\n", +"Lwater1 = 2500;//kJ/kg\n", +"Ld = xd * Lacetone1 + (1 - xd) * Lwater1;\n", +"Cpacetone = 2.2;//kJ/kgK\n", +"Cpwater = 4.2;//kJ/kgK\n", +"Cp = xd * Cpacetone + (1-xd)*Cpwater;\n", +"H = Ld + Cp * ( Td - T2 );\n", +"Cpc = 4.2;//kJ/kg\n", +"Tc = 30;//K ( change in temperature allowable for cooling water )\n", +"m = G * H / ( Cpc * Tc );\n", +"disp('kg/h',m,'(a)The circulation rate of cooling water = ')\n", +"Qc = G * H;\n", +"Hd = 0;\n", +"Hw = (xw * Cpacetone + (1-xw)*Cpwater)*(Tw - T2);\n", +"Hf = (xf * Cpacetone + (1-xf)*Cpwater)*(Tf - T2);\n", +"Qb = D * Hd + W * Hw + Qc - F * Hf;\n", +"Hcondensation = 2730;//kJ/kg\n", +"msteam = Qb/Hcondensation;\n", +"disp('kg/h',msteam,'(b)Amount of steam supplied = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.3: Work_done_calculation_for_a_gas_confined_in_a_cylinder.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"d = 100 /1000;//m\n", +"m = 50;//kg\n", +"P = 1.01325*10^5;//Pa\n", +"A = %pi * (d^2)/4;\n", +"Fatm = P * A;\n", +"Fwt = m * g;\n", +"Ftotal = Fatm + Fwt;\n", +"P = Ftotal / A;\n", +"disp('bar',P/10^5,'(a)Pressure of the gas = ')\n", +"z = 500/1000;//m\n", +"w = Ftotal * z;\n", +"disp('J',w,'(b)Work done by the gas = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.4: Power_requirement_of_the_pump.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Sgr = 0.879;\n", +"F = 5;//m^3/h\n", +"D = Sgr * 1000;\n", +"m = F * D/3600;//kg/s\n", +"P = 3500;//kPa\n", +"W = P * m * 1000/ D;\n", +"disp('W',W,'Power requirement for the pump = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.5: Specific_enthalpy_of_the_fluid_in_the_tank.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"d = 3;//m\n", +"m = 12500;//kg\n", +"P = 7000;//kPa\n", +"U = 5.3*10^6;//kJ\n", +"Vtank = 4*%pi*((d/2)^3) / 3;\n", +"Vliq = Vtank / 2;\n", +"H = U + P * Vliq;\n", +"disp('kJ/kg',H/m,'Specific enthalpy of the fluid in the tank = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.6: internal_energy_and_enthalpy_change_calculation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P = 101.3;//kPa\n", +"SVl = 1.04 * 10^-3;//m^3/kmol\n", +"SVg = 1.675;//m^3/kmol\n", +"Q = 1030;//kJ\n", +"W = P * 10^3 * (SVg - SVl)/1000;\n", +"U = Q - W;\n", +"H = U + P * 10^3 * (SVg - SVl)/1000;\n", +"disp('kJ/kmol',U,'Change in internal energy = ')\n", +"disp('kJ/kmol',H,'Change in enthalpy = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.7: change_in_internal_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//work is done on the system, hence, W is negative\n", +"W = - 2 * 745.7;//J/s\n", +"//heat is transferres to the surrounding, hence, heat transferred is negative,\n", +"Q = -3000;//kJ/h\n", +"U = Q*1000/3600 - W;\n", +"disp('J/s',U,'Change in internal energy = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.8: reaction_of_iron_with_HCl.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//Fe(s) + 2HCl(aq) = FeCl2(aq) + H2(g)\n", +"MFe = 55.847;\n", +"m = 1;//kg\n", +"Nfe = m * 10^3/MFe;\n", +"Nh2 = Nfe;//(since 1 mole of Fe produces 1 mole of H2)\n", +"T = 300;//K\n", +"R = 8.314;\n", +"//the change in volume is equal to the volume occupied by hydrogen produced\n", +"PV = Nh2 * R * T;\n", +"W = PV;\n", +"disp('kJ',W,'Work done = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.9: Thermic_fluid.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//Cp =1.436 + 2.18*10^-3*T;\n", +"m = 1000/3600;//kg/s\n", +"T1 = 380;//K\n", +"T2 = 550;//K\n", +"x = integrate('1.436 + 2.18*10^-3*T','T',T1,T2);\n", +"Q = m*x;\n", +"disp('kW',Q,'Heat load on the heater = ')" + ] + } +], +"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 +} diff --git a/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/12-Energy_Balance_Thermochemistry.ipynb b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/12-Energy_Balance_Thermochemistry.ipynb new file mode 100644 index 0000000..edd56b5 --- /dev/null +++ b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/12-Energy_Balance_Thermochemistry.ipynb @@ -0,0 +1,743 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12: Energy Balance Thermochemistry" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.10: Standard_heat_of_reaction_calculation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"// C5H12(g) + 8O2(g) = 5CO2(g) + 6H20(l)\n", +"Hfco2 = -393.51;//kJ\n", +"Hfh2o = - 241.826;//kJ\n", +"Hfc5h12 = -146.4;//kJ\n", +"Hvap = 43.967;//kJ/mol\n", +"H1 = 6*Hfh2o +5*Hfco2 - Hfc5h12;\n", +"H2 = 6 * (-Hvap);\n", +"Hreac = H1 + H2;\n", +"disp('kJ',Hreac,'Standard heat of reaction = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.11: Constant_pressure_heat_of_combustion.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m = 1;//kg of oil burned\n", +"mc = 0.9;//kg\n", +"mh2 = 0.1;//kg\n", +"Mc = mc / 12;//kmol\n", +"//C(s) + O2(g) = CO2(g)\n", +"Nh2 = mh2 / 2.016;//kmol\n", +"//change in the no. of gaseous components accompanying the combustion of 1 mole of hydrogen in liquid state is -1/2 mol, therefore for Nh2 mol\n", +"R = 8.314;\n", +"T = 298;//K\n", +"x = Nh2 * R * T / (-2);\n", +"Qv = -43000;//kJ/kg\n", +"Qp = Qv + x;\n", +"disp('kJ/kg',Qp,'the constant pressure heat of combustion = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.12: Heat_of_reaction_for_ammonia_synthesis.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//1 - N2, 2 - H2, 3 - NH3\n", +"a1 = 27.31;\n", +"a2 = 29.09;\n", +"a3 = 25.48;\n", +"b1 = 5.2335*10^-3;\n", +"b2 = -8.374*10^-4;\n", +"b3 = 36.89 * 10^-3;\n", +"c1 = -4.1868 * 10^-9;\n", +"c2 = 2.0139*10^-6;\n", +"c3 = -6.305*10^-6;\n", +"H1 = -46191;//J\n", +"T1 = 298;//K\n", +"//1/2 N2 + 3/2 H2 = NH3 H = -46.191kJ\n", +"//Ht = H + a*T + b*T^2 / 2+ c*T^3 / 3\n", +"//at 298, \n", +"a = a3 - a1 / 2 - 3 * a2 / 2;\n", +"b = b3 - b1 / 2 - 3 * b2 / 2;\n", +"c = c3 - c1 / 2 - 3 * c2 / 2;\n", +"H = H1 -a * T1 - b * (T1^2) / 2 - c * (T1^3) / 3;\n", +"T2 = 700;//K\n", +"H2 = H + a * T2 + b * (T2^2) / 2 + c * (T2^3) / 3;\n", +"disp(H);\n", +"disp('kJ',H2,'Heat of reaction at 700K = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.13: Standard_heat_of_reaction_of_methanol_synthesis.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//CO(g) + 2H2(g) = CH3OH(g)\n", +"T1 = 298;//K\n", +"T2 = 1073;//K\n", +"//Cp(CH3OH) = 18.382 + 101.564 * 10^-3 * T - 28.683 * 10^-6 * T^2\n", +"//Cp(CO) = 28.068 + 4.631 * 10^-3 * T - 2.5773 * 10^4 * T^-2\n", +"//Cp(H2) = 27.012 + 3.509 * 10^-3 * T + 6.9006 * 10^4 * T^-2\n", +"//for reactants,\n", +"H1 = integrate('28.068 + 4.631 * 10^-3 * T - 2.5773 * 10^4 * T^-2','T',T2,T1) + 2 * integrate('27.012 + 3.509 * 10^-3 * T + 6.9006 * 10^4 * T^-2','T',T2,T1);\n", +"//for product,\n", +"H2 = integrate('18.382 + 101.564 * 10^-3 * T - 28.683 * 10^-6 * T^2','T',T1,T2);\n", +"//H298 = Hproducts - Hreactants;\n", +"//CO + 2H2 = CH3OH Ha1 = -238.64kJ\n", +"Ha1 = -238.64;//kJ\n", +"//CH3OH(l) = CH3OH(g) Hvap = 37.98kJ\n", +"Hvap = 37.98;//kJ\n", +"//CO(g) + 2H2(g) = CH3OH(g) Ha2 = -200.66kJ\n", +"Ha2 = Ha1 + Hvap;//kJ\n", +"Hco = -110.6;//kJ/mol\n", +"H298 = Ha2 - (Hco);\n", +"Htotal = H1/1000 + H298 + H2/1000;\n", +"disp('kJ/mol',Htotal,'The heat of reaction at 773K = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.14: Combustion_of_CO.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Nco = 1;//mol CO reacted\n", +"//CO + 1/2 O2 = CO2\n", +"No2 = Nco / 2;\n", +"Pexcess = 100;\n", +"Nosupp = No2 * ( 1 + Pexcess / 100 );//oxygen supplied\n", +"Nn2 = Nosupp * 79 / 21;\n", +"Nco2 = Nco;\n", +"Noremain = Nosupp - No2;\n", +"T1 = 298;//K\n", +"T2 = 400;//K\n", +"Hr1 = -282.99;//kJ\n", +"T3 = 600;//K\n", +"SHco = 29.1;//J/molK\n", +"SHo2 = 29.7;//J/molK\n", +"SHn2 = 29.10;//J/molK\n", +"SHco2 = 41.45;//J/molK\n", +"H1 = (Nosupp * SHo2 + Nn2 * SHn2 + Nco * SHco) * (T1 - T2);//enthalpy of cooling of reactants from 298 to 400 K\n", +"H2 = (Nco2 * SHco2 + Nn2 * SHn2 + Noremain * SHo2) * (T3 - T1);//enthalpy of heating the products from 298K to 600K\n", +"H = H1/1000 + Hr1 + H2/1000;\n", +"disp('kJ',H,'Heat change at 600K = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.15: Heat_added_or_removed_calculatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//CO(g) + H2O(g) = CO2(g) + H2(g) H298 = -41.190\n", +"T1 = 298;//K\n", +"Pconv = 75;//%\n", +"T2 = 800;//K\n", +"H298 = -41.190;//kJ\n", +"Hco = 30.35;//J/molK\n", +"Hco2 = 45.64;//J/molK\n", +"Hwater = 36;//J/molK\n", +"Hh2 = 29.3;//J/molK\n", +"Nco = 1;//mol\n", +"Nh2o = 1;//mol\n", +"Ncofinal = Nco * (1 - Pconv/100);\n", +"Nwaterf = Ncofinal;\n", +"Nco2final = Nco - Ncofinal;\n", +"Nh2final = Nco2final;\n", +"H2 = (Nco2final * Hco2 + Nh2final * Hh2 + Ncofinal * Hco + Nwaterf * Hwater) * (T2 - T1);\n", +"Hr1 = H298 * (Nco - Ncofinal);\n", +"Hr2 = Hr1 * 1000 + H2;\n", +"mh2 = Nh2final * 2.016 * 10^-3;//kg\n", +"//therfore for 1000k H2,\n", +"Hr = Hr2 * 1000 / (mh2 * 1000);//kJ\n", +"disp('kJ',Hr,'Amount of heat change for 1000kg of hydrogen produced = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.16: CO2_O2_and_N2_passed_through_a_bed_of_C.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//CO2(g) + C(s) = 2CO(g) H1298 = 170kJ/mol\n", +"//O2(g) + 2C(s) = 2CO(g) H2298 = -221.2kJ/mol\n", +"T2 = 1298;//K\n", +"T1 = 298;//K\n", +"Hc = 0.02;//kJ/molK\n", +"Ho = 0.03;//kJ/molK\n", +"Hco = 0.03;//kJ/molK\n", +"Hco2 = 0.05;//kJ/molK\n", +"//let the flue gas contain x mol CO2 per mole of oxygen, product contains 2(1+x)mol CO. Nitrogen in reactant and product remain the same\n", +"//enthalpy of cooling xmol CO2, 1 mol O2 and 2 + xmol carbon from 1298 to 298K is given as, H1 = (Hco2 * x + Ho * 1 + Hc * (2 + x)) * (298 - 1298)\n", +"//H1 = (-70x - 70)kJ\n", +"//enthalpy of heating the product, H2 = 2 * ( 1 + x )* Hco * (1298 - 298)\n", +"//H2 = 60 + 60x kJ\n", +"//Hr = 170x - 221.2\n", +"//Htotal = 0 = H1 + H2 + Hr\n", +"x = (221.2 + 70 - 60)/(170 + 60 - 70);\n", +"disp('mol',x,'moles of CO2 present per mol of oxygen in feed stream = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.17: Partial_oxidation_of_natural_gas.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"N = 100;//mol flue gas\n", +"//Carbon balance,\n", +"//x is the feed of methane, w is water in flue ga, y is the oxygen supplied\n", +"xco2 = 0.019;\n", +"xch2o = 0.117;\n", +"xo2 = 0.038;\n", +"xch4 = 0.826;\n", +"xc = xco2 + xch2o + xch4;\n", +"Nc = xc * N;\n", +"Nch4i = Nc;\n", +"//Hydrogen balance,\n", +"xh2 = xch2o + xch4*2;\n", +"w = 2 * (Nch4i) - xh2*N;\n", +"//oxygen balance\n", +"No2s = (xco2 + xch2o/2 + xo2)*N + w/2;\n", +"y = No2s;\n", +"T1 = 298;//K\n", +"T2 = 573;//K\n", +"T3 = 673;//K\n", +"//oxygen cooled from 573K and methane from 673 to 298K \n", +"Ho573 = 30.5;//J/molK\n", +"Hch4673 = 45.9;//J/molK\n", +"H1 = y * Ho573 * (T1 - T2) + Nch4i * Hch4673 * (T1 - T3);\n", +"//CH4 + O2 = CH2O + H2O Hr1 = -282.926kJ\n", +"//CH4 + 2O2 = CO2 + 2H2O Hr2 = -802.372kJ\n", +"Hr1 = -282.926;//kJ\n", +"Hr2 = -802.372;//kJ\n", +"H2 = xch2o*N*Hr1 + xco2*N*Hr2;\n", +"T4 = 873;//K\n", +"Ho = 31.9\n", +"Hch4 = 51.4;\n", +"Hco2 = 46.3;\n", +"Hch2o = 47.1;\n", +"Hh2o = 36.3;\n", +"H3 = ((xco2 * Hco2 + xo2 * Ho + xch4 * Hch4 + Hch2o*xch2o)*N + w * Hh2o)*(T4 - T1);\n", +"Htotal = H1/1000 + H2 + H3/1000;\n", +"Nch2o = xch2o * N;\n", +"mch2o = Nch2o * 30.016/1000;//kg\n", +"//for 1000 kg of formaldehyde produced,\n", +"H = Htotal * 1000 / mch2o;\n", +"disp('kJ',H,'The amount of heat to be removed per 1000kg of formaldehyde produced = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.18: Maximum_allowable_conversion_calculation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Nn2 = 1;//kmol/s ( basis - feed conisting of 1 kmol of N2 and 3 kmol of H2 )\n", +"Nh2 = 3;//kmol/s\n", +"//let x be the fraction converted \n", +"T1 = 700;//K\n", +"Hr1 = -94.2;//kJ/mol\n", +"//heat liberated = Hr1 * x\n", +"//Product consists of 2x kmol NH3, (1-x)kmol N2, and 3(1-x)kmol Hydrogen\n", +"T2 = 800;//K\n", +"Hn2 = 0.03;//kJ/molK\n", +"Hh2 = 0.0289;//kJ/molK\n", +"Hnh3 = 0.0492;//kJ/molK\n", +"//H2 = (1-x)*0.03*10^3 * 100 + 3*(1-x)*0.0289*1000*100 + 2*x*0.0492*1000*100\n", +"//H2 = 11.67*1000 - 1.83*10^3*x kJ\n", +"//reaction is adiabatic, hence, H1 = H2\n", +"//solving this we get,\n", +"x = 0.1215;\n", +"Convmax = x * 100;\n", +"disp('%',Convmax,'The maximum conversion for nitrogen should be ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.19: Theoretical_flame_temperature_calculatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Nco = 1;//mol CO\n", +"// CO + 1/2 O2 = CO2\n", +"O2r = 1;//mol\n", +"N2r = 3.76;//mol\n", +"COr = 1;//mol\n", +"O2p = 0.5;//mol\n", +"N2p = 3.76;//mol\n", +"CO2p = 1;//mol\n", +"Hco = 29.23;//J/molK\n", +"Ho2 = 34.83;//J/molK\n", +"Hn2 = 33.03;//J/molK\n", +"Hco2 = 53.59;//J/molK\n", +"Hcomb1 = -282.99;//kJ/mol\n", +"T1 = 298;//K\n", +"T2 = 373;//K\n", +"H1 = (O2r * Ho2 + N2r * Hn2 + COr * Hco) * (T1 - T2);\n", +"//For product at temp T, H2 = (O2p * Ho2 + N2p * Hn2 + CO2p * Hco2) * (T - T1) \n", +"//For adiabatic condition, -(H1 + Hcomb1) = H2\n", +"T = -(H1 + Hcomb1 * 1000) / (O2p * Ho2 + N2p * Hn2 + CO2p * Hco2) + T1;\n", +"disp('K',T,'Theoretical flame temperature = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.1: Heat_liberated_calculatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"N = 100;//mol gas mixture burned\n", +"//CO(g) + 1/2 O2(g) = CO2 - Hr1 = - 282.91kJ/mol\n", +"//H2(g) + 1/2 O2(g) = H2O - Hr2 = - 241.83kJ/mol\n", +"Hr1 = - 282.91;//kJ/mol\n", +"Hr2 = - 241.83;//kJ/mol\n", +"Nco1 = 20;\n", +"Nh21 = 30;\n", +"Nn21 = 50;\n", +"Htotal = Nco1*Hr1 + Nh21*Hr2;\n", +"disp('kJ',-Htotal,'the amount of heat liberated on the complete combustion of 100mol of the gas mixture = ')\n", +"Ncoreac = Nco1 * 0.9;\n", +"Nh2reac = Nh21 * 0.8;\n", +"Htotal1 = Ncoreac*Hr1 + Nh2reac*Hr2;\n", +"disp('kJ',-Htotal1,'the amount of heat liberated if only 90% of CO and 80% of H2 react of 100mol of the gas mixture = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.20: Temperature_of_products_on_burning_of_hydrogen_gas.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"N = 1;//kmol hydrogen burned\n", +"No = N/2;\n", +"Nosupplied = 2 * No;\n", +"Nair = Nosupplied * 100 / 21;\n", +"Nn2 = Nair - Nosupplied;\n", +"//Reactants, H2 = 1kmol, Air = 4.762 kmol\n", +"//Product, Water vapour = 1kmol, Oxygen = 0.5kmol, N2 = 3.762kmol\n", +"//Cp(water) = 30.475 + (9.652*10^-3)*T + 1.189 * 10^-6 * T^2\n", +"//Cp(nitrogen) = 27.034 + 5.815 * 10^-3 *T - 0.2889 * 10^-6 * T^2\n", +"//Cp(oxygen) = 25.611 + 13.260 * 10^-3 * T - 4.2077 * 10^-6 * T^2\n", +"//H2 = integration(298 to T of (1 * Cp(water) + 0.5 * Cp(oxygen) + 3.762 * Cp(nitrogen)))\n", +"//therefore, H2 = 140.34 * T + 31.222 * 10^-3 * T^2 - 4.928 * 10^-6 * T^2 - 44463.54 kJ\n", +"H298 = -241.826 * 10^3;//kJ\n", +"//H2 = -H1 - H298\n", +"//H1 = 0\n", +"//therefore using equation H2, the value of T is obtained to be\n", +"T = 1609.8;//K\n", +"disp('K',T,'Temperature of the reaction products = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.2: Heat_of_formation_of_methane.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//C(s) + 2H2(g) = CH4(g) Hf = ?\n", +"Hc = -393.51;//kJ/mol\n", +"Hh2 = -285.84;//kJ/mol\n", +"Hch4 = - 890.4;//kJ/mol\n", +"//heat of reaction can be calculated from the heat of combustion data using following equation, the heat of reaction is the sum of the heat of combustion of all the reactants in the desired reaction minus the sum of the heat of combustion of all the products of the desired reaction. Here the reactants are one mole of Carbon and two moles hydrogen, and the product is one mole of methane,there heat of reaction is\n", +"Hf = 1 * Hc + 2 * Hh2 - 1 * Hch4;\n", +"disp('kJ',Hf,'Heat of formation of methane = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.3: Net_heating_value_of_coal.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m = 1;//kg of coal burned\n", +"xc = 0.7;\n", +"xh2 = 0.055;\n", +"xn2 = 0.015;\n", +"xs = 0.03;\n", +"xo = 0.13;\n", +"xash = 0.07;\n", +"Hvap = 2370;//kJ/kg\n", +"C = 29000;//kJ/kg\n", +"Nh2 = xh2 * m / 2.016;\n", +"Nwater = Nh2;// ( amount of water formed )\n", +"mwater = Nwater * 18.016;\n", +"Hreq = mwater * Hvap;\n", +"Hnet = C - Hreq;\n", +"disp('kJ/kg',Hnet,'Net heating value of coal = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.4: Heat_of_reaction_for_esterification_of_ethyl_alcohol.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//C2H5OH(l) + CH3COOH(l) = C2H5COOCH3(l) + H2O(l) H = ?\n", +"Hc2h5oh = -1366.91;//kJ/mol\n", +"Hch3cooh = -871.69;//kJ/mol\n", +"Hc2h5cooch3 = -2274.48;//kJ/mol\n", +"//to calculate heat of reaction from the heat of combustion data , \n", +"//Hreac = Hreac - Hprod\n", +"Hreac = Hc2h5oh + Hch3cooh - Hc2h5cooch3;\n", +"disp('kJ',Hreac,'Heat of reaction for the esterification of ethyl alcohol with acetic acid = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.5: Vapour_phase_hydration_of_ethylene_to_ethanol.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//C2H4(g) + H2O(g) = C2H5OH(g)\n", +"//2CO2(g) + 3H2O(l) = C2H5OH(l) + 3O2(g) H = 1366.91kJ (A)\n", +"Hc2h4 = -1410.99;//kJ/mol\n", +"Hvap = 44.04;//kJ/mol\n", +"Hc2h5oh = 42.37;//kJ/mol\n", +"//C2H4(g) + 3H2O(l) = C2H5OH(l) + 3O2(g) H = -1410.99kJ (B)\n", +"//H2O(l) = H2O(g) H = 44.04kJ (C)\n", +"//C2H5OH(l) = C2H5OH(g) H = 42.37kJ (D)\n", +"//A + B + D - C gives the required reaction\n", +"Ha = 1366.91;//kJ\n", +"Hb = -1410.99;//kJ\n", +"Hc = 44.04;//kJ\n", +"Hd = 42.37;//kJ\n", +"Hreac = Ha + Hb + Hd - Hc;\n", +"disp('kJ',Hreac,'The standard heat of reaction = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.6: Standard_heat_of_formation_of_acetylene.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//C2H5(g) + 5/2O2(g) = 2CO2(g) + H2O(l) H1 = -1299.6kJ (A)\n", +"//C(s) + O2(g) = CO2(g) H2 = -393.51kJ (B)\n", +"//H2(g) + 1/2O2(g) = H2O(l) H3 = -285.84kJ (C)\n", +"//2C(s) + H2(g) = C2H2(g) H = ?\n", +"H1 = -1299.6;//kJ\n", +"H2 = -393.51;//kJ\n", +"H3 = -285.84;//kJ\n", +"Hreac = 2 * H2 + H3 - H1;\n", +"disp('kJ',Hreac,'Heat of formation of acetylene = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.7: Standard_heat_of_roasting_of_iron_pyrites.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m = 100;//kg of pyrites charged\n", +"xfes2in = 0.8;\n", +"xganguein = 0.2;\n", +"xfes2out = 0.05;\n", +"//let x be the FeS2 in the feed, then, Fe2O3 = (80 - x)*159.69 / (119.98*2) and gangue = 20, total = 73.24 + 0.3345, be FeS2 is only 5 % in the product, hence\n", +"x = 0.05 * 73.24 / (1 - 0.05*0.3345);\n", +"mfes2reacted = m*xfes2in - x;\n", +"//4FeS2 + 11O2 = 2Fe2O3 + 8SO2\n", +"Hfes2 = -178.02;//kJ/mol\n", +"Hfe2o3 = -822.71;//kJ/mol\n", +"Hso2 = -296.9;//kJ/mol\n", +"Hreac = 2 * Hfe2o3 + 8 * Hso2 - 4 * Hfes2;\n", +"N = mfes2reacted *1000/ 119.98;\n", +"H = Hreac * N / 4;\n", +"H1 = H/m;//(heat of reaction per kg of coal burnt)\n", +"disp('kJ',H1,'Heat of reaction per 1 kg of coal burned = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.8: Standard_heat_of_formation_of_liquid_methanol.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//CH3OH(l) + 3/2O2(g) = CO2(g) + 2H2O(l) H = -726.55kJ\n", +"H1 = -726.55;//kJ\n", +"Hco2 = -393.51;//kJ/mol\n", +"Hh2o = -285.84;//kJ/mol\n", +"Hch3oh = Hco2 + 2 * Hh2o - H1;\n", +"disp('kJ',Hch3oh,'Heat of formation of liquid methanol = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.9: Gross_heating_value_and_Net_heating_value_calculation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"N = 100;//mol fuel gas\n", +"Nco = 21;\n", +"Nh2 = 15.6;\n", +"Nco2 = 9.0;\n", +"Nch4 = 2;\n", +"Nc2h4 = 0.4;\n", +"Nn2 = 52;\n", +"Hco = 282.99;//kJ/mol ( heat of combustion )\n", +"Hh2 = 285.84;//kJ/mol ( heat of combustion )\n", +"Hch4 = 890.4;//kJ/mol ( heat of combustion )\n", +"Hc2h4 = 1410.99;//kJ/mol ( heat of combustion )\n", +"Hvap = 44.04;//kJ/mol\n", +"H = Nco * Hco + Nh2 * Hh2 + Nch4*Hch4 + Nc2h4*Hc2h4;//kJ\n", +"V = N * 22.4143/1000;\n", +"H1 = H / V;//kJ/m^3\n", +"//on combustion, 1 mol hydrogen gives 1 mol of water, 1 mol of methane gives 2 mol of water and 1 mol of ethylene gives 2 moles of water\n", +"Nwater = Nh2 + 2 * Nch4 + 2 * Nc2h4;\n", +"Hvap1 = Hvap * Nwater;\n", +"Hnet = H1 - Hvap1;\n", +"disp('kJ',Hnet,'Net heating value of the fuel = ')" + ] + } +], +"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 +} diff --git a/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/2-Units_and_Dimensions.ipynb b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/2-Units_and_Dimensions.ipynb new file mode 100644 index 0000000..fe19d62 --- /dev/null +++ b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/2-Units_and_Dimensions.ipynb @@ -0,0 +1,308 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: Units and Dimensions" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1: Mass_flow_rate.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"funcprot(0)\n", +"V1 = 15;//ft^3/min\n", +"ft = 0.3048;//m\n", +"min = 60;//secs\n", +"V = V1*ft^3/min;\n", +"disp('m^3/s',V,'Volumetric flowrate = ')\n", +"D = 1000;//kg/m^3\n", +"M = V * D;\n", +"disp('kg/s',M,'mass flowrate = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2: Poundal_to_Newton.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"funcprot(0)\n", +"ft = 0.3048;//m\n", +"lb = 0.4536;//kg\n", +"P = ft*lb;\n", +"disp('N',P,'1 poundal is 1 ft*lb/s^2 = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3: Conversion_of_N_per_m2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"funcprot(0)\n", +"kgf = 9.80665;//N\n", +"cm = 10^-2;//m\n", +"P = kgf/cm^2;\n", +"disp('N/m^2',P,'1 kgf/cm^2 = ')\n", +"lbf = 32.174;//lb*ft//s^2\n", +"lb = 0.4535924;//kg\n", +"ft = 0.3048;//m\n", +"in = 0.0254;//m\n", +"P1 = lbf*lb*ft/in^2;\n", +"disp('N/m^2',P1,'1 lbf/in^2 = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4: Thermal_conductivity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Q1 = 10000;//kJ/hr\n", +"kJ = 1000;//J\n", +"hr = 3600;//s\n", +"Q = Q1*kJ/hr;//J/s\n", +"disp('J/s',Q,'Q = ')\n", +"x = 0.1;//m\n", +"A = 1//m^2\n", +"T = 800;//K\n", +"k = x*Q/(A*T);\n", +"disp('W/(m*K)',k,'thermal conductivity = ')\n", +"J = 1/4.1868;//cal\n", +"k1 = k*J*hr/1000;\n", +"disp('kcal/(h*m*C)',k1,'thermal conductivity = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5: Mass_and_FPS_system.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"F = 300;//N\n", +"a = 9.81;//m/s^2\n", +"m = F/a;//kg\n", +"disp('kg',m,'mass in kg = ')\n", +"lb = 4.535924/10;//kg\n", +"m1 = m/lb;\n", +"disp('lb',m1,'mass in pounds = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.6: Kinetic_energy_calculation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"z = 15;//m\n", +"PE = 2000;//J\n", +"g = 9.8067;//m/s^2\n", +"m = PE/(z*g);\n", +"disp('kg',m,'mass = ')\n", +"v = 50;//m/s\n", +"KE = 1/2*m*(v^2)/1000;\n", +"disp('kJ',KE,'kinetic energy = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.7: Force_and_pressure_for_piston_cylinder.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"g = 9.81;//m/s^2\n", +"m = 100 * 0.4536;//kg\n", +"P = 101325;//N/m^2\n", +"D1 = 4;//inch\n", +"D = D1 * 2.54 * 10^-2;//m\n", +"A = 3.1415 * (D^2)/4;//m^2\n", +"F1 = P * A;//N\n", +"F2 = m * g;//N\n", +"F = F1 + F2;\n", +"disp('N',F,'Total force acting on the gas = ')\n", +"P1 = F / A;//N/m^2\n", +"P2 = P1/100000;//bar\n", +"P3 = P1/(6.894757 * 10^3);//psi\n", +"disp('N/m^2',P1,'Pressure in N/m^2 = ')\n", +"disp('bar',P2,'Pressure in bar = ')\n", +"disp('psi',P3,'Pressure in psi = ')\n", +"d = 0.4;//m\n", +"W = F * d;\n", +"disp('J',W,'Work done = ')\n", +"PE = m * g * d;\n", +"disp('J',PE,'Change in potential energy = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.8: units_conversion.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//kG = (6.7 * 10^-4) * (( G * (ds + dt) / ds)^0.8) / ((ds^0.4)*(dG^0.2))\n", +"//kG - lbmol/(h ft^2 atm), G - lb/(ft^2 h), ds, dG, dt - feet\n", +"//kG1 - kmol/(m^2 h atm), G1 - kg/(m^2 h), ds1, dG1, dt1 - m\n", +"G = 0.2048;//G1 * lb/(ft^2 h)\n", +"d = 3.2808;//d1 * ft\n", +"ds = d;\n", +"dt = d;\n", +"dG = d;\n", +"kG = 4.885;//kG1 (lbmol/(h ft^2 atm) = 4.885 * kmol/(m^2 h atm))\n", +"C = (6.7 * 10^-4) * (( G * d / ds)^0.8) / ((ds^0.4)*(dG^0.2))* kG;\n", +"disp(C,'Co-efficient = ')\n", +"// this is the constant for the equation\n", +"// the equation thus becomes,\n", +"// kG1 = C * (( G1 * (ds1 + dt1) / ds1)^0.8) / ((ds1^0.4)*(dG1^0.2))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.9: units_conversion.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//Cp = 7.13 + 0.577 * (10^-3) * t + 0.0248 * (10^-6) * t^2 \n", +"//Cp - Btu/lb-mol F, t - F\n", +"//Cp1 - kJ/kmol K , t1 - K\n", +"a = 7.13;\n", +"b = 0.577 * 10^-3;\n", +"c = 0.0248 * 10^-6;\n", +"//t = 1.8 * t1 - 459.67\n", +"Cp = 4.1868;//Cp1 (Btu/lb-mol F = 4.1868 * (kJ/kmol K) )\n", +"//substituting the above, we get,\n", +"//Cp1 = 28.763 + 4.763 * (10^-3) * t1 + 0.3366 * (10^-6) * t^2\n", +"a1 = 28.763;\n", +"b1 = 4.763 * (10^-3);\n", +"c1 = 0.3366 * (10^-6);\n", +"disp(a1,'a1 = ')\n", +"disp(b1,'b1 = ')\n", +"disp(c1,'c1 = ')\n", +"// this are the co efficents for the following equation;\n", +"// Cp1 = a1 + b1 * t1 + c1 * (t1)^2" + ] + } +], +"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 +} diff --git a/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/3-Fundamental_concepts_of_stoichiometry.ipynb b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/3-Fundamental_concepts_of_stoichiometry.ipynb new file mode 100644 index 0000000..907f44c --- /dev/null +++ b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/3-Fundamental_concepts_of_stoichiometry.ipynb @@ -0,0 +1,679 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Fundamental concepts of stoichiometry" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.10: Baume_scale.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Tw = 100;//Tw\n", +"sp.g = Tw/200 + 1;\n", +"Be = 145 - 145/sp.g;\n", +"disp('Be',Be,'specific gravity on beume scale =')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.11: Density_using_API_scale.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"API1 = 30;//API\n", +"sp.g1 = 141.5/(131.5 + API1);// (since, API = 141.5/sp.g -131.5)\n", +"Dwater = 999;//kg/m^3;\n", +"Doil1 = sp.g1 * Dwater;\n", +"V1 = 250;//m^3\n", +"m1 = V1 * Doil1;\n", +"API2 = 15;//API\n", +"sp.g2 = 141.5/(131.5 + API2);// (since, API = 141.5/sp.g -131.5)\n", +"Dwater = 999;//kg/m^3;\n", +"Doil2 = sp.g2 * Dwater;\n", +"V2 = 1000;//m^3\n", +"m2 = V2 * Doil2;\n", +"Dmix = (m1 + m2)/(V1 + V2);\n", +"disp('kg/m^3',Dmix,'density of the mixture =')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.12: Drying_Ammonium_sulphate.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m1 = 250;//kg\n", +"mwater1 = 50;//kg\n", +"mdrysolid1 = m1 - mwater1;\n", +"wfe1 = mwater1 / m1;\n", +"wr1 = mwater1 / mdrysolid1; \n", +"wtpercentw1 = mwater1 * 100 / m1;\n", +"wtpercentd1 = mwater1 * 100 / mdrysolid1;\n", +"a = 90;//%\n", +"mwater2 = mwater1 * (1 - a/100);\n", +"m2 = mdrysolid1 + mwater2;\n", +"wfe2 = mwater2 / m2;\n", +"wr2 = mwater2 / mdrysolid1; \n", +"wtpercentw2 = mwater2 * 100 / m2;\n", +"wtpercentd2 = mwater2 * 100 / mdrysolid1;\n", +"disp(wfe1,'(a)weight fraction of water at entrance =')\n", +"disp(wfe2,'weight fraction of water at exit = ')\n", +"disp(wr1,'(b)weight ratio of water at entrance = ')\n", +"disp(wr2,'weight ratio of water at exit = ')\n", +"disp(wtpercentw1,'(c)weight percent of moisture on wet basis at entrance = ')\n", +"disp(wtpercentw2,'weight percent of moisture on wet basis at exit = ')\n", +"disp(wtpercentd1,'(d)weight percent of moisture on dry basis at entrance = ')\n", +"disp(wtpercentd2,'weight percent of moisture on dry basis at exit = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.13: Percentage_of_water_removed.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"mdrysolid = 100;//kg\n", +"percentin = 25;\n", +"mwaterin = mdrysolid * percentin / 100;\n", +"percentout = 2.5;\n", +"mwaterout = mdrysolid * percentout / 100;\n", +"mremoved = mwaterin - mwaterout;\n", +"percentremoved = mremoved *100 / mwaterin ;\n", +"disp(percentremoved,'percentage of water removed = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.14: Amount_and_percentage_water_removed.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m = 1;//kg\n", +"percent1 = 20;//%\n", +"mwaterin = m * percent1 / 100;\n", +"mdrysolid = m - mwaterin;\n", +"percent2 = 2.44;//%\n", +"mout = mdrysolid / (1 - percent2/100);\n", +"mwaterout = mout - mdrysolid;\n", +"mremoved = mwaterin - mwaterout;\n", +"percentremoved = mremoved * 100 / mwaterin ;\n", +"disp('kg',mremoved,'weight of water removed = ')\n", +"disp('%',percentremoved,'percentage of water removed = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.15: NaCl_solutio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"mwater = 100;//kg\n", +"mNaCl = 35.8;//kg\n", +"msolu = mwater + mNaCl;\n", +"mfr = mNaCl / msolu;\n", +"mpr = mfr * 100;\n", +"MNaCl = 58.45;//kg/kmol\n", +"NNaCl = mNaCl / MNaCl;\n", +"MH2O = 18;//kg/kmol\n", +"NH2O = mwater / MH2O;\n", +"Mfr = NNaCl / (NNaCl + NH2O);\n", +"Mpr = Mfr * 100;\n", +"N = NNaCl *1000 / mwater;\n", +"disp(mfr,'(a)mass fraction of NaCl =')\n", +"disp(mpr,'mass percent of NaCl= ')\n", +"disp(Mfr,'(b)mole fraction of NaCl =')\n", +"disp(Mpr,'mole percent of NaCl = ')\n", +"disp(N,'kmol NaCl per 1000 kg of water =')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.16: Molal_absolute_humidity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Y = 0.015;//kg water vapour/kg dry air\n", +"Mair = 29;//kg/kmol\n", +"Mwater = 18.016;//kg/kmol\n", +"Nwater = Y / Mwater;//kmol\n", +"Nair = 1 / Mair;//kmol\n", +"Mpr = Nwater *100 / (Nwater + Nair);\n", +"Mr = Nwater / Nair;\n", +"disp(Mpr,'(a)mole percent of water vapour = ')\n", +"disp('kmol water/kmol dry air',Mr,'(b) molal absolute humidity =')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17: K2CO3_solutio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"msolu = 100;//g\n", +"MK2CO3 = 138.20;//g/mol\n", +"percent1 = 50;//%\n", +"mK2CO3 = percent1 *msolu / 100;\n", +"NK2CO3 = mK2CO3 / MK2CO3;\n", +"mwater = msolu - mK2CO3;\n", +"Nwater = mwater / 18.06;\n", +"Mpr = NK2CO3 * 100 / (NK2CO3 + Nwater);\n", +"sp.gr =1.53;\n", +"Vsolu = msolu/sp.gr;//mL\n", +"Vwater = mwater / 1;//mL\n", +"Vpr = Vwater * 100/ Vsolu;\n", +"Molality = NK2CO3 / (mwater * 10^-3);\n", +"Molarity = NK2CO3 / (Vsolu * 10^-3);\n", +"Eq.wt = MK2CO3 / 2;\n", +"No = mK2CO3/Eq.wt;\n", +"N = No / (Vsolu * 10^-3);\n", +"disp('%',Mpr,'(a)Mole prcent of salt = ') \n", +"disp('%',Vpr,'(b)Volume percent of water = ')\n", +"disp('mol/kg',Molality,'(c)Molality = ')\n", +"disp('mol/L',Molarity,'(d)Molarity = ')\n", +"disp('N',N,'(e)Normality')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.18: Molarity_and_Molality_of_Alcohol_solution.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"msolu = 100;//kg\n", +"percent1 = 60;//%\n", +"Dwater = 998;//kg/m^3\n", +"Dalco = 798;//kg/m^3\n", +"Dsolu = 895;//kg/m^3\n", +"Vsolu = msolu/Dsolu;\n", +"malco = msolu * percent1 / 100;\n", +"Valco = malco / Dalco;\n", +"Vpr = Valco * 100 / Vsolu;\n", +"Malco = 46.048;//kg/kmol\n", +"N = malco/Malco;\n", +"Molarity = N/(Vsolu );\n", +"mwater = msolu - malco;\n", +"Molality = N * 1000 /mwater;\n", +"disp('%',Vpr,'(a)Volume percent of ethanol in solution = ')\n", +"disp('mol/L',Molarity,'(b)Molarity = ')\n", +"disp('mol/(kg of water)',Molality,'(c)Molality = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.19: CO_to_phosgene.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//CO + CL2 = COCl2\n", +"Np = 12;//moles\n", +"NCl2 = 3;//moles\n", +"NCO = 8;//moles\n", +"N1Cl2 = NCl2 + Np;\n", +"N1CO = NCO + Np;\n", +"pr.ex = (N1CO - N1Cl2)* 100/N1Cl2;\n", +"pr.co = (N1Cl2-NCl2) * 100/ N1Cl2;\n", +"T = Np + NCl2 + NCO;\n", +"T1 = N1Cl2 + N1CO;\n", +"N = T / T1;\n", +"disp('%',pr.ex,'(a)percent excess of CO = ')\n", +"disp('%',pr.co,'(b)percent conversion = ')\n", +"disp(N,'(c)Moles of total products per mole of total reactants = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.1: pounds_per_minute_to_kmol_per_hour.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m = 1000 * 0.4536;//kg/min\n", +"M = 30.24;//gm/mol\n", +"m1 = m * 60 / M;\n", +"disp('kmol/hr',m1,'molar folw rate = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.20: Extent_of_reaction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Nn2 = 2;//moles\n", +"Nh2 = 7;//moles\n", +"Nnh3 = 1;//mole\n", +"n0 = Nn2 + Nh2 + Nnh3;\n", +"v = 2 - 1- 3;\n", +"//YN2 = (2 - E)/(10 - 2*E)\n", +"//Yh2 = (7-3*E)/(10 - 2*E)\n", +"//Ynh3 = (1 + 2*E)/(10 - 2*E)\n", +"disp('mole fraction of N2 = (2 - E)/(10 - 2*E)')\n", +"disp('mole fraction of H2 = (7-3*E)/(10 - 2*E)')\n", +"disp('mole fraction of NH3 = (1 + 2*E)/(10 - 2*E)')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.21: ethylene_to_ethanol.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"msolu = 100;//g\n", +"MK2CO3 = 138.20;//g/mol\n", +"percent1 = 50;//%\n", +"mK2CO3 = percent1 *msolu / 100;\n", +"NK2CO3 = mK2CO3 / MK2CO3;\n", +"mwater = msolu - mK2CO3;\n", +"Nwater = mwater / 18.06;\n", +"Mpr = NK2CO3 * 100 / (NK2CO3 + Nwater);\n", +"sp.gr =1.53;\n", +"Vsolu = msolu/sp.gr;//mL\n", +"Vwater = mwater / 1;//mL\n", +"Vpr = Vwater * 100/ Vsolu;\n", +"Molality = NK2CO3 / (mwater * 10^-3);\n", +"Molarity = NK2CO3 / (Vsolu * 10^-3);\n", +"Eq.wt = MK2CO3 / 2;\n", +"No = mK2CO3/Eq.wt;\n", +"N = No / (Vsolu * 10^-3);\n", +"disp('%',Mpr,'(a)Mole prcent of salt = ') \n", +"disp('%',Vpr,'(b)Volume percent of water = ')\n", +"disp('mol/kg',Molality,'(c)Molality = ')\n", +"disp('mol/L',Molarity,'(d)Molarity = ')\n", +"disp('N',N,'(e)Normality')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2: Number_of_molecules.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"MK = 39.1;\n", +"MC = 12.0;\n", +"MO = 16;\n", +"MK2CO3 = MK * 2 + MC + MO * 3;\n", +"m = 691;\n", +"N = m / MK2CO3;\n", +"A = 6.023 * 10^23;\n", +"molecules = N * A;\n", +"disp('molecules',molecules,'Total no. of molecules =')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3: Moles_of_sodium_sulphate.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Na = 23;//gm/mol\n", +"MNa = 100;//kg\n", +"N = MNa * 1000 / Na ;//g-atoms \n", +"NNa2SO4 = N / 2;\n", +"disp('kmol',NNa2SO4,'(a) moles of sodium sulphate = ')\n", +"MNa2SO4 = 142.06;\n", +"m = NNa2SO4 * MNa2SO4/1000;\n", +"disp('kg',m,'(b)kilograms of sodium sulphate = ') " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4: Pyrites_and_oxygen_moles.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"MFe = 55.85;\n", +"MO = 16;\n", +"MS = 32;\n", +"MFeS2 = MFe + MS * 2;\n", +"MFe2O3 = MFe * 2 + MO * 3;\n", +"MSO3 = MS + MO * 3;\n", +"m1SO3 = 100;//kg\n", +"N1 = m1SO3 / (MSO3);//kmol\n", +"NFeS2 = N1 / 2;\n", +"mFeS2 = NFeS2 * MFeS2;\n", +"disp('kg',mFeS2,'mass of pyrites to obtain 100kg of SO3 =')\n", +"m2SO3 = 50;//kg\n", +"N2 = m2SO3 / (MSO3);//kmol\n", +"NO2 = N2 * 15/8;\n", +"mO2 = NO2 * MO * 2;\n", +"disp('kg',mO2,'mass of Oxygen consumed to produce 50kg of SO3 =')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.5: Volume_of_oxyge.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"MKClO3 = 122.55\n", +"mKClO3 = 100;//kg\n", +"NKClO3 = mKClO3 / MKClO3;\n", +"NO2 = 3 * NKClO3 / 2;\n", +"V1 = 22.4143;//m^3/kmol;\n", +"V = V1 * NO2;\n", +"disp('m^3',V,'volume of oxygen produced = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.6: Reaction_of_iron_and_steel.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"mH2 = 100;//kg\n", +"NH2 = mH2/2.016;\n", +"NFe = 3 * NH2 / 4;\n", +"mFe = NFe * 55.85;\n", +"disp('kg',mFe,'(a)mass of iron required = ')\n", +"NH2O = NH2 ;\n", +"mH2O = NH2O * 18;\n", +"disp('kg',mH2O,'mass of steam required =')\n", +"V1 = 22.4143;//m^3/kmol;\n", +"V = V1 * NH2;\n", +"disp('m^3',V,'Volume of hydrogen = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.7: Equivalent_weight.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"MCaCO3 = 100.08;\n", +"GE = MCaCO3 / 2;\n", +"disp('g',GE,'Gram equivalent wt. of CaCO3 =')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.8: Specific_gravity_calculatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m1 = 1;//kg (mass in air)\n", +"m2 = 0.9;//kg (mass in water)\n", +"m3 = 0.82;//kg (mass in liquid)\n", +"L1 = m2 - m1;//kg (loss of mass in water)\n", +"L2 = m3 - m1;//kg (loss of mass in liquid)\n", +"sp.g = L2 /L1;\n", +"disp(sp.g,'specific gravity of liquid = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.9: Specific_gravity_of_mixture.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m1 = 10;//kg\n", +"m2 = 5;//kg\n", +"sp.g1 = 1.17;\n", +"sp.g2 = 0.83;\n", +"Dwater = 1000;//kg/m^3\n", +"DA = Dwater * sp.g1;\n", +"DB = Dwater * sp.g2;\n", +"V1 = m1 / DA;\n", +"V2 = m2 / DB;\n", +"V = V1 + V2;\n", +"Dmix = (m1 + m2)/ V ;\n", +"sp.g3 = Dmix / Dwater;\n", +"disp(sp.g3,'specific gravity of mixture =')" + ] + } +], +"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 +} diff --git a/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/4-Ideal_Gases_and_Gas_Mixtures.ipynb b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/4-Ideal_Gases_and_Gas_Mixtures.ipynb new file mode 100644 index 0000000..f70d31d --- /dev/null +++ b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/4-Ideal_Gases_and_Gas_Mixtures.ipynb @@ -0,0 +1,583 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Ideal Gases and Gas Mixtures" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.10: Absorption_column_for_H2S.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"V = 100;//m^3\n", +"P = 600;//kPa\n", +"T = 310;//K\n", +"per1 = 20;//% ( H2S entering )\n", +"per2 = 2;//% ( H2S leaving )\n", +"Pstp = 101.325;//kPa\n", +"Tstp = 273.15;//K\n", +"Vstp = 22.414;//m^3/kmol\n", +"Vstp1 = V * P * Tstp / ( T * Pstp)\n", +"N = Vstp1 / Vstp;\n", +"N1 = N * per1 / 100;\n", +"N2 = N - N1;// ( 2 = inerts)\n", +"Nleaving = N2 / ( 1 - per2 / 100);\n", +"N1leaving = per2 * Nleaving / 100;\n", +"mabsorbed = (N1 - N1leaving) * 34.08;//( molecular wt. = 34.08)\n", +"mgiven = 100;//kg/h\n", +"Vactual = mgiven * V / mabsorbed;\n", +"Nactual = Nleaving * Vactual / V;// actual moles leaving\n", +"Vstpl = Nactual * Vstp;// volume leaving at STP\n", +"P2 = 500;//kPa\n", +"T2 = 290;//K\n", +"V2 = Vstpl * Pstp * T2 / ( P2 * Tstp);\n", +"Precovery = (N1 - N1leaving)*100 / N1;\n", +"disp('m^3/h',Vactual,'(a)Volume of gas entering per hour')\n", +"disp('m^3/h',V2,'(b)Volume of gas leaving per hour')\n", +"disp('%',Precovery,'(c)Percentage recovery of H2S')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.11: Reaction_stoichiometry_for_preparation_of_ammonia.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//N2 + 3H2 = 2NH3\n", +"V1 = 100;//m^3 ( 1 = N2)\n", +"V2 = V1 * 3;// ( According to Avagadros principle, equal volumes of all gases under similar condition contains same no. of moles)\n", +"disp('m^3',V2,'(a)Volume of hydrogen required at same condition = ')\n", +"P1 = 20;//bar\n", +"T1 = 350;//K\n", +"P2 = 5;//bar\n", +"T2 = 290;//K\n", +"V3 = 3 * V1 * P1 * T2 / ( P2 * T1);\n", +"disp('m^3',V3,'(b)Volume required at 50 bar and 290K = ')\n", +"m = 1000;//kg ( ammonia )\n", +"N = m / 17.03;//kmol\n", +"N1 = N/2;// ( nitrogen)\n", +"N2 = N * 3 / 2;//(hydrogen)\n", +"P3 = 50;//bar\n", +"T3 = 600;//K\n", +"Pstp = 1.01325;//bar\n", +"Tstp = 273.15;//K\n", +"Vstp = 22.414;//m^3/kmol\n", +"V1stp = N1 * Vstp;\n", +"V4 = V1stp * Pstp * T3 / (P3 * Tstp);// ( nitrogen at 50 bar and 600K)\n", +"V5 = V4 * 2 ;// ( ammonia at 50 bar and 600K)\n", +"V6 = V4 * 3 ;// ( hydrogen at 50 bar and 600K)\n", +"disp('m^3',V4,'(c)Volume of nitrogen at 50 bar and 600K')\n", +"disp('m^3',V6,' Volume of hydrogen at 50 bar and 600K')\n", +"disp('m^3',V5,' Volume of ammonia at 50 bar and 600K')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.12: Reaction_stoichiometry_for_preparation_of_producer_gas.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"N = 100;//kmol producer gas\n", +"P1 = 25;//% ( Carbon monoxide )\n", +"P2 = 4;//% ( Carbon Dioxide )\n", +"P3 = 3;//% ( Oxygen )\n", +"P4 = 68;//% ( Nitrogen )\n", +"N1 = N * P1/100;\n", +"N2 = N * P2/100;\n", +"N3 = N * P3/100;\n", +"N4 = N * P4/100;\n", +"NC = N1 + N2;\n", +"m = NC * 12;\n", +"Ngas = N / m;//moles of gas for 1 kg of Carbon\n", +"Vstp = 22.4143;//m^3/kmol\n", +"Vstp1 = Vstp * Ngas;\n", +"P = 1;//bar\n", +"T = 290;//k\n", +"Pstp = 1.01325;//bar\n", +"Tstp = 273.15;//K\n", +"V = T * Vstp1 * Pstp / (Tstp * P );\n", +"disp('m^3',V,'(a)Volume of gas at 1 bar and 290 K per kg Carbon = ')\n", +"//CO + 1/2 * O2 = CO2\n", +"Nrequired = N1/2 - N3;//(oxygen required)\n", +"Nsupplied = Nrequired * 1.2;\n", +"PO1 = 21;//% ( Oxygen percent in air)\n", +"Nair = Nsupplied * 100/PO1;\n", +"V1 = 100;//m^3;\n", +"Vair = V1 * Nair / N;\n", +"disp('m^3',Vair,'(b)Volume of air required = ')\n", +"NCO2 = N2 + N1;\n", +"NO2 = Nsupplied - Nrequired;\n", +"NN2 = N4 + (Vair * (1 - PO1/ 100));\n", +"Ntotal = NCO2 + NO2 + NN2;\n", +"PCO2 = NCO2 * 100 / Ntotal;\n", +"PO2 = NO2 * 100 / Ntotal;\n", +"PN2 = NN2 * 100 / Ntotal;\n", +"disp('%',PCO2,'Percent composition of Carbon Dioxide = ')\n", +"disp('%',PO2,'Percent composition of Oxygen = ')\n", +"disp('%',PN2,'Percent composition of Nitrogen = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.13: Reaction_stoichiometry_for_preparation_of_Chlorine_from_HCl.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//4HCl + O2 = 2Cl2 + 2H2O\n", +"n = 1;//mol ( Basis 1 mol of HCl )\n", +"NO2 = n / 4;\n", +"NO2supp = 1.5 * NO2;\n", +"Nair = NO2supp * 100 / 21;\n", +"V = 100;//m^3\n", +"Vair = V * Nair / n;\n", +"disp('m^3',Vair,'(a)Volume of air admitted = ')\n", +"P1 = 80;//% ( HCl converted)\n", +"Ncon = n * P1 /100;\n", +"N2 = Ncon/4;// oxygen required\n", +"NH2O = Ncon / 2;\n", +"NCl2 = Ncon / 2;\n", +"nHCl = n - Ncon;\n", +"nO2 = NO2supp - N2;\n", +"Nnitro = Nair - NO2supp;\n", +"Ntotal = nHCl + nO2 + NH2O + NCl2 + Nnitro;\n", +"V1 = V * Ntotal;\n", +"P1 = 1;//bar\n", +"T1 = 290;//K\n", +"P2 = 1.2;//bar\n", +"T2 = 400;//K\n", +"V2 = V1 * P1 * T2 / ( P2 * T1);\n", +"disp('m^3',V2,'(b)Volume of gas leaving = ')\n", +"VCl2 = NCl2 * V;\n", +"Pstp = 1.01325;//bar\n", +"Tstp = 273;//K\n", +"Vstp = 22.4143;//m^3/kmol\n", +"Vstp1 = Tstp * P1 * VCl2 / (T1 * Pstp);\n", +"Nstp = Vstp1/Vstp;\n", +"m = Nstp * 70.90;\n", +"disp('kg',m,'(c)Kilograms of Chlorine produced = ')\n", +"Ntotaldry = nHCl + nO2 + NCl2 + Nnitro;//dry basis\n", +"p1 = nHCl*100/Ntotaldry;\n", +"p2 = nO2*100/Ntotaldry;\n", +"p3 = NCl2*100/Ntotaldry;\n", +"p4 = Nnitro*100/Ntotaldry;\n", +"disp('%',p1,'(d)Percent composition of HCl in exit stream = ')\n", +"disp('%',p2,' Percent composition of Oxygen in exit stream = ')\n", +"disp('%',p3,' Percent composition of Chlorine in exit stream = ')\n", +"disp('%',p4,' Percent composition of nitrogen in exit stream = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.14: Reaction_stoichiometry_for_dissociation_of_Carbon_Dioxide.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"// CO2 = CO + 1/2 * O2\n", +"P1 = 1;//bar\n", +"T1 = 3500;//K\n", +"P2 = 1;//bar\n", +"T2 = 300;//K\n", +"V2 = 25;//L\n", +"V1 = V2 * P2 * T1 / ( P1 * T2 );\n", +"disp('L',V1,'(a)Final volume of gas if no dissociation occured = ')\n", +"Pstp = 1.01325;//bar\n", +"Tstp = 273;//K\n", +"Vstp = 22.4143;//m^3\n", +"N2 = V2 * P2 * Tstp / ( Vstp * Pstp * T2);\n", +"// let x be the fraction dissociated, then after dissociation,\n", +"// CO2 = (1 - x)mol, CO = xmol, O2 = (0.5*x)mol\n", +"//total moles = 1 - x + x + o.5 * x = 1 + 0.5 * x \n", +"V = 350;//L\n", +"N1 = V * P1 * Tstp / (Vstp * Pstp * T1);\n", +"// 1 + 0.5 * x = N1, therefore\n", +"x = (N1 - 1) / 0.5 ;\n", +"p = x*100;\n", +"disp('%',p,'(b)CO2 converted = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1: gas_constant_R.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P1 = 760;//mmHg\n", +"T1 = 273.15;//K\n", +"V1 = 22.4143 * 10^-3;//m^3/mol\n", +"R1 = P1 * V1 / T1;\n", +"disp('m^3 mmHg / (molK)',R1,'Gas constant R =')\n", +"P2 = 101325;//N/m^2\n", +"T2 = 273.15;//K\n", +"V2 = 22.4143 * 10^-3;//m^3/mol\n", +"R2 = P2 * V2 / T2;//J/molK\n", +"R3 = R2 / 4.184;//cal/molK\n", +"disp('cal/molK',R3,'Gas constant R in MKS system =')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2: Molar_volume_of_air.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"T = 350;//K\n", +"P = 1;//bar\n", +"V1 = 22.4143 * 10^-3;//m^3 (suffix 1 represents at STD)\n", +"P1 = 1.01325;//bar\n", +"T1 = 273.15;//K\n", +"V = P1 * V1 * T/(T1 * P);\n", +"disp('m^3/mol',V,'Molar volume =')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3: Ideal_gas_equatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P = 10;//bar\n", +"T = 300;//K\n", +"V = 150;//L\n", +"P1 = 1.01325;//bar ( \suffix 1 represents at STD)\n", +"T1 = 273.15;//K\n", +"V2 = T1 * P * V /(T * P1);//m^3\n", +"V1 = 22.4143;//m^3/mol\n", +"N = V2 / V1;//mol\n", +"MO2 = 32;\n", +"m = N * MO2/1000;\n", +"disp('kg',m,'Mass of oxygen in the cylinder = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4: Maximum_allowable_temperature_of_tyre.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P = 195;//kPa\n", +"T = 273;//K\n", +"P1 = 250;//kPa\n", +"T1 = P1 * T / P;\n", +"disp('K',T1,'Maximum temperature to which tyre may be heated = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.5: Pressure_calculatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"V = 250;//L\n", +"T = 300;//K\n", +"V1 = 1000;//L\n", +"P1 = 100;//kPa\n", +"T1 = 310;//K\n", +"P = T * P1 * V1 /(T1 * V);\n", +"disp('kPa',P,'Original pressure in the cylinder = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.6: weight_composition_and_density_calculation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Vper1 = 70;//% ( 1 = HCl)\n", +"Vper2 = 20;//% ( 2 = Cl2)\n", +"Vper3 = 10;//% ( 3 = CCl4)\n", +"M1 = 36.45;\n", +"M2 = 70.90;\n", +"M3 = 153.8;\n", +"m1 = Vper1 * M1;\n", +"m2 = Vper2 * M2;\n", +"m3 = Vper3 * M3;\n", +"mper1 = m1 * 100/(m1+ m2 + m3);\n", +"mper2 = m2 * 100/(m1+ m2 + m3);\n", +"mper3 = m3 * 100/(m1+ m2 + m3);\n", +"disp(mper1,' (a) weight percent of HCl= ')\n", +"disp(mper2,'weight percent of Cl2= ')\n", +"disp(mper3,'weight percent of CCl4= ')\n", +"m = (m1 + m2 + m3)/(Vper1 + Vper2 + Vper3);\n", +"disp('kg',m,'(b)average molecular weight = ')\n", +"v = 22.4143;//m^3/kmol\n", +"Vtotal = v * (Vper1 + Vper2 + Vper3);\n", +"D = (m1 + m2 + m3)/Vtotal;\n", +"disp('kg/m^3',D,'(c)Density at standard condiions = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.7: calculations_for_natural_gas.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"per1 = 93;//% ( 1 = methane)\n", +"per2 = 4.5;//% (2 = ethane)\n", +"per3 = 100 - (per1 + per2);//% ( 3 = N2);\n", +"T = 300;//K\n", +"p = 400;//kPa\n", +"P3 = p * per3 / 100;\n", +"v = 10;//m^3\n", +"V2 = per2 * v / 100;\n", +"M1 = 16.032;\n", +"M2 = 30.048;\n", +"M3 = 28;\n", +"N1 = per1;\n", +"N2 = per2;\n", +"N3 = per3;\n", +"m1 = M1 * N1;\n", +"m2 = M2 * N2;\n", +"m3 = M3 * N3;\n", +"m = m1 + m2 + m3;\n", +"Vstp = 100 * 22.4143 * 10^-3;//m3 at STP\n", +"D = m /(1000 * Vstp);\n", +"Pstp = 101.325;//kPa\n", +"T1 = 273.15;//K\n", +"V = T * Pstp * Vstp / ( T1 * p);\n", +"D1 = m /(1000 * V);\n", +"Mavg = m /100;\n", +"mper1 = m1 * 100 / (m1 + m2 + m3);\n", +"mper2 = m2 * 100 / (m1 + m2 + m3);\n", +"mper3 = m3 * 100 / (m1 + m2 + m3);\n", +"disp('kPa',P3,'(a) Partial pressure of nitrogen = ')\n", +"disp('m^3',V2,'(b) pure-component volume of ethane = ')\n", +"disp('kg/m^3',D,'(c) Density at standard conditions = ')\n", +"disp('kg/m^3',D1,'(d) Density at given condition = ')\n", +"disp(Mavg,'(e) Average molecular weight = ')\n", +"disp('%',mper1,'(f) weight percent of Methane = ')\n", +"disp('%',mper2,'weight percent of Ethane = ')\n", +"disp('%',mper3,'weight percent of Nitrogen = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.8: Volume_of_gas_from_absorption_columnn.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"per1 = 20;//% ( 1 = ammonia)\n", +"Vstp = 22.4143;//m^3/kmol\n", +"Pstp = 101.325;//kPa\n", +"Tstp = 273.15;//K\n", +"V1 = 100;//m^3\n", +"P1 = 120;//kPa\n", +"T1 = 300;//K\n", +"P2 = 100;//kPa\n", +"T2 = 280;//K\n", +"per2 = 90;//% (absorbed)\n", +"N = V1 * P1 * Tstp / (Vstp * Pstp * T1);//kmol\n", +"Nair = (1 - per1 / 100) * N;\n", +"N1 = per1 * N/100;\n", +"Nabs = per2 * N1 / 100;\n", +"N2 = N1 - Nabs;//leaving\n", +"Ntotal = Nair + N2;\n", +"Vstp1 = Ntotal * Vstp;//m^3\n", +"V2 = Vstp1 * Pstp * T2 / (Tstp * P2);\n", +"disp('m^3',V2,'Volume of gas leaving = ' )" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.9: dehumidificatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"V = 100;//m^3\n", +"Ptotal = 100;//kPa\n", +"Pwater = 4;//kPa\n", +"Pair = Ptotal - Pwater;\n", +"T = 300;//K\n", +"T1 = 275;//K\n", +"Vstp = 22.4143;//m^3/kmol\n", +"Tstp = 273.15;//K\n", +"Pstp = 101.325;//kPa\n", +"Pwater1 = 1.8;//kPa\n", +"Pair1 = Ptotal - Pwater1;\n", +"V1 = V * Pair * T1 / ( T * Pair1);\n", +"Nwater = V * Pwater * Tstp/ (Vstp * Pstp * T);\n", +"Nwater1 = V1 * Pwater1 * Tstp/ (Vstp * Pstp * T1);\n", +"m = (Nwater - Nwater1) * 18.02;\n", +"disp('m^3',V1,'(a) volume of air after dehumidification = ')\n", +"disp('kg',m,'(b) Mass of water vapour removed = ')" + ] + } +], +"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 +} diff --git a/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/5-Properties_of_Real_Gases.ipynb b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/5-Properties_of_Real_Gases.ipynb new file mode 100644 index 0000000..0aae874 --- /dev/null +++ b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/5-Properties_of_Real_Gases.ipynb @@ -0,0 +1,356 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Properties of Real Gases" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1: Van_der_waals_equation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"V = 0.6;//m^3;\n", +"T = 473;//K\n", +"N = 1 * 10 ^ 3;//mol\n", +"R = 8.314;//Pa * m^3/molK\n", +"P = N * R * T / (V * 10^5);\n", +"disp('bar',P,'(a)Pressure calculated using ideal gas equation = ')\n", +"a = 0.4233;//N * m^4 / mol^2\n", +"b = 3.73 * 10^-5;//m^3/mol\n", +"P1 = (R*T/(V/N - b)-a/(V/N)^2)/10^5;\n", +"disp('bar',P1,'(a)Pressure calculated using van der waals equation = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2: Van_der_waals_equation_for_CO2_gas.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P = 10^7;//Pa;\n", +"T = 500;//K\n", +"R = 8.314;//Pa * L / mol K\n", +"V = N * R * T / ( P * 1000);\n", +"disp('m^3',V,'(a)Volume of CO2 calculated using ideal gas equation = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3: Redlich_Kwong_equation_for_gaseous_ammonia.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"V = 0.6 * 10^-3;//m^3\n", +"T = 473;//K\n", +"Tc = 405.5;//K\n", +"Pc = 112.8 * 10 ^ 5//Pa\n", +"R = 8.314;\n", +"a = 0.4278 * (R^2) * (Tc ^ 2.5)/Pc;\n", +"b = 0.0867 * R * Tc / Pc;\n", +"P1 = (R*T/(V - b) - a/((T^0.5)*V*(V + b)))/10^5;\n", +"disp('bar',P1,'Pressure developed by gas = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4: Molar_Volume_calculation_for_gaseous_ammonia.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P = 10^6;//Pa\n", +"T = 373;//K\n", +"Tc = 405.5;//K\n", +"Pc = 112.8 * 10 ^ 5//Pa\n", +"R = 8.314;\n", +"a = 0.4278 * (R^2) * (Tc ^ 2.5)/Pc;\n", +"b = 0.0867 * R * Tc / Pc;\n", +"//P1 = (R*T/(V - b) - a/((T^0.5)*V*(V + b)))/10^5;\n", +"//10^6=((8.314*373)/(V-2.59*10^-5))-8.68/((373^0.5)*V*(V+2.59*10^-5) \n", +"//solving this we get,\n", +"V = 3.0 * 10^-3;//m^3/mol\n", +"disp('m^3/mol',V,'molar volume of gas = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5: virial_equation_of_state.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"B = -2.19 * 10^-4;//m^3/mol\n", +"C = -1.73 * 10^-8;//m^6/mol^2\n", +"P = 10;//bar\n", +"T = 500;//K\n", +"//virial equation is given as, Z = PV/RT = 1 + B/V + C/V^2\n", +"//V = (RT/P)*(1 + B/V + C/V^2)\n", +"// now by assuming different values for V on RHS and checking for corresponding V on LHS, we have to assume such value of V on RHS by which we get the same value for LHS V\n", +"//by trial and error we get,\n", +"V = 3.92 * 10^-3;//m^3\n", +"disp('m^3',V,'Molar volume of methanol = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.6: Lyderson_method_for_n_butane.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"T = 510;//K\n", +"P = 26.6;//bar\n", +"Tc = 425.2;//K\n", +"Pc = 38;//bar\n", +"Zc = 0.274;\n", +"R = 8.314;\n", +"Pr = P / Pc;\n", +"Tr = T / Tc;\n", +"disp(Pr,'Pr = ')\n", +"disp(Tr,'Tr = ')\n", +"//From fig. 5.4 and 5.5 from the text book\n", +"Z = 0.865;\n", +"D = 0.15;\n", +"Z1 = Z + D * ( Zc - 0.27);\n", +"V = R * T * Z1 / (P * 10^5);\n", +"disp('m^3/mol',V,'Molar volume of n-butane = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.7: Pitzer_correlation_for_n_butane.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"T = 510;//K\n", +"P = 26.6;//bar\n", +"Tc = 425.2;//K\n", +"Pc = 38;//bar\n", +"w = 0.193;\n", +"R = 8.314;\n", +"Pr = P / Pc;\n", +"Tr = T / Tc;\n", +"disp(Pr,'Pr = ')\n", +"disp(Tr,'Tr = ')\n", +"//From fig. 5.6 and 5.7 from the text book\n", +"Z0 = 0.855;\n", +"Z1 = 0.042;\n", +"Z = Z0 + w*Z1;\n", +"disp(Z,'Z = ')\n", +"V = R * T * Z / (P * 10^5);\n", +"disp('m^3/mol',V,'Molar volume of n-butane = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.8: Molar_volume_by_different_methods.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P = 6000;//kPa\n", +"T = 325;//K\n", +"xn2 = 0.4;\n", +"xethane = 0.6;\n", +"an2 = 0.1365;//N m^4 / mol^2\n", +"bn2 = 3.86 * 10^-5;//m^3/mol\n", +"aethane = 0.557;//N m^4 / mol^2\n", +"bethane = 6.51 * 10^-5;//m^3/mol\n", +"Pcn2 = 3394;//kPa\n", +"Tcn2 = 126.2;//K\n", +"Pcethane = 4880;//kPa\n", +"Tcethane = 305.4;//K\n", +"R = 8.314;\n", +"V = R * T / (P*1000);\n", +"disp('m^3/mol',V,'(a)Molar volume by ideal gas equation =')\n", +"a = (xn2 * (an2^0.5) + xethane * (aethane^0.5))^2;\n", +"b = (xn2*bn2 + xethane*bethane);\n", +"//substituting the above values in van der waals equation, and solving, we get\n", +"V1 = 3.680 * 10^-4;//m^3/mol\n", +"disp('m^3/mol',V1,'(b)Molar volume by van der waals equation =')\n", +"Prin2 = P/Pcn2;\n", +"Trin2 = T/Tcn2;\n", +"Priethane = P/Pcethane;\n", +"Triethane = T/Tcethane;\n", +"// using compressibilty chart, \n", +"Zn2 = 1;\n", +"Zethane = 0.42;\n", +"Z = xn2 * Zn2 + xethane * Zethane;\n", +"V2 = Z * R * T / P;\n", +"disp('m^3/mol',V2,'(c)Molar volume based on compressibilty factor =')\n", +"Pri1n2 = xn2*P/Pcn2;\n", +"Tri1n2 = T/Tcn2;\n", +"Pri1ethane = xethane*P/Pcethane;\n", +"Tri1ethane = T/Tcethane;\n", +"// using compressibilty chart, \n", +"Zn21 = 1;\n", +"Zethane1 = 0.76;\n", +"Z1 = xn2 * Zn21 + xethane * Zethane1;\n", +"V3 = Z1 * R * T / P;\n", +"disp('m^3/mol',V3,'(c)Molar volume based on daltons law =')\n", +"Tc = xn2 * Tcn2 + xethane * Tcethane;\n", +"Pc = xn2 * Pcn2 + xethane * Pcethane;\n", +"Zc = 0.83;\n", +"V4 = Zc * R *T / P;\n", +"disp('m^3/mol',V4,'(d)Molar volume by kays method =')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.9: Van_der_waals_equation_and_Kays_method.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P1 = 40;//% ( nitrogen )\n", +"P2 = 60;//% ( ethane )\n", +"T = 325;//K\n", +"V = 4.5 * 10^-4;//m^3/mol\n", +"a1 = 0.1365;//N*m^4/mol^2\n", +"b1 = 3.86 * 10 ^ -5;//m^3/mol\n", +"a2 = 0.557;//N*m^4/mol^2\n", +"b2 = 6.51 * 10 ^ -5;//m^3/mol\n", +"Pc1 = 3394;//kPa\n", +"Tc1 = 126.1;//K\n", +"Pc2 = 4880;//kPa\n", +"Tc2 = 305.4;//K\n", +"R = 8.314;\n", +"Pideal = R * T / (V * 1000);//kPa\n", +"disp('kPa',Pideal,'(a)Pressure of Gas by the ideal gas equation = ')\n", +"y1 = P1/100;\n", +"y2 = P2/100;\n", +"a = (y1 * (a1^(1/2)) + y2 * (a2^(1/2)))^2;\n", +"b = y1 * b1 + y2 * b2;\n", +"Pv = ((R * T / (V - b)) - a / (V^2))/1000;\n", +"disp('kPa',Pv,'(b)Pressure of Gas by Van der waals equation = ')\n", +"Tc = y1*Tc1 + y2*Tc2;\n", +"Pc = y1*Pc1 + y2*Pc2;\n", +"Vc = R * Tc / Pc;//Pseudo critical ideal volume\n", +"Vr = V / Vc;//Pseudo reduced ideal volume\n", +"Tr = T / Tc;//Pseudo reduced temperature\n", +"//From fig 5.3, we get Pr = 1.2\n", +"Pr = 1.2;\n", +"Pk = Pr * Pc;\n", +"disp('kPa',Pk,'(b)Pressure of Gas by the Kays method = ')" + ] + } +], +"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 +} diff --git a/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/6-Vapour_Pressure.ipynb b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/6-Vapour_Pressure.ipynb new file mode 100644 index 0000000..ea67b0f --- /dev/null +++ b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/6-Vapour_Pressure.ipynb @@ -0,0 +1,219 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6: Vapour Pressure" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1: Quality_of_steam.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P = 500;//kPa\n", +"SV = 0.2813;//m^3/kg\n", +"Vsaturatedl = 1.093 * 10^-3;//m^3/kg\n", +"Vsaturatedv = 0.3747;//m^3/kg\n", +"// let the fraction of vapour be y\n", +"//(1-y)*Vsaturatedl + y*Vsaturatedv = SV\n", +"//then we get, (1-y)*(1.093*10^-3) + y*(0.3747) = 0.2813\n", +"y = (SV - Vsaturatedl)/(Vsaturatedv - Vsaturatedl);\n", +"P1 = y * 100;\n", +"P2 = 100 - P1;\n", +"disp('%',P1,'Percentage of Vapour = ')\n", +"disp('%',P2,'Percentage of Liquid = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2: Calculation_of_vapour_pressure.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"T1 = 363;//K\n", +"T2 = 373;//K\n", +"P2s = 101.3;//kPa\n", +"J = 2275 * 18;//kJ/kmol\n", +"R = 8.314;//kJ/kmolK\n", +"//ln (P2s/P1s) = J * (1/T1 - 1/T2) / R\n", +"P1s = P2s/exp(J * (1/T1 - 1/T2) / R);\n", +"disp('kPa',P1s,'Vapour pressure of water at 363 K = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3: Clausius_Clapeyron_equation_for_acetone.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P1s = 194.9;//kPa\n", +"P2s = 8.52;//kPa\n", +"T1 = 353;//K\n", +"T2 = 273;//K\n", +"T3 = 300;//K\n", +"Pair = 101.3;//kPa\n", +"//log (P2s/P1s) = J * (1/T1 - 1/T2) / R\n", +"//let J / R = L\n", +"L = log (P2s/P1s)/(1/T1 - 1/T2);\n", +"P3s = P1s * exp(L * (1/T1 - 1/T3)) ;\n", +"Ptotal = P3s + Pair;//at saturation vapour pressure = partial pressure\n", +"disp('kPa',Ptotal,'(a)Final pressure of the mixture = ')\n", +"MP = P3s * 100 / Ptotal;\n", +"// mole percent = moles of acetone * 100 / total moles\n", +"//= Partial pressure of acetone * 100 / total Pressure\n", +"disp('%',MP,'(b)Mole percent of acetone in the final mixture = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4: Antoine_equation_for_n_heptane.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"A = 13.8587;\n", +"B = 2911.32;\n", +"C = 56.56;\n", +"T1 = 325;//K\n", +"//Pressure at normal condition = 101.3kPa\n", +"P2 = 101.3;//kPa\n", +"//Antoine equation - lnP = A - B / (T - C)\n", +"lnP = A - (B / (T - C));\n", +"P1 = exp(lnP);\n", +"disp('kPa',P1,'(a)Vapour pressure of n-heptane at 325K = ')\n", +"T2 = B/(A - log(P2)) + C;\n", +"disp('K',T2,'(b)Normal boiling point of n-heptane = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.5: Cox_chart.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"T = [273 293 313 323 333 353 373];\n", +"Ps = [0.61 2.33 7.37 12.34 19.90 47.35 101.3];\n", +"plot2d('ll',T,Ps,rect=[250,0.1,380,195]);\n", +"P = get('hdl');\n", +"xtitle('Construction of cox chart','Temperature, K','Pressure, kPa');\n", +"T1 = [273 353]\n", +"Ps1 = [8.52 194.9]\n", +"plot2d('ll',T1,Ps1);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.6: Duhring_line.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Pswater1 = 6.08;//kPa \n", +"T1 = 313;//K\n", +"//lnPs = 16.26205 - 3799.887/(T - 46.854)\n", +"Tb1 =3799.887/(16.26205 - log(Pswater1)) + 46.854;\n", +"disp('K',Tb1,'boiling point of water at 6.08kPa vapour pressure = ')\n", +"Pswater2 = 39.33;//kPa\n", +"T2 = 353;//K\n", +"Tb2 =3799.887/(16.26205 - log(Pswater2)) + 46.854;\n", +"disp('K',Tb2,'boiling point of water at 39.33 kPa vapour pressure = ')\n", +"Tb = [Tb1 Tb2];\n", +"T = [T1 T2];\n", +"plot(T,Tb);\n", +"xtitle('Equal pressure reference plot for sulphuric acid','Boiling point of solution,K','Boiling point of water, K');\n", +"T3 = 333;//K\n", +"//corresponding to T3 on x axis, on y we get\n", +"Tb3 = 329;//K\n", +"Pswater3 = exp(16.26205 - 3799.887/(Tb3 - 46.854));\n", +"disp('kPa',Pswater3,'Vapour pressure of solution at 333K')" + ] + } +], +"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 +} diff --git a/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/7-Solutions_and_Phase_Behaviour.ipynb b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/7-Solutions_and_Phase_Behaviour.ipynb new file mode 100644 index 0000000..19d22b5 --- /dev/null +++ b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/7-Solutions_and_Phase_Behaviour.ipynb @@ -0,0 +1,630 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7: Solutions and Phase Behaviour" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10: Dew_point_temperature_and_pressure.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//1 - pentane, 2 - hexane, 3 - heptane\n", +"y1 = 0.6;\n", +"y2 = 0.25;\n", +"y3 = 0.15;\n", +"A1 = 13.8183;\n", +"A2 = 13.8216;\n", +"A3 = 13.8587;\n", +"B1 = 2477.07;\n", +"B2 = 2697.55;\n", +"B3 = 2911.32;\n", +"C1 = 39.94;\n", +"C2 = 48.78;\n", +"C3 = 56.51;\n", +"P = 400;//kPa\n", +"T = 300;//K\n", +"//As raoults law is applicable, Ki = yi/xi = Pis/P\n", +"//xi = yi*P/Pis\n", +"//ln P = A- B/(T-C)\n", +"//Assuming,\n", +"T1 = 385.94;//K\n", +"Pas1 =exp(A1 - B1 / (T1 - C1));\n", +"Pas2 =exp(A2 - B2 / (T1 - C2));\n", +"Pas3 =exp(A3 - B3 / (T1 - C3));\n", +"disp('K',T,'(a)Dew point temperature of the mixture = ')\n", +"Ps1 =exp(A1 - B1 / (T - C1));\n", +"Ps2 =exp(A2 - B2 / (T - C2));\n", +"Ps3 =exp(A3 - B3 / (T - C3));\n", +"P1 = 1/(y1/Ps1 + y2/Ps2 + y3/Ps3);\n", +"disp('kPa',P1,'(b)Dew point pressure = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.11: bubble_point_and_dew_point.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//1 - methanol, 2 - ethanol, 3 - propanol\n", +"x1 = 0.45;\n", +"x2 = 0.3;\n", +"x3 = 1 - (x1 + x2);\n", +"P = 101.3;//kPa\n", +"// by drawing the temperature vs vapour pressure graph and interpolation,assuming,\n", +"T = 344.6;//K\n", +"Ps1 = 137.3;\n", +"Ps2 = 76.2;\n", +"Ps3 = 65.4;\n", +"y1 = x1 * Ps1 / P;\n", +"y2 = x2 * Ps2 / P;\n", +"y3 = x3 * Ps3 / P;\n", +"disp('K',T,'(a)Bubble point temperature = ')\n", +"disp('%',y1*100,'Composition of methanol in vapour = ')\n", +"disp('%',y2*100,'Composition of ethanol in vapour = ')\n", +"disp('%',y3*100,'Composition of propanol in vapour = ')\n", +"//again, for xi = 1\n", +"T1 = 347.5;//K\n", +"P1 = 153.28;\n", +"P2 = 85.25;\n", +"P3 = 73.31;\n", +"xa = x1 * P / P1;\n", +"xb = x2 * P / P2;\n", +"xc = x3 * P / P3;\n", +"disp('K',T1,'(b)Dew point temperature = ')\n", +"disp('%',xa*100,'Composition of methanol in liquid = ')\n", +"disp('%',xb*100,'Composition of ethanol in liquid = ')\n", +"disp('%',xc*100,'Composition of propanol in liquid = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.12: component_calculations.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"xp = 0.25;\n", +"xnb = 0.4;\n", +"xnp = 0.35;\n", +"P = 1447.14;//kPa\n", +"//assuming temperatures 355.4 K and 366.5 K , corresponding Ki values are found from nomograph and total Ki value are 0.928 and 1.075 resp, thus bubble point temperature lies between, using interpolation bubble point temperature is found to be,\n", +"Tb = 361;//K\n", +"disp('K',Tb,'(a) The buuble point temperature = ')\n", +"//At 361,\n", +"Kip = 2.12;\n", +"Kinb = 0.85;\n", +"Kinp = 0.37;\n", +"xp1 = Kip * xp;\n", +"xnb1 = Kinb * xnb;\n", +"xnp1 = Kinp * xnp;\n", +"disp(xp1,'concentration of propane at bubble point = ')\n", +"disp(xnb1,'concentration of n-butane at bubble point = ')\n", +"disp(xnp1,'concentration of n-pentane at bubble point = ')\n", +"//At dew point Yi/Ki = 1, at 377.6K this is 1.1598 and at 388.8K it is 0.9677, by interpolation dew point is found to be\n", +"Td = 387;//K\n", +"Kip1 = 2.85;\n", +"Kinb1 = 1.25;\n", +"Kinp1 = 0.59;\n", +"yp1 = xp/Kip1;\n", +"ynb1 = xnb/Kinb1;\n", +"ynp1 = xnp/Kinp1;\n", +"disp('K',Td,'(b) The dew point temperature = ')\n", +"disp(yp1,'concentration of propane at dew point = ')\n", +"disp(ynb1,'concentration of n-butane at dew point = ')\n", +"disp(ynp1,'concentration of n-pentane at dew point = ')\n", +"//summation zi / (1 + L/VKi)= 0.45, using trial and error, we find\n", +"T = 374.6;//K\n", +"L = 0.55;\n", +"V = 0.45;\n", +"Kip2 = 2.5;\n", +"Kinb2 = 1.08;\n", +"Kinp2 = 0.48;\n", +"t = (xp/(1+L/(V*Kip2)))+(xnb/(1+L/(V*Kinb2))) + (xnp/(1+L/(V*Kinp2)));\n", +"yp2 = (xp/(1+L/(V*Kip2)))/t;\n", +"ynb2 = (xnb/(1+L/(V*Kinb2)))/t;\n", +"ynp2 = (xnp/(1+L/(V*Kinp2)))/t;\n", +"xp2 = (xp - V * yp2)/L;\n", +"xnb2 = (xnb - V * ynb2)/L;\n", +"xnp2 = (xnp - V * ynp2)/L; \n", +"disp('K',T,'(c)Temperature of the mixture = ')\n", +"disp(yp2,'vapour phase concentration of propane = ')\n", +"disp(ynb2,'vapour phase concentration of n-butane = ')\n", +"disp(ynp2,'vapour phase concentration of n-pentane = ')\n", +"disp(xp2,'liquid phase concentration of propane = ')\n", +"disp(xnb2,'liquid phase concentration of n-butane = ')\n", +"disp(xnp2,'liquid phase concentration of n-pentane = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.13: equilibrium_temperature_and_composition.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P = 93.30;//kPa\n", +"T1 = 353;//K\n", +"T2 = 373;//K\n", +"Pwater1 = 47.98;//kPa\n", +"Pwater2 = 101.3;//kPa\n", +"Pliq1 = 2.67;//kPa\n", +"Pliq2 = 5.33;//kPa\n", +"T = T1 + (T2 - T1)*(P - (Pwater1 + Pliq1))/(Pwater2 + Pliq2 - (Pwater1 + Pliq1));\n", +"disp('K',T,'(a)The equilibrium temperature = ')\n", +"Pwater = 88.50;\n", +"y = Pwater * 100 /P;\n", +"disp('%',y,'(b)Water vapour in vapour mixture = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.14: Temperature_composition_diagram.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//the three phase temperature is first find out, which comes to be 342K, the corresponding Ps1 = 71.18, Ps2 = 30.12\n", +"T = [342 343 348 353 363 373];\n", +"Ps2 = [30.12 31.06 37.99 47.32 70.11 101.3];\n", +"Ps1 = [71.18 72.91 85.31 100.5 135.42 179.14];\n", +"P = 101.3;//kPa\n", +"for i = 1:4\n", +" y1(i) = 1 - (Ps1(i))/P;\n", +"end\n", +"for i = 1:6\n", +" y2(i) = 1 - (Ps2(i))/P;\n", +"end\n", +"plot2d(y2,T);\n", +"plot2d(1-y1,T,rect = [0,320,1,380]);\n", +"xtitle('Temperature - compositon diagram','x, y (mole fraction of benzene)','Temperature')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.15: Boiling_point_calculation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"T = 379.2;//K\n", +"P = 101.3;//kPa\n", +"Ps = 70;//kPa\n", +"Molality = 5;\n", +"Pws = exp(16.26205 - 3799.887/(T - 46.854));\n", +"k = P / Pws;\n", +"Pws1 = Ps / k;\n", +"T1 = 3799.887 / (16.26205 - log( Pws1)) + 46.854;\n", +"disp('K',T1,'Boiling point of the solution = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.1: composition_calculation_of_Liquid_and_vapour_at_equilibrium.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Pas = 71.2;//kPa\n", +"Pbs = 48.9;//kPa\n", +"P = 65;//kPa\n", +"//P=(Pas-Pbs)*xa+Pbs,xa=mole fraction of n-heptane,liq. condition,therefore\n", +"xa = (P - Pbs)/(Pas - Pbs);\n", +"//ya = Pa / P , Vapour condition\n", +"ya = Pas * xa / P;\n", +"P1 = xa * 100;\n", +"P2 = ya * 100;\n", +"disp('%',P1,'Percentage of hepatne in liquid = ')\n", +"disp('%',P2,'Percentage of hepatne in vapour = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2: Composition_and_total_pressure_calculation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P1 = 100;//kPa ( Vapour pressure of liq A )\n", +"P2 = 60;//kPa ( Vapour pressure of liq B )\n", +"T = 320;//K\n", +"//Pa = xa * P1 = 100 * xa\n", +"//Pa = xb * P2 = 60 * xb\n", +"//P = xa * P1 + ( 1 - xa )* P2\n", +"// = 100xa + ( 1 - xa )* 60\n", +"// = 60 + 40*xa\n", +"//ya = Pa / P\n", +"//0.5 = 100*xa / ( 60 + 40 * xa)\n", +"xa = 60 * 0.5 / (100 - 20);\n", +"Per1 = xa * 100;\n", +"disp('%',Per1,'(a)Percentage of A in liquid = ')\n", +"Ptotal = 60 + 40 * xa;\n", +"disp('kPa',Ptotal,'(b)Total pressure of the vapour = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3: Mole_fraction_calculation_for_particular_component_in_liquid_vapour_mixture.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"xa = 0.25;\n", +"xb = 0.30;\n", +"xc = 1 - xa - xb;\n", +"Ptotal = 200;//kPa\n", +"Pcs = 50;//kPa(Vapour pressure of c)\n", +"Pc = xc * Pcs;//(partial pressure of c)\n", +"yc = Pc / Ptotal;\n", +"yb = 0.5;\n", +"ya = 1 - yb - yc;\n", +"per1 = ya * 100;\n", +"disp('%',per1,'Percentage of A in vapour = ') " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4: Flash_vapourization_of_benzene_toluene_mixture.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P = 101.3;//kPa\n", +"Pbs = 54.21;//kPa\n", +"Pas = 136.09;//kPa\n", +"xf = 0.65;\n", +"xw = (P - Pbs)/(Pas - Pbs);\n", +"yd = xw * Pas / P ;\n", +"// f = ( xf - xw ) / ( yd - xw )\n", +"f = ( xf - xw ) / ( yd - xw );\n", +"per1 = f * 100;\n", +"disp('%',per1,'mole percent of the feed that is vapourised = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.5_a: Boiling_point_diagram.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"T = [371.4 378 383 388 393 398.6]\n", +"Pas = [101.3 125.3 140 160 179.9 205.3]\n", +"Pbs = [44.4 55.6 64.5 74.8 86.6 101.3]\n", +"Ptotal = 101.3;//kPa\n", +"for i = 1:6\n", +" x(i) = (Ptotal - Pbs(i))/(Pas(i) - Pbs(i));\n", +"end\n", +"for i = 1:6\n", +" y(i) = x(i) * Pas(i) / Ptotal;\n", +"end\n", +"plot(x,T,'-o');\n", +"plot(y,T,'-x');\n", +"xtitle('Boiling point diagram','Mole fraction x or y','Temperature K')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.5_b: Equilibrium_Diagram.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"T = [371.4 378 383 388 393 398.6]\n", +"Pas = [101.3 125.3 140 160 179.9 205.3]\n", +"Pbs = [44.4 55.6 64.5 74.8 86.6 101.3]\n", +"Ptotal = 101.3;//kPa\n", +"for i = 1:6\n", +" x(i) = (Ptotal - Pbs(i))/(Pas(i) - Pbs(i));\n", +"end\n", +"for i = 1:6\n", +" y(i) = x(i) * Pas(i) / Ptotal;\n", +"end\n", +"w = x;\n", +"plot(x,w);\n", +"plot(x,y,'-o');\n", +"xtitle('Equilibrium curve','x, mole fraction in liquid','y, mole fraction in vapour');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6: Bubble_point_temperature_and_vapour_composition.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Ps = 100;//kPa\n", +"A1 = 13.8587;//(1 = n-heptane)\n", +"A2 = 13.8216;//(2 = n-hexane)\n", +"B1 = 2911.32;\n", +"B2 = 2697.55;\n", +"C1 = 56.51;\n", +"C2 = 48.78;\n", +"//lnPs = A - B / ( T - C)\n", +"T1 = B1 / (-log(Ps)+A1) + C1;\n", +"T2 = B2 / (-log(Ps)+A2) + C2;\n", +"x2 = 0.25;" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7: Dew_point_temperature_pressure_and_concentration.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//lnPas = 14.5463 - 2940.46/(T - 35.93)\n", +"//lnPbs = 14.2724 - 2945.47 / (T - 49.15)\n", +"//xa = (P - Pbs)/(Pas - Pbs)\n", +"//Ya = Pas * (P - Pbs)/(P * (Pas - Pbs))\n", +"Ya = 0.4;\n", +"P = 65;//kPa\n", +"//various temperature value are assumed and tried till LHS = RHS, we get\n", +"T = 334.15;//K\n", +"Pas = exp(14.5463 - 2940.46/(T - 35.93));\n", +"Pbs = exp(14.2724 - 2945.47 / (T - 49.15));\n", +"xa = (P - Pbs)/(Pas - Pbs);\n", +"disp('K',T,'(a)The Dew point temperature at 65 kPa = ')\n", +"disp(xa,' Concentration of the first drop of liquid = ')\n", +"T1 = 327;//K\n", +"Pas1 = exp(14.5463 - 2940.46/(T1 - 35.93));\n", +"Pbs1 = exp(14.2724 - 2945.47 / (T1 - 49.15));\n", +"xa1 = Ya * Pbs1 / (Pas1 - Ya*(Pas1 - Pbs1));\n", +"P1 = xa1 * Pas1 / Ya;\n", +"disp('kPa',P1,'(b)The dew point pressure at 327 K = ') \n", +"disp(xa1,' Concentration at 327K = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8: Partial_pressure_of_acetaldehyde.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"MW = 44.032;\n", +"Mwater = 18.016;\n", +"x = 2;//%\n", +"Pa = 41.4;//kPa\n", +"Mfr = (x/MW)/(x/MW + (100-x)/Mwater);\n", +"//henry's law gives Pa = Ha * xa\n", +"Ha = Pa / Mfr;\n", +"Molality = 0.1;\n", +"Mfr1 = Molality / (1000/Mwater + Molality);\n", +"Pa1 = Ha * Mfr1;\n", +"disp('kPa',Pa1,'Partial Pressure = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9: Raults_law_applicatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//1 - pentane, 2 - hexane, 3 - heptane\n", +"x1 = 0.6;\n", +"x2 = 0.25;\n", +"x3 = 0.15;\n", +"A1 = 13.8183;\n", +"A2 = 13.8216;\n", +"A3 = 13.8587;\n", +"B1 = 2477.07;\n", +"B2 = 2697.55;\n", +"B3 = 2911.32;\n", +"C1 = 39.94;\n", +"C2 = 48.78;\n", +"C3 = 56.51;\n", +"//As raoults law is applicable, Ki = yi/xi = Pis/P\n", +"//yi = xi*Pis/P\n", +"//ln P = A- B/(T-C)\n", +"//Assuming,\n", +"P = 400;//kPa\n", +"T = 369.75;//K\n", +"Pas1 =exp(A1 - B1 / (T - C1));\n", +"Pas2 =exp(A2 - B2 / (T - C2));\n", +"Pas3 =exp(A3 - B3 / (T - C3));\n", +"Yi = (x1*Pas1 + x2*Pas2 + x3*Pas3)/P;\n", +"disp('K',T,'(a)bubble point temperature of the mixture = ')\n", +"y1 = x1*Pas1/P;\n", +"y2 = x2*Pas2/P;\n", +"y3 = x3*Pas3/P;\n", +"disp('%',y1*100,'(b)composition of n-pentane in vapour = ')\n", +"disp('%',y2*100,'composition of n-hexane in vapour = ')\n", +"disp('%',y3*100,'composition of n-heptane in vapour = ')\n", +"T1 = 300;//K\n", +"Ps1 =exp(A1 - B1 / (T1 - C1));\n", +"Ps2 =exp(A2 - B2 / (T1 - C2));\n", +"Ps3 =exp(A3 - B3 / (T1 - C3));\n", +"P1 = x1*Ps1 + x2*Ps2 + x3*Ps3;\n", +"disp('kPa',P1,'(c)Bubble point pressure =')" + ] + } +], +"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 +} diff --git a/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/8-Humidity_and_Humidity_chart.ipynb b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/8-Humidity_and_Humidity_chart.ipynb new file mode 100644 index 0000000..f4d33f5 --- /dev/null +++ b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/8-Humidity_and_Humidity_chart.ipynb @@ -0,0 +1,692 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8: Humidity and Humidity chart" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.10: Saturation_lines_for_hexane.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P = 100;//kPa\n", +"T = [273 280 290 300 310 320 330 340];\n", +"for i =1:8\n", +" Ps(i) = exp(13.8216 - 2697.55/(T(i)-48.78));\n", +"end\n", +"disp((Ps))\n", +"for j = 1:8\n", +" Ys(j) = Ps(j) * 86.11 / ((P - Ps(j))*28);\n", +"end\n", +"disp(Ys)\n", +"plot(T,Ys,rect=[273,0,333,10]);\n", +"xtitle('100% saturation line for nitrogen-hexane system','Temperature, K','Humidity, kg hexane/kg nitrogen');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.11: Psychometric_chart_applicatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Td = 328;//K ( dry bulb )\n", +"P = 101.3;//kPa\n", +"PS = 10;//%\n", +"//refering to the psychometric chart, corresponding to 328 K and 10% saturation\n", +"Y1 = 0.012;//kg water / kg dry air\n", +"disp('kg water / kg dry air',Y1,'(a)Absolute humidity = ')\n", +"//Y1 = Pa * 18 / ( P - Pa ) * 29\n", +"Pa = Y1 * P * 29 /( 18 + Y1 * 29 );\n", +"disp('kPa',Pa,'(b)Partial Pressure of water vapour = ')\n", +"//using psychometric chart, saturation humidity at 328 K is given as\n", +"Y1s = 0.115;//kg water / kg dry air\n", +"disp('kg water / kg dry air',Y1s,'(c)The absolute humidity at 328K = ')\n", +"//at saturation partial pressure = vapour pressure\n", +"Pas = Y1s * P * 29 /( 18 + Y1s * 29 ); \n", +"disp('kPa',Pas,'(d)Vapour Pressure of water vapour = ')\n", +"RS = Pa * 100 / Pas;\n", +"disp('%',RS,'(e)Percent relative saturation = ')\n", +"//using psychometric chart, moving horizontally keeping humidity constant to 100% saturation, we get dew point as,\n", +"T = 290;//K\n", +"disp('K',T,'(f)Dew point = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.12: Humid_heat_calculation_for_a_sample_of_air.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Ca = 1.884;//kJ/kgK\n", +"Cb = 1.005;//kJ/kgK\n", +"Y1 = 0.012;\n", +"//Cs = Cb + Y1 * Ca\n", +"Cs = Cb + Y1 * Ca;\n", +"disp('kJ/kgK',Cs,'Humid heat of the sample = ')\n", +"P = 101.3;//kPa\n", +"V = 100;//m^3\n", +"R = 8.314;\n", +"T = 328;//K\n", +"T1 = 373;//K\n", +"N = P * V / ( R * T );\n", +"Pa = 1.921;//kPa\n", +"Ndryair = N * (P - Pa)/P;\n", +"mdryair = Ndryair * 29;\n", +"Ht = mdryair * Cs * (T1 - T);\n", +"disp('kJ',Ht,'Heat to be supplied = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.14: wet_bulb_temperature_and_dry_bulb_temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P = 101.3;//kPa\n", +"MW = 58;\n", +"T1 = 280.8;//K\n", +"Ps = 5;//kPa\n", +"pr = 2;//kJ/kgK ( Psychometric ratio )\n", +"Hvap = 360;//kJ/kg\n", +"Tw = T1;\n", +"Yw1 = Ps * MW / (( P - Ps) * 29);\n", +"// Tw = Tg - Hvap * ( Yw1 - Y1) / (hG / kY), where hG/kY is the psychmetric ratio pr\n", +"Y1 = 0;\n", +"Tg = Tw + Hvap * ( Yw1 - Y1) / pr;\n", +"disp('K',Tg,'The air temperature = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.15: Humidity_calculatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Td = 353.2;//K\n", +"Tw = 308;//K\n", +"Hvap = 2418.5;//kJ/kg\n", +"pr = 0.950;//kJ/kg\n", +"Ps = 5.62;//kPa\n", +"P = 101.3;//kPa\n", +"Yw1 = (Ps * 18)/ (( P - Ps) * 29);\n", +"Y1 = Yw1 - pr * ( Td - Tw ) / Hvap;\n", +"disp('kg water/kg dry air',Y1,'Humidity = ')\n", +"//humidity can also be directly obtained from psychometric chart, which we get to be 0.018 kg water/kg dry air" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.16: SAturation_curve_and_adiabatic_cooling_line.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P = 101.3;//kPa\n", +"T = [283 293 303 313];\n", +"for i=1:4\n", +" Ps(i) = exp(13.8858 - 2788.51/(T(i)-52.36));\n", +"end\n", +"for j =1:4\n", +" Ys(j) = Ps(j) * 78.048 / ((P - Ps(j))*29);\n", +"end\n", +"disp(Ps)\n", +"disp(Ys)\n", +"plot(T,Ys,rect = [270,0,323,0.9]);\n", +"//Tas = Tg - L *(Y1as - Y1) / Cs\n", +"//Cs = Cb + Y1 *Ca = 1.005 + Y1 * 1.2, \n", +"L = 435.4;//kJ/kgK\n", +"//for different value of Tg and Y1 tried, we have the following set of values\n", +"Tg = [283 290.4 300 310.1 320.8];\n", +"Y1 = [0.1701150 0.15 0.125 0.1 0.075];\n", +"plot(Tg,Y1);\n", +"xtitle('Saturation curve and adiabatic cooling line','Temperature, K','Y, kg benzene/kg dry air');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.17: Adiabatic_drier.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Tin = 380.7;//K\n", +"Pin = 101.3;//kPa\n", +"Tdew = 298;//K\n", +"mremoved = 2.25;//kg\n", +"V = 100;//m^3\n", +"//using humidity chart, humidity of air at dry bulb temperature of 380.7K and dew point = 298K is,\n", +"Y = 0.02;// kg water /kg dry air\n", +"disp('kg water /kg dry air',Y,'(a)Humidity of air entering the drier = ')\n", +"Tstp = 273.15;//K\n", +"Vstp = 22.4143;//m^3/kmol\n", +"N = V * Tstp / ( Vstp * Tin );\n", +"MY = Y * 29 / 18;//molal humidity\n", +"Ndryair = N / ( 1 + MY );\n", +"mdryair = Ndryair *29;\n", +"mwaterin = mdryair * Y;\n", +"mwaterout = mwaterin + mremoved;\n", +"Yout = mwaterout / mdryair;\n", +"// percent humidity is calculated using the chart, and is\n", +"PY = 55;//%\n", +"disp('kg water /kg dry air',Yout,'(b)exit air humidity = ')\n", +"disp('%',PY,'Percent humidity = ')\n", +"//from the humidity chart \n", +"Twet = 313.2;//K\n", +"Td = 322.2;//K\n", +"disp('K',Twet,'(c)exit air wet bulb temperature = ')\n", +"disp('K',Td,'(c)exit air dry bulb temperature = ')\n", +"MYout = Yout * 29 / 18;\n", +"Nout = Ndryair * ( 1 + MYout ) / 1;\n", +"V1 = Nout * Vstp * Td / Tstp;\n", +"disp('m^3',V1,'(d)Volume of exit air = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.18: Psychometric_chart_applicatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P = 101.3;//kPa\n", +"Td = 303;//K\n", +"Tw = 288;//K\n", +"//using psychometric chart,\n", +"Y1 = 0.0045;//kg water/ kg dry air\n", +"PY = 18;//%\n", +"Theated = 356.7;//K\n", +"Cb = 1.005;\n", +"Ca = 1.884;\n", +"Cs = Cb + Y1 * Ca;\n", +"Q = 1 * Cs * (Theated - Td);\n", +"disp('kg water/ kg dry air',Y1,'(a)Humidity of the initial air = ')\n", +"disp('%',PY,'(b)Percent humidity = ')\n", +"disp('K',Theated,'(c)Temperature to which the air is heated = ')\n", +"disp('kJ',Q,'(d)Heat to be suppplied = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.19: Psychometric_chart_application_and_given_wet_bulb_and_dry_bulb_temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Tw = 313;//K\n", +"Td = 333;//K\n", +"//Using th psychometric chart,\n", +"Y = 0.04;//kg water/ kg dry air\n", +"PS = 26.5;//%\n", +"VS = 1.18;//m^3/kg dry air ( volume of saturated air )\n", +"VD = 0.94;//m^3/kg dry air ( volume of dry air )\n", +"VH = VD + PS * (VS - VD )/100;\n", +"HS = 470;//J / kg dry air ( enthalpy of saturated air )\n", +"HD = 60;//J / kg dry air ( enthalpy of dry air )\n", +"H = HD + PS * ( HS - HD )/100;\n", +"disp('kg water/ kg dry air',Y,'(a)Absolute Humidity of the air = ')\n", +"disp('%',PS,'(b)Percent humidity = ')\n", +"disp('m^3/kg dry air',VH,'(c)Humid volume = ')\n", +"disp('kJ/kg dry air',H,'(d)Enthalpy of wet air = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1: Nitrogen_and_ammonia_gas_mixture.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"T = 280;//K\n", +"P = 105;//kPa\n", +"Pas = 13.25;//kPa ( Vpaour pressure of acetone )\n", +"Pa = Pas;// ( As gas is saturated, partial pressure = vapour pressure )\n", +"Mfr = Pa / P;//(Mole fraction) \n", +"Mpr = Mfr * 100;\n", +"disp('%',Mpr,'(a)The mole percent of acetone in the mixture = ')\n", +"Ma = 58.048;//(molecular weight of acetone)\n", +"Mn = 28;//(molecular weight of nitrogen)\n", +"N = 1;//mole\n", +"Na = Mfr * N;\n", +"Nn = N - Na;\n", +"ma = Na * Ma ;\n", +"mn = Nn * Mn;\n", +"mtotal = ma + mn;\n", +"maper = ma *100 / mtotal;\n", +"mnper = mn *100/ mtotal;\n", +"disp('%',maper,'(b)Weight percent of acetone = ')\n", +"disp('%',mnper,'Weight percent of nitrogen = ')\n", +"Vstp = 22.4;//m^3/kmol\n", +"Pstp = 101.3;//kPa\n", +"Tstp = 273.15;//K\n", +"V = Vstp * Pstp * T / ( Tstp * P );\n", +"C = ma/V;\n", +"disp('kg/m^3',C,'(c)Concentration of vapour = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2: Benzene_vapour_air_mixture.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"P = 101.3;//kPa\n", +"Per1 = 10;//%\n", +"Pa = P * Per1 / 100;// ( a - benzene )\n", +"Ps = Pa;//( saturation )\n", +"//lnPs = 13.8858 - 2788.51/(T - 52.36)\n", +"T = 2788.51 / ( 13.8858 - log(Ps)) + 52.36;\n", +"disp('K',T,'Temperature at which saturation occurs = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3: Evaporation_of_acetone_using_dry_air.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Pdryair = 101.3;//kPa\n", +"Pacetone = 16.82;//kPa\n", +"Nratio = Pacetone / (Pdryair - Pacetone);\n", +"mratio = Nratio * 58.048 / 29;// ( Macetone = 58.048, Mair = 29 )\n", +"macetone = 5;//kg ( given )\n", +"mdryair = macetone / mratio;\n", +"disp('kg',mdryair,'Minimum air required = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.4: Humidity_for_acetone_vapour_and_nitrogen_gas_mixture.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"Pa = 15;//kPa ( partial pressure of acetone)\n", +"Ptotal = 101.3;//kPa\n", +"Mfr = Pa / Ptotal;\n", +"disp(Mfr,'(a)Mole fraction of acetone = ')\n", +"Macetone = 58.048;\n", +"Mnitrogen = 28;\n", +"mafr = Mfr * Macetone / ( Mfr * Macetone + (1-Mfr)* Mnitrogen );\n", +"disp(mafr,'(b)Weight fraction of acetone = ')\n", +"Y = Mfr / ( 1 - Mfr );\n", +"disp('moles of acetone/moles of nitrogen',Y,'(c)Molal humidity = ')\n", +"Y1 = Y * Macetone / Mnitrogen ; \n", +"disp('kg acetone/kg nitrogen',Y1,'(d)Absolute humidity = ')\n", +"Pas = 26.36;//kPa ( vapour pressure)\n", +"Ys = Pas / ( Ptotal - Pas);//saturation humidity\n", +"disp('moles of acetone/moles of nitrogen',Ys,'(e)Saturation humidity = ')\n", +"Y1s = Ys * Macetone / Mnitrogen;\n", +"disp('kg acetone/kg nitrogen',Y1s,'(f)Absolute saturation humidity = ')\n", +"V = 100;//m^3\n", +"Vstp =22.4143;//m^3/kmol\n", +"Pstp = 101.3;//kPa\n", +"Tstp = 273.15;//K\n", +"T = 295;//K\n", +"N = V * Ptotal * Tstp / (Vstp * Pstp * T );\n", +"Nacetone = N * Mfr;\n", +"macetone = Nacetone * Macetone;\n", +"disp('kg',macetone,'(g)Mass of acetone in 100m^3 of the total gas = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5: Percent_saturation_and_relative_saturation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc();\n", +"Pa = 15;//kPa ( Partial pressure )\n", +"Pas = 26.36;//kPa ( Vapour pressure )\n", +"RS = Pa * 100 / Pas ;\n", +"Y = 0.1738;\n", +"Ys = 0.3517;\n", +"PS = Y * 100 / Ys;\n", +"disp('%',RS,'Relative humidity = ')\n", +"disp('%',PS,'Percent humidity = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.6: Analysis_of_Moist_air.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"mwater = 0.0109;//kg\n", +"V = 1;//m^3\n", +"T = 300;//K\n", +"P = 101.3;//kPa\n", +"Vstp =22.4143;//m^3/kmol\n", +"Pstp = 101.3;//kPa\n", +"Tstp = 273.15;//K\n", +"N = V * P * Tstp / (Vstp * Pstp * T );\n", +"Nwater = mwater / 18.016;\n", +"Nfr = Nwater / N;\n", +"Pwater = Nfr * P;\n", +"disp('kPa',Pwater,'(a)Partial pressure of water vapour = ')\n", +"Ps = exp(16.26205 - 3799.887/(T - 46.854));\n", +"RS = Pwater * 100 / Ps;\n", +"disp('%',RS,'(b)Relative saturation = ')\n", +"Y1 = Pwater *18 / ((P - Pwater)*29);\n", +"disp('kg water / kg dry air',Y1,'(c)Absolute humidity = ')\n", +"Y1s = Ps *18 / ((P - Ps)*29);\n", +"PS1 = Y1 * 100 / Y1s;\n", +"disp('%',PS1,'(d)Percent saturation = ')\n", +"PS = 10;//%\n", +"Y1S = Y1 * 100/PS ; \n", +"//Y1S = Pas/(P - Pas ) * 18 /29\n", +"Pas1 = 29 * P * Y1S / (18 + 29*Y1s);\n", +"T1 = 3799.887 / (16.26205-log(Pas1)) + 46.854;\n", +"disp('K',T1,'(e)Temperature at which 10% saturation occurs = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7: Heating_value_calculation_for_a_fuel_gas.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"T = 300;//K\n", +"P = 100;//kPa\n", +"S = 25000//kJ/m^3\n", +"T1= 295;//K\n", +"P1 = 105;//kPa\n", +"RS = 50;//%\n", +"Ps = 3.5;//kPa\n", +"Ps1 = 2.6;//kPa\n", +"Vstp = 22.4143;//m^3/kmol\n", +"Pstp = 101.3;//kPa\n", +"Tstp = 273.15;//K\n", +"V = 1;//m^3\n", +"N = V * P * Tstp/(Vstp * Pstp * T);\n", +"Nfuel = N * (P - Ps)/P;\n", +"Smol = S / Nfuel;//kJ/kmol\n", +"N1 = V * P1 * Tstp/(Vstp * Pstp * T1);\n", +"Pwater = Ps1 * RS /100;\n", +"Nfuel1 = N1 * (P1 - Pwater )/P1;\n", +"S1 = Smol * Nfuel1;\n", +"disp('kJ/m^3',S1,'Heating value of gas at 295K and 105kPa = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.8: Analysis_of_nitrogen_benzene_mixture.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"T = 300;//K\n", +"T1 = 335;//K\n", +"P = 150;//kPa\n", +"//lnPs = 13.8858 - 2788.51 / ( T - 52.36)\n", +"Ps = exp(13.8858 - 2788.51 / ( T - 52.36));\n", +"Ps1 = exp(13.8858 - 2788.51 / ( T1 - 52.36));\n", +"Pa = Ps;//(Vapour pressure at dew point is equal to the partial pressure of the vapour)\n", +"Y = Pa / (P - Pa);\n", +"Ys = Ps1 / (P - Ps1);\n", +"PS = Y * 100 / Ys;\n", +"disp('%',PS,'(a)Percent saturation = ')\n", +"Ma = 78.048;\n", +"Mb = 28;\n", +"Q = Y * Ma / Mb ;\n", +"disp('kg benzene/kg nitrogen',Q,'(b)Quantity of benzene per kilgram of nitrogen = ')\n", +"V = 1;//m^3 ( basis )\n", +"Vstp = 22.4143;//m^3/kmol\n", +"Pstp = 101.3;//kPa\n", +"Tstp = 273.15;//K\n", +"N = V * P * Tstp/(Vstp * Pstp * T1);\n", +"y = Y / ( 1 + Y );\n", +"Nbenzene = N * y;\n", +"C = Nbenzene * Ma;\n", +"disp('kg/m^3',C,'(c)Kilogram of benzene per m^3 of nitrogen = ')\n", +"P1 = 100;//kPa\n", +"Pbenzene = y * P1;\n", +"T1 = 2788.51 / ( 13.8858 - log (Pbenzene)) + 52.36;\n", +"disp('K',T1,'(d)Dew point = ')\n", +"Per1 = 60;//%\n", +"Y2 = Y * (1- Per1/100);\n", +"//Y2 = Pa / (P - Pa)\n", +"P = Pa / Y2 + Pa;\n", +"disp('kPa',P,'(e)Pressure required = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.9: Drying.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"T = 300;//K\n", +"T1 = 285;//K\n", +"Pwater = 3.56;//kPa\n", +"Pwater1 = 1.4;//kPa\n", +"V = 1;//m^3 ( Basis )\n", +"Vstp = 22.4143;//m^3/kmol\n", +"N = V / Vstp;\n", +"Pstp = 101.3;//kPa\n", +"Y = Pwater / (Pstp - Pwater);\n", +"Y1 = Pwater1 / (Pstp - Pwater1);\n", +"Nremoved = Y - Y1;\n", +"Ndryair = N * 1 / (1 + Y);\n", +"mremoved = Ndryair * Nremoved * 18.016;\n", +"disp('kg',mremoved,'(a)amount of water removed = ')\n", +"Nremaining = Ndryair * Y1 ;\n", +"V1 = (Ndryair + Nremaining) * Vstp ;\n", +"disp('m^3',V1,'(b)Volume of gas at stp after drying = ')" + ] + } +], +"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 +} diff --git a/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/9-Material_Balance_in_Unit_Operations.ipynb b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/9-Material_Balance_in_Unit_Operations.ipynb new file mode 100644 index 0000000..f84c250 --- /dev/null +++ b/Stoichiometry_And_Process_Calculations_by_K_V_Narayanan_And_B_Lakshmikutty/9-Material_Balance_in_Unit_Operations.ipynb @@ -0,0 +1,853 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9: Material Balance in Unit Operations" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.10: Extractio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m = 100;//kg\n", +"Pin1 = 40;//% ( tannin )\n", +"Pin2 = 5;//% ( moisture )\n", +"Pin3 = 23;//% ( soluble non tannin material )\n", +"Pin4 = 100 - Pin1 - Pin2 - Pin3;//% ( insoluble lignin )\n", +"// since, lignin is insoluble, all of it will be present in the residue\n", +"Pout1 = 3;//%\n", +"Pout2 = 50;//%\n", +"Pout3 = 1;//%\n", +"Pout4 = 100 - Pout1 - Pout2 - Pout3;\n", +"//let W be the mass of residue, then we get\n", +"W = Pin4 * m / Pout4;\n", +"Ptannin = W * Pout1 * 100 / (m * Pin1);\n", +"disp('%',Ptannin,'Percent of original tannin unextracted = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.11: Leaching_operation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"F = 100;//kg\n", +"//F - feed, R - overflow, U - underflow, S - solvent\n", +"//F + S = U + R ( Total balance )\n", +"Poil1 = 49;//% ( 1 - feed )\n", +"Ppulp1 = 40;//%\n", +"Psalts1 = 3;//%\n", +"Pwater = 100 - Poil1 - Ppulp1 - Psalts1;\n", +"Phexane2 = 25;//%(2 - underflow)\n", +"Psalts2 = 2.5;//%\n", +"Poil2 = 15;//%\n", +"Pwater2 = 7.5;//%\n", +"Ppulp2 = 100 - Phexane2 - Poil2 - Pwater2 - Psalts2;\n", +"Poil3 = 25;//% ( 3 - extract )\n", +"//taking pulp ( inert ) balance\n", +"U = Ppulp1 * F / Ppulp2;\n", +"//oil balance gives, F * Poil1 = U * Poil2 + R * Poil3,from these , we get\n", +"R = (F * Poil1 - U * Poil2)/Poil3;\n", +"S = U + R - F;\n", +"disp('kg',S,'(a)The amount of solvent used for extraction = ')\n", +"Precovered = 95;//%\n", +"mhexane2 = Phexane2 * U / 100;\n", +"mrecovered = mhexane2 * Precovered / 100;\n", +"P = mrecovered * 100 / S ;\n", +"disp('%',P,'(b)Percent of hexane used that is recovered from the underflow = ')\n", +"Poil = Poil3 * R * 100 / (F * Poil1 );\n", +"disp('%',Poil,'(c)Percent recovery of oil = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.12: Dryer_and_oven.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//F = feed(wet solid), V1 = water evaporated(drier), V2 = water evaporated(oven), S1 = Dry solid(drier), S2 = Dry solid(oven)\n", +"F = 1000;//kg\n", +"xf = 0.8;\n", +"x1 = 0.15;\n", +"x2 = 0.02;\n", +"//moisture free solid balance for drier, F * ( 1 - xf) = S1 * ( 1 - x1 )\n", +"S1 = F * ( 1 - xf )/(1 - x1);\n", +"//total balance for drier , F = S1 + V1\n", +"V1 = F - S1;\n", +"//For oven, S1 * ( 1 - x1 ) = S2 * ( 1 -x2 )\n", +"S2 = S1 * ( 1 - x1 )/(1 - x2);\n", +"//Also, S1 = S2 + V2\n", +"V2 = S1 - S2;\n", +"disp('kg',S1,'(a)Weight of product leaving the drier = ')\n", +"disp('kg',S2,' Weight of product leaving the oven = ')\n", +"P1 = V1 *100/ (F * xf);\n", +"P2 = V2 *100/ (F * xf);\n", +"disp('%',P1,'(b)Percentage of original water removed in drier = ')\n", +"disp('%',P2,' Percentage of original water removed in oven = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.13: Adiabatic_drier.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//Ss = solid flow rate,\n", +"Pwaterin = 25;//%\n", +"Pwaterout = 5;//%\n", +"X1 = Pwaterin/(100 - Pwaterin);//kg water/kg dry air\n", +"X2 = Pwaterout/(100 - Pwaterout);//kg water/kg dry air\n", +"//form humidity chart,\n", +"Y2 = 0.015;//kg water/kg dry air\n", +"Y1 = 0.035;//kg water/kg dry air\n", +"m = 1;//kg of dry air\n", +"//Ss * X1 + Y2 = Ss * X2 + Y1\n", +"Ss = (Y1 - Y2) / ( X1 - X2 );\n", +"T = 87.5 + 273.15;//K\n", +"P = 101.3;//kPa\n", +"Tstp = 273.15;//K\n", +"Pstp = 101.3;//kPa\n", +"Vstp = 22.4143;//m^3/mol\n", +"V = 100;//m^3\n", +"N = V * P * Tstp / ( Vstp * Pstp * T);\n", +"Nr2 = Y2 * 29 / 18;//kmol of water / kmol of dry air\n", +"Ndryair = N * 1 / (1 + Nr2);\n", +"mdryair = Ndryair * 29;\n", +"mevaporated = mdryair * ( Y1 - Y2 );\n", +"disp('kg',mevaporated,'(a)total moisture evaporated per 100m^3 of air entering = ')\n", +"Ss1 = mdryair * Ss;\n", +"mproduct = Ss1 * ( 1 + X2 );\n", +"disp('kg',mproduct,'(b)mass of finished product per 100m^3 of air entering = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.14: Extraction_of_isopropyl_alcohol.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//F = feed, E = extract, S = solvent, R = Raffinate\n", +"xwaterF = 0.7;//Feed\n", +"xalcoholF = 0.3;\n", +"xwaterR = 0.71;//raffinate\n", +"xalcoholR = 0.281;\n", +"xethyR = 0.009;\n", +"xwaterE = 0.008;//Extract\n", +"xalcoholE = 0.052;\n", +"xethyE = 0.94;\n", +"//Total balance, R + E = F + S\n", +"F = 100;//kg\n", +"//R + E = 100 + S (1)\n", +"//Isopropyl balance, xalcoholR * R + xalcoholE*E = xalcoholF * F\n", +"//0.281*R + 0.052 * E = 30 (2)\n", +"//Ethylene tetra chloride balance, xethyR * R + xethyE * E = S\n", +"//0.009*R + 0.94*E = S (3)\n", +"//Solving equation 1, 2 and 3 simultaneously, we get,\n", +"S = 45.1;\n", +"E = 47.04;\n", +"R = 98.06;\n", +"disp('kg',S,'(a)Amount of solvent used = ')\n", +"disp('kg',E,'(b)Amount of extract = ')\n", +"disp('kg',R,' Amount of raffinate = ')\n", +"mextracted = E * xalcoholE;\n", +"P1 = mextracted * 100 / (F * xalcoholF);\n", +"disp('%',P1,'(c)Percent of isopropyl alcohol extracted = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.15: Absorption_of_acetone.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"G1 = 100;//kmol\n", +"//G1 and G2 be the molar flow rate of the gas at the inlet and the exit of the absorber resp.,y1 and y2 mole fraction at entrance and exit resp.,\n", +"y1 = 0.25;//%\n", +"y2 = 0.05;//%\n", +"//air balance gives, G1 * ( 1-y1 ) = G2 * ( 1-y2 )\n", +"G2 = G1 * ( 1-y1 ) / (1 - y2);\n", +"maleaving = G2 * y2;\n", +"maentering = G1 * y1;\n", +"Pabsorbed = (maentering - maleaving) * 100 / ( maentering);\n", +"disp('%',Pabsorbed,'Percentage of acetone absorbed = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.16: Absorption_of_SO3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"F = 5000;//kg/h\n", +"P1 = 50;//% (H2O4 in)\n", +"MH2SO4 = 98.016;\n", +"P1gas = 65;//(nitrogen in gas entering)\n", +"P2gas = 35;// ( SO3)\n", +"MN2 = 28;\n", +"MSO3 = 80;\n", +"Mavg = ( MN2 * P1gas + MSO3 * P2gas)/100;//avg molecular wt. of entering gas\n", +"G = 4500;//kg/h\n", +"Ng = G / Mavg;\n", +"NN2 = Ng * P1gas / 100;\n", +"NSO3 = Ng - NN2;\n", +"P2 = 75;//% (H2O4 out)\n", +"//W be the mass of 75% H2SO4, x and y be the moles of SO3 and water vapour leaving resp.,\n", +"Pwater = 25;//kPa\n", +"Ptotal = 101.3;//kPa\n", +"//Pwater / Ptotal = y / ( NN2 + x + y )\n", +"//we get, y = 0.32765 * x + 2.744 (1)\n", +"//Total balance Feed + G = W + (NN2 * 28 + x * 80 + y * 18.016)\n", +"//we get, W + 80*x + 18.016*y = 7727.32 (2)\n", +"//from 1 and 2, 84.9174*x + W = 7352.68 (3)\n", +"//SO3 balance, So3 eneterin with 50% H2SO4 + SO3 in feed gas = SO leaving with 75%H2SO4 + SO3 leaving in exit gas\n", +"//5000*0.5*80/98.016 + 34.09*80 = 80* x + 0.75*W * 80/98.016 (4)\n", +"// from 3 and 4,\n", +"x = 9.74;\n", +"Nabsorbed = NSO3 - x;\n", +"Pabsorbed = Nabsorbed * 100 / NSO3;\n", +"disp('%',Pabsorbed,'Percentage of SO3 absorbed = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.17: Continuous_distillation_column.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"F = 200;//kmol/h\n", +"//F, D and W be the flow rates of the feed, the distillate and residue resp., xf , xd and xw be the mole fraction of ethanol in the fee, distillate and the residue resp.\n", +"xf = 0.10;\n", +"xd = 0.89;\n", +"xw = 0.003;\n", +"//total balance gives, F = D + W\n", +"//D + W = 200 (1)\n", +"//Alcohol balance gives, F*xf = D*xd + W*xw\n", +"//0.89*D+0.003*W = 20 (2)\n", +"//solving 1 and 2\n", +"D = 21.87;//kmol/h\n", +"W = 178.13;//kmol/h\n", +"Nawasted = W*xw;\n", +"mmakeup = Nawasted * 46*24;\n", +"disp('kg',mmakeup,'The make up alcohol required per day = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.18: Distillation_operation_for_methanol_solution.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"F = 100;//kg\n", +"//F, D and W be the flow rates of the feed, the distillate and bottom product resp., xf , xd and xw be the mole fraction of methanol in the fee, distillate and the bottom product resp.\n", +"xf = 0.20;\n", +"xd = 0.97;\n", +"xw = 0.02;\n", +"//using, F = D + W and F*xf + D*xd + W*xw,we get\n", +"D = 18.95;//kg/h\n", +"W = 81.05;//kg/h\n", +"R = 3.5;\n", +"//R = L / D\n", +"//for distillate = 1kg\n", +"D1 = 1;//kg\n", +"L = R*D1;\n", +"//Taking balance around the condenser,\n", +"G = L + D1;\n", +"mcondensed = G * D / F;\n", +"disp('kg',D,'(a)Amount of distillate = ')\n", +"disp('kg',W,' Amount of Bottom Product = ')\n", +"disp('kg',G,'(b)Amount of vapour condensed per kg of distillate = ')\n", +"disp('kg',mcondensed,'(c)Amount of vapour condensed per kg of feed = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.19: Bypass_operatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"mdryair = 1;//kg\n", +"Pwater1 = 1.4;//kPa ( Partial pressure at 285K )\n", +"Pwater2 = 10.6;//kPa ( Partial pressure at 320K )\n", +"P = 101.3;// ( Total )\n", +"Ys1 = Pwater2 * 18 / ((P - Pwater2)*29);//( saturation humidity at 320K )\n", +"Ys2 = Pwater1 * 18 / ((P - Pwater1)*29);//( saturation humidity at 285K )\n", +"Ys = 0.03;//kg water / kg dry air. (final humidity)\n", +"// humidity of air leaving dehumidifier is Ys2 and humidity of bypassed air is Ys1. these 2 streams combine to give humidity of 0.03kg water / kg dry air.\n", +"//therefore, taking balance we get, 1*Ys2 + x * Ys1 = (1 + x)*Ys\n", +"x = (1*Ys2 - 1*Ys)/(Ys - Ys1);\n", +"disp('kg dry air',x,'(a)Mass of dry air bypassed per kg of dry air sent through the dehumidifier = ')\n", +"mcondensed = Ys1 - Ys2;\n", +"mwetair = mdryair + Ys1;\n", +"Nwetair = mdryair/29 + Ys1/18.016;\n", +"Vstp = 22.4143;//m^3/kmol\n", +"Vstp1 = Nwetair * Vstp;\n", +"T = 320;//K\n", +"P = 101.3;//kPa\n", +"Tstp = 273.15;//K\n", +"Pstp = 101.325;//kPa\n", +"V = Vstp1 * Pstp * T / (P * Tstp);\n", +"Vgiven = 100;//m^3\n", +"mcondensed1 = mcondensed * Vgiven / V;\n", +"disp('kg',mcondensed1,'(b)mass of water vapour condensed in the dehumidifier per 100m^3 of air sent through it = ')\n", +"mfinal = mdryair + x;\n", +"mfinalair = mfinal * Vgiven / V;\n", +"N = mfinalair / 29;\n", +"Ysn = Ys * 29/18;//kmol water / kmol dry air\n", +"Ntotal = N * (Ysn + 1);\n", +"Vfinal = Ntotal * Vstp * Pstp * T / ( Tstp * P );\n", +"disp('m^3',Vfinal,'(c)Volume of final air obtained per 100 cubic metres f air passed through dehumidifier = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1: Combustion_of_coal.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"PC1 = 85;//% ( Percent carbon in coal )\n", +"PA1 = 15;//% ( Percent ash in coal )\n", +"PA2 = 80;//% ( Percent ash in cinder )\n", +"PC2 = 20;//% ( Percent carbon in cinder )\n", +"m = 100;//kg (weight of coal )\n", +"mash = PA1 * m / 100;\n", +"w = mash * 100 / PA2;// weight of cinder\n", +"mcarbon = w - mash;\n", +"Plost = mcarbon * 100 / ( m - mash );\n", +"disp('kg',w,'weight of cinder formed = ')\n", +"disp('%',Plost,'Percent fuel lost = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.20: Recycle_operation_centrifuge_plus_filter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"F = 100;//kg/h\n", +"xf = 0.2;\n", +"xp = 0.93;\n", +"xr = 0.5/1.5;\n", +"xx = 0.65;\n", +"//R - recycle stream, P - Product stream , W - water separeted and removed\n", +"//component A balance, F * xf = P * xp, that is,\n", +"P = F * xf / xp;\n", +"//Total balance, F = P + W,therefore\n", +"W = F - P;\n", +"//x be the flow rate of strea entering the filter \n", +"//total balance, x = P + R (1)\n", +"//component A balance , 0.65 * x = 0.5*R/1.5 + 0.93P (2)\n", +"//Solving 1 and 2, we get,\n", +"R = (xx * P - xp * P)/(xr - xx);\n", +"disp('kg/h',R,'Flow rate of the recycle stream = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.21: Recycle_operation_granulator_and_drier.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"F = 1000;//kg/h\n", +"xfwater = 0.7;\n", +"xpwater = 0.2;\n", +"xrwater = 0.20;\n", +"xswater = 0.5;\n", +"y1 = 0.0025;\n", +"y2 = 0.05;\n", +"//R - recycle, S - stream entering granulator, P - Product, G1 - air entering the drier, G2 - air leaving the drier,\n", +"//takin overall, moisture free balance, F * xf = P * xp\n", +"P = F * ( 1 - xfwater )/(1 - xpwater );\n", +"// taking material balance at point where recycle strea joins the feed,\n", +"// F = R + S\n", +"//water balance, F*xfwater = R*xrwater + S*xswater,solving this we get,\n", +"R = (-F*xfwater +F*xswater)/(xrwater - xswater);\n", +"S = F + R;\n", +"mleaving = P + R;//solid leaving the drier\n", +"//dry air entering will there be in air leaving, therefore\n", +"//G1 * ( 1 - y1 ) = G2 * ( 1 - y2 )\n", +"// water balance over the drier gives, S*xswater+G1*y1=G2*y2+(P+R)*xpwater\n", +"//from above 2 equations , we get\n", +"G1 = ((mleaving*xpwater - S*xswater)/(y1 - y2*(1-y1)/(1-y2)));\n", +"disp('kg/h',R,'(a)Amount of solid recycled = ')\n", +"mdryair = G1 * (1 - y1);\n", +"disp('kg/h',mdryair,'(b)circulation rate of air in the drier on dry basis = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.22: Blowdown_operation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"xf = 500 * 10^-6;\n", +"xp = 50 * 10^-6;\n", +"xb = 1600 * 10^-6;\n", +"//F - Feed water rate, B - blow down rate, S - high pressure steam, P - process stream rate\n", +"// total balance, F = P + B\n", +"// Solid balance, F * xf + P * xp = B * xb\n", +"//eliminating P, we get, F * xf + (F - B)*xp = B * xb\n", +"//let F/B be X\n", +"X = (xb + xp)/(xf + xp);\n", +"disp(X,'the ratio of feed water to the blowdown water = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.2: Drying_of_wood.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m = 1;//kg ( mass of completely dry wood )\n", +"P1 = 40;//% ( percentage moisture in wet wood )\n", +"P2 = 5;//% ( Percentage moisture in dry wood )\n", +"mwaterin = P1 * m / ( 100 - P1 );\n", +"mwaterout = P2 * m / ( 100 - P2 );\n", +"mevaporated = mwaterin - mwaterout;\n", +"disp('kg',mevaporated,'mass of water evaporated per kg of dry wood = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3: Effluent_discharge.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"F1 = 6*1000;//L/s\n", +"BOD1 = 3 * 10^-5;//g/L\n", +"BOD2 = 5 * 10^-3;//g/L\n", +"V = 16 * 10^3;//m^3/day\n", +"v = V * 10^3 / (24 * 3600);//L/s\n", +"//Let BOD of the effluent be BODeff,\n", +"BODeff = (BOD2 * (F1 + v) - BOD1 * F1) / ( v );\n", +"disp('g/L',BODeff,'BOD of the effluent of the plant = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4: benzene_requirement_calculation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"D = 100;//kg of overhead product\n", +"xfa = 0.956;\n", +"xdw = 0.074;\n", +"xdb = 0.741;\n", +"xda = 0.185;\n", +"//water balance gives\n", +"F = D * xdw / (1 - xfa) ;\n", +"W = F * xfa - xda * D;\n", +"W1 = 100;\n", +"B = xdb*D;\n", +"Bused = B * W1 / W;\n", +"disp('kg',Bused,'Quantity of benzene required = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.5: Fortification_of_waste_acid.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"//let, W - waste acid, S - Sulfuric acid, N - nitric acid, M - mixed acid\n", +"xsh2so4 = 0.95;\n", +"xsh2o = 0.5;\n", +"xwh2so4 = 0.3;\n", +"xwhno3 = 0.36;\n", +"xwh2o = 0.34;\n", +"xmh2so4 = 0.4;\n", +"xmhno3 = 0.45;\n", +"xmh2o = 0.15;\n", +"xnhno3 = 0.8;\n", +"xnh2o = 0.2;\n", +"M = 1000;//kg\n", +"// total material balance, W + S + N = 1000;\n", +"//H2SO4 balance, xwh2so4 * W + xsh2so4 * S = xmh2so4*M\n", +"//HNO3 balance, xwhno3 * W + xnhno3 * N = xmhno3*M\n", +"//H2O balance, xwh2o*W+xnh2o*N + xsh2o*S = xmh2o*M\n", +"//solving the above equations simultaneously, we get,\n", +"W = 70.22;//kg\n", +"S = 398.88;//kg\n", +"N = 530.9;//kg\n", +"disp('kg',W,'Waste acid = ')\n", +"disp('kg',S,'Concentrated H2SO4 = ')\n", +"disp('kg',N,'Concentrated HNO3 = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.6: Triple_effect_evaporator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"F = 1000;//kg\n", +"Psolute1 = 20;//%\n", +"Psolute2 = 80;//%\n", +"//taking solute balance\n", +"L3 = F * Psolute1 / Psolute2;\n", +"//taking total material balance\n", +"V = (F -L3) / 3;\n", +"//for first effect, total balance gives,\n", +"L1 = F - V;\n", +"//solute balance gives,\n", +"Psolute3 = F * Psolute1 / L1;\n", +"//For second effect, total balance gives,\n", +"L2 = L1 - V;\n", +"//solute balnce gives,\n", +"Psolute4 = L1 * Psolute3 / L2;\n", +"disp('%',Psolute3,'solute entering second effect = ')\n", +"disp('kg',L1,'Weight entering second effect')\n", +"disp('%',Psolute4,'solute entering third effect = ')\n", +"disp('kg',L2,'Weight entering third effect')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.7: Crystallization_operation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"F = 100;//kg\n", +"xf = 0.25;\n", +"x2 = 7/107;\n", +"P1 = 10;//%\n", +"W3 = P1 * F * (1-xf)/100;//(W3 - weight of water evaporated)\n", +"// let W1 and W2 be weight of crystal and weight of mother liquor remaining after crystallization resp.,\n", +"//F = W1 + W2 + W3\n", +"//100 = W1 + W2 + 7.5\n", +"//solute balance gives, F*xf = W1*x1 + W2*x2\n", +"//100*0.25 = W1*1+W2 * 0.0654\n", +"W2 = (F - W3 - F*xf)/(1-x2);\n", +"W1 = F - W3 - W2;\n", +"disp('kg',W1,,,'yeild of the crystals = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.8: Evaporation_of_Na2CO3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"F = 100;//kg\n", +"xf = 0.15;\n", +"P1 = 80;//% ( Carbonate recovered )\n", +"M1 = 106;//(Molecular weight of Na2CO3)\n", +"M2 = 286;//(Molecular weight of Na2CO3.10H2O)\n", +"x1 = M1 / M2;//(Weight fraction of Na2CO3 in crystals)\n", +"Mrecovered = P1 * F * xf / 100;\n", +"Wcrystal = Mrecovered / x1;\n", +"disp('kg',Wcrystal,'(a)quantity of crystals formed = ')\n", +"//Na2CO3 balance gives, F*xf = Wcrystal*x1 + W2*x2\n", +"//W2 weight of mother liquor remaining after crystallization\n", +"//let M = W2 * x2,therefore\n", +"M = F * xf - Mrecovered;\n", +"x2 = 0.09;\n", +"W2 = M/x2;\n", +"W3 = F - Wcrystal - W2;//weight of water evaporated\n", +"disp('kg',W3,'(b)Weight of water evaporated = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.9: Crystallizatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//clc()\n", +"m = 100;//kg (of 60% solution)\n", +"//w - water added to the original solution\n", +"//w1 - wt. of Na2S2O3.5H2O crystallized\n", +"//w2 - wt. of mother liquor obtained\n", +"//w3 - solution carried away by the crystals\n", +"xf = 0.6;\n", +"Mna2s2o3 = 158;\n", +"Mna2s2o35h2o = 248;\n", +"mcrystals = m * xf * Mna2s2o35h2o / Mna2s2o3;\n", +"// free water available = m + w - 1 - mcrystals\n", +"//concentration of impurity = 1/(w+4.823)\n", +"//total balance, 100 - 1 + w = w1 + w2 + w3\n", +"//w1 + w2 + w3 - w = 99\n", +"//Na2S2O3 balance, 60 = (w1 + w2 * 1.5/2.5 + w3 * 1.5/2.5)*158/248\n", +"//w1 + 0.6 * w2 + 0.6 * w3 = 94.177\n", +"//each gram crystals carry 0.05 kg solution,\n", +"//w3 = 0.05 * w1\n", +"//impurity % = 0.1\n", +"//impurity = w3 /(2.5 * (w+4.823))\n", +"//solving above equations, we get\n", +"w = 14.577;//kg\n", +"w1 = 65.08;//kg\n", +"w2 = 45.25;//kg\n", +"w3 = 0.05 * w1;\n", +"disp('kg',w,'(a)amount of water added = ')\n", +"disp('kg',w1,'(b)amount of Na2S2O3.5H2O crystals added = ')\n", +"m1 = w1 * Mna2s2o3 / Mna2s2o35h2o + w3 * 1.5 * Mna2s2o3 / (2.5 * Mna2s2o35h2o);\n", +"P = m1*100/(m*xf);\n", +"disp('%',P,'(c)Percentage recovery of Na2S2O3 = ')" + ] + } +], +"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 +} |