You are on page 1of 138

Scilab Textbook Companion for

Introduction To Chemical Engineering
by S. K. Ghoshal, S. K. Sanyal And S. Datta1
Created by
Himanshu Bhatia
Btech
Chemical Engineering
IIT Guwahati
College Teacher
Dr Prakash Kotecha
Cross-Checked by
Ganesh R
October 3, 2013

1 Funded

by a grant from the National Mission on Education through ICT,
http://spoken-tutorial.org/NMEICT-Intro. This Textbook Companion and Scilab
codes written in it can be downloaded from the ”Textbook Companion Project”
section at the website http://scilab.in

Book Description
Title: Introduction To Chemical Engineering
Author: S. K. Ghoshal, S. K. Sanyal And S. Datta
Publisher: Tata McGraw Hill Education Pvt. Ltd., New Delhi
Edition: 1
Year: 2006
ISBN: 0-07-460140-7

1

Scilab numbering policy used in this document and the relation to the
above book.
Exa Example (Solved example)
Eqn Equation (Particular equation of the above book)
AP Appendix to Example(Scilab Code that is an Appednix to a particular
Example of the above book)
For example, Exa 3.51 means solved example 3.51 of this book. Sec 2.3 means
a scilab code whose theory is explained in Section 2.3 of the book.

2

Contents List of Scilab Codes 4 1 Introduction 9 2 Physico Chemical Calculations 23 3 Material and Energy Balances 46 4 Flow Of Fluids 73 5 Heat Transfer 87 6 Mass Transfer 100 7 Chemical Kinetics 115 8 Measuring Devices 124 9 Computers and their application 133 3 .

. . . . . .16 1. . . . . .8 1. .5 1. . . . . . . . . . . . . . . Mixture properties . . . . . . . . . . .1 1. . . . . . . . . . . . . . .13 1. . . . . . . . . . . Velocity determination . Dimensional analysis . Carbon content formulation . Average Velocity . . . . . . .3 2. . . . . . . . . . .4 1. . . . Dimensional analysis . . . . .9 1. . . . . . . . . . . . . . . . . . . . . . . . Volume calculation . . . . . . Molarity Molality Normality Calculation Normality calculation . . . . . . . . . . . . . . . . . . . . . .11 1. . . . . . . . Vapor Pressure of Mixture . . . . . . . . . . . . . . .5 2. Gas Composition . . . . . . . . .19 2. . . . Sulphuric acid preparation . . . . . 4 . . . . . . . . . . . . . .10 1. . . . . . . . . . . . . . . . . . . . . . . . . . Vapor pressure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15 1. . . . . . . .9 Air composition .2 1. . . . . .6 2. . . . . . Duhring Plot calculations . . . . . . . . . . .8 2. . . . . . . . . . . . . .12 1. . . . . Nomographic chart . . .2 2. . . . . . . . . . . . . Combustion of gas . . . . . . . . . . . . . . . . . . . . . . . . . . Ideal gas system .17 1. . . . . . . . . . . . . . . Purity of Sodium Hydroxide . . . . . Equivalent metal mass . . . . . . . . . . . . . . . . . . . .6 1. . . . Dynamic similarity . Calculation using Nomograph . . . . 9 10 10 12 12 13 14 14 15 16 16 17 18 19 19 19 20 21 22 23 23 24 25 26 26 27 28 28 . . . . . . . . Amount of CO2 released . . . . . . . . . . . .14 1.4 2.3 1. . . . . . . . . Dynamic similarity . Velocity determination . . . . . . . . . . . .1 2. . . . . . . . . . . . . . . . . Flow relation .18 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7 2.7 1. . . Vapor pressure . . . . . . . . . . . . . . . .List of Scilab Codes Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa 1. . . . . . . . . Volume calculation . . . . . .

. . . . .7 3. . . .2 3. . . . . . . . . . . . . . . Water hardness . . . . . . . . . . . . . . . . . . . . .9 3. . . . . EMF of cell . . .3 3. HCl production . . 5 . .5 3. . . . . . Vapor pressure calculation . . . . . Water hardness . . . . . . . . . . . .26 2. . . . . . . . . . . . . . . . .14 2. Distillation . . . . . . . . . . . . . . . . . . . . . . . .4 3. . . . . . . . . . . .28 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . .15 2. . . . . . . . . . . . . . . .14 3. . .1 3. Mixture composition . Colligative properties . . . . . . . . . . . . . . . . . . .24 2.15 Precipitation of KClO3 . . . . . . . . . . . . . . . . . . . . . . . .32 3. . . . . . . . .8 3. .Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa 2. . . . . . . . . . . Boiling point calculation . . .17 2. Molecular Formula . . . . . . Nitric acid preparation . . . . . . . . . . . . . . . . .19 2. . . . . . . . . . . .27 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13 2. . . . Extraction . . . . . .30 2. . . . .23 2. . . . Distillation . . . . . . Enthalpy calculation . . . . Drying . . . . . . . . Molecular Formula . . . . . .16 2. . . . . . . . .10 3. . . .12 2. . . Silver deposition . . . .20 2. . . . . Metal deposition . . Electroplating time . . . . . . . . . . . . . Absorption . . . . . . . . . . . . . . . . Huggins Equation . . . . . . . . . . . . . . . . . . . . . Conditioning of air . . . . . . . . . . . . . 29 29 30 30 31 32 32 33 34 35 35 36 37 37 38 38 39 39 40 41 42 43 44 46 47 47 48 49 50 51 52 53 54 55 55 56 57 58 . . . . . .13 3. . . . . . . . . . crystallization . . . . . . . . . . .31 2. . . . . . . . . . . . . . . . . . . . . .21 2. . . . . . . . .25 2. . . Water hardness . . . . Acetylene consumption . .6 3. . . . . . . .29 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mixture properties . . EMF of cell . . . . . . . . . . . . . . . .22 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . EMF of cell . . . .10 2. . . . . . . . . . . Molecular Formula . . . . Mixture composition . . . . . . . . . . . Crystallization . . . . . . . . . . . . . . .18 2. . . . . . . . . . Humidity . . . .12 3. . . . Ammonia Synthesis . . . . . . . . . . . . . . . . Molecular Formula . . . . . . . . . .11 3. . . . .11 2. . . . Screen effectiveness . . . . . . . . . . . . . . . . . . . . . . . . . Coal consumption . . . . . . . . . Solubility of CO2 . . . . . . .

. . Isothermal Compressibility . .23 Enthalpy calculation . . . .2 4. . . . Minimum fluidization velocity Pumping of fluids . . . .4 4.25 3. . . .26 3. . . . . . . . . . . . .20 4. . . . . . . Power requirements . .13 4. . . . . . . . . . . . . . . . . . . . . . . . .23 3. . . . . . . . . . . . .10 4. . . . . .14 4.3 4. Enthalpy of formation . Level difference calculation . . . . . . . . . . . . Air supply . . . Flow rate . . . . . . . . . . . . . . . . . .30 4.12 4. . . . . . . . . . . . . . . . . . . . . . . . . . . .29 3. . . . . . . . . . . . . . . . Frictional losses . . . . . . 59 59 60 61 61 62 62 64 66 67 68 68 69 71 72 73 73 74 74 74 75 75 75 76 77 78 78 79 80 80 81 82 82 83 84 84 85 86 . . . . . . . . . . . . . . . . . . . . . .9 4. . . . . . . . . .11 4. . . . . . . Combustion . . . . . . . . . . . . . . .18 3. . . . . . . . . . . . . . . . .7 4. . . Velocity profile . . . . . . . . . . Distillation column . . Crystallization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pipe dimensions . . . . . . . . . .21 4. Heat transfer . . .28 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pressure gradient . . .16 3. . . . . CO2 cooling . . . . . . . . . . .8 4. . . .19 3. . . . . . . . . . . . . . . . . . . . . . . . . Water compressibility . . . .27 3. . . . . . . . . . . . . . .21 3. . . . . . . . . . . . . . . . .5 4. . . Energy cost calculation . . Boundary layer . . . . . . . . . . . .15 4. . . . . . . . . . . . . . . . . . . . . . .18 4. . . . . . .17 3. . . .19 4. . . Heating area . . Velocity profile . . . . . . . . . . . .Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa 3. . . . . . . . . . . . . . . . . . . . . . . Hagen Poiseulle equation .1 4. . . . . . . . . . . . . . . . . . . .16 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coal combustion . . . . . . . . . . . Calorific value . . . . . . . . Temperature rise . . . . . . . . . . . . . . . . . . . . . . . . . .17 4. . . . . . . . .22 4. . . . . . . . . . . . . . Pressure loss . . . . . Pipe flow . . . . . . . Pressure gradient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Combustion . . . . . . . . . . . . . . . . . Viscosity . . Heat of reaction . . . . . . . . . .24 3. . . . . . . . Coal combustion . . . . . . . . . . Bernoulli equation . . . . . . . . . . . .22 3. . Pressure Head calculation . . . 6 . . . . . . . . . . . . Petrol combustion . . . . . . . . . . . . .6 4. . . . . . . .20 3. . . . . . . . . . . . . . . . . . . . . . . . . Streamline flow . . . . . . . . . . . . . . . . . . . . . . . . .

1 5. . . . . . . . . . . . 87 87 88 89 90 91 92 93 94 94 95 95 96 96 97 98 98 100 100 101 101 102 102 103 104 105 105 106 106 107 108 108 109 110 110 111 112 113 . . . . . . . . . Crystallization . . . . .12 6. . . . . . . . . . . . . . . . . .9 5. . . . . . . . .1 6. . . . . . . . . . Vapor diffusion . . . . . Solar constant . . . . . . . . . Evaporator .12 5. . . . . . Heat transfer coefficient . . . . . . . . . . . Resistane to diffusion . . . . . . .10 6. . Liquid liquid extraction . . . . . . . . . . . . . . . . . . .14 5. . . . . . . . Liquid liquid extraction . . . Parellel Resistance . . . . . . .19 6. . . . . . . . . . . . .20 6. Equilibrium Composition . . . . . . . . . . . . . . . . . . . .11 5. . . . . . . . . . . . Evaporator . . . . Absorption . . . . . . . . Vapor Liquid Equilibrium . Mcabe Thiele Method . . . . . . . . . . . .8 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 6.2 5. . . . . . .3 5. . . . . . . . . . . . .6 5. . . . . Equilibrium temperature .21 Heat conduction . . . . Temperature calculation . . . . . . . . . . . . . . . . . . . . . Drying operation . . . . . . .17 6. . . . . . . . . . . . . . . . . . .2 6. . .7 5. . . . Crystallization . . Evaporator . . . . . . . .11 6. . . . . . . . . . . . . . Heat conduction through sphere Composite wall . . . . . . . . . . . . . . . .8 5. . . . . . Gas Absorption . . . . . . . . . . . . . . . . . . . . . . . .13 5. . . . . .15 5. . . . . . . . . . . . . . . . . . . . . . . .3 6. . . . . . . . . . . . . . . . . . . . . . . . Equimolar counter diffusion . . Equilibrium temperature . . . . . . . . . . . . . . . . . . . Humidity calculation . . . . . . . . . Diffusivity .7 6. .5 5. . . . . . . . . . . Earth Temperature . . . . . . . .14 6. . . .13 6. . . . . . . .4 5. . . . . . . . . . . . . . . . . . . . Steam Distillation . . . . . . . . . . . . . . .5 6. .6 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Equilibrium Composition . . . . . . . Vaporization . . . . . . . Heat transfer coefficient . . .17 6. . . . . . . . . . . . . 7 . . .Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa 5. . . . . . . . . . . . . . . Distillation . . . . . . . Flux of HCl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Distillation Column . . . .10 5. . . . . . . . . . . . . .18 6. . . . .9 6. . . . . . . . . . . . . Heat conduction . . . Composite Pipeline . . . .16 5. . . . . . . . . . . . . . Earth Temperature . . . . . . . . . . . . . . . . . . . . . . . . . . .16 6. . . . . . . . . .15 6. . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . .13 7. Rate of reaction . . . . . .8 7. . . . . . . . .7 7. . . . . . . .15 7. . . . . . . . . . . . . . . . . . . . . . Concentration calculation . . .3 9. . . Rate Expression . . . . . . . . . . Order of reaction .12 9. Specific gravity . . . . Rate equation . . . . . . . . . . . . . . Coiled tube pressure drop . . . . . . . . .Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa 7. . . . . . . . . . . . . . . . . . . . . Venturi meter . . . Solution viscosity . . Pitot tube . . . . . . . . . . . . . . . Equilibrium shifts . 8 . . . . . .7 8. Rate of reaction . . . . . . . . . . . Equilibrium conversion . . . . . . . . . . . . . . . . . .14 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Heat exchanger pressure drop Heat exchanger area . . Viscosity calculation . . . . . . . . . . . .1 9. . . . .5 7. . . . 115 115 115 116 116 117 117 117 118 118 119 119 120 121 121 123 124 124 125 125 126 126 127 128 129 130 131 131 133 134 135 136 137 137 . .4 8. . . . . . . . . . . .10 7. . . . . . . . Mixture density . . . . . . . . . . . . Flow rate calculation . .3 7. . . . . .1 8. . . . . . . . . . . . . . . . . . . . Entropy changes . Volume function . . . . . . . . . . . . . . . . . . . . . . . . .6 7. . . . .1 7. . . . . . . . . . . . . . . . . .9 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Equilibrium conversion . . . . . . . . . . . . .5 9. . . . . . . . . Venturi meter . . . . . . . . . . . . . . . . . . . . . Hydrocarbon cracking . . . . Rotameter capacity . . . Flow rate calculation . . . . Equilibrium conversion . . . . . . . . . . . . .8 8. . . Batch distillation . . .11 7. . . . . . . . . . . . .2 7. . Gas mixture exit temperature Friction factor calculation . . .6 8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 8. . . . . . . . Rate of reaction . . . . . . . . . . . . . . . . . . . . . . . . . . . Pressure time relation . . . . . . . . . . . .16 8. . . . . . . . . . . . . .4 7.9 8. . .5 8. . . . . . . .6 Constant volume reaction . . . .3 8. . .2 9. . . . . . . . . . . . . . . . . Specific gravity . . . . . . . . . . . . . . . . .4 9. . . . . . . . . . . . . Specific gravity . . . . . . . . . . . . . . . . . . . . . . .12 7.11 8. . . . . . . . . . . . . . . . .10 8. .

