{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 2: Physico Chemical Calculations" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.10: Precipitation_of_KClO3.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.10 page number 74\n\n')\n", "\n", "//to find amount of KClO3 precipitated\n", "\n", "solubility_70=30.2 //in gm/100gm\n", "w_solute=solubility_70*350/130.2; //in gm\n", "\n", "w_water=350-w_solute;\n", "solubility_30=10.1 //in gm/100gm\n", "precipitate=(solubility_70-solubility_30)*w_water/100\n", "\n", "printf('amount precipitated = %f gm',precipitate)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.11: Solubility_of_CO2.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.11 page number 74\n\n')\n", "\n", "//to find the pressure for solubility of CO2\n", "\n", "absorbtion_coefficient=1.71 //in liters\n", "molar_mass=44;\n", "solubility=absorbtion_coefficient*molar_mass/22.4; //in gm\n", "pressure=8/solubility*101.3;\n", "\n", "printf('pressure required = %f kPa',pressure)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.12: Vapor_pressure_calculatio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.12 page number 74\n\n')\n", "\n", "//to find the vapor pressure of water\n", "\n", "w_water=540 //in gm\n", "w_glucose=36 //in gm\n", "m_water=18; //molar mass of water\n", "m_glucose=180; //molar mass of glucose\n", "\n", "x=(w_water/m_water)/(w_water/m_water+w_glucose/m_glucose);\n", "p=8.2*x;\n", "depression=8.2-p;\n", "\n", "printf('depression in vapor pressure = %f Pa',depression*1000)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.13: Boiling_point_calculation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.13 page number 75\n\n')\n", "\n", "//to find the boiling point of solution\n", "\n", "w_glucose=9 //in gm\n", "w_water=100 //in gm\n", "E=0.52;\n", "m=90/180; //moles/1000gm water\n", "\n", "delta_t=E*m;\n", "boiling_point=100+delta_t;\n", "\n", "printf('boiling_point of water = %f degreeC',boiling_point)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.14: Colligative_properties.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.14 page number 75\n\n')\n", "\n", "//to find the molar mass and osmotic pressure\n", "\n", "K=1.86;\n", "c=15 //concentration of alcohol\n", "delta_t=10.26;\n", "\n", "m=delta_t/K; //molality\n", "M=c/(m*85); //molar mass\n", "printf('molar mass = %f gm\n\n',M*1000)\n", "\n", "density=0.97 //g/ml\n", "cm=c*density/(M*100);\n", "printf('molar concentration of alcohol = %f moles/l\n\n',cm)\n", "\n", "p=cm*8.314*293 //osmotic pressure\n", "printf('osmotic pressure = %f Mpa\n\n',p/1000)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.15: Huggins_Equation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.15 page number 75\n\n')\n", "\n", "//to find u_in, M_v, k'\n", "\n", "u_in = 0.575 //from the graph\n", "u_s = 0.295 //in mPa-s\n", "\n", "M_v = (u_in/(5.80*10^-5))^(1/0.72);\n", "u_red = 0.628; //in dl/g\n", "\n", "c = 0.40 //in g/dl\n", "k = (u_red-u_in)/((u_in^2)*c);\n", "\n", "printf('k = %f \nMv = %f\nu_in = %f dl/gm',k,M_v,u_in)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.16: Molecular_Formula.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.16 page number 76\n\n')\n", "\n", "//to find the molecular formula\n", "\n", "C=54.5 //% of carbon\n", "H2=9.1 //% of hydrogen\n", "O2=36.4 //% of oxygen\n", "x=C/12; //number of carbon molecules\n", "y=O2/16; //number of oxygen molecules\n", "z=H2/2 //number of hydrogen molecules\n", "molar_mass=88;\n", "density=44;\n", "\n", "ratio=molar_mass/density;\n", "x=ratio*2;\n", "y=ratio*1;\n", "z=ratio*4;\n", "\n", "printf('x = %f, y = %f, z = %f',x,y,z)\n", "printf('\n\nformula of butyric acid is = C4H8O2')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.17: Molecular_Formula.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.17 page number 77\n\n')\n", "\n", "//to find molecular foemula \n", "C=93.75 //% of carbon\n", "H2=6.25 //% of hydrogen\n", "x=C/12 //number of carbon atoms\n", "y=H2/2 //number of hydrogen atoms\n", "molar_mass=64\n", "density=4.41*29;\n", "\n", "ratio=density/molar_mass;\n", "\n", "x=ratio*5;\n", "y=ratio*4;\n", "\n", "\n", "printf('x = %f, y = %f',x,y)\n", "printf('\n\nformula of butyric acid is = C10H8')\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.18: Molecular_Formula.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.18 page number 77\n\n')\n", "\n", "//to find molecular formula\n", "C=50.69 //% of carbon\n", "H2=4.23 //% of hydrogen\n", "O2=45.08 //% of oxygen\n", "a=C/12; //number of carbon molecules\n", "c=O2/16; //number of oxygen molecules\n", "b=H2/2; //number of hydrogen molecules\n", "molar_mass=71;\n", "\n", "function M=f(m)\n", " M=(2.09*1000)/(60*m);\n", "\n", "endfunction\n", "\n", "M=f((1.25/5.1));\n", "\n", "printf('actual molecular mass = %f\n\n',M)\n", "\n", "ratio=M/molar_mass;\n", "a=ratio*3;\n", "b=ratio*3;\n", "c=ratio*2;\n", "\n", "\n", "printf('a = %f, b = %f, c = %f',a,b,c)\n", "printf('\n\nformula of butyric acid is = C6H6O4')\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.19: Molecular_Formula.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.19 page number 78\n\n')\n", "\n", "//to find the molecular formula\n", "C=64.6 //% of carbon\n", "H2=5.2 //% of hydrogen\n", "O2=12.6 //% of oxygen\n", "N2=8.8 //% of nitrogen\n", "Fe=8.8 //% of iron\n", "\n", "a=C/12; //number of carbon molecules\n", "c=8.8/14; //number of nitrogen molecules\n", "b=H2/2; //number of hydrogen molecules\n", "d=O2/16; //number of oxygen molecules\n", "e=Fe/56 //number of iron atoms\n", "\n", "cm=243.4/(8.31*293) //concentration\n", "\n", " molar_mass=63.3/cm;\n", " \n", " printf('a = %f, b = %f, c = %f, d = %f, e = %f',a*6.5,b*6.5,c*6.5,d*6.5,e*6.5)\n", "printf('\n\nformula of butyric acid is = C34H33N4O5Fe')\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.1: Ideal_gas_system.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.1 page number 71\n\n')\n", "\n", "//to find the volume of oxygen that can be obtained\n", "\n", "p1=15 //in bar\n", "p2=1.013 //in bar\n", "t1=283 //in K\n", "t2=273 //in K\n", "v1=10 //in l\n", "\n", "v2=p1*v1*t2/(t1*p2);\n", "\n", "printf('volume of oxygen = %f liters',v2)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.20: Metal_depositio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "printf('example 2.20 page number 78\n\n')\n", "\n", "//to find sequence of deposition\n", "E1=-0.25;\n", "E2=0.80;\n", "E3=0.34;\n", "\n", "a=[E1;E2;E3];\n", "b=gsort(a);\n", "\n", "printf('sorted potential in volts =')\n", "disp (b)\n", "disp ('E2>E3>E1')\n", "disp ('silver>copper>nickel')\n", "\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.21: EMF_of_cell.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.21 page number 79\n\n')\n", "\n", "//to find the emf of cell\n", "\n", "E0_Zn=-0.76;\n", "E0_Pb=-0.13;\n", "c_Zn=0.1;\n", "c_Pb=0.02;\n", "\n", "E_Zn=E0_Zn+(0.059/2)*log10(c_Zn);\n", "E_Pb=E0_Pb+(0.059/2)*log10(c_Pb);\n", "E=E_Pb-E_Zn;\n", "\n", "printf('emf of cell = %f V',E)\n", "printf('\n\nSince potential of lead is greater than that of zinc thus reduction will occur at lead electrode and oxidation will occur at zinc electrode')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.22: EMF_of_cell.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.22 page number 79\n\n')\n", "\n", "//to find the emf of cell\n", "E0_Ag=0.80;\n", "E0_AgNO3=0.80;\n", "c_Ag=0.001;\n", "c_AgNO3=0.1;\n", "\n", "E_Ag=E0_Ag+(0.059)*log10(c_Ag);\n", "E_AgNO3=E0_AgNO3+(0.059)*log10(c_AgNO3);\n", "E=E_AgNO3-E_Ag;\n", "\n", "printf('emf of cell = %f V' ,E)\n", "printf('\n\nsince E is positive, the left hand electrode will be anode and the electron will travel in the external circuit from the left hand to the right hand electrode')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.23: EMF_of_cell.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.23 page number 79\n\n')\n", "\n", "//to find emf of cell\n", "pH=12; //pH of solution\n", "E_H2=0;\n", "E2=-0.059*pH;\n", "E=E_H2-E2;\n", "printf('EMF of cell = %f V',E)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.24: Silver_depositio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.24 page number 80\n\n')\n", "\n", "//to find amount of silver deposited\n", "I=3 //in Ampere\n", "t=900 //in s\n", "m_eq=107.9 //in gm/mol\n", "F=96500;\n", "\n", "m=(I*t*m_eq)/F;\n", "printf('mass = %f gm',m)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.25: Electroplating_time.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "printf('example 2.25 page number 80\n\n')\n", "\n", "//to find the time for electroplating\n", "volume=10*10*0.005; //in cm3\n", "mass=volume*8.9;\n", "F=96500;\n", "atomic_mass=58.7 //in amu\n", "current=2.5 //in Ampere\n", "\n", "charge=(8.9*F*2)/atomic_mass;\n", "yield=0.95;\n", "actual_charge=charge/(yield*3600);\n", "t=actual_charge/current;\n", "\n", "printf('time required = %f hours',t)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.26: Water_hardness.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.26 page number 80\n\n')\n", "\n", "//to find hardness of water\n", "m_MgSO4=90 //in ppm\n", "MgSO4_parts=120;\n", "CaCO3_parts=100;\n", "\n", "hardness=(CaCO3_parts/MgSO4_parts)*m_MgSO4;\n", "\n", "printf('hardness of water = %f mg/l',hardness)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.27: Water_hardness.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.26 page number 80\n\n')\n", "\n", "m1 = 162 //mass of calcium bi carbonate in mg\n", "m2 = 73 //mass of magnesium bi carbonate in mg\n", "m3 = 136 // mass of calsium sulfate in mg\n", "m4 = 95 // mass of magnesium cloride\n", "m5 = 500 //mass of sodium cloride in mg\n", "m6 = 50 // mass of potassium cloride in mg\n", "\n", "content_1 = m1*100/m1; //content of calcium bi carbonate in mg\n", "content_2 = m2*100/(2*m2); //content of magnesium bi carbonate in mg\n", "content_3 = m3*100/m3; // content of calsium sufate in mg\n", "content_4 = m4*100/m4; // content of magnesium cloride\n", "\n", "//part_1\n", "\n", "temp_hardness = content_1 + content_2; //depends on bicarbonate only\n", "total_hardness = content_1+content_2+content_3+content_4;\n", "printf('total hardness = %f\n temporary hardness = %f \n',temp_hardness,total_hardness)\n", "\n", "//part 2\n", "wt_lime = (74/100)*(content_1+2*content_2+content_4);\n", "actual_lime = wt_lime/0.85;\n", "printf('amount of lime required = %f \n',actual_lime)\n", "\n", "soda_required = (106/100)*(content_1+content_4);\n", "actual_soda = soda_required/0.98;\n", "printf('amount of soda required = %f \n',actual_soda)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.28: Water_hardness.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.28 page number 82\n\n')\n", "\n", "//to find hardness of water\n", "\n", "volume_NaCl=50 //in l\n", "c_NaCl=5000 //in mg/l\n", "\n", "m=volume_NaCl*c_NaCl;\n", "equivalent_NaCl=50/58.5;\n", "\n", "hardness=equivalent_NaCl*m;\n", "\n", "printf('hardness of water = %f mg/l',hardness/1000)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.29: Mixture_compositio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.29 page number 82\n\n')\n", "\n", "//to find the total vapor pressure and molar compositions\n", "\n", "m_benzene = 55 //in kg\n", "m_toluene = 28 //in kg\n", "m_xylene = 17 // in kg\n", "\n", "mole_benzene = m_benzene/78;\n", "mole_toluene = m_toluene/92;\n", "mole_xylene = m_xylene/106;\n", "\n", "mole_total = mole_benzene+mole_toluene+mole_xylene;\n", "x_benzene = mole_benzene/mole_total;\n", "x_toluene = mole_toluene/mole_total;\n", "x_xylene = mole_xylene/mole_total;\n", "\n", "P = x_benzene*178.6+x_toluene*74.6+x_xylene*28;\n", "printf('total pressure = %f kPa\n',P)\n", "\n", "benzene = (x_benzene*178.6*100)/P;\n", "toluene = (x_toluene*74.6*100)/P;\n", "xylene = (x_xylene*28*100)/P;\n", "\n", "printf('xylene = %f \n toluene = %f \n benzene = %f',xylene,toluene,benzene)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.2: Mixture_properties.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.2 page number 71\n\n')\n", "\n", "//to find volumetric composition,partial pressue of each gas and total pressure of mixture\n", "\n", "nCO2=2/44; //moles of CO2\n", "nO2=4/32; //moles of O2\n", "nCH4=1.5/16; //moles of CH4\n", "\n", "total_moles=nCO2+nO2+nCH4;\n", "yCO2=nCO2/total_moles;\n", "yO2=nO2/total_moles;\n", "yCH4=nCH4/total_moles;\n", "\n", "printf (' Composition of mixture = \nCH4 = %f \nO2 = %f \n CO2 = %f \n\n',yCH4,yO2,yCO2)\n", "\n", "pCO2=nCO2*8.314*273/(6*10^-3);\n", "pO2=nO2*8.314*273/(6*10^-3);\n", "pCH4=nCH4*8.314*273/(6*10^-3);\n", "\n", "printf ('pressure of CH4 = %f kPa \npressure of O2 = %f kPa\n pressure of CO2 =%f kPa\n\n',pCH4*10^-3,pO2*10^-3,pCO2*10^-3)\n", "\n", "total_pressure=pCO2+pCH4+pO2;\n", "printf ('total pressure = %f Kpa',total_pressure*10^-3)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.30: Mixture_compositio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.30 page number 83\n\n')\n", "\n", "//to find the mixture composition\n", "\n", "vapor_pressure=8 //in kPa\n", "pressure=100 //in kPa\n", "\n", "//part 1\n", "volume=1 //in m3\n", "volume_ethanol=volume*(vapor_pressure/pressure);\n", "volume_air=1-volume_ethanol;\n", "printf('volumetric composition:- \nair composition = %f\n ethanol compostion = %f',volume_air*100,volume_ethanol*100)\n", "\n", "//part 2\n", "molar_mass_ethanol=46;\n", "molar_mass_air=28.9;\n", "mass_ethanol=0.08*molar_mass_ethanol; //in kg\n", "mass_air=0.92*molar_mass_air; //in kg\n", "fraction_ethanol=(mass_ethanol*100)/(mass_air+mass_ethanol);\n", "fraction_air=(mass_air*100)/(mass_air+mass_ethanol);\n", "printf('\n\ncomposition by weight:-\nAir = %f Ethanol vapor = %f',fraction_air,fraction_ethanol)\n", "\n", "//part 3\n", "mixture_volume=22.3*(101.3/100)*(299/273); //in m3\n", "weight_ethanol=mass_ethanol/mixture_volume;\n", "printf('\n\nweight of ethanol/cubic meter = %f Kg',weight_ethanol)\n", "\n", "//part 4\n", "w_ethanol=mass_ethanol/mass_air;\n", "printf('\n\nweight of ethanol/kg vapor free air = %f Kg',w_ethanol)\n", "\n", "//part 5\n", "moles_ethanol=0.08/0.92;\n", "printf('\n\nkmol of ethanol per kmol of vapor free air = %f',moles_ethanol)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.31: Mixture_properties.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.31 page number 84\n\n')\n", "\n", "//to find relative saturation and dew point\n", "\n", "vapor_pressure=8 //in kPa\n", "volume_ethanol=0.05;\n", "\n", "//basis 1kmol of mixture\n", "\n", "partial_pressure=volume_ethanol*100;\n", "relative_saturation=partial_pressure/vapor_pressure;\n", "mole_ratio=volume_ethanol/(1-volume_ethanol);\n", "printf('mole ratio = %f \nrelative saturation = %f',mole_ratio,relative_saturation*100)\n", "\n", "//basis 1kmol saturated gas mixture at 100kPa\n", "volume_vapor=(8/100)*100;\n", "ethanol_vapor=volume_vapor/100;\n", "air_vapor=1-ethanol_vapor;\n", "saturation_ratio=ethanol_vapor/air_vapor;\n", "percentage_saturation=mole_ratio/saturation_ratio;\n", "\n", "printf('\n\npercentage saturation = %f',percentage_saturation)\n", "\n", "//dew point\n", "printf('\n\ncorresponding to partial pressure of 5kPa we get a dew point of 17.3 degree celcius')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.32: Humidity.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.32 page number 84\n\n')\n", "\n", "//to find the properties of humid air\n", "\n", "p = 4.24 //in kPa\n", "H_rel = 0.8;\n", "p_partial = p*H_rel;\n", "molal_H = p_partial/(100-p_partial);\n", "printf('initial molal humidity = %f\n\n',molal_H)\n", "\n", "//part 2\n", "P = 200 //in kPa\n", "p_partial = 1.70 //in kPa\n", "final_H = p_partial/(P-p_partial);\n", "printf('final molal humidity = %f\n\n',final_H)\n", "\n", "//part 3\n", "p_dryair = 100 - 3.39;\n", "v = 100*(p_dryair/101.3)*(273/303);\n", "moles_dryair = v/22.4;\n", "vapor_initial = molal_H*moles_dryair;\n", "vapor_final = final_H*moles_dryair;\n", "water_condensed = (vapor_initial-vapor_final)*18;\n", "printf('amount of water condensed = %f \n\n',water_condensed)\n", "\n", "//part 4\n", "total_air = moles_dryair+vapor_final;\n", "final_v = 22.4*(101.3/200)*(288/273)*total_air;\n", "printf('final volume of wety air = %f \n\n',final_v)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.3: Equivalent_metal_mass.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.3 page number 72\n\n')\n", "\n", "//to find equivalent mass of metal\n", "\n", "P=104.3 //total pressure in KPa\n", "pH2O=2.3 //in KPa\n", "pH2=P-pH2O; //in KPa\n", "\n", "VH2=209*pH2*273/(293*101.3)\n", "\n", "printf('volume of hydrogen obtained = %f ml\n\n',VH2)\n", "\n", "//calculating amount of metal having 11.2l of hydrogen\n", "\n", "m=350/196.08*11.2 //mass of metal in grams\n", "printf('mass of metal equivalent to 11.2 litre/mol of hydrogen = %f gm',m)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.4: Purity_of_Sodium_Hydroxide.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.4 page number 72\n\n')\n", "\n", "//to find NaCl content in NaOH solution\n", "\n", "w=2 //in gm\n", "m=0.287 //in gm\n", "\n", "//precipitate from 58.5gm of NaCl=143.4gm\n", "\n", "mNaCl=58.5/143.4*m;\n", "\n", "printf('mass of NaCl = %f gm\n',mNaCl )\n", "\n", "percentage_NaCl=mNaCl/w*100;\n", "printf('amount of NaCl = %f',percentage_NaCl)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.5: Carbon_content_formulation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.5 page number 72\n\n')\n", "\n", "//to find the carbon content in sample\n", "\n", "w=4.73 //in gm5\n", "VCO2=5.30 //in liters\n", "\n", "weight_CO2=44/22.4*VCO2;\n", "carbon_content=12/44*weight_CO2;\n", "\n", "percentage_content=(carbon_content/w)*100;\n", "\n", "printf('percentage amount of carbon in sample = %f',percentage_content)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.6: Combustion_of_gas.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.6 page number 73\n\n')\n", "//to find the volume of air\n", "\n", "volume_H2=0.5 //in m3\n", "volume_CH4=0.35 //in m3\n", "volume_CO=0.08 //in m3\n", "volume_C2H4=0.02 //in m3\n", "volume_oxygen=0.21 //in m3 in air\n", "\n", "//required oxygen for various gases\n", "H2=0.5*volume_H2;\n", "CH4=2*volume_CH4;\n", "CO=0.5*volume_CO;\n", "C2H4=3*volume_C2H4;\n", "\n", "total_O2=H2+CH4+CO+C2H4;\n", "oxygen_required=total_O2/volume_oxygen;\n", "\n", "printf('amount of oxygen required = %f cubic meter',oxygen_required)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.7: Sulphuric_acid_preparatio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.7 page number 73\n\n')\n", "\n", "//to find the volume of sulphuric acid and mass of water consumed\n", "\n", "density_H2SO4 = 1.10 //in g/ml\n", "mass_1 = 100*density_H2SO4; //mass of 100ml of 15% solution\n", "mass_H2SO4 = 0.15*mass_1;\n", "density_std = 1.84 //density of 96% sulphuric acid\n", "mass_std = 0.96*density_std; //mass of H2SO4 in 1ml 96% H2SO4\n", "\n", "volume_std = mass_H2SO4/mass_std; //volume of 96%H2SO4\n", "mass_water = mass_1 - mass_H2SO4;\n", "\n", "printf('volume of 0.96 H2SO4 required = %f ml',volume_std)\n", "printf('\nmass of water required = %f g',mass_water)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.8: Molarity_Molality_Normality_Calculatio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.8 page number 73\n\n')\n", "\n", "//to find molarity,molality and normality\n", "\n", "w_H2SO4=0.15 //in gm/1gm solution\n", "density=1.10 //in gm/ml\n", "m=density*1000; //mass per liter\n", "weight=m*w_H2SO4; //H2SO4 per liter solution\n", "molar_mass=98;\n", "\n", "Molarity=weight/molar_mass;\n", "printf('Molarity = %f mol/l\n\n',Molarity)\n", "\n", "equivalent_mass=49;\n", "normality=weight/equivalent_mass;\n", "printf('Normality = %f N\n\n',normality)\n", "\n", "molality=176.5/molar_mass;\n", "printf('Molality = %f',molality)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.9: Normality_calculatio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear \n", "printf('example 2.9 page number 74\n\n')\n", "\n", "molar_mass_BaCl2=208.3; //in gm\n", "equivalent_H2SO4=0.144;\n", "normality=equivalent_H2SO4*1000/28.8;\n", "\n", "printf('Normality = %f N',normality)" ] } ], "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 }