summaryrefslogtreecommitdiff
path: root/3434
diff options
context:
space:
mode:
Diffstat (limited to '3434')
-rw-r--r--3434/CH1/EX1.1/Ex1_1.sce15
-rw-r--r--3434/CH1/EX1.2/Ex1_2.sce11
-rw-r--r--3434/CH1/EX1.3/Ex1_3.sce11
-rw-r--r--3434/CH1/EX1.4/Ex1_4.sce17
-rw-r--r--3434/CH10/EX10.1/Ex10_1.sce22
-rw-r--r--3434/CH10/EX10.2/Ex10_2.sce17
-rw-r--r--3434/CH11/EX11.1/Ex11_1.sce11
-rw-r--r--3434/CH11/EX11.2/Ex11_2.sce24
-rw-r--r--3434/CH12/EX12.1/Ex12_1.sce20
-rw-r--r--3434/CH13/EX13.1/Ex13_1.sce12
-rw-r--r--3434/CH14/EX14.1/Ex14_1.sce9
-rw-r--r--3434/CH14/EX14.10/Ex14_10.sce11
-rw-r--r--3434/CH14/EX14.11/Ex14_11.sce13
-rw-r--r--3434/CH14/EX14.12/Ex14_12.sce67
-rw-r--r--3434/CH14/EX14.13/Ex14_13.sce64
-rw-r--r--3434/CH14/EX14.14/Ex14_14.sce29
-rw-r--r--3434/CH14/EX14.15/Ex14_15.sce25
-rw-r--r--3434/CH14/EX14.16/Ex14_16.sce17
-rw-r--r--3434/CH14/EX14.17/Ex14_17.sce14
-rw-r--r--3434/CH14/EX14.18/Ex14_18.sce34
-rw-r--r--3434/CH14/EX14.19/Ex14_19.sce24
-rw-r--r--3434/CH14/EX14.2/Ex14_2.sce13
-rw-r--r--3434/CH14/EX14.20/Ex14_20.sce13
-rw-r--r--3434/CH14/EX14.3/Ex14_3.sce9
-rw-r--r--3434/CH14/EX14.4/Ex14_4.sce9
-rw-r--r--3434/CH14/EX14.5/Ex14_5.sce9
-rw-r--r--3434/CH14/EX14.6/Ex14_6.sce8
-rw-r--r--3434/CH14/EX14.7/Ex14_7.sce26
-rw-r--r--3434/CH14/EX14.8/Ex14_8.sce18
-rw-r--r--3434/CH14/EX14.9/Ex14_9.sce24
-rw-r--r--3434/CH2/EX2.1/Ex2_1.sce18
-rw-r--r--3434/CH4/EX4.1/Ex4_1.sce17
-rw-r--r--3434/CH4/EX4.2/Ex4_2.sce17
-rw-r--r--3434/CH4/EX4.3/Ex4_3.sce20
-rw-r--r--3434/CH4/EX4.4/Ex4_4.sce12
-rw-r--r--3434/CH4/EX4.5/Ex4_5.sce33
-rw-r--r--3434/CH4/EX4.6/Ex4_6.sce25
-rw-r--r--3434/CH4/EX4.7/Ex4_7.sce20
-rw-r--r--3434/CH6/EX6.1/Ex6_1.sce10
-rw-r--r--3434/CH6/EX6.2/Ex6_2.sce9
-rw-r--r--3434/CH6/EX6.3/Ex6_3.sce15
-rw-r--r--3434/CH6/EX6.4/Ex6_4.sce12
-rw-r--r--3434/CH7/EX7.1/Ex7_1.sce42
-rw-r--r--3434/CH7/EX7.2/Ex7_2.sce27
-rw-r--r--3434/CH7/EX7.3/Ex7_3.sce15
-rw-r--r--3434/CH8/EX8.1/Ex8_1.sce14
-rw-r--r--3434/CH8/EX8.2/Ex8_2.sce30
-rw-r--r--3434/CH8/EX8.3/Ex8_3.sce17
-rw-r--r--3434/CH8/EX8.4/Ex8_4.sce29
-rw-r--r--3434/CH9/EX9.1.i/Ex9_1_i.sce11
-rw-r--r--3434/CH9/EX9.1.ii/Ex9_1_ii.sce19
-rw-r--r--3434/CH9/EX9.1.iii/Ex9_1_iii.sce23
-rw-r--r--3434/CH9/EX9.2.i/Ex9_2_i.sce23
-rw-r--r--3434/CH9/EX9.2.ii/Ex9_2_ii.sce19
-rw-r--r--3434/CH9/EX9.2.iii/Ex9_2_iii.sce26
55 files changed, 1099 insertions, 0 deletions
diff --git a/3434/CH1/EX1.1/Ex1_1.sce b/3434/CH1/EX1.1/Ex1_1.sce
new file mode 100644
index 000000000..d2ae3b3b3
--- /dev/null
+++ b/3434/CH1/EX1.1/Ex1_1.sce
@@ -0,0 +1,15 @@
+// Given data:
+clc
+T1=500+273.0 //source temp in kelvin
+T2=100+273.0 //sink temperature in kelvin
+W=1 // output power in kW
+
+nth=1-(T2/T1) // thermal efficiency
+
+Q1=1/nth // heat supplied in kW
+
+Q2=Q1-W // heat rejected in kW
+
+printf("The heat rejected is %0.2f kW",Q2)
+
+// the answer in book is wrong due to incorrect value of T1
diff --git a/3434/CH1/EX1.2/Ex1_2.sce b/3434/CH1/EX1.2/Ex1_2.sce
new file mode 100644
index 000000000..43a69bc7c
--- /dev/null
+++ b/3434/CH1/EX1.2/Ex1_2.sce
@@ -0,0 +1,11 @@
+// Given data:
+clc
+T1=40+273.0 // ambient temp in kelvin
+T2=-10+273.0 // freezer temp in kelvin
+Q2=2 // heat loss rate for freezer in kJ/s
+
+Q1=T1*(Q2/T2) // heat transfer rate in kJ/s
+
+W=Q1-Q2 // work in kW
+
+printf("The least power required is %0.2f kW",W)
diff --git a/3434/CH1/EX1.3/Ex1_3.sce b/3434/CH1/EX1.3/Ex1_3.sce
new file mode 100644
index 000000000..effc20a8a
--- /dev/null
+++ b/3434/CH1/EX1.3/Ex1_3.sce
@@ -0,0 +1,11 @@
+// Given data:
+clc
+Q1=3e4 // heat required in kJ/h
+W=2e3 // work required in kJ/h
+
+Q2=Q1-W // heat abstracted from outside in kJ/h
+
+COP=Q1/(Q1-Q2) // COP of heat pump
+
+printf("Heat abstracted from outside air is %0.2f kJ/h \n ",Q2)
+printf("COP of heat pump is %d ",COP)
diff --git a/3434/CH1/EX1.4/Ex1_4.sce b/3434/CH1/EX1.4/Ex1_4.sce
new file mode 100644
index 000000000..ce6735fbe
--- /dev/null
+++ b/3434/CH1/EX1.4/Ex1_4.sce
@@ -0,0 +1,17 @@
+// Given data:
+clc
+T11=320+273.0 // temp at source 1 in kelvin
+Q1=10000.0 // heat transfer rate at source 1 in kJ/min
+T12=65+273.0 // temp at source 2 in kelvin
+Q2=120000.0 // heat transfer rate at source 2 in kJ/min
+T2=35+273.0 // temp of surrounding in kelvin
+
+n1=1-(T2/T11) // efficiency by source 1
+n2=1-(T2/T12) // efficiency by source 2
+
+W1=Q1*n1 // work at source 1 in kJ/min
+W2=Q2*n2 // work at source 2 in kJ/min
+
+printf("The work done at W1 is = %0.2f kJ/min \n ",W1)
+printf("The work done at W2 is = %0.2f kJ/min \n ",W2)
+printf("The larger power is provided by source 2")
diff --git a/3434/CH10/EX10.1/Ex10_1.sce b/3434/CH10/EX10.1/Ex10_1.sce
new file mode 100644
index 000000000..6770053c3
--- /dev/null
+++ b/3434/CH10/EX10.1/Ex10_1.sce
@@ -0,0 +1,22 @@
+clc
+// given data
+R=13.0 // in m
+r=3.0 // in m
+A=2.0 // area in km^2
+ebbcycle=12.42 // in hours
+effi=0.7 // efficiency of turbine
+g=9.8 // gravitational acceleration in m/sec^2
+rho=1025 // density of sea in kg/m^3
+Powerpotential=0.225*A*(10**6)*((R**2)-(r**2))/10**6 // power potential in MW
+
+Powergenerated=effi*Powerpotential // in MW
+
+printf( "The average power generated by plant is %.2f kWh",Powergenerated)
+
+Energysingle=rho*A*(10**6)*g*((R**2)-(r**2))/(2.0*10**6) // Energy in single emptying in MJ
+
+ebbyear=364.0*24/ebbcycle
+
+annualenergy=Energysingle*ebbyear*effi*1000/3600.0 // in kWh
+
+printf( "\n The annual average energy generation is %.2e kWh",annualenergy)
diff --git a/3434/CH10/EX10.2/Ex10_2.sce b/3434/CH10/EX10.2/Ex10_2.sce
new file mode 100644
index 000000000..12f33460b
--- /dev/null
+++ b/3434/CH10/EX10.2/Ex10_2.sce
@@ -0,0 +1,17 @@
+clc
+// given data
+a=2.0/2 // in m
+T=8.0 // in secs
+rho=1025.0 // in kg/m^3
+w=2*%pi/T // angular frequency in radian/sec
+g=9.8 // gravitational acceleration in m/sec^2
+
+Lamda=2*(%pi)*g/(w**2) // in m
+printf( "wavelength is %.2f m",Lamda)
+v=g/w // phase velocity in m/s
+printf( " \n phase velocity is %.2f m/s",v)
+P=rho*(g**2)*(a**2)*T/(8*%pi*1000) // power in wave in kW/m
+printf( " \n power in wave is %.2f kW/m",P)
+E=P*8.76 // average annual wave energy in mWh/m
+
+printf( "\n average annual wave energy is %.1f mWh/m",E)
diff --git a/3434/CH11/EX11.1/Ex11_1.sce b/3434/CH11/EX11.1/Ex11_1.sce
new file mode 100644
index 000000000..cc9f1ad22
--- /dev/null
+++ b/3434/CH11/EX11.1/Ex11_1.sce
@@ -0,0 +1,11 @@
+clc
+// given data
+rho=996 // density in kg/m^3
+effi=0.55 // oveall efficiency
+Q=100/1000.0 // discharge in m^3/sec
+h=30 // gross head in m
+g=9.81 // gravitational acceleration in m/sec^2
+
+
+Pnet=effi*rho*Q*g*h/1000 // net power in watts
+printf("Power available is %.2f kilowatts",Pnet)
diff --git a/3434/CH11/EX11.2/Ex11_2.sce b/3434/CH11/EX11.2/Ex11_2.sce
new file mode 100644
index 000000000..f1c089b9f
--- /dev/null
+++ b/3434/CH11/EX11.2/Ex11_2.sce
@@ -0,0 +1,24 @@
+clc
+// given data
+pf=0.8 // power factor
+Load=3 // load in kW
+V=230 // voltage of kettle in V
+P=500 // power of kettle in W
+VA=pf*Load // VA load in kVA
+C=4200 // specific heat of water in j/kg-K
+T=45-20 // temperature difference in degree celsius
+
+VAR=VA*1.6 // net required VAR rating thus 60% extra capacity
+
+R=(V**2)/P // resistance by kettle in ohms
+
+Po=7*(V**2)/R // power dissipation in W for 7 elements
+
+printf( "7 elements are connected in parallel")
+
+Q=Load*1000.0/(C*T) // flow rate in kg/sec
+
+printf("\n The required flow rate is %.4f litre/sec",Q)
+
+
+
diff --git a/3434/CH12/EX12.1/Ex12_1.sce b/3434/CH12/EX12.1/Ex12_1.sce
new file mode 100644
index 000000000..ec6d0ebf8
--- /dev/null
+++ b/3434/CH12/EX12.1/Ex12_1.sce
@@ -0,0 +1,20 @@
+clc
+// given data
+delG=-39.59 // kJ/mol
+delH=-56.83 // change in enthalpy in kJ/mol
+mdotmethanol=32.0 // in g/s
+mdotoxygen=48.0 // in g/s
+
+Wmax=166.3 // -delG in kJ
+
+flowmethanol=mdotmethanol*100*3600/(Wmax*1000) // in kg/h
+flowoxygen=mdotoxygen*100*3600/(Wmax*1000) // in kg/h
+printf( "The required flow rate of methanol is %.2f kg/h",flowmethanol)
+printf( "\nThe required flow rate of oxygen is %.2f kg/h",flowoxygen)
+delQ=delH-delG // using eq 12.7
+
+fuelrate=-delQ*19.24/mdotmethanol // in kcal/s
+
+printf( "\nThe required heat removal rate is %.2f kcal/s",fuelrate)
+
+// The answer is wrong in textbook because of incorrect conversion from g/s to kg/h
diff --git a/3434/CH13/EX13.1/Ex13_1.sce b/3434/CH13/EX13.1/Ex13_1.sce
new file mode 100644
index 000000000..03ea7e32b
--- /dev/null
+++ b/3434/CH13/EX13.1/Ex13_1.sce
@@ -0,0 +1,12 @@
+clc
+// given data
+A=0.25 // area in m^2
+d=0.5 // distance between electrodes in m
+B=1.8 // flux density in Wb/m^2
+u=1200.0 // average gas velocity in m/s
+sigma=10.0 // mho/m
+
+Vo=B*u*d // in Volts
+Pmax=1*sigma*(u**2)*(B**2)*A*d/(4.0*10**6) // in MW
+
+printf("Maximum Power output %.3f MW",Pmax)
diff --git a/3434/CH14/EX14.1/Ex14_1.sce b/3434/CH14/EX14.1/Ex14_1.sce
new file mode 100644
index 000000000..372812be5
--- /dev/null
+++ b/3434/CH14/EX14.1/Ex14_1.sce
@@ -0,0 +1,9 @@
+clc
+// given data
+P=2000 // in rs
+i=12 // interest rate in %
+n=6 // time in years
+
+F=P*(1+i/100.0)**n // Future value of investment
+
+printf("The amount will be Rs %.0f",F)
diff --git a/3434/CH14/EX14.10/Ex14_10.sce b/3434/CH14/EX14.10/Ex14_10.sce
new file mode 100644
index 000000000..d5bcb2028
--- /dev/null
+++ b/3434/CH14/EX14.10/Ex14_10.sce
@@ -0,0 +1,11 @@
+clc
+// given data
+
+g=0.2 // annual gas price increase rate
+i=10/100.0 // discount rate
+n=15 // time in years
+A1=350*8 // payment at end of 1st year in lakhs rs
+
+Pgg=(A1/(i-g))*(1-((1+g)/(1+i))**n) // present worth in Rs
+
+printf("The present worth of saving is Rs %.0f",Pgg)
diff --git a/3434/CH14/EX14.11/Ex14_11.sce b/3434/CH14/EX14.11/Ex14_11.sce
new file mode 100644
index 000000000..cd63e70bf
--- /dev/null
+++ b/3434/CH14/EX14.11/Ex14_11.sce
@@ -0,0 +1,13 @@
+clc
+// given data
+Co=10000 // initial investment in rs
+B=900.0 // net annual savings per year
+
+nsp=Co/B // simple payback period
+
+printf( "The simple payback period is %0.2f",nsp)
+if nsp<20
+ printf( "\n proposal may be accepted")
+else
+ printf( "\n proposal may not be accepted")
+end
diff --git a/3434/CH14/EX14.12/Ex14_12.sce b/3434/CH14/EX14.12/Ex14_12.sce
new file mode 100644
index 000000000..6a6a06e19
--- /dev/null
+++ b/3434/CH14/EX14.12/Ex14_12.sce
@@ -0,0 +1,67 @@
+clc
+
+// given data
+
+
+
+ProjectA=[-2400,600,600,600,600,600]
+ProjectB=[-2400,800,800,800,800,800]
+ProjectC=[-2400,500,700,900,1100,1300]
+
+ProjAcu=zeros(6) // cumulative cash flow for project A
+ProjAcu(1)=ProjectA(1)
+for i =2:6
+
+ ProjAcu(i)=ProjectA(i)+ProjAcu(i-1)
+
+end
+
+ProjBcu=zeros(6) // cumulative cash flow for project B
+ProjBcu(1)=ProjectB(1)
+for i =2:6
+
+ ProjBcu(i)=ProjectB(i)+ProjBcu(i-1)
+
+end
+
+ProjCcu=zeros(6) // cumulative cash flow for project C
+ProjCcu(1)=ProjectC(1)
+for i =2:6
+
+ ProjCcu(i)=ProjectC(i)+ProjCcu(i-1)
+end
+
+
+printf( "\tProject A\t\tProject B\t\tProject C")
+printf( "\nyear\tcurrent\tcummulative current cummulative current cummulative ")
+for i =2:7
+
+ printf( "\n %i\t%i\t%.i\t\t %.i\t%.i \t \t%.i \t%.i",(i-2),ProjectA(i-1),ProjAcu(i-1),ProjectB(i-1),ProjBcu(i-1),ProjectC(i-1),ProjCcu(i-1))
+end
+
+
+for i =1:6
+
+ if ProjAcu(i)==0
+ PA=i-1
+ else
+ end
+end
+
+for i =1:6
+
+ if ProjBcu(i)==0
+ PB=i-1
+ else
+ end
+end
+
+for i =1:6
+
+ if (ProjCcu(i)<0 & ProjCcu(i+1)>0)
+ PC=i-ProjCcu(i)/ProjectC(i+1)-1
+ else
+ end
+end
+
+printf( " \n The payback period for project 1 is %.2f \n The payback period for project 2 is %.2f \n The payback period for project 3 is %.2f",PA,PB,PC)
diff --git a/3434/CH14/EX14.13/Ex14_13.sce b/3434/CH14/EX14.13/Ex14_13.sce
new file mode 100644
index 000000000..f6658f90e
--- /dev/null
+++ b/3434/CH14/EX14.13/Ex14_13.sce
@@ -0,0 +1,64 @@
+clc
+// given data
+
+
+
+ProjAcu=[-2400.0,-1864.0,-1386.0,-959.0,-578.0,-238.0] // in Rs
+ProjBcu=[-2400,-1686,-1048,-479.0,30,484] // in Rs
+ProjCcu=[-2400,-1954,-1396,-755,-56.0,683] // in Rs
+
+ProjAdis=[-2400,536,478,427,381,340] // in Rs
+ProjBdis=[-2400,714,638,569,509.0,454] // in Rs
+ProjCdis=[-2400,446,558,641,699,738.0] // in Rs
+
+PA=0
+PB=0
+PC=0
+
+for i =1:5
+ if ((ProjAcu(i)<0) & (ProjAcu(i+1)>0))
+ PA=(i+1)-ProjAcu(i)/ProjAdis(i+1)-1
+ end
+
+end
+
+printf( "\nFor project A")
+if (PA==0)
+ printf( "\nNet loss, Thus should be rejected")
+else:
+ printf( "\n% .2f years is payback period",PA)
+end
+
+for i =1:5
+
+ if ((ProjBcu(i)<0) & (ProjBcu(i+1)>0))
+ PB=(i)-ProjBcu(i)/ProjBdis(i+1)-1
+ else
+ end
+end
+
+
+printf( "\n\nFor project B" )
+
+if (PB==0)
+ printf( "\nNet loss, Thus should be rejected"
+else:
+ printf( "\n%.2f years is payback period",PB)
+end
+for i =1:5
+
+ if ((ProjCcu(i)<0) & (ProjCcu(i+1)>0))
+ PC=(i)-ProjCcu(i)/ProjCdis(i+1)-1
+ else
+ end
+end
+
+printf( "\n\nFor project C")
+
+if (PC==0)
+ printf( "\nNet loss, Thus should be rejected")
+else
+ printf( "\n%.2f years is payback period",PC )
+end
+
+
diff --git a/3434/CH14/EX14.14/Ex14_14.sce b/3434/CH14/EX14.14/Ex14_14.sce
new file mode 100644
index 000000000..f46110352
--- /dev/null
+++ b/3434/CH14/EX14.14/Ex14_14.sce
@@ -0,0 +1,29 @@
+clc
+// given data
+
+i=12.0/100 // interest rate
+n=5.0 // years
+
+ProjectA=[-2400,600,600,600,600,600]
+ProjectB=[-2400,800,800,800,800,800]
+ProjectC=[-2400,500,700,900,1100,1300]
+
+
+NPVA=ProjectA(1)+ProjectA(2)*(((1+i)**n) - 1)/(i*(1+i)**n)
+
+printf( "\nNPV of Project A is %.i ",NPVA)
+
+NPVB=ProjectB(1)+ProjectB(2)*(((1+i)**n) - 1)/(i*(1+i)**n)
+
+printf( "\nNPV of Project B is %.0f ",NPVB)
+
+ProjectNPVc=0 // cumulative cash flow for project A
+for i =1:5
+
+ ProjectNPVc=ProjectNPVc+(-ProjectC(1)+ProjectC(i+1))/(1+i)**(i+1)
+end
+
+
+printf( "\nNPV of Project C is %.2f ",ProjectNPVc)
+
+// The answer for project C is wrong in the book
diff --git a/3434/CH14/EX14.15/Ex14_15.sce b/3434/CH14/EX14.15/Ex14_15.sce
new file mode 100644
index 000000000..ed814b8ff
--- /dev/null
+++ b/3434/CH14/EX14.15/Ex14_15.sce
@@ -0,0 +1,25 @@
+clc
+// given data
+Co=20000.0 // cost in Rs
+B=3000.0 // annual benefit in rs
+n=15.0 // time in years
+i=15.0/100 // initial guess for rate
+NPV=zeros(4)
+
+NPV(1)=B*(((1+i)**n)-1)/(i*(1+i)**n)-Co
+x=1
+printf( "Iteration no.\t\ti*\t\tNPV(i*)")
+while NPV(x)<0
+ x=x+1
+ i=i-0.01
+ NPV(x)=B*(((1+i)**n)-1)/(i*(1+i)**n)-Co
+end
+for z =1:4
+ printf( "\n %i\t\t %.2f\t %.0f\t ",z,0.15-((z-1)/100.0),NPV(z))
+
+end
+IRR=i+(i+0.01-i)/(NPV(x)+NPV(x-1)) // using equation 14.28
+
+printf( "\nThe IRR is %.0f %%",IRR*100)
+
+// the answer is slightly different in textbook due to approximation
diff --git a/3434/CH14/EX14.16/Ex14_16.sce b/3434/CH14/EX14.16/Ex14_16.sce
new file mode 100644
index 000000000..44eef89bb
--- /dev/null
+++ b/3434/CH14/EX14.16/Ex14_16.sce
@@ -0,0 +1,17 @@
+clc
+// given data
+
+i=12.0/100 // interest rate
+ProjAdisB=[0,536.0,478,427,381,340] // discounted benefit for A
+ProjAdisC=[2400.0,0,0,0,0,0] // discounted cost for A
+ProjBdisB=[0,714.0,638,569,509,454] // discounted benefit for B
+ProjBdisC=[2400.0,0,0,0,0,0] // discounted cost for B
+ProjCdisB=[0,446.0,558,641,699,738] // discounted benefit for C
+ProjCdisC=[2400.0,0,0,0,0,0] // discounted cost for C
+
+BCforA=sum(ProjAdisB)/sum(ProjAdisC) // B mius C ratio
+BCforB=sum(ProjBdisB)/sum(ProjBdisC) // B mius C ratio
+BCforC=sum(ProjCdisB)/sum(ProjCdisC) // B mius C ratio
+printf( "\nB - C for project A is %.1f",BCforA)
+printf( "\nB - C for project B is %.1f",BCforB)
+printf( "\nB - C for project C is %.2f",BCforC)
diff --git a/3434/CH14/EX14.17/Ex14_17.sce b/3434/CH14/EX14.17/Ex14_17.sce
new file mode 100644
index 000000000..f7e3ea434
--- /dev/null
+++ b/3434/CH14/EX14.17/Ex14_17.sce
@@ -0,0 +1,14 @@
+clc
+// given data
+Co=12000.0 // cost in Rs
+Ca=200.0 // annual maintainence in Rs
+C12=3000.0 // replacement cost in 12th year
+S=1000.0 // salvage value in rs
+n=20.0 // time in years
+i=11/100.0 // interest rate
+
+Cnet=Co-S*(1/(1+i)**n)+Ca*((((1+i)**n)-1)/(i*(i+1)**n))+C12*(1/(1+i)**12)
+
+CR=Cnet*(i*(1+i)**n)/(((1+i)**n)-1)
+
+printf("The Capital Recovery cost is Rs %.0f",CR)
diff --git a/3434/CH14/EX14.18/Ex14_18.sce b/3434/CH14/EX14.18/Ex14_18.sce
new file mode 100644
index 000000000..383534475
--- /dev/null
+++ b/3434/CH14/EX14.18/Ex14_18.sce
@@ -0,0 +1,34 @@
+clc
+// given data
+i=10/100.0 // rate
+Acost=90000 // cost of A in Rs
+Bcost=75000 // cost of B in Rs
+Acashfl=26000 // annual cash flow of A in Rs
+Bcashfl=26000 // annual cash flow of B in Rs
+nA=5 // useful life of A in years
+nB=4 // useful life of B in years
+
+NPVA=Acashfl*(((1+i)**nA) - 1)/(i*(1+i)**nA) - Acost // NPV for A
+NPVB=Bcashfl*(((1+i)**nB) - 1)/(i*(1+i)**nB)- Bcost // NPV for B
+
+printf( "\nThe NPV for A is Rs %.0f",NPVA)
+
+printf( "\nThe NPV for B is Rs %.0f",NPVB)
+
+AEA=i*NPVA/(1-(1+i)**(-nA))
+
+
+AEB=i*NPVB/(1-(1+i)**(-nB))
+
+printf( "\nThe AE for A is Rs %.0f",AEA)
+
+printf( "\nThe AE for B is Rs %.0f",AEB)
+
+printf( "\nThe machine B will have higher profitability")
+
+
+
+
+
+
+
diff --git a/3434/CH14/EX14.19/Ex14_19.sce b/3434/CH14/EX14.19/Ex14_19.sce
new file mode 100644
index 000000000..b0b6503bf
--- /dev/null
+++ b/3434/CH14/EX14.19/Ex14_19.sce
@@ -0,0 +1,24 @@
+clc
+// given data
+
+Co=120000.0 // cost in Rs
+N=5 // useful life
+T=40/100.0 // tax rate
+i=9/100.0 // interest rate
+Earning=[33000.0,35000.0,37000.0,39000,41000.0]
+Depreciate=Co/N // depreciation in Rs
+pretax=zeros(5)
+discshfl=zeros(5)
+for x = 2:6
+ pretax=Earning(x-1)-Depreciate
+ tax=0.4*pretax
+ ernng=pretax-0.4*pretax
+ cashf=ernng+Depreciate
+ discshfl(x-1)=cashf/(1+i)**(x-1)
+end
+netdiscntincm=sum(discshfl) // net discount income in Rs
+NPV=netdiscntincm-Co // NPV
+printf( "NPV of dryer is Rs %.2f",NPV)
+
+// The answer in the book is wrong as the value of discounted cashflow is incorrect
+
diff --git a/3434/CH14/EX14.2/Ex14_2.sce b/3434/CH14/EX14.2/Ex14_2.sce
new file mode 100644
index 000000000..023d2d15d
--- /dev/null
+++ b/3434/CH14/EX14.2/Ex14_2.sce
@@ -0,0 +1,13 @@
+clc
+
+// given data
+
+P=10.0 // in lakh rs
+i=12.25 // interest rate in %
+F=20 // final amount in lakh rs
+
+n=log(F/P)/log(1+i/100.0) // time in years
+
+printf("The number of years is %.2f years",n)
+
+
diff --git a/3434/CH14/EX14.20/Ex14_20.sce b/3434/CH14/EX14.20/Ex14_20.sce
new file mode 100644
index 000000000..801d6b38b
--- /dev/null
+++ b/3434/CH14/EX14.20/Ex14_20.sce
@@ -0,0 +1,13 @@
+clc
+// given data
+
+Co=300000 // cost in Rs
+S=20000.0 // salvage value in Rs
+N=15 // useful life
+
+D=(Co-S)/N // Depreciation
+BV=Co // Book Value
+for i =1:N
+ BV=BV-D;
+ printf(" The Book value at the end of %i th year is Rs %.2f\n",i,BV)
+end
diff --git a/3434/CH14/EX14.3/Ex14_3.sce b/3434/CH14/EX14.3/Ex14_3.sce
new file mode 100644
index 000000000..3cd7bdc9f
--- /dev/null
+++ b/3434/CH14/EX14.3/Ex14_3.sce
@@ -0,0 +1,9 @@
+clc
+//given data
+F=100000 // final amount in rs
+i=6 // interest rate in %
+n=10 // time in years
+
+P=F*(1/(1+i/100.0)**n) // initial amount
+
+printf("The initial value is Rs %.2f",P)
diff --git a/3434/CH14/EX14.4/Ex14_4.sce b/3434/CH14/EX14.4/Ex14_4.sce
new file mode 100644
index 000000000..3f1d38f17
--- /dev/null
+++ b/3434/CH14/EX14.4/Ex14_4.sce
@@ -0,0 +1,9 @@
+clc
+//given data
+A=500 // annual amount invested each year in rs
+i=9 // interest rate in %
+n=6 // time in years
+
+F=A*(((1+i/100.0)**n)-1)/(i/100.0) // future amount in rs
+
+printf("The Future amount will be Rs %.0f ",F)
diff --git a/3434/CH14/EX14.5/Ex14_5.sce b/3434/CH14/EX14.5/Ex14_5.sce
new file mode 100644
index 000000000..3eb20fbfb
--- /dev/null
+++ b/3434/CH14/EX14.5/Ex14_5.sce
@@ -0,0 +1,9 @@
+clc
+//given data
+F=12000 // Total amount in rs
+i=9 // interest rate in %
+n=4 // time in years
+
+A=F*(i/100.0)/(((1+i/100.0)**n)-1) //
+
+printf("The amount deposited each year should be Rs %i",A)
diff --git a/3434/CH14/EX14.6/Ex14_6.sce b/3434/CH14/EX14.6/Ex14_6.sce
new file mode 100644
index 000000000..794082b7a
--- /dev/null
+++ b/3434/CH14/EX14.6/Ex14_6.sce
@@ -0,0 +1,8 @@
+clc
+//given data
+A=30000.0 // amount save each year in rs
+i=10/100.0 // interest rate
+n=8 // time in years
+
+P=A*(((1+i)**n)-1)/(i*((1+i)**n)) // amount spent on replacement in rs
+printf("Amount spent on replacement is Rs %i",P)
diff --git a/3434/CH14/EX14.7/Ex14_7.sce b/3434/CH14/EX14.7/Ex14_7.sce
new file mode 100644
index 000000000..c3edd8ba7
--- /dev/null
+++ b/3434/CH14/EX14.7/Ex14_7.sce
@@ -0,0 +1,26 @@
+clc
+//given data
+i=12/100.0 // interest rate
+n=10 // time in years
+
+time=100.0 // days geyser is used in year
+effi=0.9 // efficiency of geyser
+w=100.0 // weight of water in kg
+C=4.2 // heat capacity in kJ/kg-degree C
+theta=60-15 // temperature difference in C
+cost=4 // cost of electricity per kWh
+
+Elec=(1/effi)*w*C*theta/3600.0 // electricity used in kWh/day
+
+
+
+A=Elec*time*cost // annual saving in Rs
+
+P=A*(((1+i)**n)-1)/(i*((1+i)**n)) // final amount in rs
+
+printf("The final amount after 10 years is Rs %i",P)
+
+// the answer is slightly different in textbook due to approximation while in scilab answers are precise
+end
+
+
diff --git a/3434/CH14/EX14.8/Ex14_8.sce b/3434/CH14/EX14.8/Ex14_8.sce
new file mode 100644
index 000000000..ba4ce98c6
--- /dev/null
+++ b/3434/CH14/EX14.8/Ex14_8.sce
@@ -0,0 +1,18 @@
+clc
+// given data
+
+P=200000.0 //principal value in rs
+i=10/100.0 // interest rate
+n=25.0 // time in years
+L=2.0 // power produced in kW
+
+A=P*(i*(1+i)**n)/(-1+(1+i)**n) // annualised capital cost in rs
+
+maintcost=P*0.05 // annual maintainence cost
+Totalcost=A+maintcost // total annual cost
+
+Elec=L*0.25*10*365 // annual electricity production
+
+Cost=Totalcost/Elec // unit cost of electricity production
+
+printf("unit cost of electricity production is Rs %.1f",Cost)
diff --git a/3434/CH14/EX14.9/Ex14_9.sce b/3434/CH14/EX14.9/Ex14_9.sce
new file mode 100644
index 000000000..d2f6092d5
--- /dev/null
+++ b/3434/CH14/EX14.9/Ex14_9.sce
@@ -0,0 +1,24 @@
+clc
+// given data
+
+G=1 //gradient per period in lakh rs
+i=12/100.0 // discount rate
+n=5 // time in years
+A1=10 // payment at end of 1st year in lakhs rs
+loan=40 // load applied for in lakhs
+
+
+AGin=(1/i)-5*1/(-1+(1+i)**n) // gradient to uniform series conversion factor
+
+Ag=A1+G*AGin // in lakhs Rs
+
+Pg=Ag*(-1+(1+i)**n)/(i*(1+i)**n) // present worth in lakhs rs
+
+printf( "The present worth is Rs %.2f Lakh",Pg)
+
+if (Pg*0.85<loan)
+ printf( "\n Loan is not given as amount is less than applied for loan")
+
+else
+printf( "\n Loan is given" )
+end
diff --git a/3434/CH2/EX2.1/Ex2_1.sce b/3434/CH2/EX2.1/Ex2_1.sce
new file mode 100644
index 000000000..e875e6461
--- /dev/null
+++ b/3434/CH2/EX2.1/Ex2_1.sce
@@ -0,0 +1,18 @@
+clc
+
+// Given data:
+
+Hcoal=20.0 // heating value of coal in MJ
+W=200.0e3 // weight of coal in kg
+E=1.2e6 // Electrical energy generated in MJ
+delH=1.6e6 // Heat energy generated in MJ
+ne=0.30 // electrical efficiency
+nb=0.8 // thermal efficiency
+
+QA=Hcoal*W // total thermal energy input to plant in MJ
+nco=(E+delH)/QA // efficiency of cogeneration plant
+e=E/(E+delH) // electrical fraction
+
+nc=1/((e/ne)+(1-e)/nb) // overall efficiency
+
+printf("The overall efficiency is %0.2f %%",nc*100)
diff --git a/3434/CH4/EX4.1/Ex4_1.sce b/3434/CH4/EX4.1/Ex4_1.sce
new file mode 100644
index 000000000..c9e634e11
--- /dev/null
+++ b/3434/CH4/EX4.1/Ex4_1.sce
@@ -0,0 +1,17 @@
+// given data
+clc
+n=319 // 15th November
+Gama=30 // angle in degree
+Beta=45 // angle in degree
+phi=18.9 // latitude in degree
+solartime=13.5-4*(81.733-72.816)/60 +14.74/60 // in hours
+delta=23.45*(sin(360.0*(284.0+n)/365.0)) // in degree
+B=(360.0*(n-81)/364)
+E=(9.87*sin(2*B)-7.53*cos(B)-15*sin(B))
+w=(solartime-12)*15 // hour angle
+theta=-%i*acos(((cos(phi)*cos(Beta)+sin(phi)*sin(Beta)*cos(Gama))*cos(delta)*cos(w) + cos(delta)*sin(w)*sin(Beta)*sin(Gama) + sin(delta)*(sin(phi)*cos(Beta)-cos(phi)*sin(Beta)*cos(Gama)))*180/%pi)
+
+printf("the angle is %.2f degrees",theta)
+
+
+// The answer in the textbook is slightly different due to approximations
diff --git a/3434/CH4/EX4.2/Ex4_2.sce b/3434/CH4/EX4.2/Ex4_2.sce
new file mode 100644
index 000000000..179b04698
--- /dev/null
+++ b/3434/CH4/EX4.2/Ex4_2.sce
@@ -0,0 +1,17 @@
+// given data
+clc
+n1=1 // 1st january
+n2=182 // july 1
+
+phi=34.083 // latitude in degree
+
+delta1=23.45*sin((%pi/180)*(360.0*(284.0+n1)/365.0)) // in degree
+delta2=23.45*sin(((%pi/180)*360.0*(284.0+n2)/365.0)) // in degree
+
+td1=(2.0/15)*(acos((tan(phi)/tan(delta1)))*180/%pi) // daylight hours for january 1
+td2=(2.0/15)*(acos((tan(phi)/tan(delta2)))*180/%pi) // daylight hours for july 1
+
+printf ("daylight hours for january 1 are %.2f hours",td1)
+printf (" \n daylight hours for july 1 are %.2f hours",td2)
+
+// the answers are slightly different in textbook due to approximation while here ansers are precise
diff --git a/3434/CH4/EX4.3/Ex4_3.sce b/3434/CH4/EX4.3/Ex4_3.sce
new file mode 100644
index 000000000..87334b9db
--- /dev/null
+++ b/3434/CH4/EX4.3/Ex4_3.sce
@@ -0,0 +1,20 @@
+// given data
+clc
+
+a=0.25 // constant for delhi from table 4.1
+b=0.57 // constant for delhi from table 4.1
+pi=27.166 // latitute in degrees
+n=17 // day
+nbar=7 // sunshine hours
+
+dlta=23.45*(sind((360.0*(284.0+n)/365.0))) // in degree
+
+wt=acosd((-tand(pi)*(tand(dlta)))) // hour angle at sunrise
+Nbar=(2*(wt)/15.0)// day length
+
+Ho=3600*(24.0/%pi)*1.367*(1+0.033*cosd((360.0*n/365)))*(cosd(pi)*cosd(dlta)*sind(wt)+1.3728*sind(dlta)*sind(pi)) // in kj/m^2 per day
+
+Hg=Ho*(a+b*(nbar/Nbar)) // in kj/m^2 per day
+printf("The monthly average is %.2f in kj/m^2 per day",Hg)
+
+// the answer in the book is slightly different due to approximations
diff --git a/3434/CH4/EX4.4/Ex4_4.sce b/3434/CH4/EX4.4/Ex4_4.sce
new file mode 100644
index 000000000..0992e6c89
--- /dev/null
+++ b/3434/CH4/EX4.4/Ex4_4.sce
@@ -0,0 +1,12 @@
+// given data
+clc
+Hg=14450.418 // in kj/m^2 per day from previous example
+Ho=22926.408 // in kj/m^2 per day from previous example
+KT=Hg/Ho // unitless
+Hd=Hg*(1.354-1.570*KT) // in kj/m^2 per day
+Hb= Hg-Hd // in kj/m^2 per day
+
+printf("Monthly average of daily diffused is %.2f in kj/m^2 per day",Hd)
+printf("\n beam radiation is %.2f in kj/m^2 per day",Hb)
+
+// the solution inthe textbook is slighlty different as the values from previous examples are used which too are incorrect
diff --git a/3434/CH4/EX4.5/Ex4_5.sce b/3434/CH4/EX4.5/Ex4_5.sce
new file mode 100644
index 000000000..2762e83e8
--- /dev/null
+++ b/3434/CH4/EX4.5/Ex4_5.sce
@@ -0,0 +1,33 @@
+// given data
+clc
+// most of the data is used is from previous example:
+phi=27.166 // in degree
+n=17 // day
+ws=78.66 // degrees
+dlta=-20.96 // in degrees
+Ho=22926.408 // kj/m^2 per day
+Hg=14450.418 // kj/m^2 per day
+Hd=5266.2473 // kj/m^2 per day
+
+w=(11.5-12)*15 // in degrees
+
+Io=3600*1.367*(1+0.033*cosd(360*17/365.0))*(cosd((phi))*cosd((dlta))*cosd((w)))+sind((dlta))*sind((phi))
+
+a=0.409+0.5016*sind(ws-60)
+b=0.6609-0.4767*sind(ws-60)
+
+Ig=Hg*(a+b*cosd(w))*Io/Ho // in kJ/m^2-h
+
+printf("The monthly average of hourly global radiation is %.2f kJ/m^2-h",Ig)
+
+adash=0.4922+(0.27/(Hd/Hg))
+bdash=2*(1-adash)*(sind(ws)-1.7328*cosd(78.66))/(1.7328-0.5*sind(2*78.66))
+
+
+Id=5259.6*(1.2321-0.3983*cosd((w)))*Io/Ho // kJ/m^2-h
+
+
+
+printf("\n The hourly diffuse radiations are %.2f kJ/m^2-h",Id)
+
+// the solution in the textbook is wrong as the value of b and bdash are wrong
diff --git a/3434/CH4/EX4.6/Ex4_6.sce b/3434/CH4/EX4.6/Ex4_6.sce
new file mode 100644
index 000000000..dd763ef88
--- /dev/null
+++ b/3434/CH4/EX4.6/Ex4_6.sce
@@ -0,0 +1,25 @@
+// given data
+clc
+phi=28.58 // in degree
+n=135 // may 15
+dlta=23.45*sind((360*(284+n)/365.0))
+
+w=(13.5-12)*15 // in degrees
+A=3981.6 // in W/m^2 from table 4.2
+B=0.177// from table 4.2
+C=0.130 // from table 4.2
+
+costhetaz=cosd(phi)*cosd(dlta)*cosd(w)+sind(dlta)*sind(phi)
+
+Ibn=A*exp(-B/0.922)// kJ/m^2-h
+
+
+Id=C*Ibn // kJ/m^2-h
+
+printf("The diffused radiation is %.2f kJ/m^2-h",Id)
+Ib=Ibn*0.922 // in kJ/m^2-h
+
+printf("\n The beam radiation is %.2f kJ/m^2-h",Ib)
+Ig=Ib+Id // in kJ/m^2-h
+
+printf("\n The global radiation is %.2f kJ/m^2-h",Ig)
diff --git a/3434/CH4/EX4.7/Ex4_7.sce b/3434/CH4/EX4.7/Ex4_7.sce
new file mode 100644
index 000000000..fa25f4ac2
--- /dev/null
+++ b/3434/CH4/EX4.7/Ex4_7.sce
@@ -0,0 +1,20 @@
+// given data
+clc
+phi=28.58 // in degree
+B=30 // in degree
+n=318 // november 14
+Hg=16282.8 // in kJ/m^2-day from Table C1 appendix C
+Hd=4107.6 // in kJ/m^2-day from Table C2 appendix C
+
+dlta=23.45*(sind((360.0*(284.0+n)/365.0))) // in degrees
+
+ws=acosd(tand(phi)*(atan(dlta))) // hour angle at sunrise
+
+Rb=(ws*sind(dlta)*sind(phi-B)+cosd((dlta))*sind(ws)*cosd(phi-B))/(ws*sind(dlta)*sind(phi)+cosd((dlta))*sind(ws)*cosd((phi)))
+
+Rd=(1+cosd((B)))/2
+
+Rr=0.2*(1-cosd((B)))/2
+
+Ht=((1-(Hd/Hg))*1.56+(Hd/Hg)*Rd + Rr)*Hg
+printf("Monthly average total radiation is %.2f kJ/m^2-h",Ht)
diff --git a/3434/CH6/EX6.1/Ex6_1.sce b/3434/CH6/EX6.1/Ex6_1.sce
new file mode 100644
index 000000000..a458f5292
--- /dev/null
+++ b/3434/CH6/EX6.1/Ex6_1.sce
@@ -0,0 +1,10 @@
+clc
+// Given data
+
+T=27 +273 // temperature converted in kelvin\n",
+NV=1e22 // effective density of states in valence band in cm^(-3)\n",
+NA=1e19 // acceptor density in cm^(-3)\n",
+k=8.629*10**(-5) // boltzmann constant in eV/K\n",
+EFV=k*T*log(NV/NA) // closeness of fermi level i.e Ef-Ev\n",
+printf("Closeness of fermi level with valence bond is %.4f eV",EFV)
+
diff --git a/3434/CH6/EX6.2/Ex6_2.sce b/3434/CH6/EX6.2/Ex6_2.sce
new file mode 100644
index 000000000..d42133a42
--- /dev/null
+++ b/3434/CH6/EX6.2/Ex6_2.sce
@@ -0,0 +1,9 @@
+// Given data :
+clc
+clear
+E =2.42 // Band gap in eV
+hc=1.24 // planck's constant * speed of light
+// solution
+Lambda=1.24/E // in micro-meter usinf eq 6.4
+
+printf( "The optimum wavelength is %.3f micro meter",Lambda )
diff --git a/3434/CH6/EX6.3/Ex6_3.sce b/3434/CH6/EX6.3/Ex6_3.sce
new file mode 100644
index 000000000..b3744b494
--- /dev/null
+++ b/3434/CH6/EX6.3/Ex6_3.sce
@@ -0,0 +1,15 @@
+clc
+clear
+// Given data :
+
+Pout=1*735 // motor power output in W
+Peffi=0.85 // motor efficiency
+cellarea=9*4*125*125e-6 // area in m^2
+Rad=1000 //incident radiation in kW/m^2
+celleffi=0.12 // cell efficiency
+
+// soln.
+Pin=Pout/Peffi // power req by motor in W
+N=Pin/(Rad*cellarea*celleffi) // number of modules
+
+printf("%.f number of modules are required",N)
diff --git a/3434/CH6/EX6.4/Ex6_4.sce b/3434/CH6/EX6.4/Ex6_4.sce
new file mode 100644
index 000000000..6d0c226ac
--- /dev/null
+++ b/3434/CH6/EX6.4/Ex6_4.sce
@@ -0,0 +1,12 @@
+clc
+clear
+// given:
+noMPPTpower=10*8 // power without MPPT in W from fig 6.25
+MaxP=25*5 // maximum power by PV module in W from fig 6.25
+effi=0.95 // efficiency of MPPT
+MPPTcost=4000 // Cost in rupees
+// Soln
+Pact=MaxP*effi // actual power produced in W
+Psurplus=Pact-noMPPTpower // Surplus power in W
+t=MPPTcost/(3*Psurplus/1000) // time required in hours
+printf("time required is %.1f hours",t)
diff --git a/3434/CH7/EX7.1/Ex7_1.sce b/3434/CH7/EX7.1/Ex7_1.sce
new file mode 100644
index 000000000..ac89e4d55
--- /dev/null
+++ b/3434/CH7/EX7.1/Ex7_1.sce
@@ -0,0 +1,42 @@
+// given data
+clear
+clc
+rho=1.226 // air density in kG/m^3
+alpha =0.14
+H=10.0 // height at which wind speed is given in m
+uH=12.0 // speed in m/s
+z=100.0 // tower height in m
+D=80.0 // diameter in m
+effigen=0.85 // efficiency og generator
+
+A=%pi*(D**2)/4 // area in m^3
+u0=uH*(z/H)**alpha // velocity at 100 m in m/s
+u1=0.8*u0 // exit velocity in m/s
+Po=(A*rho*u0**3)/2 // Total Power in Wind
+// Part 1
+printf("Total Power in Wind is %0.2f MW \n",Po/1000000)
+
+// Part 2
+a=(u0-u1)/u0 // interference factor
+Cp=4*a*(1-a)**2 // Power Coefficient
+PT=Cp*Po/1000000 // power to turbine in MW
+
+printf("The power extracted by turbine is %0.2f MW \n",PT)
+
+// Part 3
+Pelec=effigen*PT // electrical power generated in MW
+
+printf("The Electrical power generated is %0.2f MW \n",Pelec)
+
+// Part 4
+FA=4*a*(1-a)*(A*rho*u0**2)/2 // axial thrust in N
+
+printf("The axial thrust is %0.2f N \n",FA)
+
+// Part 5
+
+Fmax=(A*rho*u0**2)/2 // maximum thrust in N
+printf("Maximum axial thrust is %0.2f N \n ",Fmax)
+
+
+
diff --git a/3434/CH7/EX7.2/Ex7_2.sce b/3434/CH7/EX7.2/Ex7_2.sce
new file mode 100644
index 000000000..dc0d2768e
--- /dev/null
+++ b/3434/CH7/EX7.2/Ex7_2.sce
@@ -0,0 +1,27 @@
+// given data
+clear
+clc
+
+u0=20.0 // wind speed in m/s
+T=273+27.0 // temp in kelvin
+P=1.01325e5 // pressure in Pa
+R=287.0 // gas constant
+r=80/2.0 // radius of rotor in m
+w=2*%pi*40/60.0 // rotor speed in rad/s
+A=%pi*r**2 // area of rotor in m^2
+
+// soln:
+rho=P/(R*T) // density in Kg/m^3
+a=1/3.0 // condition for maximum output
+Cpmax=4*a*(1-a)**2 // Power Coefficient
+Lambda=r*w/u0 //tip speed ratio
+
+Po=(A*rho*u0**3)/2000000 // Total Power in Wind in W
+
+Tm=Po*r/u0 // Torque in N
+
+Ctmax=Cpmax/Lambda // torque coefficient
+
+Tshmax=Tm*Ctmax // torque at shaft
+
+printf("The torque at shaft for maximum output is %0.2f N",Tshmax)
diff --git a/3434/CH7/EX7.3/Ex7_3.sce b/3434/CH7/EX7.3/Ex7_3.sce
new file mode 100644
index 000000000..505c50461
--- /dev/null
+++ b/3434/CH7/EX7.3/Ex7_3.sce
@@ -0,0 +1,15 @@
+// Given Data
+// given data
+clear();
+clc();
+u0=15.0 // wind speed in m/s
+R=80/2.0 // radius of rotor in m
+n=3 // number of blades
+
+Lambda=4*%pi/n // condition of tip ratio for maximum output
+
+w=Lambda*u0/R // using Eq 7.21 rotor speed in rad/s
+
+N=w*60/(2*%pi) // rotor speed in RPM
+
+printf( "For optimum energy the rotor speed should be %.1f rpm",N)
diff --git a/3434/CH8/EX8.1/Ex8_1.sce b/3434/CH8/EX8.1/Ex8_1.sce
new file mode 100644
index 000000000..f203c8454
--- /dev/null
+++ b/3434/CH8/EX8.1/Ex8_1.sce
@@ -0,0 +1,14 @@
+clc
+// given data
+Gascook=5*0.227 // gas required for cooking in m^3/day
+Gaslight=0.126*2*3 // gas required for lighting in m^3/day
+Totalgasreq=Gascook+Gaslight // in m^3/day
+gasperday=0.34*0.18*7 // in m^3/day
+
+n=1+Totalgasreq/gasperday // no. of cows
+printf("The number of cows is %i",n)
+cowfeed=7*n // in kg
+slurry=cowfeed*2.0/1090 // in m^3
+totalslurry=50.0*slurry // in m^3
+reqvolume=totalslurry/0.9
+printf("\n The total volume of digester is %.2f m^3",reqvolume)
diff --git a/3434/CH8/EX8.2/Ex8_2.sce b/3434/CH8/EX8.2/Ex8_2.sce
new file mode 100644
index 000000000..7071bddc7
--- /dev/null
+++ b/3434/CH8/EX8.2/Ex8_2.sce
@@ -0,0 +1,30 @@
+clc
+// given data
+Gaslight=10*0.227*4 // gas required for lighting in m^3/day
+Eleccomp=10*250*6*60*60/1000000.0 // electrical energy required by computers in MJ
+effith=0.25 // thermal efficieny
+efficonv=0.80 // conversion efficiency
+Heat=23.0 // heating value of biogas in MJ/m^3
+rho=1090.0 // slurry density in kg/m^3
+Engineinput=Eleccomp/(effith*efficonv)
+
+energypump=746*2*2*60*60/1000000.0 // mechanical energy required for pumping in MJ
+themalinput=energypump/effith // required thermal input in MJ
+totalinput=themalinput+Engineinput // total thermal input required by engine
+
+Volreq=totalinput/Heat // volume required per day in m^3/day
+Totalrq=Volreq+Gaslight // total gas required in m^3 /day
+
+n=Totalrq/(7*0.18*0.34) // solid mass is 18% and n is number of cows required
+n=round(n)
+printf("The number of cows is %i",n)
+feed=7*n // daily feed in kg
+slurry=2*feed // in kg
+volslurry=slurry/rho // volume of slurry added per day in m^3
+totalvol=50*volslurry/0.9 // total volume for 50 days in m^3 when 90 % is occupied by slurry
+
+printf("\n The size of biogas plant is %.2f m^3",totalvol)
+
+
+
+
diff --git a/3434/CH8/EX8.3/Ex8_3.sce b/3434/CH8/EX8.3/Ex8_3.sce
new file mode 100644
index 000000000..63622ccce
--- /dev/null
+++ b/3434/CH8/EX8.3/Ex8_3.sce
@@ -0,0 +1,17 @@
+clc
+// given data
+Voldaily=1200 // daily production in m^3/day
+prodrate=Voldaily/24.0 // gas production rate per hour
+consrate=Voldaily/6.0 //gas consumtion rate per hour
+Vg1=(consrate-prodrate)*2 // gas holder size required for 2 hours in litres
+Vg2=prodrate*9 // gas holder size for 9 hours without consumption in litres
+if Vg1>Vg2
+ Vgmax=Vg1
+else
+ Vgmax=Vg2
+Vg=Vgmax*1.25 // required gas holder with 25 % safety margin in litres
+printf("\n required gas holder size is %.2f litres",Vg)
+Capacity=Vg/Voldaily // required gas holder capacity
+
+printf("\n required gas holder capacity is %.2f %%",Capacity*100)
+
diff --git a/3434/CH8/EX8.4/Ex8_4.sce b/3434/CH8/EX8.4/Ex8_4.sce
new file mode 100644
index 000000000..6d83dff1e
--- /dev/null
+++ b/3434/CH8/EX8.4/Ex8_4.sce
@@ -0,0 +1,29 @@
+clc
+// given data
+drymattrprd=2 // dry matter produced in kg/day/cow
+gasyield=0.22 // biogas yield in m^3 /kg
+drymttr=18/100.0 // dry matter in cowdung
+rho=1090 // slurry density in kg/m^3
+effibrnr=0.6 // burner efficiency
+Heat=23.0 // heating value of biogas in MJ/m^3
+
+dungprd=drymattrprd*2/0.18 // dung produce in kg/day by 2 cows
+slurry=2*dungprd // slurry produce in kg/day
+volslurry=slurry/rho // volume of slurry in m^3
+totalslurry=30*volslurry // for 30 days slurry in m^3
+digestersize=totalslurry/0.85 // in m^3
+printf("the volume of digester is %.2f m^3",digestersize)
+
+gasprd=drymattrprd*2*gasyield // gas produced in m^3/day
+
+Energytherm=gasprd*Heat*effibrnr // total thermal energy available in MJ/day
+
+
+thermalpower=Energytherm*1000000/(24*60*60) // in watts
+
+printf (" \n total thermal power is %.2f W",thermalpower)
+
+
+
+
+
diff --git a/3434/CH9/EX9.1.i/Ex9_1_i.sce b/3434/CH9/EX9.1.i/Ex9_1_i.sce
new file mode 100644
index 000000000..7916d07c5
--- /dev/null
+++ b/3434/CH9/EX9.1.i/Ex9_1_i.sce
@@ -0,0 +1,11 @@
+clc
+// given data
+G=39.0 // temperature gradient in K/km.
+h2=10.0 // depth in km
+rhor=2700.0 // kg/m^3
+cr=820.0 // in J/kg-K
+
+h1=120/G // T1-T0=120 K is given
+h21=h2-h1 // in km
+E0byA=(rhor*(1000**3)*G*cr*h21**2)/2 // in J/km^2 Heat content per square km
+printf("The Heat content per square km is %.3e J/km^2",E0byA)
diff --git a/3434/CH9/EX9.1.ii/Ex9_1_ii.sce b/3434/CH9/EX9.1.ii/Ex9_1_ii.sce
new file mode 100644
index 000000000..45266d0e5
--- /dev/null
+++ b/3434/CH9/EX9.1.ii/Ex9_1_ii.sce
@@ -0,0 +1,19 @@
+clc
+// given data
+G=39.0 // temperature gradient in K/km.
+h2=10.0 // depth in km
+rhor=2700.0 // kg/m^3
+cr=820.0 // in J/kg-K
+QbyA=0.5 //water flow rate in m^3/sec-km^2
+rhow=1000.0 // density of water in kg/m^3
+cw=4200.0 // specific heat of water in J/kg-K
+h1=120.0/G // T1-T0=120 K is given
+h21=h2-h1 // in km
+t=25 // time in years
+
+thtao=G*h21/2.0 // in degree K
+printf( "Useful initial temp is %.2f degree K",thtao)
+tau=rhor*cr*h21*(1000**3)/(QbyA*rhow*cw) // in seconds
+tau=tau/(2*60*60*24*365) // in years
+thta=thtao*exp(-t/tau) // in degree Kelvin
+printf( " \n Useful average temp after 25 years is %.2f degree K",thta)
diff --git a/3434/CH9/EX9.1.iii/Ex9_1_iii.sce b/3434/CH9/EX9.1.iii/Ex9_1_iii.sce
new file mode 100644
index 000000000..6387a3e1d
--- /dev/null
+++ b/3434/CH9/EX9.1.iii/Ex9_1_iii.sce
@@ -0,0 +1,23 @@
+clc
+// given data
+G=39.0 // temperature gradient in K/km.
+h2=10.0 // depth in km
+rhor=2700.0 // kg/m^3
+cr=820.0 // in J/kg-K
+
+h1=120/G // T1-T0=120 K is given
+h21=h2-h1 // in km
+E0byA=(rhor*(1000**3)*G*cr*h21**2)/2 // in J/km^2 Heat content per square km
+
+thetao=G*h21/2.0 // in degree K
+tau=rhor*cr*h21*(1000**3)/(QbyA*rhow*cw) // in seconds
+tau=tau/(2*60*60*24*365) // in years
+theta=thetao*exp(-t/tau) // in degree Kelvin
+
+Heatinitial=E0byA/(60*60*365*24*tau)/1000000 // intial heat extraction rate in MW /km^2
+
+Heat25=Heatinitial*exp(-t/tau) // heat extraction rate after 25 years in MW /km^2
+
+printf( "Initial Heat extraction rate is %.2f MW/km^2",Heatinitial)
+
+printf(" \n Final Heat extraction rate is %.2f MW/km^2",Heat25)
diff --git a/3434/CH9/EX9.2.i/Ex9_2_i.sce b/3434/CH9/EX9.2.i/Ex9_2_i.sce
new file mode 100644
index 000000000..fca95355b
--- /dev/null
+++ b/3434/CH9/EX9.2.i/Ex9_2_i.sce
@@ -0,0 +1,23 @@
+clc
+// given data
+w=0.6 // in km
+h2=2.5 // in km
+p=5/100.0 // porosity
+rhor=3000.0 // density of sediment in kg/m^3
+cr=750.0 // specific heat of sediment in J/kg-K
+rhow=1000.0 // density of water in kg/m^3
+cw=4200.0 // specific heat of water in J/kg-K
+G=35.0 // temperature gradient in degree C/km
+T1=45.0 // temp 1 in degree celsius
+T0=12.0 // temp 2 in degree celsius
+Q=0.75 // water extraction rate in m^3/sec-km^2
+
+T2=T0+G*h2 // initial temp in degree celsius
+
+thetao=T2-T1 // in degree celsius
+
+E0byA=(p*rhow*(1000**3)*cw+(1-p)*rhor*(1000**3)*cr)*w*thetao // in J/km^2
+
+printf( "The heat content is %.2e J/km^2",E0byA)
+
+// the answer is different in textbook due to wrong thetao
diff --git a/3434/CH9/EX9.2.ii/Ex9_2_ii.sce b/3434/CH9/EX9.2.ii/Ex9_2_ii.sce
new file mode 100644
index 000000000..fca953e7c
--- /dev/null
+++ b/3434/CH9/EX9.2.ii/Ex9_2_ii.sce
@@ -0,0 +1,19 @@
+clc
+// given data
+w=0.6 // in km
+h2=2.5 // in km
+p=5/100.0 // porosity
+rhor=3000.0 // density of sediment in kg/m^3
+cr=750.0 // specific heat of sediment in J/kg-K
+rhow=1000.0 // density of water in kg/m^3
+cw=4200.0 // specific heat of water in J/kg-K
+G=35.0 // temperature gradient in degree C/km
+T1=45.0 // temp 1 in degree celsius
+T0=12.0 // temp 2 in degree celsius
+Q=0.75 // water extraction rate in m^3/sec-km^2
+
+tau=((p*rhow*cw+(1-p)*rhor*cr)*w*1000**3/(Q*rhow*cw))/(60*60*24*365) // in years
+
+printf( "Time constant is %.1f years",tau)
+
+// the answer is different in textbook due to wrong calculations
diff --git a/3434/CH9/EX9.2.iii/Ex9_2_iii.sce b/3434/CH9/EX9.2.iii/Ex9_2_iii.sce
new file mode 100644
index 000000000..09f010036
--- /dev/null
+++ b/3434/CH9/EX9.2.iii/Ex9_2_iii.sce
@@ -0,0 +1,26 @@
+clc
+// given data
+w=0.6 // in km
+h2=2.5 // in km
+p=5/100.0 // porosity
+rhor=3000.0 // density of sediment in kg/m^3
+cr=750.0 // specific heat of sediment in J/kg-K
+rhow=1000.0 // density of water in kg/m^3
+cw=4200.0 // specific heat of water in J/kg-K
+G=35.0 // temperature gradient in degree C/km
+T1=45.0 // temp 1 in degree celsius
+T0=12.0 // temp 2 in degree celsius
+Q=0.75 // water extraction rate in m^3/sec-km^2
+T2=T0+G*h2 // initial temp in degree celsius
+t=25 // time in years
+thetao=T2-T1 // in degree celsius
+
+E0byA=(p*rhow*(1000**3)*cw+(1-p)*rhor*(1000**3)*cr)*w*thetao // in J/km^2
+
+tau=((p*rhow*cw+(1-p)*rhor*cr)*w*1000**3/(Q*rhow*cw)) // in seconds
+Pperkm2=(E0byA)/(tau*1000000) // initial power per square km in MW/km^2
+printf("initial power per square km is %.2f MW/km^2",Pperkm2)
+Power20=Pperkm2*exp(-25*60*60*24*365/tau) // power per square km in MW/km^2 after 25 years
+printf("\n power per square km in MW/km^2 after 25 years is %.2f MW/km^2",Power20)
+
+// The answers are slightly different due to error in textbook