11 mass_fraction_oxygen = y_oxygen * molar_mass_oxygen / molar_mass_air .Chapter 1 Introduction Scilab code Exa 1.1 Air composition 1 clc 2 clear 3 printf ( ” e x a m p l e 1 .79 // mole f r a c t i o n o f n i t r o g e n 7 molar_mass_oxygen = 32 8 molar_mass_nitrogen = 28 9 10 molar_mass_air = y_oxygen * molar_mass_oxygen + y_nitrogen * molar_mass_nitrogen . mass_fraction_nitrogen ) 16 9 . mass_fraction_oxygen ) 15 printf ( ” mass f r a c t i o n o f n i t r o g e n = %f \n\n ” .21 // mole f r a c t i o n o f o x y g e n 6 y_nitrogen = 0. 13 14 printf ( ” mass f r a c t i o n o f o x y g e n = %f \n\n ” . 1 p a g e number 19\ n\n ” ) 4 // t o f i n d c o m p o s i t i o n o f a i r by w e i g h t 5 y_oxygen = 0. 12 mass_fraction_nitrogen = y_nitrogen * molar_mass_nitrogen / molar_mass_air .

4* moles . g a s volume i n a b s e n c e o f SO2 5 y_CO2 = 0. printf ( ” d e n s i t y = %f gm/ l ” .2 Volume calculation 1 clc 2 clear 3 printf ( ” e x a m p l e 1 .56 T1 = 273 T2 = 298 // i n // i n // i n // i n // i n K liters mm Hg mm Hg K V2 = ( P1 * T2 * V1 ) /( P2 * T1 ) .4 P1 = 760 P2 = 735. 9 volume =22. density ) Scilab code Exa 1.3 Gas Composition 1 clc 2 clear 3 printf ( ” e x a m p l e 1 . 10 . 2 p a g e number 20\ n\n ” ) 4 // f i n d t h e volume o c c u p i e d by p r o p a n e 5 6 mass_propane =14. // i n l i t e r s 10 11 printf ( ” volume = %d l i t e r s \n\n ” . volume ) Scilab code Exa 1.17 18 19 20 21 22 23 24 25 26 V1 = 22. density = molar_mass_air / V2 . w e i g h t c o m p o s i t i o n . 3 p a g e number 20\ n\n ” ) 4 // t o f i n d t h e a v e r a g e w e i g h t .2 // i n kg 7 molar_mass =44 // i n kg 8 moles =( mass_propane *1000) / molar_mass .25.

Mm ) 13 14 printf ( ” \n f i n d i n g w e i g h t c o m p o s i t i o n \n ” ) 15 w_CO2 = y_CO2 *44*100/ Mm . v1_N2 ) 39 v1_O2 = ( v_O2 *100/98. 28 v_CO = 0.8) . 33 34 printf ( ” volume CO2 = %f \n\n ” . w_O2 ) 25 26 printf ( ” i f SO2 i s removed \n\n ” ) 27 v_CO2 = 25. 22 printf ( ” w e i g h t N 2 = %f \n\n ” . w_CO ) 19 w_SO2 = y_SO2 *64*100/ Mm . v1_CO2 ) 35 v1_CO = ( v_CO *100/98. w_N2 ) 23 w_O2 = y_O2 *32*100/ Mm .002.8) . 7 y_SO2 = 0.8) . 31 v = v_CO2 + v_CO + v_N2 + v_O2 . w_CO2 ) 17 w_CO = y_CO *28*100/ Mm . 36 printf ( ” volume CO = %f \n\n ” .056.2. 8 y_N2 = 0. 40 printf ( ” volume O2 = %f \n\n ” . 20 printf ( ” w e i g h t S O 2 = %f \n\n ” . v1_O2 ) 11 . w_SO2 ) 21 w_N2 = y_N2 *28*100/ Mm .012.680. 10 11 Mm = y_CO2 *44+ y_CO *28+ y_SO2 *64+ y_N2 *28+ y_O2 *32. 12 printf ( ” \n m o l a r mass = %d \n ” . v1_CO ) 37 v1_N2 = ( v_N2 *100/98. 29 v_N2 = 68.0.6.6 y_CO = 0. 16 printf ( ” \n weight CO2 = %f \n\n ” . 18 printf ( ” weight CO = %f \n\n ” . 9 y_O2 = 0. 24 printf ( ” w e i g h t O 2 = %f \n\n ” . 38 printf ( ” volume N2 = %f \n\n ” . 32 v1_CO2 = ( v_CO2 *100/98.8) . 30 v_O2 = 5.

volume_NH3 ) Scilab code Exa 1. printf ( ” volume o f NH3 d i s s o l v e d = %f l i t e r s ” .5 Amount of CO2 released 1 clc 2 clear 3 4 printf ( ” e x a m p l e 1 .4*293) /273. mole_ratio = ( x ) /(1 . moles_of_NH3 = mole_ratio * moles_of_water .x ) . 5 p a g e number 24\ n\n ” ) 5 6 // t o c a l c u l a t e amount o f CO2 r e l e a s e d by w a t e r 7 p =746 // i n mm Hg 8 H =1. moles_of_water =(100*1000) /18.Scilab code Exa 1.7 // atm x=p/H. Henry ’ s c o n s t a n t 12 .4 Volume calculation 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 clc clear printf ( ” e x a m p l e 1 .08*10^6 // i n mm Hg . moles_of_NH3 ) volume_NH3 =( moles_of_NH3 *22. printf ( ” m o l e s o f NH3 d i s s o l v e d = %f\n\n ” . 4 p a g e number 24\ n\n ” ) // t o f i n d volume o f NH3 d i s s o l v a b l e i n w a t e r p =1 // atm H =2.

2 //VP o f e t h y l w a t e r a t 10 d e g r e e C i n mm Hg 10 pb3 =332 //VP o f e t h y l w a t e r a t 7 8 .9 10 x = p / H . // mole f r a c t i o n o f CO2 11 X = x *(44/18) .005. pa2 = pa3 /(10^ pa ) . 6 p a g e number 27 \n\n ’ ) 5 // t o f i n d v a p o r p r e s s r e o f e t h y l a l c h o h a l 6 7 pa1 = 23. //VP o f e t h y l a l c h o h a l a t 10 d e g r e e C 8 pa3 =760 //VP o f e t h y l a l c h o h a l a t 7 8 .6 Vapor pressure 1 clc 2 clear 3 4 printf ( ’ e x a m p l e 1 . pb2 =149 //VP o f w a t e r a t 60 d e g r e e C i n mm Hg pas =( pb3 / pb2 ) .X ) . 3 d e g r e e C i n mm Hg 11 12 13 14 15 16 17 18 19 C =( log10 ( pa1 / pa3 ) /( log10 ( pb1 / pb3 ) ) ) . // kg CO2/ kg H20 14 G =1000*( initial_CO2 . // mass r a t i o o f CO2 i n w a t e r 12 13 initial_CO2 = 0. pa = C * log10 ( pas ) . 3 d e g r e e C i n mm Hg 9 pb1 = 9.G ) Scilab code Exa 1. 13 .6. 15 16 printf ( ”CO2 g i v e n up by 1 c u b i c m e t e r o f w a t e r = %f kg CO2/ c u b i c m e t e r H20” .

8 p a g e number 29\ n\n ’ ) 4 // t o f i n d t h e amount o f steam r e l e a s e d 5 6 vp_C6H6 = 520 // i n t o r r 7 vp_H2O = 225 // i n t o r r 8 mass_water =18 14 . pa2 ) Scilab code Exa 1.20 printf ( ” v a p o r p r e s s u r e o f e t h y l a l c h o l o h a t 60 d e g r e e C = %f mm Hg” . t =59+( K *(104. 7 p a g e number 28 \n\n ’ ) // t o f i n d v a p o r p r e s s u r e u s i n g d u h r i n g p l o t t1 = 41 // i n d e g r e e C t2 =59 // i n d e g r e e C theta_1 =83 // i n d e g r e e C theta_2 =100 // i n d e g r e e C K = ( t1 .t ) Scilab code Exa 1.t2 ) /( theta_1 .8 Vapor Pressure of Mixture 1 clc 2 clear 3 printf ( ’ e x a m p l e 1 .theta_2 ) .2 -100) ) . printf ( ” b o i l i n g p o i n t o f SCl2 a t 880 T o r r = %f d e g r e e c e l c i u s ” .7 Duhring Plot calculations 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 clc clear printf ( ’ e x a m p l e 1 .

15 . l i q u i d phase composition 22 // x =(760 −408) / ( 1 0 1 3 − 4 0 8 ) .yb .9 Vapor pressure 1 clc 2 clear 3 printf ( ’ e x a m p l e 1 . yt = pt / P . P = pb + pt .4.9 10 11 12 13 mass_benzene =78 amount_of_steam = ( vp_H2O / vp_C6H6 ) /( mass_benzene / mass_water ) .P ) yb = pb / P .6. printf ( ” t o t a l p r e s s u r e = %f t o r r \n\n ” . amount_of_steam ) Scilab code Exa 1. 9 p a g e number 30\ n\n ’ ) 4 5 // t o f i n d e q u i l i b r i u m v a p o r l i q u i d c o m p o s i t i o n 6 p0b = 385 // v a p o r p r e s s u e o f b e n z e n e a t 60 degree C in torr // v a p o r p r e s s u e o f t o l u e n e a t 60 d e g r e e C in torr 8 xb =0. printf ( ” amount o f steam = %f ” . 9 xt =0. pt = p0t * xt . printf ( ” v a p o r c o m p o s i t i o n o f b e n z e n e = %f \n v a p o r c o m p o s i t i o n o f t o l u e n e = %f\n\n ” . 7 p0t =140 10 11 12 13 14 15 16 17 18 19 pb = p0b * xb . yt ) 20 21 // f o r l i q u i d b o i l i n g a t 90 d e g r e e C and 760 t o r r .

256 ” ) Scilab code Exa 1.23 24 (1013* x ) +(408*(1 . 11 sigma_x2 =91. 13 m =((6* sigma_xy ) -( sigma_x * sigma_y ) ) /(6* sigma_x2 -( sigma_x ) ^2) . l o g Re=x . 10 sigma_y = -12. l o g a=c 9 sigma_x =23. 14 printf ( ”m = %f \n ” . 1 0 p a g e number 33\ n ’ ) 5 6 // t o f i n d r e l a t i o n b e t w e e n f r i c t i o n f a c t o r and r e y n o l d ’ s number 7 8 // l o g f=y .c ) 18 19 printf ( ” f = 0 .437.554.x .x ) ) ==760.1 .10 Flow relation 1 clc 2 clear 3 4 printf ( ’ e x a m p l e 1 .m ) 15 16 c =(( sigma_x2 * sigma_y ) -( sigma_xy * sigma_x ) ) /(6* sigma_x2 -( sigma_x ) ^2) .456 12 sigma_xy = -48. 17 printf ( ” c = %f \n ” . printf ( ” mole f r a c t i o n o f b e n z e n e i n l i q u i d m i x t u r e = %f \n mole f r a c t i o n o f t o l u e n e i n l i q u i d m i x t u r e = %f ” . 0 8 4 ∗ Re ˆ −0.x ) Scilab code Exa 1.393.11 Average Velocity 1 clc 16 .

printf ( ” a v e r a g e v e l o c i t y = %f cm/ s \n ” .4 18 printf ( ” a v e r a g e v e l o c i t y = %f cm/ s \n ” .4. 11 plot (r . h = (3 .7 8+ 2*2 .* r . I = ( h /2) * (0 +2 *0 .1.1. u_avg ) 17 .1. u_avg ) Scilab code Exa 1.0.97 +2 *1 . 52 +0 ) . 1 2 p a g e number 37\ n ’ ) // t o f i n d t h e a v e r a g e v e l o c i t y printf ( ’ u s i n g t r a p e z o i d r u l e \n ’ ) n = 6.28.2 5+ 2* 2. 9 10 z = u .1. we g e t 17 u_avg = (2/25) *12.68.3.72. z ) 12 title ( ” v a r i a t i o n o f u r w i t h r ” ) 13 xlabel ( ” r ” ) 14 ylabel ( ” u r ” ) 15 16 // by g r a p h i c a l i n t e g r a t i o n .12 Velocity determination 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 clc clear printf ( ’ e x a m p l e 1 .2 clear 3 printf ( ” e x a m p l e 1 .0].2. 8 r = [0. u_avg = (2/3^2) * I .0) / n .5]. 1 1 p a g e number 35\ n\n ” ) 4 5 // t o f i n d t h e a v e r a g e v e l o c i t y 6 7 u = [2.92. 22+ 2* 1.

10. 19 h = 3/ n . u_avg ) Scilab code Exa 1.89. z2 = 29.78+2. 22 23 printf ( ” a v e r a g e v e l o c i t y = %f cm/ s \n ” . 20 u2_t4 = ( -3* z0 +4* z1 .z2 ) /(2* h ) . 19 z2 = 28.52) +2*(1. 7 8 9 10 11 12 u1_t0 = ( -3* z0 +4* z1 . 1 3 p a g e number 38\ n\n ’ ) 5 6 // t o f i n d t h e s e t t l i n g v e l o c i t y a s a f u n c t i o n time z0 = 30. 14 u1_t8 = ( z0 -4* z1 +3* z2 ) /(2* h ) . h = 4.z0 + z2 ) /(2* h ) .30.16 disp ( ’ S i m p s o n s r u l e ’ ) 17 18 n = 6. 23 18 of . 21 u2_t8 = ( . 20 I = ( h /3) *(0+4*(0.97+2.z0 + z2 ) /(2* h ) . z1 = 29.25+1. 21 u_avg = (2/3^2) * I .z2 ) /(2* h ) .13 Velocity determination 1 clc 2 clear 3 4 printf ( ’ e x a m p l e 1 . 13 u1_t4 = ( . 8 . 15 16 // c o n s i d e r i n g d a t a s e t f o r t = 4 . 1 2 min 17 z0 = 29. 22 u2_t12 = ( z0 -4* z1 +3* z2 ) /(2* h ) .22) +0) .84. 18 z1 = 29.10.89.

u_t4 .16 Dynamic similarity 19 . 30 u3_t16 = ( z0 -4* z1 +3* z2 ) /(2* h ) . 34 u_t8 = ( u1_t8 + u2_t8 + u3_t8 ) /3. 26 z1 = 28.14 Dimensional analysis 1 2 printf ( ’ e x a m p l e 1 . 1 5 p a g e number 46 ’ ) disp ( ” t h i s i s a t h e o r i t i c a l q u e s t i o n . u1_t0 .10. 36 37 printf ( ” u t 0 = %f cm/ min \n u t 4 = %f cm/ min \n u t 8 = %f cm/ min \n u t 1 2 = %f / n cm/ min \n u t 1 6 =%f /n cm/ min ” . book s h a l l be r e f e r r e d f o r s o l u t i o n ”) Scilab code Exa 1. 27 z2 = 27. u_t8 . 31 32 // t a k i n g a v e r a g e 33 u_t4 = ( u1_t4 + u2_t4 ) /2.24 // c o n s i d e r i n g d a t a s e t f o r t = 8 . 29 u3_t12 = ( .z0 + z2 ) /(2* h ) . 1 2 . 28 u3_t8 = ( -3* z0 +4* z1 . u_t12 .50.15 Dimensional analysis 1 2 printf ( ’ e x a m p l e 1 . u3_t16 ) Scilab code Exa 1. 1 6 min 25 z0 = 29. 35 u_t12 = ( u2_t12 + u3_t12 ) /2. book s h a l l be r e f e r r e d f o r s o l u t i o n ”) Scilab code Exa 1. 1 4 p a g e number 45 ’ ) disp ( ” t h i s i s a t h e o r i t i c a l q u e s t i o n .30.z2 ) /(2* h ) .

21 // i n kg /m3 viscosity_air =1. 1 6 p a g e number 49\ n ’ ) // t o f i n d t h e f l o w r a t e and p r e s s u r e d r o p density_water =988 // i n kg /m3 viscosity_water =55*10^ -5 // i n Ns /m2 density_air =1.17 Dynamic similarity 1 clc 2 clear 3 printf ( ’ e x a m p l e 1 .83*10^ -5 // i n Ns /m2 L =1 // l e n g t h i n m L1 =10* L // l e n g t h i n m Q =0.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 clc clear printf ( ’ e x a m p l e 1 . Q1 =(( Q * density_water * viscosity_air * L ) /( L1 * viscosity_water * density_air ) ) 16 17 printf ( ” f l o w r a t e = %f c u b i c m e t e r / s \n ” . p1 / p ) Scilab code Exa 1. Q1 ) 18 19 // e q u a t i n g e u l e r number 20 21 p =9. 23 24 printf ( ” p r e s s u r e d r o p c o r r e s p o n d i n g t o 1 kp / s q u a r e cm = %f kP/ s q u a r e cm” . 1 7 p a g e number 50\ n ’ ) 4 5 // t o f i n d t h e s p e c i f i c g r a v i t y o f p l a s s t i c 20 . // p r e s s u r e i n p a s c a l 22 p1 =( p * density_water * Q ^2* L ^4) /( density_air * Q1 ^2* L1 ^4) .0133.8067*10^4.

76) ) . printf ( ” \ n e r r o r = %f \n ” .18 Nomographic chart 1 clc 2 clear 3 printf ( ’ e x a m p l e 1 . 1 8 p a g e number 53\ n\n ’ ) 4 5 // t o f i n d e r r o r i n a c t u a l d a t a and n o m o g r a p h i c c h a t value 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 // f o r my ly = 8 // i n cm my = ly /((1/0. lz = 10.9945) *100. mx = ( my * mz ) /( my + mz ) .5:0.15 // i n cm mz = lz /((1/2.25) . density_model ) Scilab code Exa 1.6 7 L =1 // l e n g t h o f p r o t o t y p e i n m 8 L1 =10* L // l e n g t h o f model i n m 9 density_prototype =2. printf ( ”mx = %f cm\n ” .density_water ) ) /( L1 ^3) +1.5) ) . mx ) err = ((1 -0.(1/6.5:2. plot (x .85) . 13 14 printf ( ” s p e c i f i c g r a v i t y o f p l a s t i c = %f ” . y ) 21 .65 //gm/ c c 10 density_water =1 //gm/ c c 11 12 density_model =( L ^3*( density_prototype .5.(1/0.9945) /0. err ) x = 2 y = 0.

21 title ( ” nomograph ” ) 22 xlabel ( ” x ” ) 23 ylabel ( ” y ” ) 24 25 x = 3 26 y = 0.2:2. if Re >2100 then printf ( ” f l o w i s t u r b u l e n t and d= %f mm” .19 Calculation using Nomograph 1 clc 2 clear 3 printf ( ’ e x a m p l e 1 .4:0.14* d ^2/4) .d ) 16 else disp ( ” f l o w i s l a m i n a r and t h i s nomograph i s not v a l i d ”) 17 end 22 . Re = u * density * d /0. 1 9 p a g e number 54\ n ’ ) 4 5 // t o f i n d t h e e c o n o m i c p i p e d i a m e t e r from nomograph 6 // from t h e nomograph . we g e t t h e v a l u e s o f w and density 7 8 9 10 11 12 13 14 15 w =450 // i n kg / h r density =1000 // i n kg /m3 d =16 // i n mm u =( w / density ) /(3.001. y ) Scilab code Exa 1. 27 plot (x .

013 t1 =283 t2 =273 v1 =10 // i n // i n // i n // i n // i n bar bar K K l v2 = p1 * v1 * t2 /( t1 * p2 ) . v2 ) Scilab code Exa 2.Chapter 2 Physico Chemical Calculations Scilab code Exa 2. printf ( ” volume o f o x y g e n = %f l i t e r s ” .1 Ideal gas system 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 clc clear printf ( ” e x a m p l e 2 . 1 p a g e number 71\ n\n ” ) // t o f i n d t h e volume o f o x y g e n t h a t can be o b t a i n e d p1 =15 p2 =1.2 Mixture properties 23 .

total_pressure *10^ -3) Scilab code Exa 2. // m o l e s o f O2 9 nCH4 =1. // m o l e s o f CH4 10 11 total_moles = nCO2 + nO2 + nCH4 . yO2 . yCO2 ) 17 18 pCO2 = nCO2 *8. 21 22 printf ( ” p r e s s u r e o f CH4 = %f kPa \ n p r e s s u r e o f O2 = %f kPa \n p r e s s u r e o f CO2 =%f kPa \n\n ” . 2 p a g e number 71\ n\n ” ) 4 5 // t o f i n d v o l u m e t r i c c o m p o s i t i o n . pO2 *10^ -3 .3 Equivalent metal mass 1 clc 2 clear 24 . p a r t i a l p r e s s u e of e a c h g a s and t o t a l p r e s s u r e o f m i x t u r e 6 7 nCO2 =2/44.314*273/(6*10^ -3) . pCO2 *10^ -3) 23 24 25 total_pressure = pCO2 + pCH4 + pO2 . 14 yCH4 = nCH4 / total_moles . 19 pO2 = nO2 *8.5/16. // m o l e s o f CO2 8 nO2 =4/32. 20 pCH4 = nCH4 *8.314*273/(6*10^ -3) . printf ( ” t o t a l p r e s s u r e = %f Kpa” . pCH4 *10^ -3 . 12 yCO2 = nCO2 / total_moles . 13 yO2 = nO2 / total_moles . 15 16 printf ( ” C o m p o s i t i o n o f m i x t u r e = \nCH4 = %f \nO2 = %f \n CO2 = %f \n\n ” .314*273/(6*10^ -3) .1 clc 2 clear 3 printf ( ” e x a m p l e 2 . yCH4 .

5/143.pH2O .m ) Scilab code Exa 2. 2 l i t r e / mol o f h y d r o g e n = %f gm” . VH2 ) 14 15 // c a l c u l a t i n g amount o f m e t a l h a v i n g 1 1 .3) 12 13 printf ( ” volume o f h y d r o g e n o b t a i n e d = %f ml \n\n ” . // i n KPa 10 11 VH2 =209* pH2 *273/(293*101. 4 p a g e number 72\ n\n ” ) 4 5 // t o f i n d NaCl c o n t e n t i n NaOH s o l u t i o n 6 7 w =2 // i n gm 8 m =0.3 // i n KPa 9 pH2 =P .3 printf ( ” e x a m p l e 2 .4 Purity of Sodium Hydroxide 1 clc 2 clear 3 printf ( ” e x a m p l e 2 . 2 l o f hydrogen 16 17 m =350/196.08*11. 4gm 11 12 mNaCl =58.2 // mass o f m e t a l i n grams 18 printf ( ” mass o f m e t a l e q u i v a l e n t t o 1 1 . 5 gm o f NaCl = 1 4 3 . 13 25 .287 // i n gm 9 10 // p r e c i p i t a t e from 5 8 . 3 p a g e number 72\ n\n ” ) 4 5 // t o f i n d e q u i v a l e n t mass o f m e t a l 6 7 P =104.3 // t o t a l p r e s s u r e i n KPa 8 pH2O =2.4* m .

4* VCO2 .35 // i n m3 26 . 5 p a g e number 72\ n\n ” ) 4 5 // t o f i n d t h e c a r b o n c o n t e n t i n s a m p l e 6 7 w =4.14 15 16 17 printf ( ” mass o f NaCl = %f gm\n ” . printf ( ” amount o f NaCl = %f ” . 14 15 printf ( ” p e r c e n t a g e amount o f c a r b o n i n s a m p l e = %f ” . 11 carbon_content =12/44* weight_CO2 . percentage_NaCl ) Scilab code Exa 2. 12 13 percentage_content =( carbon_content / w ) *100.5 // i n m3 7 volume_CH4 =0.6 Combustion of gas 1 clc 2 clear 3 printf ( ” e x a m p l e 2 . percentage_content ) Scilab code Exa 2.73 // i n gm5 8 VCO2 =5. 6 p a g e number 73\ n\n ” ) 4 // t o f i n d t h e volume o f a i r 5 6 volume_H2 =0. mNaCl ) percentage_NaCl = mNaCl / w *100.30 // i n l i t e r s 9 10 weight_CO2 =44/22.5 Carbon content formulation 1 clc 2 clear 3 printf ( ” e x a m p l e 2 .

15* mass_1 .96* density_std .7 Sulphuric acid preparation 1 clc 2 clear 3 printf ( ” e x a m p l e 2 .84 // d e n s i t y o f 96% s u l p h u r i c a c i d 11 mass_std = 0. 15 CO =0.21 // i n m3 i n a i r 11 12 // r e q u i r e d o x y g e n f o r v a r i o u s g a s e s 13 H2 =0. 10 density_std = 1. 14 CH4 =2* volume_CH4 . 16 C2H4 =3* volume_C2H4 . %H2SO4 27 // volume o f 96 .5* volume_H2 .5* volume_CO .10 // i n g / ml mass_1 = 100* density_H2SO4 . 19 oxygen_required = total_O2 / volume_oxygen . 7 p a g e number 73\ n\n ” ) 4 5 // t o f i n d t h e volume o f s u l p h u r i c a c i d and mass o f w a t e r consumed 6 7 8 density_H2SO4 = 1. // mass o f H2SO4 i n 1 ml 96% H2SO4 12 13 volume_std = mass_H2SO4 / mass_std . oxygen_required ) Scilab code Exa 2. // mass o f 100 ml o f 15% solution 9 mass_H2SO4 = 0. 20 21 printf ( ” amount o f o x y g e n r e q u i r e d = %f c u b i c m e t e r ” .8 volume_CO =0.02 // i n m3 10 volume_oxygen =0. 17 18 total_O2 = H2 + CH4 + CO + C2H4 .08 // i n m3 9 volume_C2H4 =0.

mass_H2SO4 . 9 6 H2SO4 r e q u i r e d = %f ml ” .8 Molarity Molality Normality Calculation 1 clc 2 clear 3 printf ( ” e x a m p l e 2 . mass_water ) Scilab code Exa 2.10 // i n gm/ ml 9 m = density *1000. Molarity ) 15 16 equivalent_mass =49. // mass p e r l i t e r 10 weight = m * w_H2SO4 . 8 p a g e number 73\ n\n ” ) 4 5 // t o f i n d m o l a r i t y .9 Normality calculation 1 clc 28 . normality ) 19 20 molality =176.5/ molar_mass . printf ( ” volume o f 0 . 21 printf ( ” M o l a l i t y = %f ” . m o l a l i t y and n o r m a l i t y 6 7 w_H2SO4 =0. 17 normality = weight / equivalent_mass . 18 printf ( ” N o r m a l i t y = %f N\n\n ” .15 // i n gm/1gm s o l u t i o n 8 density =1. molality ) Scilab code Exa 2. volume_std ) 17 printf ( ” \ nmass o f w a t e r r e q u i r e d = %f g ” . 12 13 Molarity = weight / molar_mass . //H2SO4 p e r l i t e r s o l u t i o n 11 molar_mass =98.14 15 16 mass_water = mass_1 . 14 printf ( ” M o l a r i t y = %f mol / l \n\n ” .

normality ) Scilab code Exa 2.10 Precipitation of KClO3 1 clc 2 clear 3 printf ( ” e x a m p l e 2 . 1 1 p a g e number 74\ n\n ” ) 4 29 .2 3 4 5 6 7 8 9 clear printf ( ” e x a m p l e 2 . 9 p a g e number 74\ n\n ” ) molar_mass_BaCl2 =208. precipitate ) Scilab code Exa 2.2 // i n gm/ 1 0 0gm 8 w_solute = solubility_70 *350/130.11 Solubility of CO2 1 clc 2 clear 3 printf ( ” e x a m p l e 2 . normality = equivalent_H2SO4 *1000/28.144. printf ( ” N o r m a l i t y = %f N” .solubility_30 ) * w_water /100 13 14 printf ( ” amount p r e c i p i t a t e d = %f gm” .8. // i n gm equivalent_H2SO4 =0. 11 solubility_30 =10.2.1 // i n gm/ 1 0 0gm 12 precipitate =( solubility_70 .3. // i n gm 9 10 w_water =350 .w_solute . 1 0 p a g e number 74\ n\n ” ) 4 5 // t o f i n d amount o f KClO3 p r e c i p i t a t e d 6 7 solubility_70 =30.

15 16 printf ( ” d e p r e s s i o n i n v a p o r p r e s s u r e = %f Pa” .2 . // m o l a r mass o f w a t e r 10 m_glucose =180. 1 2 p a g e number 74\ n\n ” ) 4 5 // t o f i n d t h e v a p o r p r e s s u r e o f w a t e r 6 7 w_water =540 // i n gm 8 w_glucose =36 // i n gm 9 m_water =18.3. // m o l a r mass o f g l u c o s e 11 12 x =( w_water / m_water ) /( w_water / m_water + w_glucose / m_glucose ) .71 // i n l i t e r s molar_mass =44.4. 14 depression =8.12 Vapor pressure calculation 1 clc 2 clear 3 printf ( ” e x a m p l e 2 .5 6 7 8 9 // t o f i n d t h e p r e s s u r e f o r s o l u b i l i t y o f CO2 absorbtion_coefficient =1. pressure ) Scilab code Exa 2.2* x . solubility = absorbtion_coefficient * molar_mass /22. 13 p =8. 11 12 printf ( ” p r e s s u r e r e q u i r e d = %f kPa ” . // i n gm 10 pressure =8/ solubility *101.13 Boiling point calculation 30 .p . depression *1000) Scilab code Exa 2.

14 Colligative properties 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 clc clear printf ( ” e x a m p l e 2 . 10 m =90/180. boiling_point ) Scilab code Exa 2. 13 boiling_point =100+ delta_t .97 // g / ml cm = c * density /( M *100) .52.26. m = delta_t / K . 1 4 p a g e number 75\ n\n ” ) // t o f i n d t h e m o l a r mass and o s m o t i c p r e s s u r e K =1. // m o l e s / 1 0 0 0gm w a t e r 11 12 delta_t = E * m . 31 .86. 1 3 p a g e number 75\ n\n ” ) 4 5 // t o f i n d t h e b o i l i n g p o i n t o f s o l u t i o n 6 7 w_glucose =9 // i n gm 8 w_water =100 // i n gm 9 E =0. // m o l a r mass printf ( ” m o l a r mass = %f gm\n\n ” .1 clc 2 clear 3 printf ( ” e x a m p l e 2 . // m o l a l i t y M = c /( m *85) . c =15 // c o n c e n t r a t i o n o f a l c o h o l delta_t =10.M *1000) density =0. 14 15 printf ( ” b o i l i n g p o i n t o f w a t e r = %f d e g r e e C ” .

M_v . 1 6 p a g e number 76\ n\n ” ) 4 5 // t o f i n d t h e m o l e c u l a r f o r m u l a 32 . 1 5 p a g e number 75\ n\n ” ) // t o f i n d u i n .16 Molecular Formula 1 clc 2 clear 3 printf ( ” e x a m p l e 2 .72) . // i n d l / g c = 0.295 // from t h e g r a p h // i n mPa−s M_v = ( u_in /(5. cm ) 18 19 p = cm *8.628.15 Huggins Equation 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 clc clear printf ( ” e x a m p l e 2 . u_red = 0. u_in ) Scilab code Exa 2.575 u_s = 0.u_in ) /(( u_in ^2) * c ) .p /1000) Scilab code Exa 2.k . printf ( ” k = %f \nMv = %f\ n u i n = %f d l /gm” . k ’ u_in = 0.80*10^ -5) ) ^(1/0.17 printf ( ” m o l a r c o n c e n t r a t i o n o f a l c o h o l = %f m o l e s / l \ n\n ” . M v .40 // i n g / d l k = ( u_red .314*293 // o s m o t i c p r e s s u r e 20 printf ( ” o s m o t i c p r e s s u r e = %f Mpa\n\n ” .

75 //% o f c a r b o n H2 =6. density =44.5 //% o f c a r b o n H2 =9.x . x = ratio *5.17 Molecular Formula 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 clc clear printf ( ” e x a m p l e 2 . y = %f . ratio = molar_mass / density .25 //% o f h y d r o g e n x = C /12 // number o f c a r b o n atoms y = H2 /2 // number o f h y d r o g e n atoms molar_mass =64 density =4. z ) printf ( ” \n\ n f o r m u l a o f b u t y r i c a c i d i s = C4H8O2” ) Scilab code Exa 2. z = %f ” . x = ratio *2. z = ratio *4.6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 C =54.y . // number o f c a r b o n m o l e c u l e s y = O2 /16. y = ratio *1.4 //% o f o x y g e n x = C /12.41*29. 1 7 p a g e number 77\ n\n ” ) // t o f i n d m o l e c u l a r f o e m u l a C =93. printf ( ” x = %f . 33 . // number o f o x y g e n m o l e c u l e s z = H2 /2 // number o f h y d r o g e n m o l e c u l e s molar_mass =88.1 //% o f h y d r o g e n O2 =36. ratio = density / molar_mass .

y = %f ” .08 //% o f o x y g e n a = C /12.1) ) . // number o f o x y g e n m o l e c u l e s b = H2 /2. c = ratio *2.69 //% o f c a r b o n H2 =4.16 y = ratio *4. // number o f c a r b o n m o l e c u l e s c = O2 /16.09*1000) /(60* m ) . // number o f h y d r o g e n m o l e c u l e s molar_mass =71.25/5. b = ratio *3.23 //% o f h y d r o g e n O2 =45.M ) ratio = M / molar_mass . y ) 20 printf ( ” \n\ n f o r m u l a o f b u t y r i c a c i d i s = C10H8” ) Scilab code Exa 2.18 Molecular Formula 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 clc clear printf ( ” e x a m p l e 2 . 17 18 19 printf ( ” x = %f . function M = f ( m ) M =(2. 1 8 p a g e number 77\ n\n ” ) // t o f i n d m o l e c u l a r f o r m u l a C =50. 34 . endfunction M = f ((1. a = ratio *3. printf ( ” a c t u a l m o l e c u l a r mass = %f\n\n ” .x .

c =8.8/14. d = O2 /16.20 Metal deposition 35 .3/ cm .4/(8.8 //% o f n i t r o g e n Fe =8.a . b = H2 /2.19 Molecular Formula 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 clc clear printf ( ” e x a m p l e 2 .6 //% o f o x y g e n N2 =8.5 . b *6.b . c ) printf ( ” \n\ n f o r m u l a o f b u t y r i c a c i d i s = C6H6O4” ) Scilab code Exa 2. e = Fe /56 // number o f c a r b o n m o l e c u l e s // number o f n i t r o g e n m o l e c u l e s // number o f h y d r o g e n m o l e c u l e s // number o f o x y g e n m o l e c u l e s // number o f i r o n atoms cm =243.a *6.8 //% o f i r o n a = C /12. c *6. printf ( ” a = %f .5 . e *6. d = %f .2 //% o f h y d r o g e n O2 =12. b = %f . e = %f ” .5 .28 29 30 printf ( ” a = %f . c = %f . d *6. c = %f ” . b = %f .5 .5) 23 printf ( ” \n\ n f o r m u l a o f b u t y r i c a c i d i s = C34H33N4O5Fe” ) Scilab code Exa 2.31*293) // c o n c e n t r a t i o n molar_mass =63.6 //% o f c a r b o n H2 =5. 1 9 p a g e number 78\ n\n ” ) // t o f i n d t h e m o l e c u l a r f o r m u l a C =64.

21 EMF of cell 1 clc 2 clear 3 printf ( ” e x a m p l e 2 . 9 c_Zn =0.059/2) * log10 ( c_Pb ) .E ) 36 . E3 =0. 2 1 p a g e number 79\ n\n ” ) 4 5 // t o f i n d t h e emf o f c e l l 6 7 E0_Zn = -0. 13 E_Pb = E0_Pb +(0. 14 E = E_Pb . printf ( ” s o r t e d p o t e n t i a l i n v o l t s =” ) disp ( b ) disp ( ”E2>E3>E1” ) disp ( ” s i l v e r >c o p p e r > n i c k e l ” ) Scilab code Exa 2.25.059/2) * log10 ( c_Zn ) .34. b = gsort ( a ) .13.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 clc clear printf ( ” e x a m p l e 2 . 8 E0_Pb = -0.80. 11 12 E_Zn = E0_Zn +(0. E2 =0.E_Zn . 2 0 p a g e number 78\ n\n ” ) // t o f i n d s e q u e n c e o f d e p o s i t i o n E1 = -0. 15 16 printf ( ” emf o f c e l l = %f V” . E2 . a =[ E1 . E3 ].1.02.76. 10 c_Pb =0.

