diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /2087/CH6 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '2087/CH6')
-rwxr-xr-x | 2087/CH6/EX6.1/example6_1.sce | 36 | ||||
-rwxr-xr-x | 2087/CH6/EX6.1/example6_1_4.jpg | bin | 0 -> 25528 bytes | |||
-rwxr-xr-x | 2087/CH6/EX6.1/example6_1_5.jpg | bin | 0 -> 23896 bytes | |||
-rwxr-xr-x | 2087/CH6/EX6.10/example6_10.sce | 31 | ||||
-rwxr-xr-x | 2087/CH6/EX6.2/example6_2.sce | 27 | ||||
-rwxr-xr-x | 2087/CH6/EX6.3/example6_3.jpg | bin | 0 -> 29829 bytes | |||
-rwxr-xr-x | 2087/CH6/EX6.3/example6_3.sce | 22 | ||||
-rwxr-xr-x | 2087/CH6/EX6.4/example6_4.sce | 26 | ||||
-rwxr-xr-x | 2087/CH6/EX6.5/example6_5.sce | 87 | ||||
-rwxr-xr-x | 2087/CH6/EX6.6/example6_6.sce | 60 | ||||
-rwxr-xr-x | 2087/CH6/EX6.8/example6_8.sce | 27 | ||||
-rwxr-xr-x | 2087/CH6/EX6.9/example6_9.sce | 34 |
12 files changed, 350 insertions, 0 deletions
diff --git a/2087/CH6/EX6.1/example6_1.sce b/2087/CH6/EX6.1/example6_1.sce new file mode 100755 index 000000000..5ad1b5d66 --- /dev/null +++ b/2087/CH6/EX6.1/example6_1.sce @@ -0,0 +1,36 @@ +
+
+//exampple 6.1
+//determine maximum reservior level
+//maximum discharge over spillway
+//plot inflow and routed hydrograph and find peak flow and peak lag
+clc;funcprot(0);
+//given
+e=[100 100.3 100.6 100.9 101.2 101.5 101.8 102.1 102.4 102.7]; //elevation(km)
+A=[405 412 420 425 428 436 445 453 460 469]; //area
+o=[0 14.9 42.2 77.3 119 169 217 272 334 405]; //outflow
+c(1)=0;
+for i=2:10
+ dh(i)=e(i)-e(i-1);
+ s(i)=dh(i)/3*(A(i-1)+A(i)+(A(i-1)*A(i))^0.5); //storage between contours
+ c(i)=c(i-1)+s(i); //cumulative storage
+ h(i)=c(i)/1.08; //2s/t
+ h1(i)=h(i)-o(i); //2s/t-o
+ h2(i)=h(i)+o(i); //2s/t+o
+end
+T=[0:6:102];
+I=[42 45 57 88 147 210 272 340 350 338 314 288 263 240 198 170 143 120]; //inflow
+h4=[0 0 60 122 185 266 362 455 545 605 623 620 600 575 550 515 470 430]; //2s/t-0 obtained from curve a
+O=[0 10 24 42 74 130 194 260 316 334 328 312 286 264 236 204 177 150]; //outflow read from curve a
+re=[100.2 100.39 100.58 100.86 101.26 101.65 102.03 102.31 102.4 102.37 102.3 102.18 102.06 101.9 101.72 101.56 102.4]; //reservior elevation read from curve b
+for i=2:17
+ t(i)=I(i-1)+I(i); //I1+I2
+ h3(i)=t(i)+h4(i); //2s/t+O
+end
+pt=T(10)-T(9);
+d=I(9)-O(10);
+//results
+mprintf(" maximum reservior level=%f m.",re(10));
+mprintf("\nmaximum discharge over spillway=%f cumecs.",O(10));
+mprintf("\nreduction in peak discharge=%f cumecs.",d);
+mprintf("\npeak lag=%f hours.",pt);
diff --git a/2087/CH6/EX6.1/example6_1_4.jpg b/2087/CH6/EX6.1/example6_1_4.jpg Binary files differnew file mode 100755 index 000000000..0a84d8fa5 --- /dev/null +++ b/2087/CH6/EX6.1/example6_1_4.jpg diff --git a/2087/CH6/EX6.1/example6_1_5.jpg b/2087/CH6/EX6.1/example6_1_5.jpg Binary files differnew file mode 100755 index 000000000..e4dc49eb0 --- /dev/null +++ b/2087/CH6/EX6.1/example6_1_5.jpg diff --git a/2087/CH6/EX6.10/example6_10.sce b/2087/CH6/EX6.10/example6_10.sce new file mode 100755 index 000000000..1d114e835 --- /dev/null +++ b/2087/CH6/EX6.10/example6_10.sce @@ -0,0 +1,31 @@ +
+
+//example 6.10
+//calculate
+//minimum capacity of reservior
+//the initial storage storage required to maintain uniform demand
+clc;funcprot(0);
+//given
+in=[2.83 4.25 5.66 18.4 22.64 22.64 19.81 8.49 7.1 7.1 5.66 5.66]; //inflow(x10^5)
+s=0;
+for i=1:12
+ s=s+in(i);
+end
+avd=s/12; //average demand(x10^5)
+s=0;t=0;
+for i=1:12
+ e(i)=avd-in(i);
+ if e(i)<0 then
+ S(i)=-e(i); //surplus(x10^5)
+ s=s+S(i);
+ else
+ D(i)=e(i); //Deficit(x10^5)
+ t=t+D(i);
+ end
+end
+
+d=(s-(t-D(1)-D(2)-D(3)));
+s=s;
+
+mprintf("minimum capacity of reservior=%fD+5 cumec.",s);
+mprintf("\nstorage required to maintain uniform demand=%fD+5 cumec",d);
diff --git a/2087/CH6/EX6.2/example6_2.sce b/2087/CH6/EX6.2/example6_2.sce new file mode 100755 index 000000000..aa1eee3d4 --- /dev/null +++ b/2087/CH6/EX6.2/example6_2.sce @@ -0,0 +1,27 @@ +
+
+//example6.2
+//calculate required useful storage
+clc;funcprot(0);
+//given
+in=[8.6 2.2 1.8 0 0 13.5 280.6 510.2 136 52.5 20.6 12.3]; //inflow(ha-m)
+pan=[2.2 2.3 3.1 8.6 12.8 15.6 12.3 10.6 10 8.2 5.8 3]; //pan evaporation
+p=[0.8 1.2 0 0 0 4.8 12.2 18.6 8.6 1.5 0 0] //precipitation
+D=[14.5 15.8 16.2 16.8 17.5 18 18 17 16.5 16 15.8 15]; //Demand
+s=0;
+for i=1:12
+ if in(i)<10 then
+ r(i)=in(i); //D/S requirement
+ else
+ r(i)=10;
+ end
+ E(i)=3.6*pan(i); //Evaporation over reservior area
+ P(i)=3.5*p(i); //Precipitation
+ I(i)=in(i)-r(i)-E(i)+P(i); //Adjusted inflow
+ S(i)=D(i)-I(i); //Water required from storage
+ if S(i)<0 then
+ S(i)=0;
+ end
+ s=s+S(i);
+end
+mprintf("required useful storage=%f ha-m.",s);
diff --git a/2087/CH6/EX6.3/example6_3.jpg b/2087/CH6/EX6.3/example6_3.jpg Binary files differnew file mode 100755 index 000000000..5ec9ac43a --- /dev/null +++ b/2087/CH6/EX6.3/example6_3.jpg diff --git a/2087/CH6/EX6.3/example6_3.sce b/2087/CH6/EX6.3/example6_3.sce new file mode 100755 index 000000000..d4cb52bf2 --- /dev/null +++ b/2087/CH6/EX6.3/example6_3.sce @@ -0,0 +1,22 @@ +
+
+//example 6.3
+//calculate storage capacity of reservior
+clc;funcprot(0);
+//given
+V=475; //flow required to be maintained throughout the year
+Y=V*365*8.64; //yearly demand
+//yearly demand gives the slope of demand curve
+t=[0:1:36]; //number of season startin from 1960;each year is diveded into 3 seasons.
+q=[0 1050 300 50 3000 250 40 3500 370 90 2000 150 120 1200 350 65 1400 400 100 3600 200 80 3000 200 80 3000 150 120 700 210 50 800 120 80 2400 320 120 3200 280 80]; //average discharge
+v=[0 0.9707 0.4717 0.0328 2.7734 0.3981 0.0263 3.2357 0.5818 0.0591 1.8490 0.2356 0.0788 1.1094 0.5504 0.0427 1.2943 0.6290 0.0657 3.3281 0.3145 0.0525 2.7734 0.2359 0.0788 0.6441 0.3302 0.028 0.7396 0.1887 0.0525 2.2188 0.5032 0.0788 2.9583 0.4403 0.0525]; //voloume
+cv(1)=v(1);
+for i=2:37
+ cv(i)=cv(i-1)+v(i);
+end
+//each year is divided into three seasons(monsoon,winter and summer).and readings are taken for 12 years
+//mass inflow curve is plotted and tangent are drawn at the apexes and parellel to demand curve slope;
+//the respectiv ordinates represent the deficiency during dry period
+//maximum of these ordinates gives the desired reservior capacity
+mprintf("storage capacity of reservior=1.6 million ha-m.");
+
diff --git a/2087/CH6/EX6.4/example6_4.sce b/2087/CH6/EX6.4/example6_4.sce new file mode 100755 index 000000000..4c7bacb4d --- /dev/null +++ b/2087/CH6/EX6.4/example6_4.sce @@ -0,0 +1,26 @@ +
+
+//example 6.4
+//calculate probable life of reservior
+clc;funcprot(0);
+//given
+asi=3.6; //annual sediment inflow(x10^6)
+gamma_s=12; //specific weigth of sediment
+vs=asi/12;
+ir=30; //initial reservior capacity
+fr=60; //final reservior capacity
+r=ir/fr; //initial capacity/inflow ratio
+//r=0.5; hence we start capacity/inflow ratio from 0.5
+c=[0.5:-0.1:0.1]; //capacity inflow ratio
+e=[0.96 0.955 0.95 0.93 0.87]; //trap efficiency
+for i=1:4
+ ae(i)=(e(i)+e(i+1))/2; //average efficiency for interval
+end
+as=[0.2872 0.2857 0.2820 0.2700]; //annual sediment trapped
+s=0;
+for i=1:4
+ y(i)=6/as(i); //year to fill
+ s=s+y(i);
+end
+mprintf(" probable life of reservior=%i years.",s);
+
diff --git a/2087/CH6/EX6.5/example6_5.sce b/2087/CH6/EX6.5/example6_5.sce new file mode 100755 index 000000000..30cc0d8bf --- /dev/null +++ b/2087/CH6/EX6.5/example6_5.sce @@ -0,0 +1,87 @@ +
+
+//example 6.5
+//calculate maximum outflow discharge over spillway
+//corresponding maximum level of water above spillway crest
+clc;funcprot(0);
+//given
+I=[60 480 900 470 270 160 110 80 60]; //inflow
+//for the first time interval 0 hours to 3 hours
+I1=I(1);
+I2=I(2);
+t=3*3600;
+ti=(I1+I2)*t/2; //total inflow
+//outflow=1.62*h1^1.5;
+//storage change=(30+3h1)h1
+//from the basic equation i.e total inflow=total outflow+change in storage
+//on solving we get
+//h1^2+0.54h1^1.5+10h1-0.972=0;
+//solving it by trial and error method;we get
+h1=0.0954;
+//for the second time interval 3 hours to 6 hours
+I1=I(2);
+I2=I(3);
+t=3*3600;
+ti=(I1+I2)*t/2; //total inflow
+//outflow=0.0477+1.62*h2^1.5;
+//storage change=(30+3h2)h2
+//from the basic equation i.e total inflow=total outflow+change in storage
+//on solving we get
+//h2^2+0.54h2^1.5+10h2-3.4312=0;
+//solving it by trial and error method;we get
+h2=0.323;
+//for the third time interval 6 hours to 9 hours
+I1=I(3);
+I2=I(4);
+t=3*3600;
+ti=(I1+I2)*t/2; //total inflow
+//outflow=0.2974+1.62*h3^1.5;
+//storage change=(30+3h3)h3
+//from the basic equation i.e total inflow=total outflow+change in storage
+//on solving we get
+//h3^2+0.54h3^1.5+10h3-5.7012=0;
+//solving it by trial and error method;we get
+h3=0.522;
+//for the fourth time interval 9 hours to 12 hours
+I1=I(4);
+I2=I(5);
+t=3*3600;
+ti=(I1+I2)*t/2; //total inflow
+//outflow=0.611+1.62*h4^1.5;
+//storage change=(30+3h4)h4
+//from the basic equation i.e total inflow=total outflow+change in storage
+//on solving we get
+//h4^2+0.54h4^1.5+10h4-6.6208=0;
+//solving it by trial and error method;we get
+h4=0.601;
+//for the fifth time interval 12 hours to 15 hours
+I1=I(5);
+I2=I(6);
+t=3*3600;
+ti=(I1+I2)*t/2; //total inflow
+//outflow=0.7548+1.62*h5^1.5;
+//storage change=(30+3h5)h5
+//from the basic equation i.e total inflow=total outflow+change in storage
+//on solving we get
+//h5^2+0.54h5^1.5+10h5-6.8936=0;
+//solving it by trial and error method;we get
+h5=0.624;
+//for the sixth time interval 12 hours to 15 hours
+I1=I(6);
+I2=I(7);
+t=3*3600;
+ti=(I1+I2)*t/2; //total inflow
+//outflow=0.7985.62*h6^1.5;
+//storage change=(30+3h6)h6
+//from the basic equation i.e total inflow=total outflow+change in storage
+//on solving we get
+//h6^2+0.54h6^1.5+10h6-6.8492=0;
+//solving it by trial and error method;we get
+h6=0.620;
+hmax=h5;
+q=300*(h5)^1.5; //equation given
+q=round(q*100)/100;
+mprintf("maximum outflow discharge over spillway=%f cumecs.",q);
+mprintf("\nmaximum level of water above spillway crest=%f m.",h5);
+
+
diff --git a/2087/CH6/EX6.6/example6_6.sce b/2087/CH6/EX6.6/example6_6.sce new file mode 100755 index 000000000..b7ffc15c3 --- /dev/null +++ b/2087/CH6/EX6.6/example6_6.sce @@ -0,0 +1,60 @@ +
+
+//example 6.6
+//calculate the allocations to each project purpose
+clc;funcprot(0);
+//given
+t=240; //total cost of project(million rupees)
+s=[32 88 72]; //separable cost
+eb=[40 138 112]; //estimated benifit
+sp=[47 104 101]; //alternate single purpose cost
+//using remaining benifit method
+ts=s(1)+s(2)+s(3); //total separable cost
+tj=t-ts; //total joint cost
+w=0;
+for i=1:3
+ if eb(i)<sp(i) then
+ b(i)=eb(i); //benifit limited by alternate cost
+ else
+ b(i)=sp(i);
+ end
+ rb(i)=b(i)-s(i); //remaining benifit
+ w=w+rb(i);
+
+end
+y=0;
+for i=1:3
+ aj(i)=tj*rb(i)/w; //allocated joint cost
+ ta(i)=s(i)+aj(i); //total allocations
+ y=y+ta(i);
+end
+mprintf("Using remaining benifit method.");
+mprintf("\n\nallocations to each project purpose(percent):");
+for i=1:3
+ per(i)=ta(i)*100/y; //total allocation percent
+ mprintf("\n%f",per(i));
+end
+
+
+//using alternate justifiable method
+w=0;
+for i=1:3
+ ac(i)=sp(i)-s(i); //alternate cost less separable cost
+ w=w+ac(i);
+
+end
+y=0;
+for i=1:3
+ ajc(i)=tj*ac(i)/w; //allocated joint cost
+ ta(i)=s(i)+ajc(i); //total allocation
+ y=y+ta(i);
+end
+mprintf("\n\nUsing alternate justifiable expenditure method method.");
+mprintf("\n\nallocations to each project purpose(percent):");
+for i=1:3
+ pr(i)=ta(i)*100/y; //total allocation percent
+mprintf("\n%f",pr(i));
+end
+
+
+
diff --git a/2087/CH6/EX6.8/example6_8.sce b/2087/CH6/EX6.8/example6_8.sce new file mode 100755 index 000000000..4018117e8 --- /dev/null +++ b/2087/CH6/EX6.8/example6_8.sce @@ -0,0 +1,27 @@ +
+
+//example 6.8
+//calculate outflow hydrograph
+clc;funcprot(0);
+//given
+I=[35 55 92 130 160 140]; //inflow(cumec/sec)
+x=0.28;K=1.6; //studied value
+t=6;
+K=K*24; //in hours
+co=(-K*x+0.5*t)/(K-K*x+0.5*t);
+c1=(K*x+0.5*t)/(K-K*x+0.5*t);
+c2=(K-K*x-0.5*t)/(K-K*x+0.5*t);
+c=co+c1+c2;
+//c=1; which implies (OK)
+//from Muskingum equation
+O(1)=35;
+mprintf("outflow hydrograph:\n%f",O(1));
+for i=2:6
+ p1(i)=co*I(i);
+ p2(i)=c1*I(i-1);
+ p3(i)=c2*O(i-1);
+ O(i)=p1(i)+p2(i)+p3(i);
+ O(i)=round(O(i)*100)/100;
+ mprintf("\n%f",O(i));
+end
+
diff --git a/2087/CH6/EX6.9/example6_9.sce b/2087/CH6/EX6.9/example6_9.sce new file mode 100755 index 000000000..dc4d46f81 --- /dev/null +++ b/2087/CH6/EX6.9/example6_9.sce @@ -0,0 +1,34 @@ +
+
+//example 6.9
+//calculate minimum storage to meet the demand
+clc;funcprot(0);
+//given
+md=[50 75 80 85 130 120 25 25 40 45 50 60]; //monthly demand
+e=[6 8 13 17 22 22 14 11 13 12 7 5]; //evaporation
+r=[1 0 0 0 0 19 43 39 22 6 2 1]; //rainfall
+in=[50 40 30 25 20 30 200 225 150 90 70 60]; //monthly inflow
+A=30; //area of reservior
+Cr=0.4; //run-off coefficient
+for i=1:12
+ er(i)=0.4*r(i); //effective rainfall
+ ni(i)=er(i)-e(i); //net inflow
+ niv(i)=ni(i)*0.01*A; //net inflow volume
+ nd(i)=md(i)-niv(i); //net demand
+end
+cnd(1)=nd(1); //cumulative demand
+ci(1)=in(1); //cumulative inflow
+for i=2:12
+ cnd(i)=cnd(i-1)+nd(i);
+ ci(i)=ci(i-1)+in(i);
+end
+mprintf("Excess demand:");
+for i=1:12
+ ed(i)=cnd(i)-ci(i); //excess demand
+ if ed(i)<0 then
+ es(i)=ed(i); //excess supply
+ ed(i)=0;
+ end
+ mprintf("\n%f",ed(i));
+end
+mprintf("\nminimum storage required=Maximum of excess demand=%f Mm^3.",ed(6));
|