summaryrefslogtreecommitdiff
path: root/3434/CH4
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /3434/CH4
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '3434/CH4')
-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
7 files changed, 144 insertions, 0 deletions
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)