17

printf ( ” \n\ n S i n c e p o t e n t i a l o f l e a d i s g r e a t e r t h a n
that of zinc thus reduction w i l l occur at lead
e l e c t r o d e and o x i d a t i o n w i l l o c c u r a t z i n c
e l e c t r o d e ”)

Scilab code Exa 2.22 EMF of cell
1 clc
2 clear
3 printf ( ” e x a m p l e 2 . 2 2 p a g e number 79\ n\n ” )
4
5 // t o f i n d t h e emf o f c e l l
6 E0_Ag =0.80;
7 E0_AgNO3 =0.80;
8 c_Ag =0.001;
9 c_AgNO3 =0.1;
10
11 E_Ag = E0_Ag +(0.059) * log10 ( c_Ag ) ;
12 E_AgNO3 = E0_AgNO3 +(0.059) * log10 ( c_AgNO3 ) ;
13 E = E_AgNO3 - E_Ag ;
14
15 printf ( ” emf o f c e l l = %f V” ,E )
16 printf ( ” \n\ n s i n c e E i s p o s i t i v e , t h e l e f t hand

e l e c t r o d e w i l l be anode and t h e e l e c t r o n w i l l
t r a v e l i n t h e e x t e r n a l c i r c u i t from t h e l e f t hand
t o t h e r i g h t hand e l e c t r o d e ” )

Scilab code Exa 2.23 EMF of cell
1 clc
2 clear
3 printf ( ” e x a m p l e 2 . 2 3 p a g e number 79\ n\n ” )
4

37

5 // t o f i n d emf o f c e l l
6 pH =12;
//pH o f s o l u t i o n
7 E_H2 =0;
8 E2 = -0.059* pH ;
9 E = E_H2 - E2 ;
10 printf ( ”EMF o f c e l l = %f V” ,E )

Scilab code Exa 2.24 Silver deposition
1
2
3
4
5
6
7
8
9
10
11
12

clc
clear
printf ( ” e x a m p l e 2 . 2 4 p a g e number 80\ n\n ” )
// t o f i n d amount o f s i l v e r d e p o s i t e d
I =3
// i n Ampere
t =900
// i n s
m_eq =107.9
// i n gm/ mol
F =96500;
m =( I * t * m_eq ) / F ;
printf ( ” mass = %f gm” ,m )

Scilab code Exa 2.25 Electroplating time
1 clc
2 clear
3 printf ( ” e x a m p l e 2 . 2 5 p a g e number 80\ n\n ” )
4
5 // t o f i n d t h e t i m e f o r e l e c t r o p l a t i n g
6 volume =10*10*0.005;
// i n cm3
7 mass = volume *8.9;
8 F =96500;
9 atomic_mass =58.7
// i n amu

38

10 current =2.5
// i n Ampere
11
12 charge =(8.9* F *2) / atomic_mass ;
13 yield =0.95;
14 actual_charge = charge /( yield *3600) ;
15 t = actual_charge / current ;
16
17 printf ( ” t i m e r e q u i r e d = %f h o u r s ” ,t )

Scilab code Exa 2.26 Water hardness
1 clc
2 clear
3 printf ( ” e x a m p l e 2 . 2 6 p a g e number 80\ n\n ” )
4
5 // t o f i n d h a r d n e s s o f w a t e r
6 m_MgSO4 =90
// i n ppm
7 MgSO4_parts =120;
8 CaCO3_parts =100;
9
10 hardness =( CaCO3_parts / MgSO4_parts ) * m_MgSO4 ;
11
12 printf ( ” h a r d n e s s o f w a t e r = %f mg/ l ” , hardness )

Scilab code Exa 2.27 Water hardness
1
2
3
4
5
6
7

clc
clear
printf ( ” e x a m p l e 2 . 2 6 p a g e number 80\ n\n ” )
m1 = 162
m2 = 73
m3 = 136

// mass o f c a l c i u m b i c a r b o n a t e i n mg
// mass o f magnesium b i c a r b o n a t e i n mg
// mass o f c a l s i u m s u l f a t e i n mg
39

25 actual_lime = wt_lime /0.98. actual_soda = soda_required /0. 26 printf ( ” amount o f l i m e r e q u i r e d = %f \n ” . // c o n t e n t o f magnesium cloride 16 17 18 19 // p a r t 1 temp_hardness = content_1 + content_2 . actual_soda ) Scilab code Exa 2. temp_hardness . 21 printf ( ” t o t a l h a r d n e s s = %f\n t e m p o r a r y h a r d n e s s = %f \n ” . // c o n t e n t o f magnesium b i c a r b o n a t e i n mg 14 content_3 = m3 *100/ m3 . // c o n t e n t o f c a l s i u m s u f a t e i n mg 15 content_4 = m4 *100/ m4 .28 Water hardness 40 . // d e p e n d s on b i c a r b o n a t e o n l y 20 total_hardness = content_1 + content_2 + content_3 + content_4 . // c o n t e n t o f c a l c i u m b i c a r b o n a t e i n mg 13 content_2 = m2 *100/(2* m2 ) . total_hardness ) 22 23 24 // p a r t 2 wt_lime = (74/100) *( content_1 +2* content_2 + content_4 ) . printf ( ” amount o f s o d a r e q u i r e d = %f \n ” .8 m4 = 95 9 m5 = 500 10 m6 = 50 11 12 content_1 // mass o f magnesium c l o r i d e // mass o f sodium c l o r i d e i n mg // mass o f p o t a s s i u m c l o r i d e i n mg = m1 *100/ m1 . actual_lime ) 27 28 29 30 soda_required = (106/100) *( content_1 + content_4 ) .85.

hardness /1000) Scilab code Exa 2. 12 13 hardness = equivalent_NaCl * m .29 Mixture composition 1 clc 2 clear 3 printf ( ” e x a m p l e 2 . mole_total = mole_benzene + mole_toluene + mole_xylene . mole_xylene = m_xylene /106. 2 9 p a g e number 82\ n\n ” ) 4 5 // t o f i n d t h e t o t a l v a p o r p r e s s u r e and m o l a r compositions 6 7 8 9 10 11 12 13 14 15 16 m_benzene = 55 m_toluene = 28 m_xylene = 17 // i n kg // i n kg // i n kg mole_benzene = m_benzene /78. 11 equivalent_NaCl =50/58.1 clc 2 clear 3 printf ( ” e x a m p l e 2 . x_benzene = mole_benzene / mole_total . mole_toluene = m_toluene /92. 41 . 14 15 printf ( ” h a r d n e s s o f w a t e r = %f mg/ l ” .5. 2 8 p a g e number 82\ n\n ” ) 4 5 // t o f i n d h a r d n e s s o f w a t e r 6 7 volume_NaCl =50 // i n l 8 c_NaCl =5000 // i n mg/ l 9 10 m = volume_NaCl * c_NaCl .

6+ x_xylene *28. 21 printf ( ” t o t a l p r e s s u r e = %f kPa \n ” . volume_ethanol *100) 15 16 17 18 // p a r t 2 molar_mass_ethanol =46. xylene . 25 xylene = ( x_xylene *28*100) / P .6*100) / P . molar_mass_air =28.volume_ethanol .6*100) / P . 14 printf ( ” v o l u m e t r i c c o m p o s i t i o n :− \ n a i r c o m p o s i t i o n = %f\n e t h a n o l c o m p o s t i o n = %f ” .17 x_toluene = mole_toluene / mole_total .P ) 22 23 benzene = ( x_benzene *178. 3 0 p a g e number 83\ n\n ” ) 4 5 // t o f i n d t h e m i x t u r e c o m p o s i t i o n 6 7 vapor_pressure =8 // i n kPa 8 pressure =100 // i n kPa 9 10 // p a r t 1 11 volume =1 // i n m3 12 volume_ethanol = volume *( vapor_pressure / pressure ) . 18 x_xylene = mole_xylene / mole_total .9. 24 toluene = ( x_toluene *74. 42 . 19 20 P = x_benzene *178. benzene ) Scilab code Exa 2. 13 volume_air =1 .6+ x_toluene *74.30 Mixture composition 1 clc 2 clear 3 printf ( ” e x a m p l e 2 . toluene . 26 27 printf ( ” x y l e n e = %f \n t o l u e n e = %f \n b e n z e n e = %f ” . volume_air *100 .

31 Mixture properties 1 clc 2 clear 3 printf ( ” e x a m p l e 2 .92. fraction_ethanol ) 19 20 21 24 25 26 27 28 29 30 31 32 33 34 35 36 // p a r t 3 mixture_volume =22.92* molar_mass_air . w_ethanol ) // p a r t 5 moles_ethanol =0. // i n m3 weight_ethanol = mass_ethanol / mixture_volume . fraction_air . moles_ethanol ) Scilab code Exa 2.3/100) *(299/273) . printf ( ” \n\ n w e i g h t o f e t h a n o l / c u b i c m e t e r = %f Kg” .08/0.05.3*(101. // i n kg fraction_ethanol =( mass_ethanol *100) /( mass_air + mass_ethanol ) . weight_ethanol ) // p a r t 4 w_ethanol = mass_ethanol / mass_air . printf ( ” \n\ n w e i g h t o f e t h a n o l / kg v a p o r f r e e a i r = %f Kg” .08* molar_mass_ethanol . 3 1 p a g e number 84\ n\n ” ) 4 5 // t o f i n d r e l a t i v e s a t u r a t i o n and dew p o i n t 6 7 vapor_pressure =8 // i n kPa 8 volume_ethanol =0. 22 fraction_air =( mass_air *100) /( mass_air + mass_ethanol ) . // i n kg mass_air =0. 43 .mass_ethanol =0. 23 printf ( ” \n\ n c o m p o s i t i o n by w e i g h t : −\ n A i r = %f E t h a n o l v a p o r = %f ” . printf ( ” \n\ nkmol o f e t h a n o l p e r kmol o f v a p o r f r e e a i r = %f ” .

44 . 9 p_partial = p * H_rel .ethanol_vapor . relative_saturation = partial_pressure / vapor_pressure . mole_ratio . mole_ratio = volume_ethanol /(1 .8. 10 molal_H = p_partial /(100 . air_vapor =1 . 3 d e g r e e c e l c i u s ” ) Scilab code Exa 2. percentage_saturation ) // dew p o i n t printf ( ” \n\ n c o r r e s p o n d i n g t o p a r t i a l p r e s s u r e o f 5 kPa we g e t a dew p o i n t o f 1 7 . percentage_saturation = mole_ratio / saturation_ratio . saturation_ratio = ethanol_vapor / air_vapor .p_partial ) . printf ( ” \n\ n p e r c e n t a g e s a t u r a t i o n = %f ” .volume_ethanol ) . ethanol_vapor = volume_vapor /100. relative_saturation *100) // b a s i s 1 kmol s a t u r a t e d g a s m i x t u r e a t 100 kPa volume_vapor =(8/100) *100. 3 2 p a g e number 84\ n\n ” ) 4 5 // t o f i n d t h e p r o p e r t i e s o f humid a i r 6 7 p = 4.9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 // b a s i s 1 kmol o f m i x t u r e partial_pressure = volume_ethanol *100.32 Humidity 1 clc 2 clear 3 printf ( ” e x a m p l e 2 . printf ( ” mole r a t i o = %f \ n r e l a t i v e s a t u r a t i o n = %f ” .24 // i n kPa 8 H_rel = 0.

39. 24 vapor_final = final_H * moles_dryair . final_H ) 18 19 // p a r t 3 20 p_dryair = 100 . 26 printf ( ” amount o f w a t e r c o n d e n s e d = %f \n\n ” . 21 v = 100*( p_dryair /101. water_condensed ) 27 28 29 30 31 // p a r t 4 total_air = moles_dryair + vapor_final . 17 printf ( ” f i n a l m o l a l h u m i d i t y = %f\n\n ” . 25 water_condensed = ( vapor_initial .4*(101. 23 vapor_initial = molal_H * moles_dryair . final_v ) 45 .3.4.3) *(273/303) . final_v = 22. molal_H ) 12 13 // p a r t 2 14 P = 200 // i n kPa 15 p_partial = 1.p_partial ) .11 printf ( ” i n i t i a l m o l a l h u m i d i t y = %f\n\n ” .vapor_final ) *18. printf ( ” f i n a l volume o f wety a i r = %f \n\n ” .70 // i n kPa 16 final_H = p_partial /( P .3/200) *(288/273) * total_air . 22 moles_dryair = v /22.

reaction 2 19 46 // i n kg // i n // i n . // amount o f c a r b o n i n c o a l 7 N2_content = 40 // i n m3 p e r 100m3 a i r 8 9 air_consumed = N2_content /0.4) .79.4) . 16 17 C_consumption1 = (12/18) * steam_consumed . 18 reaction 1 C_consumption2 = (24/32) * O2_content . 10 weight_air = air_consumed *(28.4) .6. 11 O2_content = air_consumed *32*(0.21/22. 12 13 H2_content = 20 // i n m3 14 15 steam_consumed = H2_content *(18/22.1 Coal consumption 1 clc 2 clear 3 printf ( ” e x a m p l e 3 .Chapter 3 Material and Energy Balances Scilab code Exa 3. 1 p a g e number 90\ n\n ” ) 4 5 // t o f i n d t h e c o a l c o n s u m p t i o n 6 w_C = 0.8/22.

96.4/17) .3 HCl production 1 clc 2 clear 3 printf ( ” e x a m p l e 3 . 3 p a g e number 91\ n\n ” ) 47 . coal_consumption = total_consumption / w_C .92. 12 printf ( ” volume o f ammonia consumed= %f c u b i c m e t r e / h ” . air_consumption ) Scilab code Exa 3. HNO3_consumption = 0.20 21 22 23 total_consumption = C_consumption1 + C_consumption2 . printf ( ” c o a l c o n s u m p t i o n = %f kg ” . coal_consumption ) Scilab code Exa 3. 2 p a g e number 91\ n\n ” ) 4 5 // t o f i n d amount o f ammonia and a i r consumed 6 7 NH3_required = (17/63) *1000. 11 volume_NH3 = NH3_consumed *(22. printf ( ” \n\ nvolume o f a i r consumed = %f c u b i c m e t r e / h ” . NH3_consumed = NH3_required /( NO_consumption * HNO3_consumption ) . //NH3 r e q u i r e d for 1 ton o f n i t r i c a c i d NO_consumption = 0.2 Nitric acid preparation 1 clc 2 clear 3 printf ( ” e x a m p l e 3 . volume_NH3 ) 8 9 10 13 14 15 16 NH3_content = 11 //% by volume air_consumption = volume_NH3 *((100 -11) /11) .

actual_NaCl ) 14 15 16 purity_H2SO4 = 0. 9 48 // i n l .92. H2SO4_consumption ) 18 19 20 Na2SO4_produced = (142/73) * HCl_production . H2SO4_consumption = (98/73) *( HCl_production /( yield * purity_H2SO4 ) ) . Na2SO4_produced ) Scilab code Exa 3. printf ( ” \n\ namount o f Na2SO4 p r o d u c e d = %f kg ” . 9 yield = 0. // i n kmol 8 volume_C2H2 = C2H2_produced *22. 4 p a g e number 92\ n\n ” ) 4 5 // t o f i n d t h e p e r i o d o f s e r v i c e 6 7 C2H2_produced = (1/64) *0. 17 printf ( ” \n\ namount o f H2SO4 consumed = %f kg ” .4 5 // t o f i n d t h e c o n s u m p t i o n o f NaCl and H2SO4 i n HCl consumption 6 7 HCl_production = 500 // r e q u i r e d t o be p r o d u c e d i n kg 8 NaCl_required = (117/73) * HCl_production . 10 purity_NaCl = 0.96.93.4*1000.86. printf ( ” amount o f NaCl r e q u i r e d = %f kg ” . 11 12 13 actual_NaCl = NaCl_required /( purity_NaCl * yield ) .4 Acetylene consumption 1 clc 2 clear 3 printf ( ” e x a m p l e 3 .

time = ( volume_C2H2 / volume ) *(1/60) . volume = (100/101. printf ( ”L = %f Kg \nV = %f Kg” . 5 p a g e number 92\ n\n ” ) // t o f i n d t h e s c r e e n e f f e c t i v e n e s s xv xf xl F= = 0. V ) Eo = ( V * xv ) /( F * xf ) . 22 23 printf ( ” \n\ n o v e r a l l e f f e c t i v e n e s s = %f ” .xv ) ) /( xl . V = F-L. = 0. time ) Scilab code Exa 3. Eo ) 18 Eu = ( L *(1 .L .88.32. 100 // i n kg L = ( F *( xf . 19 20 printf ( ” e f f e c t i v e n e s s b a s e d on u n d e r s i z e d p a r t i c e s = %f ” . Eu ) 21 E = Eu * Eo . = 0.10 11 12 13 // a s s u m i n g i d e a l b e h a v i o u r .E ) 49 .5 Screen effectiveness 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 clc clear printf ( ” e x a m p l e 3 . printf ( ” \n\ n e f f e c t i v e n e s s b a s e d on o v e r s i z e d p a r t i c e s = %f \n\n ” .46. printf ( ” t i m e o f s e r v i c e = %f h r ” .xv ) .3) *(273/(273+30) ) .xl ) ) /( F *(1 .xf ) ) .

002) . 26 27 // a t e q u i l i b r i u m y ∗ = 0 . Y2 ) 23 24 x2 = 0. 18 printf ( ” \n\ n m o l e s o f b e n z e n e f r e e g a s = %f kmol d r y g a s /h ” .002/(1 -0. 22 printf ( ” \n\ n f i n a l mole r a t i o o f b e n z e n e = %f kmol b e n z e n e / kmol d r y g a s ” .Scilab code Exa 3.02. 50 . m = q /22. // i n m3/ s printf ( ” mole r a t i o o f b e n z e n e = %f kmol b e n z e n e / kmol d r y g a s ” . // i n kmol /h y1 = 0. Y1 = y1 /(1 .y1 ) .02.3) *(273/((273+ T ) ) ) .4.y1 ) .002 25 X2 = 0. 2 4 0 6X 28 // p a r t 1 29 // f o r o i l r a t e t o be minimum t h e wash o i l leaving t h e a b s o r b e r must be i n e q u i l i b r i u m w i t h t h e e n t e r i n g gas 30 31 y1 = 0. 6 p a g e number 94\ n\n ” ) // t o f i n d t h e f l o w r a t e and c o n c e n t r a t i o n G1 = 3600 // i n m3/ h P = 106. Y1 ) 16 17 Gs = m *(1 .6 // i n kPa T = 40 // i n d e g r e e C q = G1 *( P /101.95) .6 Absorption 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 clc clear printf ( ” e x a m p l e 3 . Gs ) 19 20 // f o r 95% r e m o v a l 21 Y2 = Y1 *(1 -0.

Y2 ) /( X1 . min_Ls *260) 36 37 // f o r 1 . // n i c o t i n e c o n c i n f e e d c_water = Feed *(1 .X2 ) ) .7 Extraction 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 clc clear printf ( ” e x a m p l e 3 . X1 ) Scilab code Exa 3. y = fsolve (x . 33 X1 = x1 /(1 .Y2 ) / Ls ) ) . 41 printf ( ” \n\ n c o n c e n t r a t i o n o f b e n z e n e i n wash o i l = %f kmol b e n z e n e / kmol wash o i l ” .9*((1 .Xf ) // w a t e r c o n c i n f e e d // p a r t 1 function [ f ] = F1 ( x ) funcprot (0) f = ( x /150) -0.32 x1 = y1 /(0. endfunction // i n i t i a l g u e s s x = 10. 5 t i m e s o f t h e minimum 38 Ls = 1.5* min_Ls .xf ) . 51 . 7 p a g e number 95\ n\n ” ) // t o f i n d t h e e x t r a c t i o n o f n i c o t i n e xf = 0. Ls *260) 40 X1 = X2 + ( Gs *(( Y1 .01 Xf = xf /(1 . 35 printf ( ” \n\nminimum Ls r e q u i r e d = %f kg / h” .x1 ) . Feed = 100 // f e e d i n kg c_nicotine = Feed * Xf . F1 ) . 39 printf ( ” \n\ n f l o w r a t e o f wash o i l = %f kg / h” .2406) . 34 min_Ls = Gs *(( Y1 .x ) /99) .

N1 . N1 ) 31 function [ f ] = F1 (x . 41 endfunction 42 43 // i n i t i a l g u e s s 44 x = 10.9*((1 .x . N3 = %f kg ” .N2 . N1 ) 32 f = ( x /50) -0. N2 ) 39 function [ f ] = F1 (x .N1 ) /99) . 37 N2 = fsolve (x .9*((1 .x .N ) Scilab code Exa 3. 46 47 printf ( ” \n\ namount o f n i c o t i n e removed i n s t a g e 3 . 25 endfunction 26 27 // i n i t i a l g u e s s 28 x = 10. F1 ) .8 Distillation 52 n i c o t i n e removed = %f kg . 33 endfunction 34 35 // i n i t i a l g u e s s 36 x = 10. 38 printf ( ” \n\ namount o f n i c o t i n e removed i n s t a g e 2 . 29 N1 = fsolve (x . N2 ) 40 f = ( x /50) -0. N3 ) 48 N = N1 + N2 + N3 .N1 ) /99) . N1 = %f kg ” .y ) 22 // p a r t 2 23 function [ f ] = F1 ( x ) 24 f = ( x /50) -0. 45 N3 = fsolve (x . 30 printf ( ” \n\ namount o f n i c o t i n e removed i n s t a g e 1 .x ) /99) .21 printf ( ” amount o f n i c o t i n e removed N = %f kg ” .9*((1 . F1 ) . F1 ) . N2 = %f kg ” . 49 printf ( ” \n\ n t o t a l amount o f ” .

1 clc 2 clear 3 printf ( ” e x a m p l e 3 . 11 x_benzene = vp_benzene / P . 11 printf ( ”P = %f kPa ” . water_left = ( initial_water .06 // i n kPa 8 vp_benzene = 72. 13 14 initial_water = 50/18.9 Distillation 1 clc 2 clear 3 printf ( ” e x a m p l e 3 .92 // i n kPa 9 10 P = vp_water + vp_benzene . water_left *18) Scilab code Exa 3.93 // i n kPa 7 po_W = 96. printf ( ” amount o f w a t e r l e f t i n r e s i d u e = %f kg ” .75 // v a p o r i z a t i o n e f f i c i e n c y 9 10 P = n * po_D + po_W .P ) 53 . 8 p a g e number 96\ n\n ” ) 4 5 // t o f i n d t h e amount o f w a t e r i n r e s i d u e 6 7 vp_water = 31.water_evaporated ) . 12 x_water = vp_water / P . 9 p a g e number 97\ n\n ” ) 4 5 // t o f i n d t h e v a p o r c o n t e n t o f d i m e t h y l a n a l i n e 6 po_D = 4.3 // i n kPa 8 n = 0. // i n kmol o f w a t e r 15 initial_benzene = 50/78 // i n kmol o f b e n z e n e 16 water_evaporated = initial_benzene *( x_water / 17 18 19 x_benzene ) .

100*(1 .7+1000) .wt_water )) Scilab code Exa 3. wt_water *100 .12 13 14 15 x_water = 96. 24 printf ( ” \n\ namount o f steam r e q u i r e d = %f kg steam / kg d i m e t h y l a n a l i n e ” . x_dimethylanaline = 1 .7) /(114. wt_water = x_water *18/( x_water *18+(1 . wt_dimethylanaline *100) 17 18 // p a r t 1 19 n = 0. steam_required ) 25 26 27 28 29 // p a r t 2 x_water = p_water /100. 22 p_water = 100 .x_water .x_water ) *121) .10 Crystallization 1 2 3 4 5 6 7 8 9 clc clear printf ( ” e x a m p l e 3 . wt_dimethylanaline = ( x_dimethylanaline *121) /( x_dimethylanaline *121+ x_water *18) . printf ( ” \n\ n w e i g h t o f w a t e r v a p o r = %f \ n w e i g h t o f d i m e t h y l a n a l i n e =%f ” . 1.15.8. 20 po_D = 32 // i n kPa 21 actual_vp = n * po_D .3/100. 1 0 p a g e number 98\ n\n ” ) // t o xf = xl = xc = f i n d t h e amount o f w a t e r e v a p o r a t e d 0. 16 printf ( ” \n\ n w e i g h t o f d i m e t h y l a n a l i n e i n w a t e r = %f ” . 23 steam_required = ( p_water *18) /( actual_vp *121) . (114. 54 .actual_vp .

// i n kg C = (100* xf . 13 C = n * K2Cr2O7_feed . xl = 27. printf ( ” y i e l d = %f ” . // i n kg 11 12 n = 0.12 Drying 1 clc 2 clear 55 . water_present = 100*(1 .7* xl ) /( xc . yield ) Scilab code Exa 3.103) . yield = ( C / Na2CO3_feed ) *100.103) /( -0. xf = 0.25.xf ) .11 crystallization 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 clc clear printf ( ” e x a m p l e 3 . 14 V = ( K2Cr2O7_feed -120 . // i n kg V = 0. Na2CO3_feed = 25/ xc .5/127.880*0. 1 0 p a g e number 98\ n\n ” ) // t o f i n d t h e y i e l d o f c r y s t a l s xc = 106/286.15.5.xl ) . 15 16 printf ( ” amount o f w a t e r e v a p o r a t e d = %f kg ” .88.15*75.V ) Scilab code Exa 3.8.10 K2Cr2O7_feed = 1000*0.

13 Conditioning of air 1 clc 2 clear 3 printf ( ” e x a m p l e 3 .3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 printf ( ” e x a m p l e 3 .016 // i n kg w a t e r v a p o r / kg d r y a i r H2 = 0.y ) . 1 2 p a g e number 99\ n\n ” ) // t o f i n d t h e f r a c t i o n o f a i r r e c i r c u l a t e d r = 50 // w e i g h t o f d r y a i r p a s s i n g t h r o u g h d r i e r w1 = 1.( w1 . H1 ) 18 19 // c h e c k 20 H11 = H2 * y + H0 *(1 .( w1 .y ) H1 = H2 . 1 3 p a g e number 100 \ n\n ” ) 4 5 // t o f i n d t h e v o l u m e t r i c f l o w r a t e and f r a c t i o n of a i r passing through the c o o l e r 6 7 // b a s i s 60m3/h o f c o n d i t i o n e d a i r a t 25 d e g r e e C and 60% RH 8 56 .w2 ) /( r *( H2 . printf ( ” f r a c t i o n o f a i r r e c i r c u l a t e d = %f ” .055 // i n kg w a t e r v a p o r / kg d r y a i r y = 1 . 21 if H1 == H11 then printf ( ” \n\ n f r a c t i o n of air r e c i r c u l a t e d = %f \n v e r i f i e d ” . printf ( ” \n\ n h u m i d i t y o f a i r e n t e r i n g t h e d r i e r = %f kg w a t e r v a p o r / kg kg d r y a i r ” .60 // i n kg p e r kg d r y s o l i d w2 = 0.w2 ) / r .y ) 22 end Scilab code Exa 3.H0 ) ) .1 // i n kg / kg d r y s o l i d H0 = 0.

12 13 water_vapor = Hf /18. // i n kmol o f w a t e r vapor 23 volume_inlet = 22.033/18.0075.y ) Scilab code Exa 3. 19 printf ( ” w e i g h t o f d r y a i r h a n d l e d p e r h r = %f kg ” .14 Ammonia Synthesis 1 clc 2 clear 3 printf ( ” e x a m p l e 3 . volume_inlet * weight ) 25 26 // p a r t 2 27 y = ( Hf . 11 H1 = 0.9 Hf = 0. 18 weight = 60/ volume . weight ) 20 21 22 // p a r t 1 inlet_watervapor = 0. 24 printf ( ” \n\ n v o l u m e t r i c f l o w r a t e o f i n l e t a i r = %f c u b i c m e t e r ” .033.4*(308/273) *( inlet_watervapor + dry_air ) .4*(298/273) * total_mass .9.Hi ) .Hi ) /( H1 . 10 Hi = 0. 16 17 volume = 22. 1 4 p a g e number 102 \ n\n ” ) 4 5 // t o f i n d t h e f r a c t i o n o f p u r g e d r e c y c l e and t o t a l yield 6 57 . // i n kmol 15 total_mass = water_vapor + dry_air . // i n kmol o f w a t e r v a p o r 14 dry_air = 1/28.012. 28 printf ( ” \n\ n f r a c t i o n o f i n l e t a i r passing through c o o l e r = %f ” .

9 // i n kJ 7 H0_CO2 = -393. 0 6 3 3 y 13 x = (0.105*(100+ x ) . x ) 15 16 // p a r t 1 17 fraction = y / x . yield ) Scilab code Exa 3. 11 printf ( ” c h a n g e i n e n t h a l p y = %f kJ ” . 10 // a r g o n i n f r e s h f e e d i s e q u a l t o a r g o n i n p u r g e 11 12 y = 0.7 // x− m o l e s o f N2 and H2 r e c y c l e d .79) . 1 5 p a g e number 107 \ n\n ” ) 4 5 // t o f i n d c h a n g e i n e n t h a l p y 6 H0_CH4 = -74.y . delta_H0 ) 58 . y − m o l e s o f N2 H2 purged 8 9 Ar_freshfeed = 0.y ) /(1 -0. fraction ) 19 20 21 22 // p a r t 2 yield = 0.8 // i n kJ 9 10 delta_H0 = H0_CO2 +2* H0_H2O .2. // a r g o n i n p u r g e = 0 .H0_CH4 .2/0. printf ( ” \n\ n o v e r a l l y i e l d o f ammonia = %f kmol ” .15 Enthalpy calculation 1 clc 2 clear 3 printf ( ” e x a m p l e 3 . 18 printf ( ” \n\ n f r a t i o n o f r e c y c l e t h a t i s p u r g e d = %f ” . 14 printf ( ” y = %f kmol \ nx = %f kmol ” .79*100 .5 // i n kJ 8 H0_H2O = -241.0633.

1 6 p a g e number 107 \ n\n ” ) 4 5 // t o compare t h e e n t h a l p y c h a n g e i n two r e a c t i o n s 6 7 H0_glucose = -1273 // i n kJ 8 H0_ethanol = -277.16 Enthalpy calculation 1 clc 2 clear 3 printf ( ” e x a m p l e 3 . 14 printf ( ” e n t h a l p y c h a n g e i n r e a c t i o n 1 = %f KJ” .6 // i n kJ 9 H0_CO2 = -393. delta_H1 ) 15 16 17 18 // f o r r e a c t i o n 2 delta_H2 = 6* H0_H2O +6* H0_CO2 .5 // i n kJ 10 H0_H2O = -285.8 // i n kJ 11 12 // f o r r e a c t i o n 1 13 delta_H1 = 2* H0_ethanol +2* H0_CO2 . delta_H2 ) 19 20 if delta_H1 > delta_H2 then disp ( ” r e a c t i o n 2 s u p p l i e s more e n e r g y ” ) 21 else disp ( ” r e a c t i o n 1 s u p p l i e s more e n e r g y ” ) 22 end Scilab code Exa 3.17 Enthalpy of formation 1 clc 2 clear 59 .Scilab code Exa 3. printf ( ” \n\ n e n t h a l p y c h a n g e i n r e a c t i o n 2 = %f kJ ” .H0_glucose .H0_glucose .

13 14 printf ( ” e n t h a l p y o f f o r m a t i o n = %f kJ / mol ” .t ) 60 .32 // i n kJ / kmol 12 13 t = H_combustion /(2* H0_CO2 +3* H0_steam +0.38 // i n kJ / kmol 11 H0_N2 = 33.95*159. 14 15 printf ( ” t h e o r i t i c a l t e m p e r a t u r e o f c o m b u s t i o n = %f d e g r e e C” .56 // i n kJ / kmol 9 H0_O2 = 35.18*3.delta_H2 . 1 7 p a g e number 108 \ n\n ” ) // t o f i n d e n t h a l p y o f f o r m a t i o n o f CuSO4 .6) /(16*10^3) 12 delta_H1 = delta_H3 .2 // i n kJ / kmol 10 H0_steam = 43. 5 H2O delta_H2 = 11.875* H0_O2 +16.18 Combustion 1 clc 2 clear 3 printf ( ” e x a m p l e 3 . delta_H1 ) Scilab code Exa 3. 1 8 p a g e number 108 \ n\n ” ) 4 5 // t o f i n d t h e t e m p e r a t u r e o f c o m b u s t i o n 6 7 H_combustion = 1560000 // i n kJ / kmol 8 H0_CO2 = 54.3 4 5 6 7 8 9 10 11 printf ( ” e x a m p l e 3 .46* H0_N2 ) .7 // i n kJ / mol m_CuSO4 = 16 // i n gm m_H2O = 384 // i n gm delta_H3 = -(( m_CuSO4 + m_H2O ) *4.

Scilab code Exa 3.3 // i n MJ/ kmol 9 H_Na2SO4 = 1384 // i n MJ/ kmol 10 H_HCl = 92.H_H2SO4 . 16 coke_consumption = heat_required /19 17 printf ( ” amount o f c o k e oven g a s consumed = %f c u b i c m e t e r ” .5*(500/73) .5 // i n k j / kg 8 cp_steam = 3040 // i n kJ / kg 61 . coke_consumption ) Scilab code Exa 3.20 Heat transfer 1 clc 2 clear 3 printf ( ” e x a m p l e 3 . 1 9 p a g e number 109 \ n\n ” ) 4 5 // t o f i n d t h e h e a t o f r e a c t i o n and c o n s u m p t i o n o f coke 6 7 H_NaCl = 410.3 // i n MJ/ kmol 11 12 Q = H_Na2SO4 + 2* H_HCl -2* H_NaCl . 2 0 p a g e number 109 \ n\n ” ) 4 5 // t o f i n d t h e r a t e o f h e a t f l o w 6 7 cp_water = 146. 13 printf ( ” h e a t o f r e a c t i o n = %f MJ\n\n ” .Q ) 14 15 heat_required = 64.19 Heat of reaction 1 clc 2 clear 3 printf ( ” e x a m p l e 3 .9 // i n MJ/ kmol 8 H_H2SO4 = 811.

03 // i n kg wt_S = 0.102 // i n m u = 1. 2 2 p a g e number 110 \ n\n ” ) 4 5 // t o f i n d t h e amount o f a i r r e q u i r e d f o r c o m b u s t i o n 6 7 8 9 10 11 12 13 and c o m p o s i t i o n o f f l u e g a s wt_C = 0. printf ( ” r a t e o f h e a t f l o w = %f kW” .cp_water ) .05 // i n kg wt_O2 = 0.22 Coal combustion 1 clc 2 clear 3 printf ( ” e x a m p l e 3 .75 // i n kg wt_H2 = 0.14/4) * d ^2* u * density .01 // i n kg wt_ash = 0. Q = m *( cp_steam .Q ) Scilab code Exa 3.9 10 11 12 13 14 15 16 d = 0.5 // i n m/ s density = 1000 // i n kg /m3 m = (3. 2 1 3 //To f i n d t h e c a l o r i f i c v a l u e o f c o a l 4 disp ( ’ t h i s i s a t h e o r i t i c a l p r o b l e m . // i n kg 62 . R e f e r t h e book for solution ’) Scilab code Exa 3.21 Calorific value 1 clc 2 //EXAMPLE 3 .04 // i n kg O2_C = wt_C *(32/12) .12 // i n kg wt_N2 = 0.

x_O2 *100) 63 . volume ) air_supplied = 1.4/28. moles_O2 = O2_fluegas /32. N2_supplied = air_supplied *0. x_CO2 = moles_CO2 / total_moles .77. air_needed = oxygen_supplied /0.23. x_N2 = moles_N2 / total_moles . // i n kg O2_required = O2_C + O2_H2 + O2_S . total_N2 = N2_supplied + wt_N2 . printf ( ” \n\nCO2 = %f ” . moles_N2 = total_N2 /28. moles_CO2 = wt_CO2 /44. x_CO2 *100) printf ( ” \n\nSO2 = %f ” . wt_CO2 = wt_C + O2_C .14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 O2_H2 = wt_H2 *(16/2) . total_moles = moles_CO2 + moles_SO2 + moles_N2 + moles_O2 . moles_SO2 = wt_SO2 /64. x_N2 *100) printf ( ” \n\nO2 = %f ” . printf ( ” \n\ nvolume o f a i r n e e d e d = %f c u b i c m e t e r ” . wt_SO2 = wt_S + O2_S . x_SO2 *100) printf ( ” \n\nN2 = %f ” .20* air_needed . // i n kg O2_S = wt_S *(32/32) . O2_fluegas = air_supplied *0. oxygen_supplied = O2_required .8) * air_needed .wt_O2 . printf ( ” amount o f a i r r e q u i r e d = %f kg ” . air_needed ) volume = (22. x_SO2 = moles_SO2 / total_moles . x_O2 = moles_O2 / total_moles .oxygen_supplied .23 .

25* wt_air . H2_O2 = H2 *(16/2) . // i n kg m_O2 = ( wt_airsupplied .23. wt_airsupplied = 1. mole_O2 = m_O2 /32.Scilab code Exa 3. O2_supplied ) wt_air = O2_supplied *(100/23) .005 // i n kg ash = 0.145 // i n kg // r e q u i r e d o x y g e n i n kg C_O2 = C *(32/12) . mole_N2 = m_N2 /28. O2_supplied = C_O2 + S_O2 + H2_O2 .wt_air ) *0. S_O2 = S *(32/32) .77. // i n kg 64 // i n kg . printf ( ” amount o f a i r s u p p l i e d = %f kg \n\n ” .23 Coal combustion 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 clc clear printf ( ” e x a m p l e 3 . m_CO2 = C *(44/12) .05 // i n kg S = 0. 2 3 p a g e number 110 \ n\n ” ) // t o f i n d t h e c o m p o s i t i o n o f f l u e g a s C = 0.8 // i n kg H2 = 0. printf ( ” amount o f O2 s u p p l i e d = %f kg \n\n ” . wt_airsupplied ) // f l u e g a s c o m p o s i t i o n m_N2 = wt_airsupplied *0.

x_N2 *100) 62 63 x_O2 = mole_O2 / m1 . w_N2 *100) 44 45 46 47 48 49 50 51 52 53 54 55 w_O2 = m_O2 / m . // i n kg 37 mole_SO2 = m_SO2 /64. 35 36 m_SO2 = S *(64/32) . 61 printf ( ” p e r c e n t a g e o f N2 by mole = %f\n\n ” . w_H2O *100) w_SO2 = m_SO2 / m . printf ( ” p e r c e n t a g e o f SO2 by w e i g h t = %f\n\n ” . 32 33 m_H2O = H2 *(18/2) . printf ( ” p e r c e n t a g e o f O2 by w e i g h t = %f\n\n ” . // i n kg 34 mole_H2O = m_H2O /18. 65 . printf ( ” p e r c e n t a g e o f H2O by w e i g h t = %f\n\n ” .31 mole_CO2 = m_CO2 /44. w_SO2 *100) 56 57 m1 = mole_N2 + mole_O2 + mole_CO2 + mole_H2O + mole_SO2 58 59 // p e r c e n t by mole 60 x_N2 = mole_N2 / m1 . printf ( ” p e r c e n t a g e o f CO2 by w e i g h t = %f\n\n ” . 38 39 m = m_N2 + m_O2 + m_CO2 + m_H2O + m_SO2 40 41 // p e r c e n t by w e i g h t 42 w_N2 = m_N2 / m . 43 printf ( ” p e r c e n t a g e o f N2 by w e i g h t = %f\n\n ” . w_CO2 *100) w_H2O = m_H2O / m . w_O2 *100) w_CO2 = m_CO2 / m .

10 O2_C = wt_C *(32/12) .85.15*( wt_air ) . 9 O2_H2 = wt_H2 *(16/2) . x_SO2 *100) Scilab code Exa 3. x_O2 *100) x_CO2 = mole_CO2 / m1 . printf ( ” p e r c e n t a g e o f SO2 by mole = %f\n\n ” .15. 8 wt_C = 0.23. 19 moles_CO2 = 0.24 Petrol combustion 1 clc 2 clear 3 printf ( ” e x a m p l e 3 . 18 O2_supplied = 0. x_H2O *100) x_SO2 = mole_SO2 / m1 . printf ( ” p e r c e n t a g e o f H2O by mole = %f\n\n ” . 15 16 air_supplied = 1. x_CO2 *100) x_H2O = mole_H2O / m1 . 13 14 wt_air = total_O2 /0. 11 12 total_O2 = O2_H2 + O2_C .64 65 66 67 68 69 70 71 72 73 printf ( ” p e r c e n t a g e o f O2 by mole = %f\n\n ” . 2 4 p a g e number 112 \ n\n ” ) 4 5 // t o f i n d v o l u m e t r i c c o m p o s i t i o n o f f l u e g l a s s 6 7 wt_H2 = 0. 66 .23*( air_supplied .wt_air ) /32.77* air_supplied /28.85/12. 17 N2_supplied = 0. printf ( ” p e r c e n t a g e o f CO2 by mole = %f\n\n ” .

O2_supplied ) total_moles = N2_supplied + O2_supplied + moles_CO2 .20 21 22 23 24 25 26 27 printf ( ” m o l e s o f CO2 = %f kmol \n\n ” . // i n m3 10 O2_fluegas = 6. printf ( ” p e r c e n t a g e o f CO2 = %f\n\n ” . excess_air_supplied ) 67 . N2_supplied ) printf ( ” m o l e s o f O2 = %f kmol \n\n ” . moles_CO2 ) printf ( ” m o l e s o f N2 = %f kmol \n\n ” .5 // i n m3 8 air_supplied = N2 /0. 14 15 printf ( ” p e r c e n t a g e o f e x c e s s a i r s u p p l i e d = %f ” . 2 5 p a g e number 113 \ n\n ” ) 4 5 // t o f i n d t h e e x c e s s a i r s u p p l i e d 6 7 N2 = 80. 13 excess_air_supplied = ( O2_fluegas / O2_used ) *100.O2_fluegas .( N2_supplied / total_moles ) *100) 29 printf ( ” p e r c e n t a g e o f O2 = %f ” .( moles_CO2 / total_moles ) *100) 28 printf ( ” p e r c e n t a g e o f N2 = %f\n\n ” .25 Air supply 1 clc 2 clear 3 printf ( ” e x a m p l e 3 .( O2_supplied / total_moles ) *100) Scilab code Exa 3.1 // i n m3 11 12 O2_used = volume_O2 .79 // i n m3 9 volume_O2 = air_supplied *0.21.

85 // i n kJ / kg K //Q = ms∗ d e l t a T Q = m_CO2 * s_CO2 *(40 -20) d0 A0 di Ai = = = = 0. m_CO2 = 44*( q_NTP /22.t ) Scilab code Exa 3. printf ( ” e x i t w a t e r t e m p e r a t u r e = %f d e g r e e C” . u = 0.26 CO2 cooling 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 clc clear printf ( ” e x a m p l e 3 .19 // i n kJ / kg K t = 15+( Q /( m_water * s_water ) ) . 2 6 p a g e number 114 \ n\n ” ) // t o f i n d t h e o u t l e t t e m p e r a t u r e o f w a t e r q_NTP = 10*(200/101.3) *(273/313) . A_annular = Ai . 0.14/4) * di ^2.Scilab code Exa 3.4) .035 // i n mm (3. s_CO2 = 0.A0 .14/4) * d0 ^2.27 Heating area 1 clc 2 clear 3 printf ( ” e x a m p l e 3 .023 // i n mm (3. 2 7 p a g e number 114 \ n\n ” ) 4 5 // t o f i n d t h e a r e a o f h e a t i n g s u r f a c e 68 .15 // i n m/ s m_water = A_annular *( u *3600) *1000 // i n kg / h r s_water = 4.

6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 F = 1000 xF = 0.A ) 69 .6 // i n kJ / kg V = F -L . water_feed = F .4 // i n kW/m2K delta_t = ts .S ) Q = S *( Hs .V * Hv .L * hL ) /( hc . U = 1.4 // i n d e g r e e C 2690 // i n kJ / kg 108.02.5 // i n kJ / kg xL = 0. tF = 40 // i n d e g r e e C hF = 167.solid_feed . A = 383.Hs ) . solid_liquor = 10 // i n kg L = solid_liquor / xL .hc ) . printf ( ” w e i g h t o f steam r e q u i r e d = %f kg / h r ” .tL .2/( U * delta_t ) .01 // i n kg solid_feed = F * xF . printf ( ” \n\ n a r e a o f h e a t i n g s u r f a c e = %f s q u a r e m e t e r ” . tv Hv ts Hs tc hc = = = = = = 100 // i n d e g r e e C 2675 // i n kJ / kg 108.4 // i n d e g r e e C 454 // i n kJ / kg // a p p l y i n g h e a t b a l a n c e S = ( F * hF . tL = 100 // i n d e g r e e C hL = 418.

printf ( ” bottom p r o d u c t = %f kg / h r ” . 2 8 p a g e number 115 \ n\n ” ) 4 5 // t o f i n d t h e t o p and bottom p r o d u c t .40 xW = 0.02.D ) disp ( ’ p a r t 2 ’ ) L = 3.Scilab code Exa 3.28 Distillation column 1 clc 2 clear 3 printf ( ” e x a m p l e 3 .97.W ) printf ( ” \ n t o p p r o d u c t = %f kg / h r \n\n ” . printf ( ” c o n d e n s e r duty = %f KJ/ h r \n\n ” . c o n d e n s e r duty .xW ) .5* D .D * hD . 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 hW = 200 // i n kJ / kg H = 540 // i n kJ / kg disp ( ’ p a r t 1 ’ ) F = 1000 // i n kg /h xF = 0. heat input to r e b p o i l e r 6 hF = 171 // i n kJ / kg 7 hD = 67 // i n kJ / kg 8 hL = hD . Qc ) disp ( ’ p a r t 3 ’ ) Qr = Qc . W = F-D. xD = 0.L * hL .24200. printf ( ” r a t e o f h e a t i n p u t t o r e b o i l e r = %f kJ / h r ” .xW ) /( xD . V = L+D. Qc = V *H . Qr ) 70 . D = F *( xF .

9*75. xL = 75/(100+75) .V *2414) /( U * delta_Tm *3. 25 26 A =( F *2. printf ( ” r a t e o f c r y s t a l f o r m a t i o n = %f kg ” . delta_Tm = ( delta_T1 .19*11) .48.429) . xC = 1.delta_T2 ) /( log ( delta_T1 / delta_T2 ) ) 24 U = 125. printf ( ” \n\ n r a t e o f c o o l i n g w a t e r = %f kg ” .2 .05* F . // i n kg xF = 0.6) .9*75. c o o l i n g water rate . C = ( F * xF -950* xL ) /(1 -0. 27 printf ( ” \n\ n a r e a = %f s q u a r e m e t e r ” . // c o o l i n g w a t e r W = ( F *2. // i n kg V = 0.W ) delta_T1 = 56.97*(85 -35) +126.C ) L = F -C . delta_T2 = 17.V . r e q u i r e d area 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 F = 1000. 2 9 p a g e number 117 \ n\n ” ) 4 5 // t o f i n d t h e r a t e o f c r y s t a l f o r m a t i o n .V *2414) /(4.Scilab code Exa 3.A ) 71 .29 Crystallization 1 clc 2 clear 3 printf ( ” e x a m p l e 3 .2 .97*(85 -35) +126.

printf ( ” h e a t o f c o m b u s t i o n = %f kJ \n\n ” . // i n g mol Qp1 = Qp . Qp ) disp ( ’ p a r t 2 ’ ) delta_H = 44.3144*298/1000) . Qp1 ) 72 . printf ( ” h e a t o f c o m b u s t i o n = %f kJ ” .( delta_H * water_formed ) .05 // i n kJ / gmol water_formed = 4/128.30 Combustion 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 clc clear printf ( ” e x a m p l e 3 . // mole p e r mole n a p t h a n l e n e // b a s i s 1 g moles_napthalene = (1/128) . disp ( ’ p a r t 1 ’ ) Qv = 40.Scilab code Exa 3. 3 0 p a g e number 118 \ n\n ” ) // t o f i n d t h e h e a t o f c o m b u s t i o n delta_n = 10 -12.28 // i n kJ Qp = Qv -( delta_n * moles_napthalene *8.

compressibility ) Scilab code Exa 4. 1 p a g e number 125 \ n\n ” ) 4 5 // t o f i n d w a t e r c o m p r e s s i b i l i t y 6 delta_p =70. 2 p a g e number 125 \ n\n ” ) 4 5 disp ( ” t h i s i s a t h e o r i t i c a l problem . book s h a l l be r e f e r r e d f o r s o l u t i o n ”) 73 .Chapter 4 Flow Of Fluids Scilab code Exa 4.1 Water compressibility 1 clc 2 clear 3 printf ( ” e x a m p l e 4 .2 Isothermal Compressibility 1 clc 2 clear 3 printf ( ” e x a m p l e 4 . 9 printf ( ” c o m p r e s s i b i l t y o f w a t e r = %f ” . // i n b a r 7 Et =20680 // i n b a r 8 compressibility = delta_p / Et .

13 viscosity = shear_stress / velocity_distribution . 14 printf ( ” \n\ n v i s c o s i t y = %f Pa−s ” . 3 p a g e number 128 \ n\n ” ) 4 5 // t o f i n d t h e v i s c o s i t y o f o i l 6 7 F =0.15. book s h a l l be r e f e r r e d f o r s o l u t i o n ”) Scilab code Exa 4.05*10^ -3) .4 Streamline flow 1 clc 2 clear 3 printf ( ” e x a m p l e 4 . // i n m2 9 shear_stress = F / A . 4 p a g e number 130 \ n\n ” ) 4 printf ( ” t h i s i s a t h e o r i t i c a l problem .1/(0. // i n Pa 10 printf ( ” s h e a r s t r e s s = %f Pa” .5 Frictional losses 1 clc 2 clear 74 .Scilab code Exa 4. viscosity ) Scilab code Exa 4.5*9.3 Viscosity 1 clc 2 clear 3 printf ( ” e x a m p l e 4 .14*0. // i n N 8 A =3.05*0. shear_stress ) 11 12 velocity_distribution =0.8.

8 p a g e number 137 \ n\n ” ) 4 75 .6. book s h a l l be r e f e r r e d f o r s o l u t i o n ”) Scilab code Exa 4.6 7 velocity_ratio =2. // u2 / u1=2 8 n = log2 ( loss_ratio ) .6 Velocity profile 1 clc 2 clear 3 printf ( ” e x a m p l e 4 .3 printf ( ” e x a m p l e 4 .7 Velocity profile 1 clc 2 clear 3 printf ( ” e x a m p l e 4 . 7 p a g e number 134 ” ) 4 disp ( ” t h i s i s a t h e o r i t i c a l problem . book s h a l l be r e f e r r e d f o r s o l u t i o n ”) Scilab code Exa 4. // d e l t a P 2 / d e l t a P 1 =(u2 / u1 ) ˆ n 9 printf ( ” power c o n s t a n t = %f f l o w i s t u r b u l e n t ” . // d e l t a P 2 / d e l t a P 1 =3.n ) Scilab code Exa 4. 5 p a g e number 133 \ n\n ” ) 4 5 // t o f i n d v a r i a t i o n o f l o s s e s w i t h v e l o c i t y 6 loss_ratio =3.8 Boundary layer 1 clc 2 clear 3 printf ( ” e x a m p l e 4 . 6 p a g e number 133 \ n\n ” ) 4 printf ( ” t h i s i s a t h e o r i t i c a l problem .

9 Pipe flow 1 clc 2 clear 3 printf ( ” e x a m p l e 4 .367* x *( Re ) ^ -0. 27 thickness =0. 22 printf ( ” t r a n s i t i o n t a k e s p l a c e a t x = %f m\n ” . Re ) 15 16 thickness =4. x_cr ) 23 24 disp ( ’ p a r t 3 ’ ) 25 x =0.5 // i n m 26 Re =( density * u * x ) / viscosity .2. t_sublayer ) Scilab code Exa 4. 9 p a g e number 138 \ n\n ” ) 4 76 .5* x *( Re ) ^ -0. 28 printf ( ” boundary l a y e r t h i c k n e s s= %f m” . thickness ) 29 30 t_sublayer =71.2*10^5. thickness ) 18 19 disp ( ’ p a r t 2 ’ ) 20 Re_x =3.05 // i n m 9 density =1000 // i n kg /m3 10 viscosity =1*10^ -3 // i n Pa−s 11 u =1 // i n m/ s 12 Re =( density * u * x ) / viscosity . 13 14 printf ( ” R e y n o l d s Number = %f ” . 31 printf ( ” \ nsub l a y e r t h i c k n e s s= %f m” .5. 21 x_cr =( Re_x * viscosity ) /( density * u ) .5 // t o f i n d t h e boundary l a y e r p r o p e r t i e s 6 7 disp ( ’ p a r t 1 ’ ) 8 x =0.9.65* x *( Re ) ^ -0. 17 printf ( ” \ nboundary l a y e r t h i c k n e s s = %f m\n ” .

1 0 p a g e number 139 \ n\n ” ) // t o f i n d t h e t e m p e r a t u r e i n c r e a s e Q =0. density_1 =2. delta_T ) 77 . printf ( ” d e n s i t y a t s e c t i o n 2 = %f kg / c u b i c m e t e r ” .075) ^2.14* d1 ^2) /4. // i n b a r w = density_1 * A1 * u1 .05/0. // i n b a r P2 =1. 18 printf ( ” \n\ n v e l o c i t y a t s e c t i o n 2 = %f m/ s ” . u2 ) Scilab code Exa 4.8. density_2 ) 16 17 u2 = u1 *( density_1 / density_2 ) *(0.19*10^3 // i n // i n // i n // i n J/ s kg / s kg /m3 J / kg K delta_T = Q /( w * cp ) .3.05 // i n m A1 =(3.10 Temperature rise 1 2 3 4 5 6 7 8 9 10 11 12 13 clc clear printf ( ” e x a m p l e 4 . density_2 = density_1 *( P2 / P1 ) .1 // i n kg /m3 u1 =15 // i n m/ s P1 =1.001*1000 density =1000 cp =4.5 6 7 8 9 10 11 12 13 14 15 // t o f i n d t h e f l o w p r o p e r t i e s d1 =0.001*10^5 w =0. printf ( ” T e m p e r a t u r e i n c r e a s e = %f d e g r e e c e l c i u s ” .

5. 1 2 p a g e number 143 \ n\n ” ) 4 5 // t o f i n d t h e power r e q u i r e m e n t s 6 7 Q =3800/(24*3600) // i n m3/ s 78 . u3 ) ratio_area =0. 1 1 p a g e number 142 \ n\n ” ) // t o f i n d t h e p r e s s u r e u1 =0.P3 ) ) / density ) ^0. u2 = u3 / ratio_area .12 Power requirements 1 clc 2 clear 3 printf ( ” e x a m p l e 4 . printf ( ” u3 = %f m/ s ” .5. printf ( ” \n\ nu2 = %f m/ s ” . P2 ) printf ( ” \ n t h i s f l o w i s p h y s i c a l l y u n r e a l ” ) Scilab code Exa 4. // i n m/ s ws =0.Scilab code Exa 4.7*10^5 -(( density * u2 ^2) /2) printf ( ” \n\nP2 = %f Pa” . u2 ) // a p p l y i n g b e r n o u l l i ’ s e q u a t i o n P2 =1.7*10^5 // i n Pa P3 =0 density =1000 // i n kg /m3 u3 =((2*( P1 .11 Bernoulli equation 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 clc clear printf ( ” e x a m p l e 4 . P1 =0.

79 . Re ) //F= 1 8 .0005/ viscosity . u=Q/A.5*10^ -3/(24*3600) A =3. power =( ws * mass_flow_rate ) /0. // i n J / kg ws =9.u ^2+ vdP ) /18. power /1000) Scilab code Exa 4. printf ( ” power r e q u i r e d = %f kW” .202 // i n m u = Q /((3.3*10^6 // i n Pa density =897 // i n kg /m3 F = delta_P / density . 1 3 p a g e number 146 \ n\n ” ) // t o f i n d t h e t u b e l e n g t h density =1000 // i n kg /m3 viscosity =1*10^ -3 // i n Pa s P =100*1000 // i n Pa vdP = P / density .13 Hagen Poiseulle equation 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 clc clear printf ( ” e x a m p l e 4 .14*(0. printf ( ” \n\nRe = %f ” .86.6.8 9 10 11 12 13 14 15 16 17 18 d =0. 8 6 ∗ L L =( . Q =2.14/4) * d ^2) .0005) ^2/4.u ) Re = density * u *0. // i n m/ s delta_P =5. printf ( ” u = %f m/ s ” .8*30+ F . mass_flow_rate = Q * density .

1 4 p a g e number 151 \ n\n ” ) // t o f i n d t h e d i s c h a r g e p r e s s u r e d =0.15 Level difference calculation 1 clc 2 clear 3 printf ( ” e x a m p l e 4 . 1 5 p a g e number 152 \ n\n ” ) 4 5 // t o f i n d t h e l e v e l d i f f e r e n c e 80 . total_head /10^5) Scilab code Exa 4. printf ( ” \n\ n t o t a l p r e s s u r e head = %f b a r ” .8.2*10^4 // i n Pa−s Re =( u * d * density ) / viscosity . L =50. f =0. delta_P /1000) required_P =25* density *9. total_head = delta_P + required_P . delta_P =2* f * density * u ^2*( L / d ) printf ( ” f r i c t i o n a l head l o s s = %f kPa ” .22 printf ( ” \n\nL = %f m” .025 // i n m u =3 // i n m/ s density =894 // i n kg /m3 viscosity =6.14 Pressure Head calculation 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 clc clear printf ( ” e x a m p l e 4 .L ) Scilab code Exa 4.0045.

printf ( ” l e v e l d i f f e r e n c e = %f m” .0012 // i n Pa−s Re = u * density * d / viscosity . L =60 h_f =2* f *(( u ^2) /9. // i n m/ s density =800 // i n kg /m3 viscosity =0.079*( Re ) ^ -0.004.18 // i n m Q =0.026 // i n m A =(3.14* d ^2) /4. // i n m L =290.0005 // i n Pa−s Re =( u * density * d ) / viscosity . 1 6 p a g e number 153 \ n\n ” ) // t o f i n d t h e e n g e r y c o s t delta_z =50.36 // i n m d =0. // i n kg /m3 viscosity =0. 81 . // i n m3/ s d =0.25. h_f ) Scilab code Exa 4.16 Energy cost calculation 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 clc clear printf ( ” e x a m p l e 4 .8) *( L / d ) .05 // i n m3/ s A =(3. f =0.14*( d ^2) ) /4 // i n m2 u=Q/A.6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Q =0. // i n m/ s density =1180. // i n m2 u=Q/A. f =0.8*10^ -3.

18 sigma_F =2* f * u ^2* L / d . // i n Pa delta_P_coil = delta_P *(1+(3. // i n Kg/ s 21 power = mass_flow_rate * ws /1000. f =0. printf ( ” f r i c t i o n a l p r e s s u r e d r o p = %f kPa ” .17 Pressure loss 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 clc clear printf ( ” e x a m p l e 4 . delta_P_coil ) Scilab code Exa 4. 23 24 printf ( ” Energy c o s t = Rs %f ” . D =1 // i n m N =10 L =3.6.03 // i n m u =1.54*( d / D ) ) ) . 1 7 p a g e number 154 \ n\n ” ) // t o f i n d t h e p r e s s u r e l o s s density =998 // i n kg /m3 viscosity =0.0088.14* D * N .18 Pressure gradient 82 . energy_cost ) Scilab code Exa 4. // i n KW 22 energy_cost = power *24*0.0008 // i n Pa−s d =0. 19 ws =((9. 20 mass_flow_rate = Q * density .2 // i n m/ s Re = density * d * u / viscosity . delta_P =(2* f * u ^2* L ) / d .8.8*50) + sigma_F ) /0.

050 // i n m a =0. printf ( ” v o l u m e t r i c f l o w r a t e = %f c u b i c m e t e r p e r s e c o n d ” . e =40*10^6 // i n m f =0.001 Re = d_eq * u * density / viscosity .0062. // i n Pa/m printf ( ” p r e s s u r e p e r u n i t l e n g t h = %f Pa/m” .025 // i n m d_eq =b .14/4) * d ^2* u .63 // avg v e l o c i t y i n m/ s q = (3. P_perunit_length =2* f * density * u ^2/ d_eq .19 Flow rate 1 2 3 4 5 6 7 8 9 10 clc clear printf ( ” e x a m p l e 4 .3 // i n m u = 17.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 clc clear printf ( ” e x a m p l e 4 . P_perunit_length ) Scilab code Exa 4. 1 8 p a g e number 154 \ n\n ” ) // t o f i n d p r e s s u r e d r o p p e r u n i t l e n g t h b =0.q ) 83 .a // i n m density =1000 // i n kg /m3 u =3 // i n m/ s viscosity = 0. 1 9 p a g e number 155 \ n\n ” ) // t o f i n d t h e f l o w r a t e d = 0.

15 // i n m u = (0. // i n kg /m3 viscosity =0.21 Pressure gradient 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 clc clear printf ( ” e x a m p l e 4 .05 // i n m A =(3. density =1000. // i n Pa−s e =0. 2 1 p a g e number 160 \ n\n ” ) // t o f i n d t h e p r e s s u r e g r a d i e n t Q =0. // p a r t i c l e d i a m e t e r i n m 84 .0003 // i n m3/ s d =0.00125. // i n m/ s q = (3.Scilab code Exa 4. 2 0 p a g e number 156 \ n\n ” ) // t o f i n d t h e s i z e o f p i p e r e q u i r e d d = 0.14* d ^2) /4.001.14/4) * d ^2* u .20 Pipe dimensions 1 2 3 4 5 6 7 8 9 10 clc clear printf ( ” e x a m p l e 4 .3.q ) Scilab code Exa 4. u=Q/A. dp =0. printf ( ” v o l u m e t r i c f l o w r a t e = %f c u b i c m e t e r / s ” .0191/0.15^2) .

// i n Pa−s 12 umf =( d ^2*( density . // g i v e n t h a t uo / umf=10 function [ f ] = F ( e ) 85 . pressure_gradient = delta_P /( L *1000) . pressure_gradient ) Scilab code Exa 4. 10 density_water =1000 // i n kg /m3 11 viscosity =0.17 18 Re =( dp * u * density ) /( viscosity *(1 .9*10^ -3. // i n Pa 22 23 24 25 26 // a p p l y i n g b e r n o u l l i ’ s e q u a t i o n . // i n kPa /m printf ( ” r e q u i r e d p r e s s u r e g r a d i e n t = %f kPa /m o f p a c k e d h e i g h t ” . 13 printf ( ”minimum f l u d i z a t i o n v e l o c i t y = %f m/ s ” .22 Minimum fluidization velocity 1 clc 2 clear 3 printf ( ” e x a m p l e 4 . we g e t delta_P = delta_Pf -( density *9.5 // i n m 21 delta_Pf = fm *(( density * L * u ^2) / dp ) *((1 .e ) / e ^3) . 19 fm =(150/ Re ) +1.75.e_min ) ) .45. 20 L =0. 2 2 p a g e number 163 \ n\n ” ) 4 5 // t o f i n d minimum f l u i d i z a t i o n v e l o c i t y 6 7 d =120*10^ -6 // i n m 8 density =2500 // p a r t i c l e d e n s i t y i n kg /m3 9 e_min =0.8* e_min ^3) /(150* viscosity *(1 .8* L ) .e_min ) ) .density_water ) *9. umf ) 14 15 16 17 18 19 Re_mf =( d * umf * density_water ) /( viscosity *(1 .e ) ) .

21 endfunction 22 23 // i n i t i a l g u e s s 24 x = 10.657* e -1. power_taken = power_delivered /0.65. F ) . printf ( ” p o w e r d e l i v e r e d = %f kW” . 29 printf ( ” \n\ n r a t i o o f h e i g h t s = %f ” .23 Pumping of fluids 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 clc clear printf ( ” e x a m p l e 4 .e ) . 26 27 printf ( ” \n\ ne = %f ” . power_taken /1000) 86 .9. 2 3 p a g e number 167 \ n\n ” ) // t o f i n d t h e power r e q u i r e m e n t s P =9807 // i n Pa density =1000 // i n kg /m3 Q =250/(60* density ) head =25 // i n m w = head * Q * P . 25 e = fsolve (x . power_delivered /1000) 17 printf ( ” \n\ npower t a k e n by motor = %f kW” . // i n kW power_delivered = w /0.e ) 28 length_ratio =(1 .20 f = e ^3+1.e_min ) /(1 . length_ratio ) Scilab code Exa 4.675.

x =0.25 // i n m k =0.Chapter 5 Heat Transfer Scilab code Exa 5.Q ) Scilab code Exa 5. printf ( ” r a t e o f h e a t l o s s = %f W” .70 // i n W/mK Q = k * A *( delta_T / x ) .T2 . 1 p a g e number 171 \ n\n ” ) // t o f i n d t h e r a t e o f h e a t l o s s A =5*4 // i n m2 T1 =100.1 Heat conduction 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 clc clear printf ( ” e x a m p l e 5 .2 Heat conduction 87 . // i n K T2 =30. // i n K delta_T = T1 .

14* d2 * l Am =( A1 . // i n K delta_T = T1 . // i n K T2 =119. 1 p a g e number 171 \ n\n ” ) // t o f i n d t h e h e a t l o s s d1 =0.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 clc clear printf ( ” e x a m p l e 5 .T2 .8.A2 ) / log ( A1 / A2 ) . 3 p a g e number 172 \ n\n ” ) 4 5 // t o f i n d t h e r a t e o f h e a t l o s s 6 7 ri =0.3 Heat conduction through sphere 1 clc 2 clear 3 printf ( ” e x a m p l e 5 . T1 =120.15 // i n m d2 =0. k =50 // i n W/mK Q = k * Am *( delta_T / x ) . A2 =3.6. x =( d2 .5 // i n m 8 ro =0.d1 ) /2.16 // i n m l =1 // i n m A1 =3. // i n m 88 . printf ( ” r a t e o f h e a t l o s s p e r u n i t l e n g t h = %f W/m” . Q) Scilab code Exa 5.14* d1 * l .

12 // i n W/mK Q = k * Am *( delta_T / x ) . // i n m2 R1 = x1 /( k1 * A1 ) . // i n W/mK A1 =1. Am =( A1 * A2 ) ^0. // i n m k2 =0.046. 4 p a g e number 173 \ n\n ” ) // t o f i n d t h e h e a t l o s s from c o m p o s i t e w a l l // f o r t h e r e d b r i c k l a y e r x1 =0.250. // i n K/W R = R1 + R2 . // i n K To =50.020. // i n m2 R2 = x2 /( k2 * A2 ) .7. A2 =4*3. // i n K delta_T = Ti . x =0.R ) 89 .14* ri ^2.4 Composite wall 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 clc clear printf ( ” e x a m p l e 5 .To . Ti =140.1 // i n m k =0. // i n W/mK A2 =1. printf ( ” T o t a l r e s i s t a n c e = %f K/W” . printf ( ” Heat l o s s t h r o u g h s p h e r e = %f W” .14* ro ^2.9 10 11 12 13 14 15 16 17 18 19 20 21 A1 =4*3.5. // i n m k1 =0.Q ) Scilab code Exa 5. // i n K/W // f o r t h e f e l t l a y e r x2 =0.

24 Q = delta_T / R .d1 ) /2.14* d2 * l Am1 =( A2 . Q) Scilab code Exa 5. 90 .14* d1 * l . // r e s i s t a n c e by i n s u l a t i o n d2 =0.d2 ) /2. 5 p a g e number 173 \ n\n ” ) // t o f i n d t h e r a t e o f h e a t l o s s t h r o u g h p i p e l i n e // r e s i s t a n c e by p i p e l i n e d1 =0. A3 =3.15 // i n m d2 =0.16 // i n m l =1 // i n m A1 =3. x2 =( d3 . k1 =50 // i n W/mK R1 = x1 /( k1 * Am1 ) .14* d2 * l . 25 printf ( ” \n\ n h e a t l o s s t h r o u g h w a l l = %f W/ s q u a r e m” .5 Composite Pipeline 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 clc clear printf ( ” e x a m p l e 5 . // i n K 22 T2 =25 // i n K 23 delta_T = T1 .16 // i n m d3 =0.20 21 T1 =110.26 // i n m l =1 // i n m A2 =3.T2 . A2 =3.A1 ) / log ( A2 / A1 ) . x1 =( d2 .14* d3 * l Am2 =( A3 .A2 ) / log ( A3 / A2 ) .

printf ( ” t o t a l r e s i s t a n c e = %f K/W” . // i n K delta_T = T1 .1.Q ) 91 . // i n m x2 = 0.25. printf ( ” h e a t t r a n s f e r r a t e = %f W” . 6 p a g e number 174 \ n\n ” ) // t o f i n d t h e i n c r e a s e i n h e a t t r a n s f e r r a t e x1 =0. // i n W/mK k_ib =0. Q = delta_T / R .93.6 // i n W/mK A =0.T2 . R = R1 + R2 .Q ) Scilab code Exa 5.08 // i n W/mK R2 = x2 /( k2 * Am2 ) . T1 =225 // i n K T2 =37 // i n K delta_T = T1 .6 Parellel Resistance 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 clc clear printf ( ” e x a m p l e 5 . // i n m k_rb =0.116 // i n W/mK k_al =203.26 27 28 29 30 31 32 33 34 35 36 37 k2 =0.R ) T1 =120. printf ( ” \n\ n h e a t l o s s = %f W/m” . Q = delta_T / R . // i n K T2 =40.T2 .1 // i n m2 // t o f i n d r e s i s t a n c e w i t h o u t r i v e t s R =(1/ A ) *(( x1 / k_rb ) +( x2 / k_ib ) ) .

03 // i n m 24 rivet_area = (3.1. 27 R_cl =( A / area_norivet ) * R . 29 Q_new = delta_T / R_eq .rivet_area . // i n m x2 = 0.21 22 // t o f i n d r e s i s t a n c e w i t h r i v e t 23 d =0. 28 R_eq =1/(1/ R_r +1/ R_cl ) .Q ) / Q ) *100.6 // i n W/mK A =0. // i n W/mK k_ib =0. T1 =225 // i n K T2 =37 // i n K 92 . increase ) Scilab code Exa 5.25.7 Heat transfer coefficient 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 clc clear printf ( ” e x a m p l e 5 .93. 25 R_r =( x1 + x2 ) /( k_al * rivet_area ) . 6 p a g e number 174 \ n\n ” ) // t o f i n d t h e i n c r e a s e i n h e a t t r a n s f e r r a t e x1 =0.116 // i n W/mK k_al =203. Q_new ) increase =(( Q_new . // i n m k_rb =0. 26 area_norivet =A .1 // i n m2 // t o f i n d r e s i s t a n c e w i t h o u t r i v e t s R =(1/ A ) *(( x1 / k_rb ) +( x2 / k_ib ) ) . 30 31 printf ( ” \n\ nRate o f h e a t t r a n s f e r 32 33 w i t h r i v e t = %f W” . printf ( ” \n\ n p e r c e n t a g e i n c r e a s e i n h e a t t r a n s f e r r a t e = %f ” .14/4) * d ^2.

Q_new ) 32 increase =(( Q_new .8 Heat transfer coefficient 1 2 3 4 5 6 7 8 9 10 11 12 13 14 clc clear printf ( ” e x a m p l e 5 . Pr =( cp * viscosity ) / k . 29 Q_new = delta_T / R_eq . increase ) Scilab code Exa 5.rivet_area . 25 R_r =( x1 + x2 ) /( k_al * rivet_area ) . 27 R_cl =( A / area_norivet ) * R . 19 Q = delta_T / R . 30 31 printf ( ” \n\ nRate o f h e a t t r a n s f e r w i t h r i v e t = %f W” . 26 area_norivet =A .657 // i n W/mK cp =4178 // i n J / kg K d =0. 28 R_eq =1/(1/ R_r +1/ R_cl ) . 8 p a g e number 188 \ n\n ” ) // t o f i n d t h e h e a t t r a n s f e r c o e f f i c i e n t density =984.03 // i n m 24 rivet_area = (3. 93 .1 // i n kg / c u b i c m e t e r v =3 // i n m/ s viscosity =485*10^ -6.14/4) * d ^2.18 delta_T = T1 .T2 .016 // i n m Re =( density * v * d ) / viscosity . 20 printf ( ” h e a t t r a n s f e r r a t e = %f W” . // i n Pa−s k =0.Q ) / Q ) *100. 33 printf ( ” \n\ n p e r c e n t a g e i n c r e a s e i n h e a t t r a n s f e r r a t e = %f ” .Q ) 21 22 // t o f i n d r e s i s t a n c e w i t h r i v e t 23 d =0.

14.8* Pr ^(1/3) *( k / d ) *( viscosity / viscosity_w ) ^0.h ) 19 20 // S i e d e r Tate e q u a t i o n 21 viscosity_w =920*10^ -6 22 h1 =0.15 16 // d i t t u s b o e l t e r e q u a t i o n 17 h =0. 9 p a g e number 191 \ n\n ” ) 4 5 // t o f i n d t h e s u r f a c e t e m p e r a t u r e o f e a r t h 6 T_sun = 5973 // i n d e g r e e C 7 d = 1. h1 ) c o e f f i c i e n t = %f W/ s q Scilab code Exa 5. 23 printf ( ” \n\ n h e a t t r a n s f e r m e t e r K” .5) * T_sun . // i n cm 9 10 T_earth = (( R /(2* d ) ) ^0.1*10^10.023* Re ^0. T_earth -273) Scilab code Exa 5.023* Re ^0.8* Pr ^0.5*10^13 // i n cm 8 R = 7. 11 printf ( ” T e m p e r a t u r e o f e a r t h = %f C” .3*( k / d ) . 18 printf ( ” h e a t t r a n s f e r c o e f f i c i e n t = %f W/ s q m e t e r K” .9 Earth Temperature 1 clc 2 clear 3 printf ( ” e x a m p l e 5 .10 Earth Temperature 1 clc 2 clear 3 printf ( ” e x a m p l e 5 . 1 0 p a g e number 191 \ n\n ” ) 4 94 .

5*10^13.12 Equilibrium temperature 1 2 3 4 5 6 7 8 9 10 11 clc clear printf ( ” e x a m p l e 5 .5. 1 1 p a g e number 192 \ n\n ” ) // t o f i n d t h e e q u i l i b r i u m t e m p e r a t u r e R =6. // i n K l =1. printf ( ” E q u i l i b r i u m t e m p e r a t u r e = %f K” . printf ( ” E q u i l i b r i u m t e m p e r a t u r e = %f K” . To ) 95 .25* Ts . 1 2 p a g e number 192 \ n\n ” ) // t o f i n d t h e e q u i l i b r i u m t e m p e r a t u r e view_factor =0.5 6 7 8 9 10 // t o f i n d t e m p e r a t u r e o f e a r t h R =7*10^10.92*10^5 // i n km l =14. // i n cm Ts =6000.25) * Ts . To ) Scilab code Exa 5.25* Ts . To ) Scilab code Exa 5. // i n K To =( R ^2/ l ^2) ^0. // i n m To =(( R ^2/(4* l ^2) ) ^0.92*10^5 // i n km l =14. R =6.97*10^7 // i n km Ts =6200.11 Equilibrium temperature 1 2 3 4 5 6 7 8 9 10 clc clear printf ( ” e x a m p l e 5 . printf ( ” t e m p e r a t u r e o f e a r t h = %f K” .97*10^7 // i n km Ts =6200. // i n K To =( view_factor *( R ^2/ l ^2) ) ^0.

1 4 p a g e number 193 \ n\n ” ) // t o f i n d t h e s o l a r c o n s t a n t R =7*10^10. printf ( ” s o l a r c o n s t a n t = %f J / s q cm min ” .25.2.3*10^ -5. printf ( ” E q u i l i b r i u m t e m p e r a t u r e = %f K” . To ) Scilab code Exa 5. 1 3 p a g e number 193 \ n\n ” ) // t o f i n d t h e s u r f a c e t e m p e r a t u r e view_factor =0.5*10^13 // i n cm Ts =5973.1. // i n cm l =1. ratio = alpha / epsilon .5*10^13.14 Solar constant 1 2 3 4 5 6 7 8 9 10 11 12 clc clear printf ( ” e x a m p l e 5 . // i n e r d / s ( cm2 ) (K) 4 T =6000. epsilon =0. R =7. // i n K S =( R / l ) ^2*( sigma ) *( T ^4) *60. // i n K alpha =0.Scilab code Exa 5. To =( ratio * view_factor *( R ^2/ l ^2) ) ^0.1*10^10 // i n cm l =1.S /10^7) 96 .13 Temperature calculation 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 clc clear printf ( ” e x a m p l e 5 . // i n cm sigma =5.25* Ts .

01 xL = 0.L .5 // i n kJ / kg hs = 461.L * hL . printf ( ”L = %f Kg/ h r \n V = %f kg / h r ” .S ) q = S *( Hs .30 // i n kJ / kg S = ( F * hF .2 // i n K Hv = 2676. 1 5 p a g e number 207 \ n\n ” ) 4 5 // t o f i n d t h e amount o f v a p o r and l i q u i d and amount of heat t r a n s f e r 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 F = 5000 // i n kg / h r xF = 0. V = F-L.15 Evaporator 1 clc 2 clear 3 printf ( ” e x a m p l e 5 .U ) 97 .04.2 // i n K Hs = 2691. q = q *1000/3600 // c o n v e r s i o n t o Watt U = q /(69. printf ( ” \n\ namount o f steam = %f kg steam / h ” .02.hs ) . printf ( ” \n\ n h e a t r e a n s f e r c o e f f i c i e n t = %f W/ s q m K” .Scilab code Exa 5.9*10) . L = F * xF / xL .9 // i n KJ/ kg T1 = 373. V ) TF = 303 // i n K hF = 125. // i n kJ / kg Ts = 383.V * Hv ) /( hs .Hs ) .1 // i n kJ / kg hL = 419.

V ) F = 6000 // i n kg / h r xF = 0.5 -3187. b2 ]. xL = F * xF / L .Scilab code Exa 5. printf ( ”L = %f kg / h r \nV = %f kg / h r ” .30. xL *100) Scilab code Exa 5. 11 12 13 14 15 16 17 18 19 20 21 22 b x L V = = = = [ b1 .56*461.16 Evaporator 1 clc 2 clear 3 printf ( ” e x a m p l e 5 .1 1]. // d a t a from p r e v i o u s p r o b l e m 9 b2 = 6000. x (1) .01.79+3187. 10 A = [419. 1 6 p a g e number 208 \ n\n ” ) 4 5 // t o f i n d t h e amount o f l i q u i d and v a p o r l e a v i n g and outlet concentration 6 // we have two l i n e a r e q u a t i o n s i n L and V s o we w i l l w r i t e them i n form o f a m a t r i x and t h e n s o l v e using p r i n c i p l e s of l i n e a r algebra 7 8 b1 = 6000*125. x (2) . A\b.17 Evaporator 98 . printf ( ” \n\ n p e r c e n t a g e i n c r e a s e i n o u t l e t c o n c e n t r a t i o n = %f ” .L .04 2676.56*2691.1.

93+2500*2635.2.3 -5000*125. // i n W/m2 K delta_T = 383.30) .5 . 1 7 p a g e number 209 \ n\n ” ) // t o f i n d t h e c h a n g e i n h e a t t r n a s f e r a r e a Hv =2635.79) /(2691.S ) 11 12 13 14 15 16 17 18 19 q = S *(2691. // i n K A = q /( U * delta_T ) .13.30) .2 -348. 10 printf ( ” steam f l o w r a t e = %f kg steam / h r ” .3 // kJ / kg hL =313.A ) printf ( ” \n\ n i n t h i s c a s e a c o n d e n s o r and vaccum pump s h o u l d be u s e d ” ) 99 . q = q *1000/3600 // i n W U = 2833.5 -461.93 // i n kJ / kg S =(2500*313.1 2 3 4 5 6 7 8 9 clc clear printf ( ” e x a m p l e 5 . printf ( ” \n\ nArea = %f s q m e t e r ” .461.

2 p a g e number 214 \ n\n ” ) 4 5 printf ( ” T h i s i s a t h e o r i t i c a l p r o b l e m and book s h a l l be r e f e r r e d f o r s o l u t i o n ” ) 100 .2 Absorption 1 clc 2 clear 3 printf ( ” e x a m p l e 6 . 1 p a g e number 213 \ n\n ” ) 4 5 printf ( ” T h i s i s a t h e o r i t i c a l p r o b l e m and book s h a l l be r e f e r r e d f o r s o l u t i o n ” ) Scilab code Exa 6.1 Diffusivity 1 clc 2 clear 3 printf ( ” e x a m p l e 6 .Chapter 6 Mass Transfer Scilab code Exa 6.

15 // i n m 8 P =1. p_A2 ) Scilab code Exa 6.4 Resistane to diffusion 1 clc 2 clear 3 printf ( ” e x a m p l e 6 .5*10^4 // i n Pa 101 .75*10^ -5 // i n m2/ s Z =0.3 Equimolar counter diffusion 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 clc clear printf ( ” e x a m p l e 6 .03 // i n m R =8314 p_A1 =5.02.p_A2 ) /( R * T * Z ) . 4 p a g e number 216 \ n\n ” ) 4 5 // t o f i n d t h e f l u x o f NH3 and e q u i m o l a r c o u n t e r diffusion flux 6 7 Z =0.5*10^4 // i n Pa T =298 // i n K N_A = D_AB *( p_A1 . // i n m p_A2 = p_A1 -(( N_A * R * T * Z ) / D_AB ) .103*10^5 // i n Pa 9 p_A1 =1.5*10^4 // i n Pa p_A2 =1. printf ( ” \n\ n p r e s s u r e = %f Pa” .Scilab code Exa 6. 3 p a g e number 215 \ n\n ” ) // t o f i n d t h e f l u x and p r e s s u r e d i f f e r e n c e D_AB =6. printf ( ” f l u x = %f kmol / s q m s ” . N_A ) // f o r p a r t i a l p r e s s u r e Z =0.

5 p a g e number 216 \ n\n ” ) 4 printf ( ” T h i s i s a t h e o r i t i c a l p r o b l e m and book s h a l l be r e f e r r e d f o r s o l u t i o n ” ) Scilab code Exa 6.p_A2 ) * P /( R * T * Z * p_BM ) . printf ( ” f l u x = %f kmol / s q m s ” . printf ( ” \n\ n f l u x = %f kmol / s q m s ” .p_A2 ) /( R * T * Z ) .5 Vapor diffusion 1 clc 2 clear 3 printf ( ” e x a m p l e 6 . N_A ) // f o r d i f f u s i n g N2 N_A = D_AB *( p_A1 .5 // m o l a r mass o f HCl 102 .p_A2 .30*10^ -5 R =8314 T =298 // i n K // i n m2/ s // f o r non d i f f u s i n g N2 p_BM =( p_B2 . N_A ) Scilab code Exa 6.p_B1 ) / log ( p_B2 / p_B1 ) . 6 p a g e number 218 \ n\n ” ) 4 5 M_A =36.10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 p_A2 =5*10^3 // i n Pa p_B1 =P .p_A1 .6 Flux of HCl 1 clc 2 clear 3 printf ( ” e x a m p l e 6 . D_AB =2. N_A = D_AB *( p_A1 . p_B2 =P .

28 Z =0. 30 N_A =( D_AB * C_av *( x_A1 .w_A2 ) / M_B ) ) .w_A2 ) / M_B ) ) . 18 x_B2 =1 . M1 ) 15 16 // a t p o i n t 2 17 x_A2 =( w_A2 / M_A ) /(( w_A2 / M_A ) +((100 . 31 printf ( ” \n\ n f l u x = %f kmol / s q m−s ” .5*10^ -9.15.x_A1 . x_A1 ) 11 12 x_B1 =1 . // w e i g h t % o f HCL 8 w_A2 =4 // w e i g h t % o f HCL 9 x_A1 =( w_A1 / M_A ) /(( w_A1 / M_A ) +((100 .7.7 Vaporization 1 clc 2 clear 3 printf ( ” e x a m p l e 6 . M2 ) 21 22 density_1 =1060.w_A1 ) / M_B ) ) . 13 M1 =100/(( w_A1 / M_A ) +((100 . 25 printf ( ” \n\ nC av = %f kmol / c u b i c m” . 19 M2 =100/(( w_A2 / M_A ) +((100 .x_B1 ) /( log ( x_B2 / x_B1 ) ) . 7 p a g e number 220 \ n\n ” ) 4 5 printf ( ” T h i s i s a t h e o r i t i c a l p r o b l e m and book s h a l l 103 . 10 printf ( ’ x A1 =%f ’ .004 // i n m 29 D_AB =2. // avg molecular weight at point 2 20 printf ( ” \n\ n m o l a r mass a t p o i n t 2 = %f Kg/ kmol ” .x_A2 . 14 printf ( ” \n\ n m o l a r mass a t p o i n t 1 = %f kg / kmol ” . N_A ) Scilab code Exa 6. // i n kg /m3 23 density_2 =1020.6 M_B =18 // m o l a r m a s s s o f w a t e r 7 w_A1 =12. C_av ) 26 27 x_BM =( x_B2 .x_A2 ) ) /( x_BM * Z ) .w_A1 ) / M_B ) ) . // i n kg /m3 24 C_av =(( density_1 / M1 ) +( density_2 / M2 ) ) /2.

8 p a g e number 229 \ n\n ” ) 4 5 // t o f i n d t h e mean d r i v i n g f o r c e and mass t r a n s f e r area 6 7 8 9 10 11 12 13 14 15 16 17 18 19 Gs =700/22.delta_Y2 ) /( log ( delta_Y1 / delta_Y2 ) ).y1 ) .68* X1 .4 // i n kmol a c e t o n e / kmol d r y a i r 24 A = m /( K_G * delta_Y ) .Y2 ) .A ) 104 . 25 printf ( ” \n\ n a r e a = %f s q m” . X2 =0 X1 =( Gs / Ls ) *( Y1 .4 // i n kmol o f d r y a i r / h r Ls =1500/18 // i n kmol o f d r y a i r / h r y1 =0. Y2 =0. delta_Y ) 21 22 // mass t r a n s f e r a r e a 23 K_G =0.05 Y1 = y1 /(1 .be r e f e r r e d f o r s o l u t i o n ” ) Scilab code Exa 6.Y2 ) . 20 printf ( ” d r i v i n g f o r c e = %f kmol a c e t o n e / kmol d r y a i r ” .02* Y1 . // d r i v i n g f o r c e delta_Y1 = Y1 -1.8 Gas Absorption 1 clc 2 clear 3 printf ( ” e x a m p l e 6 . m = Gs *( Y1 . delta_Y =( delta_Y1 .68* X2 . delta_Y2 = Y2 -1.

X2 ) . 9 p a g e number 229 \ n\n ” ) // t o c a l c u l a t e minimum o i l circulation rate G1 =(855/22.Y2 ) ) /( X1 .x2 ) .32 // kPa 7 P_W = 12.33 // i n kpA 105 .02.Scilab code Exa 6. Y =0. x2 =0. // f o r 95% r e m o v a l Y2 =0.6/101.204.9 Equilibrium Composition 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 clc clear printf ( ” e x a m p l e 6 . X2 = x2 /(1 .y1 ) .y1 ) .05* Y1 . 20 Ls = Ls_molar *260. Ls ) Scilab code Exa 6.10 Equilibrium Composition 1 clc 2 clear 3 printf ( ” e x a m p l e 6 .4) *(106. y1 =0.7) . Y1 = y1 /(1 .005.176. X1 =0. // i n kmol b g e n z e n e / kmol b e n z e n e f r e e oil 18 19 Ls_molar =( Gs *( Y1 .3) *(273/299. 21 22 printf ( ”minimum o i l c i r c u l a t i o n r a t e = %f kg / h r ” . Gs = G1 *(1 . 1 0 p a g e number 231 \ n\n ” ) 4 5 // t o f i n d t h e e q u i l i b r i u m c o m p o s i t i o n 6 P_M = 53.

0.0.0.11 Vapor Liquid Equilibrium 1 clc 2 clear 3 printf ( ” e x a m p l e 6 .192. plot (x .8 P = 40 // IN K pA 9 x = ( P . book s h a l l be r e f e r r e d f o r s o l u t i o n ” ) Scilab code Exa 6. 1 1 p a g e number 232 \ n\n ” ) 4 5 printf ( ” t h i s i s a t h e o r i t i c a l q u e s t i o n .78.0.0]. y ) 106 . 1 2 p a g e number 231 \ n\n ” ) // t o f i n d t h e t o p and bottom c o m p o s i t i o n x = [1.1:1. y = 0:0.x ) 12 13 y = P_M * x / P .0.40.69.P_W ) .0].1775. 14 printf ( ” \n\ n v a p o r p h a s e c o m p o s i t i o n = %f ” .12 Distillation Column 1 2 3 4 5 6 7 8 9 10 11 12 13 14 clc clear printf ( ” e x a m p l e 6 .932.538.P_W ) /( P_M .0. 10 11 printf ( ” l i q u i d p h a s e c o m p o s i t i o n = %f ” .1:1.045. plot (x .0.y ) Scilab code Exa 6. y = [1. y ) xlabel ( ” x ” ) ylabel ( ” y ” ) title ( ” d i s t i l l a t i o n c u r v e ” ) x = 0:0.0.

5 .2:0.2) /0.45 -0. x_W =0.15 16 17 18 19 20 21 22 23 x = [0.5. 1 3 p a g e number 237 \ n\n ” ) // t o f i n d t h e c o m p o s i t e d i s t i l l a t e and r e s i d u e F = 100 // m o l e s xf = 0. end 107 .69. z ( i ) = ( y ( i ) -x ( i ) ) ^ -1.4.7].31].45.0.16* x ( i ) /(1+1.05) +1 y ( i ) = 2. y = [0. y ) Z =0. D = 60 // m o l e s W = 40 // m o l e s x = 0.5 . y_D =0. for i =1:((0.16* x ( i ) ) . x_W *100) Scilab code Exa 6.0.31. y_D *100) 24 printf ( ” \n\ n c o m p o s i t i o n o f bottom p r o d u c t = %f mole p e r c e n t o f h e x a n e ” .13 Distillation 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 clc clear printf ( ” e x a m p l e 6 .05:0. plot (x . printf ( ” c o m p o s i t i o n o f t o p p r o d u c t = %f mole p e r c e n t o f h e x a n e ” .

21 22 plot (x . 1 5 p a g e number 249 \ n\n ” ) // t o f i n d t h e t o p and bottom p r o d u c t c o m p o s i t i o n // p a r t 1 x =0.4. // from t h e g r a p h 27 yd = ( F * xf .z ’/10) 23 title ( ’ Batch D i s t i l l a t i o n Curve ’ ) 24 xlabel ( ’ x ’ ) 25 ylabel ( ’ y ’ ) 26 xw = 0. xw ) Scilab code Exa 6.W * xw ) / D . // bottom c o n c e n t r a t i o n 108 .8. x_D = y .15 Mcabe Thiele Method 1 2 3 4 5 6 7 8 9 10 11 clc clear printf ( ” e x a m p l e 6 . y =0.22. 28 29 printf ( ” c o m p o s i t i o n o f d i s t i l l a t e = %f ” . 1 4 p a g e number 238 \ n\n ” ) 4 5 printf ( ’ t h i s i s a t h e o r i t i c a l q u e s t i o n and s o l u t i o n can be r e f e r r e d from t h e book ’ ) Scilab code Exa 6.135. yd ) 30 printf ( ” \n\ n c o m p o s i t i o n o f r e s i d u e = %f ” .14 Steam Distillation 1 clc 2 clear 3 printf ( ” e x a m p l e 6 . x_W =0.

// kg k e r o s c e n e X1 = A0 * X0 /( A0 + B0 *0. y_W = (1/3) * x_D +(2/3) * x1 . D =(100*( x .y_W ) ) ) .12 D =(100* x -100* x_W ) /( y . // r e l a t i v e v o l a t i l i t y 17 x_R = y /( y +( alpha *(1 .X1 ) .x_W ) .c ) 109 .x_W ) . printf ( ” \n\ namount o f d i s t i l l a t e = %f m o l e s /h ” .D ) 14 15 // p a r t 2 16 alpha =6.01.y ) ) ) .D ) Scilab code Exa 6. //% o f n i c o t i n e X0 = x /(1 . printf ( ” f i n a l c o n c e n t r a t i o n o f n i c o t i n e = %f ” .x ) .x_W ) ) /( y . B0 =250. x_R ) y1 =(1/3) * y +(2/3) * x . x_W = y_W /( y_W +( alpha *(1 . printf ( ” \n\ namount o f n i c o t i n e removed = %f kg ” .y1 ) ) ) . // l i q u i d l e a v i n g p a r t i a l 18 19 20 21 22 23 24 25 26 condensor printf ( ” \n\ n l i q u i d l e a v i n g p a r t i a l c o n d e n s e r = %f ” . 1 6 p a g e number 264 \ n\n ” ) // t o f i n d t h e p e r c e n t a g e e x t r a c t i o n o f n i c o t i n e x =0. w =150 // w e i g h t o f n i c o t i n e w a t e r s o l u t i o n A0 = w *(1 . X1 ) c = A0 *( X0 .X0 ) .16 Liquid liquid extraction 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 clc clear printf ( ” e x a m p l e 6 .798) . // d i s t i l l a t e amount 13 printf ( ” amount o f d i s t i l l a t e =%f m o l e s / h” . x1 = y1 /( y1 +( alpha *(1 .

number_of_stages ) Scilab code Exa 6. // i n kg k e r o s e n e / h Y1 =(( A0 *( X0 .X0 ) . // i n kg n i c o t i n e / kg w a t e r YN = yN /(1 .18 Humidity calculation 110 .yN ) . Y1 ) 18 19 20 21 // f o r g r a p h r e f e r t o t h e book number_of_stages = 8.16 17 18 percentage = ( c *100) /( A0 * x ) . 1 7 p a g e number 264 \ n\n ” ) // t o f i n d t h e number o f s t a g e s x =0.0006. printf ( ” \n\ nnumnber o f s t a g e s = %f ” . percentage ) Scilab code Exa 6.x ) .YN ) . // i n kg n i c o t i n e / kg kerosene 17 printf ( ”Y1 = %f kg n i c o t i n e / kg k e r o s e n e ” . printf ( ” \n\ n p e r c e n t a g e r e c o v e r y = %f p e r c e n t ” . // mole f r a c t i o n i n s o l v e n t xN = 0.xN ) . // k g w a t e r / h B0 =150*(1 . // f i n a l mole f r a c t i o n i n w a t e r X0 = x /(1 .17 Liquid liquid extraction 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 clc clear printf ( ” e x a m p l e 6 .01 // mole f r a c t i o n o f n i c o t i n e yN = 0.4.XN ) ) / B0 ) + YN . A0 =100*(1 .001. // i n kg n i c o t i n e / kg k e r o s c e n e XN = xN /(1 .

printf ( ” \n\ n p e r c e n t a g e r e l a t i v e h u m i d i t y = %f p e r c e n t ” .p_AS ) ) . printf ( ” \n\ n S a t u r a t e d h u m i d i t y = %f kg H2O/ kg a i r ” .02/28.pA ) ) .19 Drying operation 1 2 3 4 5 6 7 8 9 10 clc clear printf ( ” e x a m p l e 6 .415 // i n kPa H = (18.74 // i n kPa p_AS = 7. 1 8 p a g e number 274 \ n\n ” ) // t o c a l c u l a t e t h e h u m i d i t y P = 101. printf ( ” \n\ n p e r c e n t a g e h u m i d i t y = %f p e r c e n t ” . 1 7 p a g e number 264 \ n\n ” ) // t o f i n d t h e a i r f l o w r a t e and o u t l e t h u m i d i t y S =425. %_humidity ) relative_humidity = 100*( pA / p_AS ) .97) *( p_AS /( P . relative_humidity ) Scilab code Exa 6.02/28.035 // i n k g w a t e r / kg d r y s o l i d t_s1 =25 // i n d e g r e e C X2 = 0.H ) Hs = (18. Hs ) %_humidity = 100*( H / Hs ) .3 // i n kPa pA = 3.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 clc clear printf ( ” e x a m p l e 6 .6 // i n kg /h X1 = 0.017 // i n kg H2O/ kg d r y a i r t_s2 =60 // i n d e g r e e C 111 . printf ( ” h u m i d i t y = %f kg H2O/ kg a i r ” .97) *( pA /( P .

G ) printf ( ” \n\ nHumidity .664]. 3 9 8 = 2 5 6 2 .187 // i n kg / kg H2O K 16 17 H_G2 =(1. 18 H_S1 = C_pS *( t_s1 -0) + X1 * C_pA *( t_s1 -0) . 2 0 p a g e number 291 \ n\n ” ) 112 .2 // i n d e g r e e C 13 t_G1 = 32.20 Crystallization 1 clc 2 clear 3 printf ( ” e x a m p l e 6 . H1 = %f kg d r y a i r / h r ” . G = %f kg d r y a i r / h r ” . G = x (1) .005+1.88* H2 ) *( t_G2 -0) + H2 *2501. 1 7 2 4 8 = GH1 and 9 8 . 6 6 4 GH1 A = [0.465 // i n kJ / kg d r y s o l i d 15 C_pA = 4.398].0175 -1.11 H2 = 0. we g e t two linear equations // 0 . HG2 = %f kJ / kg d r y a i r ” . b = [ -14.194 -2562. H1 = x (2) / G . H_S2 ) 25 26 27 28 29 30 31 32 33 34 // a p p l y i n g GHg2 + SHs1 = GHg1 +SHs2 +Q. x = A\b. H_S1 ) 24 printf ( ” \n\ n E n t h a l p y o f e x i t s o l i d . printf ( ” \n\ n A i r f l o w r a t e .0175 // i n kg H2O/ kg d r y a i r 12 t_G2 = 84. // i n kJ / kg 19 H_S2 = C_pS *( t_s2 -0) + X2 * C_pA *( t_s2 -0) . // i n kJ / h 21 22 printf ( ” L a t e n t h e a t o f w a t e r a t 0C .29745.98. HS1 = %f kJ / kg d r y a i r ” . 1 9 4G− 2 9 7 4 5 . HS2 = %f kJ / kg d r y a i r ” .17248.8 // i n d e g r e e C 14 C_pS = 1. // i n kJ / kg 20 Q =9300. 0 1 7 5G+ 1 4 . H_G2 ) 23 printf ( ” \n\ n E n t h a l p y o f e n t e r i n g s o l i d . H1 ) Scilab code Exa 6.

7 3 8 0 L + 0 .8230 0. 2 1 p a g e number 291 \ n\n ” ) 4 5 // t o f i n d t h e c r y s t a l y i e l d 6 // from m a t e r i a l b a l a n c e . C = x (2) . // s o l v i n g m a t e r i a l b a l a n c e .L ) printf ( ” \n\nC = %f kg o f Na2CO3 .1769 0.3703] b = [3500. w_Na2CO3 = 5000 // i n kg %_water = 0.C ) Scilab code Exa 6. 6 2 9 6C = 3 5 0 0 // e q u a t i o n 2 −> 0 .2619 0. 8 2 3 0 L + 0 . 2 6 1 9 L + 0 .600] 113 . L = x (1) . 1 7 6 9 L + 0 .6296.0. 5 1 1 7C and 600 = 0 .05 //% o f w a t e r e v a p o r a t e d W = %_water * w_Na2CO3 . 1 0 H2O c r y s t a l s ” . we have two l i n e a r equations 7 // 1 4 0 0 = 0 .4882] 10 b = [1400.0. 4 8 8 2C 8 9 A =[0.7380 0.21 Crystallization 1 clc 2 clear 3 printf ( ” e x a m p l e 6 .2.2 M_Na2CO3_10H2O = 286. we have two e q u a t i o n s // e q u a t i o n 1 −> 0 .5117. 3 7 0 3C = 1 2 5 0 A =[0. printf ( ”L = %f kg s o l u t i o n ” .4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 // t o f i n d t h e c r y s t a l y i e l d M_Na2CO3 = 106 M_10H2O = 180.1250] x = A\b.

L = x (1) .C ) F = 2000 // i n kg /h cv = 2. 7 H2O heat_soln = -13.93 // i n kJ / kg K H1 = F * cv *(330 -293) .L ) printf ( ” \n\nC = %f kg o f MgSO4 . H1 ) wt = 246. heat_crystallization = abs ( heat ) .49 // m o l a r mass MgSO4 . H2 = heat_crystallization * C .H2 . // i n kJ / kg mol heat = heat_soln / wt .31*10^3.q ) 114 . 7 H2O c r y s t a l s ” . printf ( ” \n\ n h e a t a b s o r b e d = %f kJ \ n t h u s h e a t s h a l l be removed ” . printf ( ” \n\ n e n t h a l p y o f f e e d = %f kJ ” . // t o t a l h e a t q = -H1 .11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 x = A\b. C = x (2) . printf ( ”L = %f kg s o l u t i o n ” .

book s h a l l be r e f e r r e d f o r s o l u t i o n ”) Scilab code Exa 7.3 Rate of reaction 115 . book s h a l l be r e f e r r e d f o r s o l u t i o n ”) Scilab code Exa 7. 1 p a g e number 305 \ n\n ” ) 4 5 printf ( ” i t i s a t h e o r i t i c a l problem .Chapter 7 Chemical Kinetics Scilab code Exa 7.2 Rate of reaction 1 clc 2 clear all 3 printf ( ” e x a m p l e 7 .1 Constant volume reaction 1 clc 2 clear 3 printf ( ” e x a m p l e 7 . 2 p a g e number 306 \ n\n ” ) 4 printf ( ” i t i s a t h e o r i t i c a l problem .

// a c c o r d i n g t o t h e r a t e r e a c t i o n 18 printf ( ” \n\ n r e a c t i o n r e a t e w i l l be i n c r e a s e d by w i t h 3 t i m e s i n c r e a s e i n c o n c o f NO = %f t i m e s ” .r ) 16 17 r = 3^2.4 Order of reaction 1 clc 2 clear all 3 printf ( ” e x a m p l e 7 .1 clc 2 clear all 3 printf ( ” e x a m p l e 7 .5 Rate Expression 116 . 4 p a g e number 308 \ n\n ” ) 4 5 printf ( ” i t i s a t h e o r i t i c a l problem .r ) 12 13 // p a r t 2 14 r = 3^2*3. // a c c o r d i n g t o t h e r a t e r e a c t i o n 11 printf ( ” r e a c t i o n r e a t e w i l l be i n c r e a s e d by w i t h 3 t i m e s i n c r e a s e i n p r e s s u r e = %f t i m e s ” . 3 p a g e number 305 \ n\n ” ) 4 5 // t o f i n d t h e c h a n g e on r a t e o f r e a c t i o n 6 // p a r t 1 7 // r a t e e q u a t i o n r = kC NOˆ2∗ C O2 8 // i f p r e s s u r e i n c r e a s e s 3 t i m e s 9 10 r = 3^2*3.r ) Scilab code Exa 7. // a c c o r d i n g t o t h e r a t e r e a c t i o n 15 printf ( ” \n\ n r e a c t i o n r e a t e w i l l be i n c r e a s e d by w i t h 3 t i m e s d e c r e a s e i n volume = %f t i m e s ” . book s h a l l be r e f e r r e d f o r s o l u t i o n ”) Scilab code Exa 7.

5 p a g e number 308 \ n\n ” ) 4 5 printf ( ” i t i s a t h e o r i t i c a l problem . 8 p a g e number 312 \ n\n ” ) 117 .8 Entropy changes 1 clc 2 clear all 3 printf ( ” e x a m p l e 7 .6 Volume function 1 clc 2 clear all 3 printf ( ” e x a m p l e 7 .7 Pressure time relation 1 clc 2 clear all 3 printf ( ” e x a m p l e 7 . book s h a l l be r e f e r r e d f o r s o l u t i o n ”) Scilab code Exa 7. 6 p a g e number 308 \ n\n ” ) 4 5 printf ( ” i t i s a t h e o r i t i c a l problem . 7 p a g e number 309 \ n\n ” ) 4 5 printf ( ” i t i s a t h e o r i t i c a l problem . book s h a l l be r e f e r r e d f o r s o l u t i o n ”) Scilab code Exa 7. book s h a l l be r e f e r r e d f o r s o l u t i o n ”) Scilab code Exa 7.1 clc 2 clear all 3 printf ( ” e x a m p l e 7 .

y = fsolve (x . moles_B = 5. 9 p a g e number 312 \ n\n ” ) 4 5 printf ( ” t h i s i s a t h e o r e t i c a l q u e s t i o n .4 5 printf ( ” i t i s a t h e o r i t i c a l problem .y *(100/3) ) 118 . printf ( ” amount o f A t r a n s f o r m e d = %f p e r c e n t ” . 1 0 p a g e number 316 \ n\n ” ) // t o f i n d t h e % t r a n s f o r m a t i o n moles_A = 3. function [ f ] = F ( x ) f = 15 -8* x . book s h a l l be r e f e r r e d f o r s o l u t i o n ” ) Scilab code Exa 7.10 Equilibrium conversion 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 clc clear printf ( ” e x a m p l e 7 . endfunction // i n i t i a l g u e s s x = 10. F ) . book s h a l l be r e f e r r e d f o r s o l u t i o n ”) Scilab code Exa 7. K = 1.9 Hydrocarbon cracking 1 clc 2 clear all 3 printf ( ” e x a m p l e 7 .

Scilab code Exa 7.11 Equilibrium conversion
1 clc
2 clear
3 printf ( ” e x a m p l e 7 . 1 1 p a g e number 316 \ n\n ” )
4
5 // t o f i n d t h e p r o d u c t c o n c e n t r a t i o n
6 printf ( ” t h i s i s a t h e o r i t i c a l q u e s t i o n , book s h a l l

be r e f e r r e d f o r s o l u t i o n ” )

Scilab code Exa 7.12 Concentration calculation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

clc
clear
printf ( ” e x a m p l e 7 . 1 1 p a g e number 316 \ n\n ” )
// t o f i n d t h e i n i t i a l c o n c o f A and B
Cp = 0.02;
Cq = 0.02;
K = 4*10^ -2;
Cb = 0.05;
Cb_i = Cb + Cp ;
a = ( Cp * Cq ) /( K * Cb ) ;
funcprot (0)
function [ f ] = F (x , a )
f = x -0.02 - a ;
endfunction
// i n i t i a l g u e s s
x = 10;
y = fsolve (x , F ) ;
119

20
21

printf ( ” c o n c o f A= %f mol / l ” ,y )
printf ( ” \n\ n c o n c o f B= %f mol / l ” , Cb_i )

Scilab code Exa 7.13 Equilibrium conversion
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

clc
clear
printf ( ” e x a m p l e 7 . 1 1 p a g e number 316 \ n\n ” )
// t o f i n d t h e % t r a n s f o r m a t i o n
moles_A = 0.02;
K = 1;
// p a r t 1
moles_B = 0.02;
function [ f ] = F ( x )
f = moles_A * moles_B -( moles_A + moles_B ) * x ;
endfunction
// i n i t i a l g u e s s
x = 10;
y = fsolve (x , F ) ;
printf ( ” amount o f A t r a n s f o r m e d = %f p e r c e n t ” ,y
*(100/0.02) )

20
21 // p a r t 2
22 moles_B = 0.1;
23 y = fsolve (x , F ) ;
24 printf ( ” \n\ namount o f A t r a n s f o r m e d = %f p e r c e n t ” ,y

*(100/0.02) )
25
26 // p a r t 1
27 moles_B = 0.2;
28 y = fsolve (x , F ) ;

120

29

printf ( ” \n\ namount o f A t r a n s f o r m e d = %f p e r c e n t ’ , y
∗(100/0.02) )

Scilab code Exa 7.14 Equilibrium shifts
1 clc
2 clear
3 printf ( ” e x a m p l e 7 . 1 4 p a g e number 317 \ n\n ” )
4
5 // t o f i n d t h e i n i t i a l c o n c e n t r a t i o n and s h i f t

in

equilibrium
6
7
8
9
10
11
12
13

Ce_N2 = 3;
Ce_H2 = 9;
Ce_NH3 = 4;
C_N2 = Ce_N2
C_H2 = Ce_H2

// e q u i l i b r i u m c o n c o f N2
// e q u i l i b r i u m c o n c o f H2
// e q u i l i b r i u m c o n c oh NH3
+ 0.5* Ce_NH3 ;
+ 1.5* Ce_NH3 ;

printf ( ” c o n c e n t r a t i o n o f N2 = %f mol / l \
n c o n c e n t r a t i o n o f H2 = %f mol / l ” , C_N2 , C_H2 )
14 printf ( ” \n\ n s e c o n d p a r t i s t h e o r i t i c a l , book s h a l l
be r e f e r r e d f o r s o l u t i o n ” )
15
16 n_H2 = 3;
// s t o t i o m e t r i c
17 n_N2 = 1;
// s t o t i o m e t r i c
18 n_NH3 = 2;
// s t o t i o m e t r i c
19 delta_n = n_H2 + n_N2 - n_NH3 ;
20 if delta_n > 0 then printf

coefficient
coefficient
coefficient

( ” \n\ n d e l t a n =%f\ n s i n c e
d e l t a n i s g r e a t e r than 0 , e q u i l i b r i u m w i l l s h i f t
t o r i g h t w i t h i n c r e a s e i n volume ” , delta_n )

21 end

Scilab code Exa 7.15 Rate equation
121

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

clc
// e x a m p l e 7 . 1 5
// t o f i n d t h e r a t e e q u a t i o n
t = [0;5;10;15;20;25]
C_A = [25;18.2;13.2;9.6;7;5.1]
// i n t e g r a l method o f r a t e d e t e r m i n a t i o n
s = 0;
for i = 2:6
k ( i ) = (1/ t ( i ) ) * log (25/ C_A ( i ) )
// d i s p ( k ( i ) , ” k v a l u e s f o r v a r i o u s c o n c . ” )
s = s+k(i)
end
printf ( ” a v e r a g e v a l u e o f k = %f ” ,s /5)
disp ( ” r a =− 0 . 0 6 3 6 7 ∗CA” ,” s i n c e i t s a f i r s t o r d e r
r e a c t i o n , ”)

17
18 subplot (221)
19 plot (t , C_A )
20 xlabel ( ” t i m e ” )
21 ylabel ( ” c o n c e n t r a t i o n ” )
22 title ( ” i n t e g r a l method ” )
23
24 // d i f f e r e n t i a l method o f r a t e d e t e r m i n a t i o n
25 ra = [ -1.16; -0.83; -0.60; -0.43];
26 C_A = [18.2;13.2;9.6;7];
27
28 subplot (222)
29 plot ( ra , C_A )
30 xlabel ( ” C o n c e n t r a t i o n ” )
31 ylabel ( ”−r a ” )
32 title ( ” d i f f e r e n t i a l method ” )
33
34 printf ( ” \n\ n r a t e from d i f f e r e n t i a l method = −0.064∗

CA” )

122

rate_increase . 1 6 // t o f i n d t h e r a t e o f r e a c t i o n E = 75200 // i n J / mol E1 = 50100 // i n J / mol R = 8.314 // i n J / mol K T = 298 // i n K ratio = exp (( E1 .16 Rate of reaction 1 2 3 4 5 6 7 8 9 10 11 clc clear // e x a m p l e 7 . rate_increase = ratio ^ -1 disp ( ” t i m e s ” .E ) /( R * T ) ) . ” i n c r e a s e i n r a t e o f r e a c t i o n =” ) 123 .Scilab code Exa 7.

book s h a l l be r e f e r r e d f o r s o l u t i o n ”) Scilab code Exa 8.1 Specific gravity 1 clc 2 clear 3 printf ( ” e x a m p l e 8 . 1 p a g e number 334 \ n\n ” ) 4 5 printf ( ” t h i s i s a t h e o r i t i c a l problem . 2 p a g e number 335 \ n\n ” ) 4 5 printf ( ” t h i s i s a t h e o r i t i c a l problem . book s h a l l be r e f e r r e d f o r s o l u t i o n ”) 124 .2 Specific gravity 1 clc 2 clear 3 printf ( ” e x a m p l e 8 .Chapter 8 Measuring Devices Scilab code Exa 8.

8 // i n p a s c a l .density_difference .4 // i n mm w a t e r 10 pressure = 1. 125 .0133*10^5 // i n pa 11 temperatue = 293 // i n K 12 mass_of_air = 29 // i n Kg 13 density_air = pressure /( temperatue *8314) * mass_of_air // i n kg /m3 14 printf ( ” D e n s i t y o f a i r = %f kg / cu m” .8* Height ) . book s h a l l be r e f e r r e d f o r s o l u t i o n ”) Scilab code Exa 8. 19 printf ( ” \n\ n D e n s i t y d i f f e r e n c e = %f kg / cu m” .3 Specific gravity 1 clc 2 clear 3 printf ( ” e x a m p l e 8 . g =9.4 Mixture density 1 clc 2 clear 3 printf ( ” e x a m p l e 8 . density_difference ) 20 21 density_mixture = density_air . a c c e l e r a t i o n due t o g r a v i t y .8 17 Height =4 18 density_difference = delta_p /(9. density_air ) 15 16 delta_p = pressure_difference *9. 3 p a g e number 335 \ n\n ” ) 4 5 printf ( ” t h i s i s a t h e o r i t i c a l problem . s i d e 2: − N2−H2 m i x t u r e 8 9 pressure_difference = 3.Scilab code Exa 8. 4 p a g e number 336 \ n\n ” ) 4 5 // C h a p t e r 8 : M e a s u r i n g D e v i c e s 6 // Given : B a l a n c e H e i g h t =4m 7 // s i d e 1− a i r .

14) *( diameter /2) ^4) . // i n m 7 disk_distance =1.6 Solution viscosity 1 clc 2 clear 3 printf ( ” e x a m p l e 8 .25*10^ -3. viscosity ) Scilab code Exa 8. // i n mm density_of_solution = 1750.// i n kg /m3 22 printf ( ” \n\ n D e n s i t y o f m i x t u r e = %f kg / cu m” . // i n J o u l e s 10 11 // we know t h a t t o r q u e= p i ∗ omega ∗ v i s c o s i t y ∗ r a d i u s ˆ4/2∗ d i s c d i s t a n c e 12 viscosity =(2* disk_distance * torque ) /(3. 6 p a g e number 342 \ n\n ” ) 4 5 // t o f i n d t h e v i s c o s i t y o f s o l u t i o n u s i n g g i v e n parameters 6 7 8 diameter =10. // r e v o l u t i o n s / min 9 torque =11.5. density_mixture ) Scilab code Exa 8.6.14*(10*3. 5 p a g e number 341 \ n\n ” ) 4 5 // t o f i n d v i s c o s i t y o f o i l 6 diameter =0.5 Viscosity calculation 1 clc 2 clear 3 printf ( ” e x a m p l e 8 . 13 printf ( ” v i s c o s i t y = %f Pa−s ” . // i n m 8 speed =5. // i n kg /m3 126 .

// i n mm 12 13 // c a l c u l a t i o n 14 height_water_equivalent = ( density_of_mercury - density_of_water ) *( manometer_height *10^ -3) /( density_of_water ) // i n m 15 127 .density_of_air ) *9. // i n kg /m3 7 viscosity = 1*10^ -3.7 Flow rate calculation 1 clc 2 clear 3 printf ( ” e x a m p l e 8 . 18 if v >0. viscosity ) 14 15 16 // c h e c k i n g s t o k e ’ s r e g i o n v a l i d i t y 17 v =(0. // i n mm 9 orifice_diameter = 50.8*( diameter *10^ -3) ^2/(18* velocity *10^ -3) .2. // i n mm 11 manometer_height = 242. // i n mm/ s viscosity = ( density_of_solution . 7 p a g e number 367 \ n\n ” ) 4 5 // t o f i n d t h e f l o w r a t e i n an o r i f i c e 6 density_of_water = 1000.9 then printf ( ” \n\ n s y s t e m f o l l o w s s t o k e s law ” ) 19 end Scilab code Exa 8. // i n kg /m3 velocity = 0. // e x p r e s s i o n f o r f i n d i n g v i s c o s i t y 12 13 printf ( ” v i s c o s i t y o f s o l u t i o n = %f Pa−s ” . // i n mm 10 density_of_mercury = 13600.9 10 11 density_of_air = 1.9. // i n Pa−s 8 pipe_diameter = 250.2* viscosity ) /( density_of_solution * diameter *10^ -3) .

18 velocity = Co *(2*9. pressure_drop =0.5. venturi_diameter =0. rate_of_flow ) Scilab code Exa 8. Re ) 23 24 if Re >30000 then printf ( ” \n\ n v e l o c i t y o f w a t e r = %f m/ s ” . flow_rate =3. density = 1000.05. m/ s // i n 19 20 // c h e c k i n g Reynold ’ s number 21 Re = ( orifice_diameter *10^ -3* velocity * 22 density_of_water ) / viscosity . printf ( ” r e y n o l d s number = %f\ nwhich i s g r e a t e r t h a n 3 0 0 0 0 ” .8 Venturi meter 1 clc 2 clear 3 printf ( ” e x a m p l e 8 .15.12. 29 printf ( ” \n\ n r a t e o f f l o w = %f l i t r e / s ” .14*( orifice_diameter *10^ -3) ^2/4) * velocity * density_of_water . velocity ) 25 26 end 27 28 rate_of_flow = (3. 8 p a g e number 368 \ n\n ” ) 4 5 // t o f i n d t h e c o e f f i c i e n t o f d i s c h a r g e f o r converging cone 6 7 8 9 10 11 // i n // i n //m // i n // i n pipe_diameter =0.61. 128 m m of water kg / s kg /m3 .8* height_water_equivalent /(1 -( orifice_diameter / pipe_diameter ) ^4) ) ^0.16 // a s s u m i n g Re >30000 17 Co = 0.

disp ( ” p a r t 1 ” ) pA = pB +( h2 * s2 -( h1 . // i n m h3 =0. // i n kg /m3 pB =68900.001 velocity = ((4/3.305 // i n m density =1000.9 Venturi meter 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 clc clear printf ( ” e x a m p l e 8 . pA ) 129 // i n Pa .203. Re ) Scilab code Exa 8.5. printf ( ” \ n p r e s s u r e a t A = %f Pa\n ” .81.8* pressure_drop ) ) ^0.66. printf ( ” \n\ n r e y n o l d s No = %f ” . velocity ) 16 17 // c a l c u l a t i n g c o e f f i c i e n t o f d i s c h a r g e 18 Cv = velocity *((1 -( venturi_diameter / pipe_diameter ) ^4) /(2*9.12 13 14 // i n Pa−s viscosity = 0. // i n m h2 =0.14) * flow_rate ) /( venturi_diameter ^2* density ) . 15 printf ( ” v e l o c i y = %f m/ s ” . s2 =13.h3 ) * s1 ) * density *9.6. Cv ) 20 21 // c a l c u l a t i n g r e y n o l d ’ s number 22 Re = velocity *( venturi_diameter / pipe_diameter ) ^2* 23 pipe_diameter * density / viscosity . 9 p a g e number 369 \ n\n ” ) // t o f i n d pA and pB // p a r t 1 h1 =0. 19 printf ( ” \n\ n c o e f f i c i e n t o f d i s c h a r g e = %f ” .83. // i n Pa s1 =0.

density_oil 13 14 15 16 ) / density_oil . // i n Pa−s 9 density_water = 1000.h3 ) * s1 ) * density *9. 23 pressure_B =( pB1 . delta_H ) maximum_velocity =(2*9.10 Pitot tube 1 clc 2 clear 3 printf ( ” e x a m p l e 8 . maximum_velocity ) 17 18 Re = diameter * maximum_velocity * density_oil / viscosity_oil .5∗Vmax Re = %f ” . 130 . Re ) 20 if Re <4000 then velocity = maximum_velocity *0. pressure_B ) Scilab code Exa 8. //m o f w a t e r 12 delta_H = manometer_reading *( density_water .8* delta_H ) ^0. // i n kg /m3 8 viscosity_oil =38. // i n kg /m3 10 diameter =0.3) /9810.pressure *133.8*10^ -3.5. 24 //m o f water printf ( ” \ n p r e s s u r e a t B = %f m o f w a t e r ” .81.102 // i n m 11 manometer_reading =0. printf ( ” manometer r e a d i n g a s m o f o i l = %f m” .5.9.18 19 disp ( ” p a r t 2 ” ) 20 pA1 =137800 // i n Pa 21 pressure =735 //mm Hg 22 pB1 = pA1 -( h2 * s2 -( h1 . 19 printf ( ” \n\ n i f Re <4000 t h e n v =0. 1 0 p a g e number 370 \ n\n ” ) 4 5 // t o f i n d t h e r a t e o f o i l f l o w i n l / s 6 7 density_oil =900. printf ( ” \n\ n m a x i m u m v e l o c i t y ( Vmax ) = %f m/ s ” .

5* flow_rate_steel 11 printf ( ” maximum flow r a t e o f k e r o s e n e = %f l i t r e / s ” . flow_rate_kerosene ) Scilab code Exa 8. velocity ) 24 25 flow_rate =(3. 26 printf ( ” \n\ n f l o w r a t e =%f l i t r e / s ” .12 Flow rate calculation 1 clc 2 clear 3 printf ( ” e x a m p l e 8 . flow_rate ) Scilab code Exa 8.82.14/4) * diameter ^2* velocity *1000.2. 9 density_water =1.92. 10 flow_rate_kerosene =((( density_steel - density_kerosene ) / density_kerosene ) /(( density_steel . // l / s 7 density_steel =7.11 Rotameter capacity 1 clc 2 clear 3 printf ( ” e x a m p l e 8 . 1 2 p a g e number 373 \ n\n ” ) 4 5 // t o f i n d t h e r a t e o f f l o w o f f l u e g a s 6 131 .21 end 22 23 printf ( ” \n\ n v e l o c i t y = %f m/ s ” . 8 density_kerosene =0.density_water ) / density_water ) ) ^0. 1 1 p a g e number 372 \ n\n ” ) 4 5 // t o f i n d t h e maximum c a p a c i t y o f k e r o s c e n e 6 flow_rate_steel =1.

// f l o w r a t e // amount o f // amount o f // amount o f // amount o f // w e i g h t f r a c t i o n //gm/ s // w e i g h t f r a c t i o n o f f l u e g a s =x CO2 e n t e r i n g = 0 . final_CO2 =0.5.02. 0 2 2 5 ) deff ( ’ y=f ( x ) ’ .031. flow_rate_CO2 = 22. 0 3 1 ∗ ( x +0.0225 CO2 l e a v i n g = 0 .7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 initial_CO2 = 0. flow_rate_flue_gas = fsolve (0 . 0 3 1 ∗ ( x + 0 . flow_rate_flue_gas ) 132 . 0 2 x + 0 . ’ y=i n i t i a l C O 2 ∗ x + 0 . 0 2 ∗ x CO2 l e a v i n g = 0 . 0 2 2 5 − 0 . f ) printf ( ” f l o w r a t e o f f l u e g a s = %f kg / s ” .0225) ’ ). 0 2 2 5 gas l e a v i n g = x +0.

// i n m U = 1 // i n m/ s density = 998 // i n kg / c u b i c m viscosity = 8*10^ -4 // i n Pa−s DC = 1 // i n m N = 10 e = 4*10^ -6.9) ) ^ -2. printf ( ” R e y n o l d s number = %f ” .f ) . 133 .Chapter 9 Computers and their application Scilab code Exa 9.7+(6. 1 p a g e number 384 \ n\n ” ) // t o f i n d t h e p r e s s u r e d r o p i n t h e c o i l D = 38*10^ -3.1 Coiled tube pressure drop 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 clc clear printf ( ” e x a m p l e 9 . // i n m Re = ( density * U * D ) / viscosity . printf ( ” \n\ n f r i c t i o n f a c t o r = %f ” . Re ) f = (4* log10 (( e / D ) /3.81/ Re ) ^0.

00032 // i n Pa s Pr = 6. delta_P ) Scilab code Exa 9.14* DC * N . 24 printf ( ” \n\ n p r e s s u r e d r o p t h r o u g h s t r a i g h t p i p e = %f Pa” .5 // i n m/ s N = 19. HYDIA = ( DS ^2 . 27 printf ( ” \n\ n c o r r e c t i o n f a c t o r = %f ” .54*( D / DC ) . delta_Pstr ) 25 26 S = 1+3. DT = 0.6. 134 . Prw = 7.2 Heat exchanger pressure drop 1 clc 2 clear 3 printf ( ” e x a m p l e 9 .2 // i n m e = 0.026 // i n m L = 2.20 21 L = 3. 2 p a g e number 384 \ n\n ” ) 4 5 // t o f i n d t h e s h e l l s i d e p r e s s u r e d r o p i n h e a t exchanger 6 7 8 9 10 11 12 13 14 15 16 17 18 19 U = 0.N * DT ^2) /( DS + N * DT ) .S ) 28 29 delta_P = S * delta_Pstr 30 printf ( ” \n\ n p r e s s u r e d r o p o f c o i l = %f Pa” .7 // i n m DS = 0.5. 22 23 delta_Pstr = (2* f * U * density * L ) / D .0002 // i n m density = 836 // i n kg / cu m viscosity = 0.

14* DT * N . 26 27 L = 3.f ) . 28 29 delta_Pstr = (2* f * U * density * L ) / HYDIA .5 // i n kg / s CPH = 4. 3 p a g e number 385 \ n\n ” ) MH = 10 // i n kg / s MC = 12. delta_Pstr ) 31 32 S = ( Prw / Pr ) ^0. 22 printf ( ” R e y n o l d s number = %f ” .7+(6.8 // i n kW/ s q m K Q = MH * CPH *( THI .9) ) ^ -2.THO ) .3 Heat exchanger area 1 2 3 4 5 6 7 8 9 10 11 12 13 14 clc clear printf ( ” e x a m p l e 9 .S ) 34 35 delta_P = S * delta_Pstr 36 printf ( ” \n\ n p r e s s u r e d r o p o f c o i l = %f Pa” . 25 printf ( ” \n\ n f r i c t i o n f a c t o r = %f ” . 30 printf ( ” \n\ n p r e s s u r e d r o p t h r o u g h s t r a i g h t p i p e = %f Pa” .33. delta_P ) Scilab code Exa 9.20 21 Re = HYDIA * U * density / viscosity .2 // i n kJ / kg CPC = 4. 135 . 33 printf ( ” \n\ n c o r r e c t i o n f a c t o r = %f ” . Re ) 23 24 f = (4* log10 (( e / HYDIA ) /3.81/ Re ) ^0.2 // i n kJ / kg THI = 353 // i n K THO = 333 // i n K TCI = 300 // i n K U = 1.

a r e a = %f s q m ” . DT2 = THO . 4 p a g e number 387 \ n\n ” ) 4 5 printf ( ” t h i s i s a t h e o r e t i c a l q u e s t i o n . TCO ) 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 // f o r c o c u r r e n t f l o w DT1 = THI . printf ( ” \n\ n f o r c o u n t e r c u r r e n t f l o w . printf ( ” \n\ n f o r c o c u r r e n t f l o w . 18 printf ( ” \n\ n c o l d f l u i d o u t l e t t e m p e r a t u r e = %f K” .TCO . a r e a = %f s q m” . // f o r c o u n t e r c u r r e n t f l o w DT1 = THI .4 Batch distillation 1 clc 2 clear 3 printf ( ” e x a m p l e 9 . LMTD = ( DT1 .TCO . DT2 = THO .15 printf ( ” h e a t l o a d = %f J ” . A = Q /( U * LMTD ) .A ) . LMTD = ( DT1 .DT2 ) / log ( DT1 / DT2 ) .Q ) 16 17 TCO = Q /( MC * CPC ) + TCI . Scilab code Exa 9. book s h a l l be r e f e r r e d f o r s o l u t i o n ” ) 136 . A = Q /( U * LMTD ) .TCI .TCO .DT2 ) / log ( DT1 / DT2 ) .A ) .

6 Friction factor calculation 1 clc 2 clear 3 printf ( ” e x a m p l e 9 .5 Gas mixture exit temperature 1 clc 2 clear 3 printf ( ” e x a m p l e 9 . book s h a l l be r e f e r r e d f o r s o l u t i o n ” ) Scilab code Exa 9.Scilab code Exa 9. 6 p a g e number 395 \ n\n ” ) 4 5 printf ( ” t h i s i s a t h e o r i t i c a l problem . 5 p a g e number 392 \ n\n ” ) 4 5 printf ( ” t h i s i s a t h e o r e t i c a l q u e s t i o n . book s h a l l be r e f e r r e d f o r s o l u t i o n ”) 137 .