summaryrefslogtreecommitdiff
path: root/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia
diff options
context:
space:
mode:
Diffstat (limited to 'Irrigation_and_Water_Power_Engineering_by_B_C_Punmia')
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/10-EARTH_AND_ROCKFILL_DAM.ipynb327
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/11-SPILLWAYS.ipynb452
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/12-DIVERSION_HEADWORKS.ipynb1150
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/14-IRRIGATION_CHANNEL_1_SILT_THEORIES.ipynb1583
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/15-IRRIGATION_CHANNEL_2_DESIGN_PROCEDURE.ipynb262
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/16-WATERLOGGING_AND_CANAL_LINING.ipynb662
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/17-CANAL_OUTLETS.ipynb187
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/18-CANAL_REGULATION_WORKS.ipynb583
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/19-CROSS_DRAINAGE_WORKS.ipynb299
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/2-METHODS_OF_IRRIGATION.ipynb359
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/20-RIVER_ENGINEERING.ipynb120
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/21-WATER_POWER_ENGINEERING.ipynb161
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/3-WATER_REQUIREMENTS_OF_CROPS.ipynb1227
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/4-HYDROLOGY.ipynb3002
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/5-GROUND_WATER_WELL_IRRIGATION.ipynb1009
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/6-RESERVIOR_PLANNING.ipynb543
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/8-GRAVITY_DAMS.ipynb1307
17 files changed, 13233 insertions, 0 deletions
diff --git a/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/10-EARTH_AND_ROCKFILL_DAM.ipynb b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/10-EARTH_AND_ROCKFILL_DAM.ipynb
new file mode 100644
index 0000000..3c997d7
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/10-EARTH_AND_ROCKFILL_DAM.ipynb
@@ -0,0 +1,327 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10: EARTH AND ROCKFILL DAM"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.1: EX10_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 10.1\n",
+"//calculate seepage flow per unit length of dam\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"K=5D-4; //coefficient of permeability of soil\n",
+"Bt=6; //width of top of dam\n",
+"wb=146; //width of base of dam\n",
+"H=20; //heigth of dam\n",
+"hw=2; //heigth of water in reservior\n",
+"hs1=4; //slope on upstream side\n",
+"hs2=3; //slope on downstream side\n",
+"df=30; //length of drainage filter\n",
+"\n",
+"x=wb-df-72+72*0.3;\n",
+"y=18;\n",
+"s=(x^2+y^2)^0.5-x;\n",
+"\n",
+"x=[0 10 20 30 40 50 60 65.6];\n",
+"for i=1:8\n",
+" y(i)=(4.849*x(i)+5.879)^0.5;\n",
+" y(i)=round(y(i)*1000)/1000;\n",
+"end\n",
+"\n",
+"mprintf('\nx y');\n",
+"for i=1:8\n",
+" mprintf('\n%f %f',x(i),y(i));\n",
+"end\n",
+"\n",
+"sf=K*s*10000;\n",
+"sf=round(sf*1000)/1000;\n",
+"mprintf('\nSeepage flow per unit length of dam=%fD-6 cumecs/metre length of dam.',sf);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.2: EX10_2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 10.2\n",
+"//calculate discharge per meter length of dam\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"K=3D-3; //coefficient of permeability\n",
+"nd=25; //number of potential drops\n",
+"nf=4; //number of flow channels\n",
+"lf=40; //filter length\n",
+"H=52; //heigth of dam\n",
+"fb=2; //free board\n",
+"\n",
+"q=K*(H-fb)*nf/(nd*100);\n",
+"mprintf('Discharge per meter length of dam=%f cumec/metre length.',q);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.3: EX10_3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example10.3\n",
+"//calculate factor of safety for slope\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"x=4; //given scale\n",
+"An=14.4; //area of N rectangle\n",
+"At=6.4; //area of T rectangle\n",
+"Au=4.9; //area of U rectangle\n",
+"L=12.6; //length of arc;\n",
+"gamma_m=19; //unit weigth of soil\n",
+"gamma_w=9.81; //unit weigth of water\n",
+"fi=26; //effective angle(degree)\n",
+"co=19.5; //cohesion value\n",
+"\n",
+"//consider 1m length of dam\n",
+"SumN=An*x^2*gamma_m;\n",
+"SumT=At*x^2*gamma_m;\n",
+"SumU=Au*x^2*gamma_w;\n",
+"Le=x*L;\n",
+"F=((Le*co)+(SumN-SumU)*tand(fi))/SumT;\n",
+"F=round(F*100)/100;\n",
+"mprintf('Factor of safety for slope=%f.',F);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.4: EX10_4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 10.4\n",
+"//check section for:\n",
+"//Stability of d/s slope against steady seepage\n",
+"//Sloughing of u/s slope against sudden drawdown\n",
+"//Stability of the foundation against shear\n",
+"//Seepage through body of dam\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"//Dimensions\n",
+"H=20; //Heigth of dam\n",
+"Bt=6; //top width of dam\n",
+"s1=4; //u/s slope\n",
+"s2=3; //d/s slope\n",
+"fb=2; //free board\n",
+"//Properties of materials of dam\n",
+"gamma_d=17.27; //dry density\n",
+"wc=0.15; //optimum water content\n",
+"gamma_s=21.19; //saturated density\n",
+"gamma_w=9.81; //unit weigth of water\n",
+"wavg=19.62; //average unit weigth under seepage\n",
+"theta=26; //average angle of internal friction(degree)\n",
+"co=19.13; //average cohesion\n",
+"K=5D-4; //coefficient of permeability\n",
+"//properties of foundation materials\n",
+"gamma_f=17.27; //average unit weigth\n",
+"cof=47.87; //average cohesion\n",
+"fi=8; //average angle internal friction\n",
+"t=6; //thickness of clay\n",
+"FOSp=1.5; //permissible factor of safety of slope\n",
+"PS=8D-6; //permissible seepage\n",
+"\n",
+"\n",
+"//(a) Stability of d/s slope against steady seepage\n",
+"An=302.4; //area of N diagram\n",
+"At=91.2; //area of T diagram\n",
+"Au=98.4; //area of U diagram\n",
+"Le=60; //length of arc\n",
+"SumN=An*gamma_s;\n",
+"SumT=At*gamma_s;\n",
+"SumU=Au*gamma_w;\n",
+"F=((Le*co)+(SumN-SumU)*tand(theta))/SumT;\n",
+"F=round(F*100)/100;\n",
+"mprintf('Part(a):')\n",
+"mprintf('\nFactor of safety for slope=%f.',F);\n",
+"mprintf('\nSafe');\n",
+"\n",
+"//(b) Sloughing of u/s slope against sudden drawdown\n",
+"h1=15;\n",
+"b=80;\n",
+"P=gamma_s*H^2*tand(45-(theta/2))^2/2+gamma_w*h1^2/2;\n",
+"sav=P/b;\n",
+"smax=2*sav;\n",
+"Ne=(gamma_s-gamma_w)*b*H/2;\n",
+"R=Ne*tand(theta)+co*b;\n",
+"fs=R/P;\n",
+"fs=round(fs*100)/100;\n",
+"mprintf('\n\nPart(b):')\n",
+"mprintf('\nFactor of safety w.r.t average shear=%f.',fs);\n",
+"mprintf('\nSafe');\n",
+"sr=0.6*H*(gamma_s-gamma_w)*tand(theta)+co;\n",
+"FS=sr/smax;\n",
+"FS=round(FS*100)/100;\n",
+"mprintf('\n\nFactor of safety w.r.t maximum shear=%f.',FS);\n",
+"mprintf('\nSafe');\n",
+"\n",
+"//(c) Stability of the foundation against shear\n",
+"h1=26;\n",
+"h2=6;\n",
+"gamma_m=(wavg*(h1-h2)+gamma_f*h2)/h1;\n",
+"l=(gamma_m*h1*tand(fi)+cof)/(gamma_m*h1);\n",
+"fi1=atand(l);\n",
+"P=(h1^2-h2^2)/2*gamma_m*tand(45-(fi1/2))^2;\n",
+"sav=P/b;\n",
+"smax=2*sav;\n",
+"s1=cof+gamma_f*h2*tand(fi);\n",
+"s2=cof+gamma_m*h1*tand(fi);\n",
+"as=(s1+s2)/2;\n",
+"fs=as/sav;\n",
+"fs=round(fs*100)/100;\n",
+"mprintf('\n\nPart(c):')\n",
+"mprintf('\nFactor of safety w.r.t overall shear=%f.',fs);\n",
+"mprintf('\nSafe');\n",
+"\n",
+"gamma_av=(wavg*0.6*H+gamma_f*h2)/((0.6*H)+h2);\n",
+"s=cof+gamma_av*0.6*H*tand(fi);\n",
+"fs=s/smax;\n",
+"fs=round(fs*100)/100;\n",
+"mprintf('\n\nFactor of safety w.r.t overall shear=%f.',fs);\n",
+"mprintf('\nUnsafe');\n",
+"\n",
+"//(d) Seepage through body of dam\n",
+"s=2; //measured\n",
+"q=K*s*100000/100;\n",
+"mprintf('\n\nPart(d):')\n",
+"mprintf('\n Seepage through body of dam=%fD-5 cumecs/m length of dam',q);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.5: EX10_5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 10.5\n",
+"//design upstream impervious blanket\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Zb=1.2; //thickness of blanket\n",
+"Zf=8; //distance of blanket from foundation\n",
+"kb=0.06; //coefficient of permeability of blanket material\n",
+"kf=72; //coefficient of permeability of foundation soil\n",
+"Hw=10; //heigth of water in reservior\n",
+"Xd=40;\n",
+"\n",
+"a=(kb/(kf*Zb*Zf))^0.5;\n",
+"Xo=1.414/a;\n",
+"\n",
+"//we vary value of x\n",
+"x=[0 25 50 75 100 125 151.8 300]\n",
+"for i=1:8\n",
+" e=exp(2*a*x(i));\n",
+" Xr(i)=(e-1)/(a*(e+1));\n",
+" ho(i)=Xr(i)*Hw/(Xr(i)+Xd);\n",
+" r(i)=Xr(i)*100/(Xr(i)+Xd);\n",
+"end\n",
+"mprintf('\nx Xr ho reduction q(percent)');\n",
+"for i=1:8\n",
+" mprintf('\n%f %f %f %f',x(i),Xr(i),ho(i),r(i));\n",
+"end\n",
+"//graph is plotted between r and x.\n",
+"//after around 130m length there is only slight increase in head dissipated(ho)\n",
+"L=130;\n",
+"mprintf('\nThickness of blanket=%f m',Zb);\n",
+"mprintf('\nLength of blanket=%i m.',L);\n",
+""
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/11-SPILLWAYS.ipynb b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/11-SPILLWAYS.ipynb
new file mode 100644
index 0000000..18328ba
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/11-SPILLWAYS.ipynb
@@ -0,0 +1,452 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 11: SPILLWAYS"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.1: EX11_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 11.1\n",
+"//calculate compute the dynamic force on curved section\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"h=1.2; //head of water\n",
+"Cd=2.2; //coefficient of discharge\n",
+"rho=1; //density of water\n",
+"gamma_w=9.81; //unit weigth of water\n",
+"\n",
+"q=Cd*h^1.5;\n",
+"\n",
+"//applying bernaulli's equation at u/s water surface at section A and B\n",
+"//solving it by error and trial method we get\n",
+"v1=13.7;v2=14.7;\n",
+"d1=0.212;d2=0.197;\n",
+"\n",
+"F1=gamma_w*d1^2*cosd(60)/2;\n",
+"F2=gamma_w*d2^2/2;\n",
+"W=gamma_w*60*2*%pi*3*((d1+d2)/2)/360;\n",
+"Fx=rho*q*(v2-v1*cosd(60))-F1/2+F2;\n",
+"Fy=rho*q*(v1*sind(60))+F1*sind(60)+W;\n",
+"F=(Fx^2+Fy^2)^0.5;\n",
+"F=round(F*100)/100;\n",
+"mprintf('Resultant force=%f kN/m.',F);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.2: EX11_2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 11.2\n",
+"//calculate discharge over oggy weir\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"C=2.4; //coefficient of discharge\n",
+"H=2; //head\n",
+"L=100; //length of spillway\n",
+"wc=8; //heigth of weir crest above bottom\n",
+"g=9.81; //acceleration due to gravity\n",
+"h=H+wc;\n",
+"Q1=C*L*H^(1.5); //neglecting approach velocity and end contractions\n",
+"va=Q1/(h*L);\n",
+"ha=va^2/(2*g);\n",
+"Ha=ha+H;\n",
+"Q=C*L*Ha^1.5;\n",
+"Q=round(Q*10)/10;\n",
+"mprintf('discharge over oggy weir=%f cumecs.',Q);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.3: EX11_3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 11.3\n",
+"//calculate\n",
+"//capacity of siphon\n",
+"//head required in oggy spillway\n",
+"//length of oggy weir required\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"t=6; //tail water elevation\n",
+"h=1; //heigth of siphon spillway\n",
+"w=4; //width of siphon spillway\n",
+"hw=1.5; //head water elevation\n",
+"C=0.6; //coefficient of discharge\n",
+"Co=2.25; //coefficient of discharge of oggy spillway\n",
+"lo=4; //length of oggy spillway\n",
+"hc=1.5; //head on weir crest\n",
+"g=9.81; //acceleration due to gravity\n",
+"\n",
+"//part (a)\n",
+"Q=C*h*w*(2*g*(t+hw))^0.5;\n",
+"Q=round(Q*10)/10;\n",
+"mprintf('capacity of siphon=%f cumecs.',Q);\n",
+"\n",
+"//part (b)\n",
+"h1=(Q/(Co*lo))^(2/3);\n",
+"h1=round(h1*100)/100;\n",
+"mprintf('\nhead required in oggy spillway=%f m',h1);\n",
+"\n",
+"//part (c)\n",
+"L=Q/(Co*(hc)^1.5);\n",
+"L=round(L*100)/100;\n",
+"mprintf('\nlength of oggy weir required=%f m.',L);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.4: EX11_4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 11.4\n",
+"//calculate number of siphons units required\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"rl=435; //full reservior level\n",
+"cl=429.6; //level of centre of siphon\n",
+"hfl=435.85; //high flood level\n",
+"hfd=600; //high flood discharge\n",
+"w=4; //width of throat\n",
+"h=2; //heigth of throat\n",
+"C=0.65; //coefficient of discharge\n",
+"g=9.81; //acceleration due to gravity\n",
+"\n",
+"H=hfl-cl;\n",
+"Q=C*w*h*(2*g*H)^0.5;\n",
+"n=hfd/Q;\n",
+"n=round(n*100)/100;\n",
+"mprintf(' number of siphons units required=%f.\nhence provide 11 siphons units.',n);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.5: EX11_5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 11.5\n",
+"//design oggy spillway for concrete gravity dam\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"rbl=250; //avarage river bed level\n",
+"rlc=350; //R.L of spillway crest\n",
+"s=0.75; //slope on downstream side\n",
+"Q=6500; //discharge\n",
+"L=5*9; //length of spillway\n",
+"Cd=2.2; //coefficient of discharge\n",
+"t=2; //thickness of each pier\n",
+"\n",
+"//step 1. computation of design head\n",
+"H=(Q/(Cd*L))^(2/3);\n",
+"P=rlc-rbl;\n",
+"\n",
+"//P/H=6.15,which is<1.33;it is a high overflow spillway\n",
+"\n",
+"//H+P/H=7.15>1.7; hence discharge coefficient is not affected by downstream apron interface\n",
+"\n",
+"Kp=0.01;Ka=0.1;N=4;\n",
+"He=17.5; //assumed\n",
+"Le=L-2*(N*Kp+Ka)*He;\n",
+"He1=(Q/(Cd*Le))^(2/3);\n",
+"He1=round(He1*100)/100;\n",
+"//He1 is almost equal to He\n",
+"mprintf('crest profile will be designed for Hd=%f m.',He1);\n",
+"\n",
+"//step 2. determination of d/s profile\n",
+"\n",
+"//equating the slope of d/s side and derivative of profile equation suggested by WES\n",
+"x=27.03;\n",
+"y=0.04372*x^1.85;\n",
+"mprintf('\n\ndownstream profile:');\n",
+"x=[1:1:26]\n",
+"for i=1:26\n",
+" y(i)=0.04372*x(i)^1.85;\n",
+" y(i)=round(y(i)*1000)/1000;\n",
+"end\n",
+"mprintf('\nx y');\n",
+"for i=1:26\n",
+" mprintf('\n%i %f',x(i),y(i));\n",
+"end\n",
+"mprintf('\n27.03 19.48');\n",
+"\n",
+"\n",
+"//step 3. determination of u/s profile\n",
+"// cosidering equation for vertical u/s face and Hd=17.58\n",
+"\n",
+"mprintf('\n\nupstream profile:');\n",
+"x=[-0.5 -0.1 -1.5 -2.0 -3.0 -4.0 -4.75];\n",
+"for i=1:7\n",
+" y(i)=0.0633*(x(i)+4.7466)^1.85+2.2151-1.2643*(x(i)+4.7466)^0.625;\n",
+" y(i)=round(y(i)*1000)/1000;\n",
+"end\n",
+"mprintf('\nx y');\n",
+"for i=1:7\n",
+" mprintf('\n%f %f',x(i),y(i));\n",
+"end\n",
+"\n",
+"//step 4.design of d/s bucket\n",
+"\n",
+"R=P/4;\n",
+"mprintf('\n\nradius of bucket=%i m.',R);\n",
+"mprintf('\nbucket will subtend angle of 60 degree at the centre.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.6: EX11_6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 11.6\n",
+"//design length and depth of stilling basin\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"q=1; //discharge of spillway\n",
+"Cd=0.7; //coefficient of discharge\n",
+"h1=10; //heigth of crest above downstream silting basin\n",
+"g=9.81; //acceleration due to gravity\n",
+"Cv=0.9; //coefficient of velocity\n",
+"\n",
+"h=(3*q/(2*Cd*(2*g)^0.5))^(2/3);\n",
+"H=h1+h/2;\n",
+"vt=(2*g*H)^0.5;\n",
+"v1=Cv*vt;\n",
+"y1=q/v1;\n",
+"F1=v1/(g*y1)^0.5;\n",
+"//F>1, flow is super-critical\n",
+"y2=1;\n",
+"v2=q/y2;\n",
+"F2=v2/(g*y2)^0.5; //<1\n",
+"y2=(y1/2)*((1+8*F1^2)^0.5-1);\n",
+"de=y2-1;\n",
+"le=5*(y2-y1);\n",
+"de=round(de*1000)/1000;\n",
+"le=round(le*10)/10;\n",
+"mprintf('stilling basin should be depressed by %f m.',de);\n",
+"mprintf('\nlength of stilling basin=%f m.',le);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.7: EX11_7.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 11.7\n",
+"//calculate leading dimension of hydraulic jump stilling basin\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"q=7.83; //discharge through spillway\n",
+"w=12.5; //width of fall\n",
+"d=2; //depth of water in downstream\n",
+"g=9.8;\n",
+"\n",
+"y1=0.5;\n",
+"v1=q/y1;\n",
+"F1=v1/(g*y1)^0.5;\n",
+"\n",
+"//F>1,flow is super-critical\n",
+"v2=q/d;\n",
+"F2=v2/(g*d)^0.5;\n",
+"y2=(y1/2)*((1+8*F1^2)^0.5-1);\n",
+"de=y2-d;\n",
+"le=5*(y2-y1);\n",
+"de=round(de*100)/100;\n",
+"le=round(le*10)/10;\n",
+"mprintf('stilling basin should be depressed by %f m.',de);\n",
+"mprintf('\nlength of stilling basin=%f m.',le); "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.8: EX11_8.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 11.8\n",
+"//calculate force to be exerted to lift the gate\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Ag=5*2.5; //area of gate\n",
+"miu=0.25; //coefficient of friction\n",
+"w=0.5; //weigth of gate\n",
+"h=2; //head of water over crest\n",
+"g=9.81; //acceleration due to gravity\n",
+"gamma_w=1000; //unit weigth of water\n",
+"\n",
+"m=w*g*1000;\n",
+"F=gamma_w*Ag*h*h*g/10;\n",
+"ff=miu*F;\n",
+"tf=(m+ff)/1000;\n",
+"mprintf('force to be exerted to lift the gate=%f kN.',tf);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.9: EX11_9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 11.9\n",
+"//calculate depth of flow at both end of jumps\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"q=19; //dischrge through spillway\n",
+"E=1; //energy loss\n",
+"\n",
+"//from energy loss equation;E=(y2-y1)^3/4y2y1; and solving it we get\n",
+"//x=0.5*(-1+(1+294.39*(x-1)^9/64*x^3))\n",
+"//by trial and error method x=2.806\n",
+"x=2.806;\n",
+"y1=4*x/(x-1)^3;\n",
+"y2=x*y1;\n",
+"y1=round(y1*1000)/1000;\n",
+"y2=round(y2*1000)/1000;\n",
+"mprintf('depth of flow at both end of jumps=%f m and %f m. respectively.',y1,y2);\n",
+""
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/12-DIVERSION_HEADWORKS.ipynb b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/12-DIVERSION_HEADWORKS.ipynb
new file mode 100644
index 0000000..97bc0a7
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/12-DIVERSION_HEADWORKS.ipynb
@@ -0,0 +1,1150 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 12: DIVERSION HEADWORKS"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.10: EX12_10.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 12.10\n",
+"//calculate critical exit gradient and factor of safety of system\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"b=60; //length of floor\n",
+"H=6; //static head of weir\n",
+"d=6; //downstream depth of pile\n",
+"n=0.3; //porousity of soil particles\n",
+"G=2.7; //relative density of soil particles\n",
+"\n",
+"alpha=b/d;\n",
+"lambda=(1+(1+alpha^2)^0.5)/2;\n",
+"Ge=H/(d*%pi*(lambda)^0.5);\n",
+"e=n/(1-n);\n",
+"chg=(G-1)/(1+e);\n",
+"f=chg/Ge;\n",
+"f=round(f*100)/100;\n",
+"mprintf('critical exit gradient=%f.\nfactor of safety of system=%f.',chg,f);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.11: EX12_11.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 12.11\n",
+"//design a vertical drop weir on Bligh's theory\n",
+"//test floor by Khosla's theory\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=2800; //maximum flood discharge\n",
+"hfl=285; //H.F.L before construction\n",
+"hw=278; //minimum water level\n",
+"fsl=284; //F.S.L of canal\n",
+"c=12; //coefficient of creep\n",
+"flux=1; //allowable afflux\n",
+"Ge=1/6; //permissible exit gradient\n",
+"rho=2.24; //specific gravity of concrete\n",
+"\n",
+"//Hydraulic calculation\n",
+"L=4.75*Q^0.5;\n",
+"q=Q/L;\n",
+"q=round(q*10)/10;\n",
+"mprintf('Hydraulic calculation:');\n",
+"mprintf('\ndischarge per unit width of river=%f cumecs.',q);\n",
+"f=1;\n",
+"R=1.35*(q^2/f)^(1/3);\n",
+"R=round(R*100)/100;\n",
+"mprintf('\nregime scour depth=%f m.',R);\n",
+"V=q/R; //regime velocity\n",
+"vh=V^2/(2*9.81); //velocity head\n",
+"l_down=hfl+vh;\n",
+"l_up=l_down+flux;\n",
+"hfl_up=l_up-vh;\n",
+"hfl_down=hfl-0.5;\n",
+"hfl_down=round(hfl_down*100)/100;\n",
+"mprintf('\nactual d/s H.F.L allowing 0.5 m for retrogation=%f m.',hfl_down);\n",
+"K=(q/1.7)^(2/3);\n",
+"cl=l_up-K; //crest level\n",
+"cl=round(cl*100)/100;\n",
+"mprintf('\ncrest level=%f m.',cl);\n",
+"pl=fsl+0.5; //pond level\n",
+"s=hfl_down-cl; //heigth of shutter\n",
+"mprintf('\nheigth of shutter=%f m.',s);\n",
+"rl_up_pile=hfl_up-1.5*R; //R.L of bottom u/s pile\n",
+"d_up_cut=hw-276; //depth of upstream cut-off\n",
+"mprintf('\ndepth of upstream cut-off=%f m.',d_up_cut);\n",
+"mprintf('\n provide concrete cut off 2 m depth.');\n",
+"rl_bot_ds=hfl_down-2*R;\n",
+"Hs=hfl_down-hw; //seepage head\n",
+"Hc=cl-hw; //heigth of crest\n",
+"mprintf('\nR.L of gates crest=%f m.',Hs);\n",
+"mprintf('\nHeigth of crest=%f m.',Hc);\n",
+"\n",
+"//design of weir wall\n",
+"d=hfl_up-cl;\n",
+"a=d/(rho)^0.5;\n",
+"a=3*d/(2*rho); //from sliding consideration\n",
+"a=s+1; //from practical consieration\n",
+"a=a+1;\n",
+"mprintf('\n\ndesign of weir wall:')\n",
+"mprintf('\nprovide top width of %i m.',a);\n",
+"Mo=9.81*Hs^3/6; //overtirning moment\n",
+"//equating the moment of resistance to overturning moment and putting the values we get\n",
+"y=poly([-1.084,0.020,0.039],'x','c');\n",
+"b=roots(y);\n",
+"//we get b= - 5.5347261 and 5.0219056\n",
+"//taking\n",
+"b=5;\n",
+"//when weir is submerged\n",
+"C=0.58;\n",
+"d=(q^2/((2*C/3)^2*2*9.81))^(1/3);\n",
+"Mo=9.81*d*Hc^2/2;\n",
+"//from equation of moment of resistence we get\n",
+"y=poly([-77.55,3,1],'x','c');\n",
+"b=roots(y);\n",
+"//we get b= - 10.433085 and 7.4330846\n",
+"//taking\n",
+"b=8;\n",
+"mprintf('\nbottom width=%i m.',b);\n",
+"\n",
+"//design of impervious and pervious aprons\n",
+"C=12;\n",
+"L=C*Hs;\n",
+"mprintf('\n\ndesign of impervious and pervious aprons:');\n",
+"mprintf('\ntotal creep length=%i m.',L);\n",
+"l1=2.21*C*(Hs/13)^0.5;\n",
+"l1_=l1+1;\n",
+"mprintf('\nlength of downstream impervious apron=%i m.',l1_);\n",
+"d1=hw-276;\n",
+"d2=hw-271;\n",
+"l2=L-l1-(b+2*d1+2*d2);\n",
+"mprintf('\nlength of upstream impervious apron=%i m.',l2);\n",
+"l3=18*C*(Hs*q/975)^0.5;\n",
+"mprintf('\ntotal length of d/s apron=%i m.',l3); //calculation is wrong in book\n",
+"l=l3-l1;\n",
+"le=l/2;\n",
+"le=round(le*100)/100;\n",
+"mprintf('\nprovide filter of length %f m. and launching apron of length %f m.',le,le);\n",
+"t=d2*10^0.5/le;\n",
+"mprintf('\nthickness of launching apron in horizontal position=%f m.',t);\n",
+"mprintf('\nprovide launching apron of thickness 1.5 m.');\n",
+"T=2*d1;\n",
+"V=d1*10^0.5;\n",
+"ta=V/T;\n",
+"ta=round(ta*10)/10;\n",
+"mprintf('\nthickness of apron in horizontal position=%f m.',ta);\n",
+"Hr=Hs-Hs*(4+33+8)/L;\n",
+"t=4*Hr/(3*(rho-1));\n",
+"t=round(t*10)/10;\n",
+"mprintf('\nprovide thickness of %f m from d/s of weir wall to point 6 m from it.',t);\n",
+"Hr=Hs-Hs*(4+33+8+6)/L;\n",
+"t=4*Hr/(3*(rho-1));\n",
+"t=round(t*10)/10;\n",
+"mprintf('\nprovide thickness of %f m from 6 m to 12 m from d/s end of weir wall.',t);\n",
+"Hr=Hs-Hs*(4+33+8+12)/L;\n",
+"t=4*Hr/(3*(rho-1));\n",
+"t=round(t*10)/10;\n",
+"mprintf('\nprovide thickness of %f m for rest of length of weir floor.',t);\n",
+"\n",
+"//check by khosla's theory\n",
+"b=33+8+19; //total horizontal length of impervious floor\n",
+"d=7; //depth of downstream pile\n",
+"alpha=b/d;\n",
+"n=0.14; //n=1/%pi*(lambda)^0.5;\n",
+"Ge=Hs*n/d;\n",
+"mprintf('\n\ncheck by Khosla theory:');\n",
+"mprintf('\nexit gradient=%f. < 1/6\n hence safe',Ge);\n",
+"alpha_=d/b;\n",
+"fic1=0.83;fid1=0.88;\n",
+"corec_c1=(fid1-fic1)*100/2;\n",
+"bdash=b;\n",
+"d=2;D=7;\n",
+"C1=19*(D/bdash)^0.5*(d+D)/b;\n",
+"fic1=fic1*100+corec_c1+C1;\n",
+"Pc=Hs*fic1/100; //pressure head at C\n",
+"alpha_=d/b;\n",
+"fie2=0.31;fid2=0.21;\n",
+"corec_e1=(fie2-fid2)*1.7*100/7;\n",
+"bdash=b;\n",
+"d=7;D=2;\n",
+"C1=19*(D/bdash)^0.5*(d+D)/b;\n",
+"fie2=fie2*100-corec_e1-C1; //in book 3.53 value is wrong\n",
+"Pe=Hs*fie2/100; //pressue head at E\n",
+"//assuming linear variation of pressure for intermediate points\n",
+"Pa=Pc-(Pc-Pe)*(33+8)/b;\n",
+"t=Pa/1.24;\n",
+"Pa=round(Pa*100)/100;\n",
+"t=round(t*100)/100;\n",
+"mprintf('\npressure at d/s of weir wall=%f m.',Pa);\n",
+"mprintf('\nthickness at d/s of weir wall=%f m. < thickness by Bligh theory;\nhence safe.',t);\n",
+"Pb=Pc-(Pc-Pe)*(33+8+6)/b;\n",
+"t=Pb/1.24;\n",
+"Pa=round(Pa*100)/100;\n",
+"t=round(t*100)/100;\n",
+"mprintf('\npressure at 6 m from d/s of weir wall=%f m.',Pb);\n",
+"mprintf('\nthickness at 6m from d/s of weir wall=%f m. < thickness by Bligh theory;\nhence safe.',t);\n",
+"Pc=Pc-(Pc-Pe)*(33+8+12)/b;\n",
+"t=Pc/1.24;\n",
+"Pa=round(Pa*100)/100;\n",
+"t=round(t*100)/100;\n",
+"mprintf('\npressure at 12 m from d/s of weir wall=%f m.',Pc);\n",
+"mprintf('\nthickness at 12m from d/s of weir wall=%f m. > thickness by Bligh theory;\nhence unsafe.',t);\n",
+"mprintf('\nhence increase th ethickness to 1.9 m for a length of 7 m of impervious floor.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.12: EX12_12.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 12.12\n",
+"//calculate\n",
+"//number of gates required for the barrage\n",
+"//head regulator if each gate has 10 m clear span(neglect end contractions and approach velocity)\n",
+"//length and R.L of basin floor if silting basin is provided downstream of barrage\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Lmax=212; //maximum reservior level\n",
+"Lp=211; //pond level\n",
+"hfl=210; //downstream high flood level in the river\n",
+"Qmax=3500; //maximum design flood discharge\n",
+"Lcrest=207; //crest level of the barrage\n",
+"Lcrest_r=208; //crest level of head regulator\n",
+"Cd=2.1; //coefficient of discharge for barrage\n",
+"Cd_r=1.5; //coefficient of discharge for head regulator\n",
+"rbl=205; //river bed level\n",
+"Q=500; //design discharge of main canal\n",
+"\n",
+"//design of water way for barrage during flood\n",
+"H=Lmax-Lcrest;\n",
+"L=Qmax/(Cd*H^1.5);\n",
+"//which gives L=149.07.\n",
+"//provide 15 bays of 10m clear span\n",
+"mprintf('nunmber of gates for the barrage=15.');\n",
+"\n",
+"//design of waterway for canal head regulator\n",
+"H=Lp-Lcrest_r;\n",
+"L1=Q/(Cd_r*H^1.5);\n",
+"//which gives L=64.2\n",
+"//hence provide 7 bays of 10 m each\n",
+"mprintf('\n\nnunmber of gates for the head regulator=7.');\n",
+"\n",
+"//design of stilling basin\n",
+"Hl=Lmax-hfl;\n",
+"q=Qmax/L;\n",
+"yc=(q^2/9.81)^(1/3);\n",
+"Z=Hl/yc;\n",
+"//since Z<1\n",
+"Y=1+0.93556*Z^0.368;\n",
+"y2=Y*yc;\n",
+"Lc=5*y2;\n",
+"Lc=round(Lc*10)/10;\n",
+"mprintf('\n\nLength of cistern=%f m.',Lc);\n",
+"Ef2=yc*(Y+1/(2*Y^2));\n",
+"j=hfl-Ef2;\n",
+"j=round(j*10)/10;\n",
+"mprintf('\nR.L of cistern=%f m.',j);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.1: EX12_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 12.1\n",
+"//calculate average hydraulic gradient\n",
+"//uplift presuures and thickness of floor at 6m, 12m and 18m from u/s\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"rho=2.24; //relative density of material\n",
+"gamma_w=9.81; //unit weigth of water\n",
+"L=22; //total length\n",
+"lc=(2*6)+L+(2*8); //length of creep\n",
+"hg=4/lc; //hydraulic gradient\n",
+"mprintf('avearge hydraulic gradient=%f.',hg);\n",
+"//at 6 m from u/s\n",
+"x=6;\n",
+"lg=(6*2)+x;\n",
+"h1=4*(1-lg/50); //unbalanced head\n",
+"up=gamma_w*h1;\n",
+"t=4*h1/(3*(rho-1));\n",
+"up=round(up*100)/100;\n",
+"t=round(t*100)/100;\n",
+"mprintf('\n\nuplift at 6 m from u/s=%f kN/square metre.',up);\n",
+"mprintf('\nthickness at 6 m from u/s=%f m.',t);\n",
+"\n",
+"//at 12 m from u/s\n",
+"x=12;\n",
+"lg=(6*2)+x;\n",
+"h1=4*(1-lg/50); //unbalanced head\n",
+"up=gamma_w*h1;\n",
+"t=4*h1/(3*(rho-1));\n",
+"up=round(up*100)/100;\n",
+"t=round(t*100)/100;\n",
+"mprintf('\n\nuplift at 12 m from u/s=%f kN/square metre.',up);\n",
+"mprintf('\nthickness at 12 m from u/s=%f m.',t);\n",
+"\n",
+"//at 18m from u/s\n",
+"x=18;\n",
+"lg=(6*2)+x;\n",
+"h1=4*(1-lg/50); //unbalanced head\n",
+"up=gamma_w*h1;\n",
+"t=4*h1/(3*(rho-1));\n",
+"up=round(up*10)/10;\n",
+"t=round(t*100)/100;\n",
+"mprintf('\n\nuplift at 18 m from u/s=%f kN/square metre.',up);\n",
+"mprintf('\nthickness at 18 m from u/s=%f m.',t);\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.2: EX12_2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 12.2\n",
+"//calculate uplift pressure and exit gradient\n",
+"//check whether section is safe against overturning and piping\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"b=54; //width of section\n",
+"D1D2=16; //distance between points D1 and D2\n",
+"D2D3=37; //distance between points D2 and D3\n",
+"\n",
+"//first pipe line\n",
+"//taking data from figure\n",
+"d=105-97;\n",
+"b1=0.5;\n",
+"alpha=b/d;\n",
+"//from the curves we get\n",
+"fic1=0.665;\n",
+"fid1=0.76;\n",
+"fie1=1;\n",
+"t=105-104; //floor thickness\n",
+"corec=(fid1-fic1)*100*t/d; //correction for floor thickness\n",
+"//for pile no. 2\n",
+"D=104-97;\n",
+"d=104-97;\n",
+"bdash=16;\n",
+"C=19*(D/bdash)^0.5*(d+D)/b; //correction for pile no. 2\n",
+"fic1=fic1*100+corec+C; //corrected pressures\n",
+"\n",
+"//intermedite pipe line\n",
+"d=105-97;\n",
+"b1=16.5;\n",
+"alpha=b/d;\n",
+"r=b1/b; //ratio b1/b\n",
+"//from the curves we get\n",
+"fic2=0.52;\n",
+"fie2=0.725;\n",
+"fid2=0.615;\n",
+"corec_c1=(fid2-fic2)*100*t/d;\n",
+"corec_e1=(fie2-fid2)*100/d;\n",
+"\n",
+"//for pile no. 1\n",
+"C1=C;\n",
+"d=104-97;\n",
+"bdash=37;\n",
+"D=104-95;\n",
+"C2=19*(D/bdash)^0.5*(d+D)/b;\n",
+"//correction due to slope\n",
+"corec_e2=3.3; //from table 12.4\n",
+"//correction is negative due to upwrd slope\n",
+"l=4; //horizontal length of slope\n",
+"corec_c2=corec_e2*l/bdash;\n",
+"\n",
+"fie2=fie2*100-corec_e1-corec_e2;\n",
+"fic2=fic2*100+corec_c1+C2-corec_c2;\n",
+"\n",
+"//pile no. 3 at d/s end\n",
+"d=103.5-95;\n",
+"alpha_=d/b;\n",
+"//for curves\n",
+"fie3=0.35;fid3=0.242;\n",
+"corec_t=(fie3-fid3)*100*(103.5-102)/d;\n",
+"\n",
+"//correction for interference at pile no. 2\n",
+"d=102-95;\n",
+"D=102-97;\n",
+"C3=19*(D/bdash)^0.5*(d+D)/b;\n",
+"fie3=fie3*100-corec_t-C3;\n",
+"\n",
+"point=['C1' 'C2' 'E2' 'E3']; //Point\n",
+"P=[fic1 fic2 fie2 fie3]; //pressure percent\n",
+"P_=[3.55 2.78 3.39 1.58]; //pressure head\n",
+"mprintf('Points Pressure percent Pressure head');\n",
+"for i=1:4\n",
+" P(i)=round(P(i)*10)/10;\n",
+" mprintf('\n%s %f %f',point(i),P(i),P_(i));\n",
+"end\n",
+"\n",
+"//check for floor thickness\n",
+"Pa=P_(2)-((P_(2)-P_(4))*6.5/37);\n",
+"Pb=P_(2)-((P_(2)-P_(4))*24/37);\n",
+"Pc=P_(2)-((P_(2)-P_(4))*30/37);\n",
+"rho=2.24; //specific gravity of concrete\n",
+"ta=Pa/(rho-1);\n",
+"tb=Pb/(rho-1);\n",
+"tc=Pc/(rho-1);\n",
+"ta=round(ta*100)/100;\n",
+"tb=round(tb*100)/100;\n",
+"tc=round(tc*100)/100;\n",
+"mprintf('\n\nThickness required at A=%f m.',ta);\n",
+"mprintf('\nThickness required at B=%f m.',tb);\n",
+"mprintf('\nThickness required at C=%f m.',tc);\n",
+"t=103.5-102;\n",
+"mprintf('\nThickness provided=%f m.',t);\n",
+"mprintf('\nFloor thickness at B and C are adequate');\n",
+"\n",
+"//exit gradient\n",
+"H=108.5-103.5; //seepage head\n",
+"d=103.5-95; //depth cut-off\n",
+"//from exit gradient curve\n",
+"alpha=6.35;\n",
+"lambda=(1+(1+alpha^2)^0.5)/2;\n",
+"Ge=H/(d*%pi*lambda^0.5);\n",
+"mprintf('\n\nexit gradient=%f.',Ge);\n",
+"mprintf('\n it is less than permissible exit gradient < 1/6\nHence safe..');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.3: EX12_3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 12.3\n",
+"//design a vertical drop weir on Bligh's theory\n",
+"//test floor by Khosla's theory\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=2800; //maximum flood discharge\n",
+"hfl=285; //H.F.L before construction\n",
+"hw=278; //minimum water level\n",
+"fsl=284; //F.S.L of canal\n",
+"c=12; //coefficient of creep\n",
+"flux=1; //allowable afflux\n",
+"Ge=1/6; //permissible exit gradient\n",
+"rho=2.24; //specific gravity of concrete\n",
+"\n",
+"//Hydraulic calculation\n",
+"L=4.75*Q^0.5;\n",
+"q=Q/L;\n",
+"q=round(q*10)/10;\n",
+"mprintf('Hydraulic calculation:');\n",
+"mprintf('\ndischarge per unit width of river=%f cumecs.',q);\n",
+"f=1;\n",
+"R=1.35*(q^2/f)^(1/3);\n",
+"R=round(R*100)/100;\n",
+"mprintf('\nregime scour depth=%f m.',R);\n",
+"V=q/R; //regime velocity\n",
+"vh=V^2/(2*9.81); //velocity head\n",
+"l_down=hfl+vh;\n",
+"l_up=l_down+flux;\n",
+"hfl_up=l_up-vh;\n",
+"hfl_down=hfl-0.5;\n",
+"hfl_down=round(hfl_down*100)/100;\n",
+"mprintf('\nactual d/s H.F.L allowing 0.5 m for retrogation=%f m.',hfl_down);\n",
+"K=(q/1.7)^(2/3);\n",
+"cl=l_up-K; //crest level\n",
+"cl=round(cl*100)/100;\n",
+"mprintf('\ncrest level=%f m.',cl);\n",
+"pl=fsl+0.5; //pond level\n",
+"s=hfl_down-cl; //heigth of shutter\n",
+"mprintf('\nheigth of shutter=%f m.',s);\n",
+"rl_up_pile=hfl_up-1.5*R; //R.L of bottom u/s pile\n",
+"d_up_cut=hw-276; //depth of upstream cut-off\n",
+"mprintf('\ndepth of upstream cut-off=%f m.',d_up_cut);\n",
+"mprintf('\n provide concrete cut off 2 m depth.');\n",
+"rl_bot_ds=hfl_down-2*R;\n",
+"Hs=hfl_down-hw; //seepage head\n",
+"Hc=cl-hw; //heigth of crest\n",
+"mprintf('\nR.L of gates crest=%f m.',Hs);\n",
+"mprintf('\nHeigth of crest=%f m.',Hc);\n",
+"\n",
+"//design of weir wall\n",
+"d=hfl_up-cl;\n",
+"a=d/(rho)^0.5;\n",
+"a=3*d/(2*rho); //from sliding consideration\n",
+"a=s+1; //from practical consieration\n",
+"a=a+1;\n",
+"mprintf('\n\ndesign of weir wall:')\n",
+"mprintf('\nprovide top width of %i m.',a);\n",
+"Mo=9.81*Hs^3/6; //overtirning moment\n",
+"//equating the moment of resistance to overturning moment and putting the values we get\n",
+"y=poly([-1.084,0.020,0.039],'x','c');\n",
+"b=roots(y);\n",
+"//we get b= - 5.5347261 and 5.0219056\n",
+"//taking\n",
+"b=5;\n",
+"//when weir is submerged\n",
+"C=0.58;\n",
+"d=(q^2/((2*C/3)^2*2*9.81))^(1/3);\n",
+"Mo=9.81*d*Hc^2/2;\n",
+"//from equation of moment of resistence we get\n",
+"y=poly([-77.55,3,1],'x','c');\n",
+"b=roots(y);\n",
+"//we get b= - 10.433085 and 7.4330846\n",
+"//taking\n",
+"b=8;\n",
+"mprintf('\nbottom width=%i m.',b);\n",
+"\n",
+"//design of impervious and pervious aprons\n",
+"C=12;\n",
+"L=C*Hs;\n",
+"mprintf('\n\ndesign of impervious and pervious aprons:');\n",
+"mprintf('\ntotal creep length=%i m.',L);\n",
+"l1=2.21*C*(Hs/13)^0.5;\n",
+"l1_=l1+1;\n",
+"mprintf('\nlength of downstream impervious apron=%i m.',l1_);\n",
+"d1=hw-276;\n",
+"d2=hw-271;\n",
+"l2=L-l1-(b+2*d1+2*d2);\n",
+"mprintf('\nlength of upstream impervious apron=%i m.',l2);\n",
+"l3=18*C*(Hs*q/975)^0.5;\n",
+"mprintf('\ntotal length of d/s apron=%i m.',l3); //calculation is wrong in book\n",
+"l=l3-l1;\n",
+"le=l/2;\n",
+"le=round(le*100)/100;\n",
+"mprintf('\nprovide filter of length %f m. and launching apron of length %f m.',le,le);\n",
+"t=d2*10^0.5/le;\n",
+"mprintf('\nthickness of launching apron in horizontal position=%f m.',t);\n",
+"mprintf('\nprovide launching apron of thickness 1.5 m.');\n",
+"T=2*d1;\n",
+"V=d1*10^0.5;\n",
+"ta=V/T;\n",
+"ta=round(ta*10)/10;\n",
+"mprintf('\nthickness of apron in horizontal position=%f m.',ta);\n",
+"Hr=Hs-Hs*(4+33+8)/L;\n",
+"t=4*Hr/(3*(rho-1));\n",
+"t=round(t*10)/10;\n",
+"mprintf('\nprovide thickness of %f m from d/s of weir wall to point 6 m from it.',t);\n",
+"Hr=Hs-Hs*(4+33+8+6)/L;\n",
+"t=4*Hr/(3*(rho-1));\n",
+"t=round(t*10)/10;\n",
+"mprintf('\nprovide thickness of %f m from 6 m to 12 m from d/s end of weir wall.',t);\n",
+"Hr=Hs-Hs*(4+33+8+12)/L;\n",
+"t=4*Hr/(3*(rho-1));\n",
+"t=round(t*10)/10;\n",
+"mprintf('\nprovide thickness of %f m for rest of length of weir floor.',t);\n",
+"\n",
+"//check by khosla's theory\n",
+"b=33+8+19; //total horizontal length of impervious floor\n",
+"d=7; //depth of downstream pile\n",
+"alpha=b/d;\n",
+"n=0.14; //n=1/%pi*(lambda)^0.5;\n",
+"Ge=Hs*n/d;\n",
+"mprintf('\n\ncheck by Khosla theory:');\n",
+"mprintf('\nexit gradient=%f. < 1/6\n hence safe',Ge);\n",
+"alpha_=d/b;\n",
+"fic1=0.83;fid1=0.88;\n",
+"corec_c1=(fid1-fic1)*100/2;\n",
+"bdash=b;\n",
+"d=2;D=7;\n",
+"C1=19*(D/bdash)^0.5*(d+D)/b;\n",
+"fic1=fic1*100+corec_c1+C1;\n",
+"Pc=Hs*fic1/100; //pressure head at C\n",
+"alpha_=d/b;\n",
+"fie2=0.31;fid2=0.21;\n",
+"corec_e1=(fie2-fid2)*1.7*100/7;\n",
+"bdash=b;\n",
+"d=7;D=2;\n",
+"C1=19*(D/bdash)^0.5*(d+D)/b;\n",
+"fie2=fie2*100-corec_e1-C1; //in book 3.53 value is wrong\n",
+"Pe=Hs*fie2/100; //pressue head at E\n",
+"//assuming linear variation of pressure for intermediate points\n",
+"Pa=Pc-(Pc-Pe)*(33+8)/b;\n",
+"t=Pa/1.24;\n",
+"Pa=round(Pa*100)/100;\n",
+"t=round(t*100)/100;\n",
+"mprintf('\npressure at d/s of weir wall=%f m.',Pa);\n",
+"mprintf('\nthickness at d/s of weir wall=%f m. < thickness by Bligh theory;\nhence safe.',t);\n",
+"Pb=Pc-(Pc-Pe)*(33+8+6)/b;\n",
+"t=Pb/1.24;\n",
+"Pa=round(Pa*100)/100;\n",
+"t=round(t*100)/100;\n",
+"mprintf('\npressure at 6 m from d/s of weir wall=%f m.',Pb);\n",
+"mprintf('\nthickness at 6m from d/s of weir wall=%f m. < thickness by Bligh theory;\nhence safe.',t);\n",
+"Pc=Pc-(Pc-Pe)*(33+8+12)/b;\n",
+"t=Pc/1.24;\n",
+"Pa=round(Pa*100)/100;\n",
+"t=round(t*100)/100;\n",
+"mprintf('\npressure at 12 m from d/s of weir wall=%f m.',Pc);\n",
+"mprintf('\nthickness at 12m from d/s of weir wall=%f m. > thickness by Bligh theory;\nhence unsafe.',t);\n",
+"mprintf('\nhence increase th ethickness to 1.9 m for a length of 7 m of impervious floor.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.4: EX12_4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 12.4\n",
+"//design a slopeing glacis\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"q=10; //maximum discharge intensity on weir crest\n",
+"hfl=255; //H.F.L before construction of weir\n",
+"rb=249.5; //R.L of river bed\n",
+"pl=254; //pond level\n",
+"s=1; //heigth of crest shutter\n",
+"dhw=251.5; //anticipated downstream water level in river when water is dischrging with pond level upstream\n",
+"br=0.5; //bed retrogression\n",
+"f=0.9; //Laecey silt factor\n",
+"Ge=1/7; //permissible exit gradient\n",
+"flux=1; //permissible afflux\n",
+"\n",
+"cl=pl-s; //crest level\n",
+"mprintf('crest level=%f m.',cl);\n",
+"K=(q/1.7)^(2/3);\n",
+"tel_up=cl+K;\n",
+"tel_up=round(tel_up*100)/100;\n",
+"mprintf('\nelevation of u/s T.E.L=%f m.',tel_up);\n",
+"R=1.35*(q^2/f)^(1/3);\n",
+"R=round(R*10)/10;\n",
+"mprintf('\nregime scour depth=%f m.',R);\n",
+"V=q/R; //regime velocity\n",
+"vh=V^2/(2*9.81); //velocity head\n",
+"hfl_up=tel_up-vh;\n",
+"tel_down=hfl+vh;\n",
+"flux=hfl_up-hfl;\n",
+"flux=round(flux*100)/100;\n",
+"mprintf('\nafflux=%f. which is near to permissible',flux);\n",
+"hfl_down=hfl-br; //downstream H.F.L after retrogression\n",
+"tel_down=tel_down-br; //downstream T.F.L after retrogression\n",
+"Hl=tel_up-tel_down; //loss of head in flood\n",
+"Hl=round(Hl*100)/100;\n",
+"mprintf('\nloss of head in at high flood=%f m.',Hl);\n",
+"K=pl-cl; //head over crest\n",
+"q_=1.7*(K)^1.5;\n",
+"Hl_=pl-dhw; //loss of head\n",
+"mprintf('\nloss of head=%f m.',Hl_);\n",
+"Ef2=4.3;\n",
+"Ef2_=1.7; //from Blench curve\n",
+"jump=tel_down-Ef2;\n",
+"jump_=251.5-Ef2_; //level at which jump will form\n",
+"Ef1=Ef2+Hl;\n",
+"Ef1_=Ef2_+Hl_;\n",
+"D1=1.03;\n",
+"D1_=0.15; //calculated from Ef1 and Ef1_ respectively\n",
+"D2=3.96;D2_=1.68; //calculated from Ef2 and Ef2_ respectively\n",
+"hj=D2-D1;\n",
+"hj_=D2_-D1_; //heigth of jump\n",
+"concrete=5*hj;\n",
+"concrete_=5*hj_; //length of concrete floor\n",
+"mprintf('\n\nHydraulic jump calculation:');\n",
+"mprintf('\nheigth of jump for high flood condition=%f m.',hj);\n",
+"mprintf('\nlength of concrete floor for high flood condition=%f m.',concrete);\n",
+"mprintf('\nheigth of jump for pond level condition=%f m.',hj_);\n",
+"mprintf('\nlength of concrete floor for high pond level condition=%f m.',concrete_);\n",
+"\n",
+"cw=2; //crets width\n",
+"us=2; //upstream slope\n",
+"ds=3; //downstream slope\n",
+"l=15;\n",
+"mprintf('\n\n upstream slope of glacis=%i:1.',us);\n",
+"mprintf('\ndownstream slope of glacis=%i:1.',ds);\n",
+"mprintf('\nhorizontal length of floor beyond the toe=%i m..',l);\n",
+"\n",
+"R=6.5;\n",
+"sh_up=hfl_up-1.5*R;\n",
+"sh_down=hfl_down-2*R;\n",
+"sh_up=round(sh_up*100)/100;\n",
+"mprintf('\nR.L of bottom of upstream sheet pile=%f m.',sh_up);\n",
+"mprintf('\nR.L of downstream sheet pile=%f m.',sh_down);\n",
+"mprintf('\nprovide intermediate sheet pile at d/s toe of glacis.');\n",
+"Hs=pl-249.6; //maximum percolation head\n",
+"d=249.6-sh_down; //depth of d/s cut-off\n",
+"n=Ge*d/Hs; //n=1/(%pi*lambda^0.5);\n",
+"//from khosla exit gradient curve\n",
+"alpha=1.5;\n",
+"b=alpha*d;\n",
+"mprintf('\n\nlength of impervious floor=%f m.',b);\n",
+"fl=(2*(253-249.5))+2+(3*(253-249.6))+15;\n",
+"us=36-fl;\n",
+"mprintf('\nlength of floor already provide=%f m.',fl);\n",
+"mprintf('\nwhich is more than required from permissible exit gradient.\nno upstream floor is required.');\n",
+"mprintf('\nprovide %f m upstream floor so that total length becomes 36 m.',us);\n",
+"alpha_1=0.089; \n",
+"alpha_2=0.225; //alpha_=1/alpha\n",
+"b1=21;\n",
+"alpha=4.44;\n",
+"mprintf('\n\nPressure percent at points:');\n",
+"point=['C1' 'D1' 'C2' 'E2' 'D2' 'D3' 'E3'];\n",
+"bc=[72 82 31.5 45.5 58.5 29 44];\n",
+"crt=[3.1 0 3.5 0 -3.2 0 0 -3.6];\n",
+"crs=[0 0 0 0 2.3 0 0 0];\n",
+"cri=[3.7 0 6.4 0 -2.4 0 -6.4];\n",
+"mprintf('\nPoints Before correction After correction');\n",
+"for i=1:7\n",
+" after(i)=bc(i)+crt(i)+crs(i)+cri(i);\n",
+" mprintf('\n%s %i %f',point(i),bc(i),after(i));\n",
+"end\n",
+"Hs=254-249.6; //no flow condition\n",
+"Hs_=256.13-254.5; //high flood condition\n",
+"Hs__=254-251.5; //flow at pond level\n",
+"mprintf('\n\nelevation of subsoil H.G above datum:');\n",
+"mprintf('\nno flow condition:');\n",
+"fie1=1*Hs;\n",
+"fid1=0.82*Hs;\n",
+"fic1=0.788*Hs;\n",
+"fie2=0.552*Hs;\n",
+"fid2=0.455*Hs;\n",
+"fic2=0.414*Hs;\n",
+"fie3=0.34*Hs;\n",
+"fid3=0.29*Hs;\n",
+"fic3=0;\n",
+"fie1=round(fie1*100)/100;fid1=round(fid1*100)/100;fic1=round(fic1*100)/100;\n",
+"fie2=round(fie2*100)/100;fid2=round(fid2*100)/100;fic2=round(fic2*100)/100;\n",
+"fie3=round(fie3*100)/100;fid3=round(fid3*100)/100;fic3=round(fic3*100)/100;\n",
+"mprintf('\nfie1=%f.;fid1=%f.;fic1=%f.\nfie2=%f.;fid2=%f.;fic2=%f.\nfie3=%f.;fid3=%f.;fic3=%f.',fie1,fid1,fic1,fie2,fid2,fic2,fie3,fid3,fic3);\n",
+"mprintf('\nhigh flood condition:');\n",
+"fie1=1*Hs_;\n",
+"fid1=0.82*Hs_;\n",
+"fic1=0.788*Hs_;\n",
+"fie2=0.552*Hs_;\n",
+"fid2=0.455*Hs_;\n",
+"fic2=0.414*Hs_;\n",
+"fie3=0.34*Hs_;\n",
+"fid3=0.29*Hs_;\n",
+"fic3=0;\n",
+"fie1=round(fie1*100)/100;fid1=round(fid1*100)/100;fic1=round(fic1*100)/100;\n",
+"fie2=round(fie2*100)/100;fid2=round(fid2*100)/100;fic2=round(fic2*100)/100;\n",
+"fie3=round(fie3*100)/100;fid3=round(fid3*100)/100;fic3=round(fic3*100)/100;\n",
+"mprintf('\nfie1=%f.;fid1=%f.;fic1=%f.\nfie2=%f.;fid2=%f.;fic2=%f.\nfie3=%f.;fid3=%f.;fic3=%f.',fie1,fid1,fic1,fie2,fid2,fic2,fie3,fid3,fic3);\n",
+"mprintf('\nflow at pond level:');\n",
+"fie1=1*Hs__;\n",
+"fid1=0.82*Hs__;\n",
+"fic1=0.788*Hs__;\n",
+"fie2=0.552*Hs__;\n",
+"fid2=0.455*Hs__;\n",
+"fic2=0.414*Hs__;\n",
+"fie3=0.34*Hs__;\n",
+"fid3=0.29*Hs__;\n",
+"fic3=0;\n",
+"fie1=round(fie1*100)/100;fid1=round(fid1*100)/100;fic1=round(fic1*100)/100;\n",
+"fie2=round(fie2*100)/100;fid2=round(fid2*100)/100;fic2=round(fic2*100)/100;\n",
+"fie3=round(fie3*100)/100;fid3=round(fid3*100)/100;fic3=round(fic3*100)/100;\n",
+"mprintf('\nfie1=%f.;fid1=%f.;fic1=%f.\nfie2=%f.;fid2=%f.;fic2=%f.\nfie3=%f.;fid3=%f.;fic3=%f.',fie1,fid1,fic1,fie2,fid2,fic2,fie3,fid3,fic3);\n",
+"\n",
+"mprintf('\n\nPrejump profile:');\n",
+"mprintf('\nhigh flood condition:');\n",
+"dist=[3 6 8.4]; //distance\n",
+"glacis=[252 251 250.32]; //R.L of glacis\n",
+"D1=[1.3 1.15 1.03];\n",
+"mprintf('\nEf1 D1');\n",
+"for i=1:3\n",
+" Ef1(i)=256.25-glacis(i);\n",
+" mprintf('\n%f %f',Ef1(i),D1(i));\n",
+"end\n",
+"mprintf('\npond level flow:');\n",
+"dist=[3 6 9 9.6]; //distance\n",
+"glacis=[252 251 250 249.9]; //R.Lof glacis\n",
+"D1=[0.31 0.23 0.16 0.15];\n",
+"mprintf('\nEf1 D1');\n",
+"for i=1:4\n",
+" Ef1(i)=254-glacis(i);\n",
+" mprintf('\n%f %f',Ef1(i),D1(i));\n",
+"end\n",
+"\n",
+"\n",
+"rho=2.24;\n",
+"Uf=4; //unbalanced head for high flood condtion\n",
+"Us=2.56; //unbalanced static head\n",
+"Hf=2*Uf/3;\n",
+"t=Hf/(rho-1);\n",
+"t=round(t*10)/10;\n",
+"mprintf('\n\nfloor thickness at the point of formation of hydraulic jump=%f m.',t);\n",
+"Uf=2.9; //unbalanced head for high flood condtion\n",
+"Us=2.2; //unbalanced static head\n",
+"Hf=2*Uf/3;\n",
+"t=Us/(rho-1);\n",
+"t=round(t*10)/10;\n",
+"mprintf('\nfloor thickness at the point of formation of hydraulic jump at the pond level condition=%f m.',t);\n",
+"P=1.5; //pressure head at d/s end of floor\n",
+"t=P/(rho-1);\n",
+"t=round(t*10)/10;\n",
+"mprintf('\n\nfloor thickness at downstream side of sloping glacis=%f m.',t);\n",
+"D=rb-sh_up; //depth of u/s scour hole above bed level\n",
+"a=1.5*D;\n",
+"a=round(a*10)/10;\n",
+"mprintf('\n\nminimum length of upstream launching apron=%f m.',a);\n",
+"mprintf('\nprovide 1.5 m thick apron for length of 5 m.');\n",
+"D=249.6-241.5;\n",
+"a=1.5*D;\n",
+"mprintf('\n\nminimum length of downstream launching apron=%f m.',a);\n",
+"mprintf('\nprovide 1.5 m thick apron for length of 12 m.');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.5: EX12_5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 12.5\n",
+"//calculate uplift pressure at the junction of inner faces of pile with weir floor using Khosla theory\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"b=16; //total length of floor\n",
+"d=5; //depth of downstream pile\n",
+"D=4; //depth of upstream pile\n",
+"H=2.5; //head created by weir\n",
+"\n",
+"//pressure at E\n",
+"alpha=b/d;\n",
+"lambda=(1+(1+alpha^2)^0.5)/2;\n",
+"fie=acos((lambda-2)/lambda)/%pi;\n",
+"C=19*(D/b)^0.5*((d+D)/b);\n",
+"fie=fie*100-C;\n",
+"P=H*fie/100;\n",
+"P=round(P*1000)/1000;\n",
+"mprintf('Pressure at E=%f m.',P);\n",
+"\n",
+"//pressure at C1\n",
+"alpha=b/D;\n",
+"lambda=(1+(1+alpha^2)^0.5)/2;\n",
+"fie=acos((lambda-2)/lambda)/%pi;\n",
+"fic=1-fie; //by principle reversibility of flow\n",
+"C=19*(d/b)^0.5*((d+D)/b);\n",
+"fic=fic*100+C;\n",
+"P=fic*H/100;\n",
+"P=round(P*1000)/1000;\n",
+"mprintf('\n Pressure at C=%f m.',P);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.6: EX12_6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 12.6\n",
+"//calculate floor thickness at mid length and at junction with u/s and d/s cut-off walls\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"b=13; //length of floor\n",
+"d=2; //depth of downstream wall\n",
+"D=1.5; //depth of upstream cut-off\n",
+"rho=2.24; //relative density\n",
+"H=1.5;\n",
+"\n",
+"//at junction of d/s cut-off with floor\n",
+"alpha=b/d;\n",
+"lambda=(1+(1+alpha^2)^0.5)/2;\n",
+"fie=acos((lambda-2)/lambda)/%pi;\n",
+"C=19*(D/b)^0.5*((d+D)/b);\n",
+"fie=fie*100-C;\n",
+"P=H*fie/100;\n",
+"t=P/(rho-1);\n",
+"t=round(t*10)/10;\n",
+"mprintf('floor thickness at junction of d/s cut-off with floor=%f m.',t);\n",
+"\n",
+"//at junction of u/s cut-off with floor\n",
+"alpha=b/D;\n",
+"lambda1=(1+(1+alpha^2)^0.5)/2;\n",
+"fie=acos((lambda1-2)/lambda1)/%pi;\n",
+"fic=1-fie; //by principle reversibility of flow\n",
+"C=19*(D/b)^0.5*((d+D)/b);\n",
+"fiec=fic*100+C;\n",
+"P=fiec*H/100;\n",
+"t=0.3; //this the uplift will be counter balanced by downward weigth of impounded water\n",
+"mprintf('\nfloor thickness at junction of u/s cut-off with floor=%f m.',t);\n",
+"\n",
+"//at mid-length\n",
+"P=(1.08+0.489)/2; //assuming linear variation\n",
+"t=P/(rho-1);\n",
+"t=round(t*100)/100;\n",
+"mprintf('\nfloor thickness at mid-length=%f m.',t);\n",
+"\n",
+"//exit gradient\n",
+"G=H/(d*%pi*(lambda)^0.5);\n",
+"G=round(G*1000)/1000;\n",
+"//since G<0.18\n",
+"mprintf('\n G=%f. <0.18./nfloor is safe against failure by piping.',G);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.7: EX12_7.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example12.7\n",
+"//calculate heigth of weir to be built\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"B=30; //stream width\n",
+"D=3; //stream depth\n",
+"V=1.25; //mean velocity\n",
+"Cd=0.95; //discharge coefficient\n",
+"Q=B*D*V;\n",
+"C=2*Cd*(2*9.81)^0.5/3;\n",
+"x=4-(Q/(C*B))^(2/3);\n",
+"x=round(x*1000)/1000;\n",
+"mprintf('heigth of weir to be built=%f m.',x);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.8: EX12_8.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 12.8\n",
+"//calculate uplift pressure at two cut-off\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"b=50; //length of floor\n",
+"d=8; //depth of downstream pile\n",
+"D=8; //depth of upstream pile\n",
+"H=5; //effective head \n",
+"tu=1; //floor thickness at upstream\n",
+"td=2; //floor thickness at downstream\n",
+"\n",
+"//downstream cut-off\n",
+"alpha=b/d;\n",
+"lambda=(1+(1+alpha^2)^0.5)/2;\n",
+"fie=acos((lambda-2)/lambda)/%pi;\n",
+"fid=acos((lambda-1)/lambda)/%pi;\n",
+"Ct=(fie-fid)*td/d;\n",
+"C=19*(D/b)^0.5*((d+D)/b);\n",
+"fie=fie*100-C-Ct*100;\n",
+"P=H*fie/100;\n",
+"P=round(P*100)/100;\n",
+"mprintf('Pressure at downstream cut-off=%f m.',P);\n",
+"\n",
+"//upstream cut-off\n",
+"fie=acos((lambda-2)/lambda)/%pi;\n",
+"fid=acos((lambda-1)/lambda)/%pi;\n",
+"fic1=1-fie;\n",
+"fid1=1-fid;\n",
+"Ct=(fic1-fid1)*td/d;\n",
+"C=-19*(D/b)^0.5*((d+D)/b);\n",
+"fic1=fic1*100-C-Ct*100;\n",
+"P=H*fic1/100;\n",
+"P=round(P*100)/100;\n",
+"mprintf('\nPressure at upstream cut-off=%f m.',P);\n",
+"G=H/(d*%pi*(lambda)^0.5);\n",
+"mprintf('\nExit Gradient=%f.',G);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.9: EX12_9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 12.9\n",
+"//calculate depth of downstream cut-off\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=1000; //discharge of river\n",
+"L=256; //crest length of diversion\n",
+"f=1.1; //silt factor\n",
+"seg=1/6; //safe exit gradient\n",
+"hfl=103; //high flood level\n",
+"cf=100; //reduced level of downstream concrete floor\n",
+"H=2.4; //maximum static head of weir\n",
+"b=40; //length of concrete floor\n",
+"\n",
+"q=Q/L;\n",
+"R=1.35*(q^2/f)^(1/3);\n",
+"rld=hfl-1.5*R;\n",
+"d=cf-rld;\n",
+"d=round(d*100)/100;\n",
+"mprintf('depth of downstream cut-off=%f m.',d);\n",
+"\n",
+"alpha=b/d;\n",
+"lambda=(1+(1+alpha^2)^0.5)/2;\n",
+"G=H/(d*%pi*(lambda)^0.5);\n",
+"//since G<seg\n",
+"mprintf('\n G=%f. <1/6./nfloor is safe against failure by piping.',G);\n",
+""
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/14-IRRIGATION_CHANNEL_1_SILT_THEORIES.ipynb b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/14-IRRIGATION_CHANNEL_1_SILT_THEORIES.ipynb
new file mode 100644
index 0000000..6325d2c
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/14-IRRIGATION_CHANNEL_1_SILT_THEORIES.ipynb
@@ -0,0 +1,1583 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 14: IRRIGATION CHANNEL 1 SILT THEORIES"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.10: EX14_10.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.10\n",
+"//design irrigation channel according to Laecy silt theory\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=15; //discharge\n",
+"f=1; //laecy silt factor\n",
+"s=1/2; //channel side slope\n",
+"\n",
+"V=(Q*f^2/140);\n",
+"A=Q/V;\n",
+"R=5*V^2/(2*f);\n",
+"//using the value of A in equations we get,\n",
+"//equation in D as\n",
+"y=poly([-21.765,18.336,-1.73],'x','c');\n",
+"D=roots(y);\n",
+"//we get D=9.2368003 and 1.3620436.\n",
+"//taking\n",
+"D=1.3620436;\n",
+"B=18.336-D*2.23;\n",
+"P=4.75*Q^0.5;\n",
+"S=1/(3340*Q^(1/6));\n",
+"B=round(B*10)/10;\n",
+"D=round(D*100)/100;\n",
+"mprintf('Width of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+"mprintf('\nBed slope=%f.',S);\n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.11: EX14_11.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.11\n",
+"//find channel section and discharge\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"S=1/5000; //bed slope\n",
+"s=1/2; //side slope\n",
+"f=0.9; //laecy silt factor\n",
+"\n",
+"Q=(f^(5/3)/(3340*S))^6;\n",
+"R=f^3/(4980*S)^2;\n",
+"P=4.75*Q^0.5;\n",
+"A=P*R;\n",
+"//using the value of A and P in equations we get,\n",
+"//equation in D as\n",
+"y=poly([-6.961,9.41,-1.73],'x','c');\n",
+"D=roots(y);\n",
+"//we get D=4.5561754 and 0.8831309.\n",
+"//taking\n",
+"D=0.8831309;\n",
+"B=9.41-D*2.23;\n",
+"B=round(B*100)*100;\n",
+"D=round(D*100)/100;\n",
+"Q=round(Q*1000)/1000;\n",
+"mprintf('Width of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+"mprintf('\n Discharge=%f cumecs.',Q);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.12: EX14_12.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.12\n",
+"//calculate quantity of bed load moved by the Meyer-Peter equation\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"gamma_w=9.81; //unit weigth of water\n",
+"D=3; //depth of channel\n",
+"d=0.3; //grain size\n",
+"k=1.5; //size of roughness of channel bed\n",
+"S=1/4400; //bed slope\n",
+"G=2.65; //specific gravity\n",
+"tau_b=gamma_w*D*S;\n",
+"N1=d^(1/6)/24;\n",
+"N=k^(1/6)/24;\n",
+"gamma_s=gamma_w*G;\n",
+"tau_c=0.047*(gamma_s-gamma_w)*d/1000;\n",
+"r=(N1/N)^1.5;\n",
+"q=47450*(tau_b*r-tau_c)^1.5;\n",
+"q=round(q*100)/100;\n",
+"mprintf('quantity of bed load moved=%f kN/m/hr.',q);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.13: EX14_13.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.13\n",
+"//calculate bed load transported by channel by einstein equation\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"gamma_w=9.81; //unit weigth of water\n",
+"D=3; //depth of channel\n",
+"d=0.3; //grain size\n",
+"k=1.5; //size of roughness of channel bed\n",
+"S=1/4400; //bed slope\n",
+"G=2.65; //specific gravity\n",
+"\n",
+"N1=d^(1/6)/24;\n",
+"N=k^(1/6)/24;\n",
+"r=(N1/N)^1.5;\n",
+"R1=3*r;\n",
+"si=(G-1)*d/(1000*R1*S);\n",
+"//hence we get\n",
+"fi=7;\n",
+"q=3600*fi*G*gamma_w*(G-1)^0.5*(gamma_w)^0.5*(d/1000)^1.5;\n",
+"q=round(q*10)/10;\n",
+"mprintf('quantity of bed load moved=%f kN/m/hr.',q);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.14: EX14_14.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.14\n",
+"//calculate concentration of suspended load\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"gamma_w=9.81; //unit weigth of water\n",
+"D=3; //depth of channel\n",
+"d=0.3; //grain size\n",
+"k=1.5; //size of roughness of channel bed\n",
+"S=1/4400; //bed slope\n",
+"G=2.65; //specific gravity\n",
+"V=0.03; //fall velocity\n",
+"c_=400; //concentration at 0.3 m above bed\n",
+"a=0.3;\n",
+"y=1;\n",
+"k_=0.4; //van karman's constant\n",
+"\n",
+"N1=d^(1/6)/24;\n",
+"N=k^(1/6)/24;\n",
+"r=(N1/N)^1.5;\n",
+"R1=3*r;\n",
+"V_=(gamma_w*R1*S)^0.5;\n",
+"c=c_*((a/y)*(D-y)/(D-a))^(V/(V_*k_));\n",
+"c=round(c*10)/10;\n",
+"mprintf('concentration of suspended load=%f ppm.',c);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.15: EX14_15.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.15\n",
+"//design an irrigation channel by Meyer peter equation\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=45; //discharge\n",
+"c=55; //bed load concentraion\n",
+"d=0.3; //average grain diameter\n",
+"gamma_w=9.81; //unit weigth of water\n",
+"G=2.67;\n",
+"f=0.964;\n",
+"\n",
+"c=c*Q*gamma_w*3600/1000000;\n",
+"P=4.75*Q^0.5;\n",
+"//taking channel width as B=28 m(slightly less than P)\n",
+"B=28;\n",
+"qs=c/B;\n",
+"//assuming effective grain diameter k=0.4 mm\n",
+"ks=0.4D-3;\n",
+"N1=ks^(1/6)/24;\n",
+"sf=1.76*d^0.5;\n",
+"N=0.0225*sf^0.25;\n",
+"r=N1/N;\n",
+"tau_c=0.047*gamma_w*(G-1)*d/1000;\n",
+"tau_b=r^1.5*((qs/47450)^(2/3)+tau_c);\n",
+"//from Manning's formula we get on simplification\n",
+"R=(0.000992*1000/0.525)^(3/7);\n",
+"S=0.525/(1000*R);\n",
+"//solving equation of R for trapezoidal section of side slope 1/2 we get\n",
+"y=poly([-36.792,25.06,0.5],'x','c');\n",
+"D=roots(y);\n",
+"//we get D= -51.547499 and 1.4274989 \n",
+"//taking\n",
+"D=1.4274989;\n",
+"D=round(D*100)/100;\n",
+"mprintf('Width of channel section=%i m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+"mprintf('\nBed slope=%f.',S);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.16: EX14_16.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.16\n",
+"//design an irrigation channel by Einstein equation\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=45; //discharge\n",
+"c=55; //bed load concentraion\n",
+"d=0.3; //average grain diameter\n",
+"gamma_w=9.81; //unit weigth of water\n",
+"G=2.67; //specific gravity of soil\n",
+"f=0.964; //silt factor\n",
+"\n",
+"//taking channel width as B=28 m(slightly less than P)\n",
+"B=28;\n",
+"qs=c/B;\n",
+"\n",
+"fi=(qs/(gamma_w*G))*(1/(G-1))^0.5*(1000000000/(gamma_w*d^3))^0.5;\n",
+"//from fig. 14.6 we get value of sci\n",
+"//using the sci equation and Manning formula and on simplifications we get\n",
+"R=(2.4296)^(3/7);\n",
+"S=0.4083/(1000*1.463);\n",
+"//solving equation of R for trapezoidal section of side slope 1/2 we get\n",
+"y=poly([-40.96,24.73,0.5],'x','c');\n",
+"D=roots(y);\n",
+"//we get D= -51.064253 and 1.6042534 \n",
+"//taking\n",
+"D=1.6042534;\n",
+"D=round(D*10)/10;\n",
+"mprintf('Width of channel section=%i m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+"mprintf('\nBed slope=%f.',S);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.17: EX14_17.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.17\n",
+"//design a channel for non-alluvial deposites\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=45; //discharge\n",
+"S=1/4000; //bed slope\n",
+"v=0.9; //permissible velocity\n",
+"N=0.025; //rogosity coefficient\n",
+"\n",
+"A=Q/v;\n",
+"R=(v*N/S^0.5)^1.5;\n",
+"P=A/R;\n",
+"//let us provide a trapezoidal section\n",
+"//from equation of Area and Perimeter of trapezoid\n",
+"y=poly([50,-29.45,1.828],'x','c');\n",
+"D=roots(y);\n",
+"//from which we get D=14.181815 and 1.9286881\n",
+"//taking\n",
+"D=1.9286881;\n",
+"B=P-2*1.41*D;\n",
+"D=round(D*100)/100;\n",
+"mprintf('Width of channel section=%i m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.18: EX14_18.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example14.18\n",
+"//design non-allvial channel using Bazin's formula\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=15; //discharge\n",
+"V=0.75; //mean velocity\n",
+"s=1; //side slope\n",
+"K=1.3; //bazin's coefficient\n",
+"//width is five times its depth\n",
+"\n",
+"A=Q/V;\n",
+"D=(A/6)^0.5;\n",
+"B=5*D;\n",
+"P=B+2*D*1.41;\n",
+"R=A/P;\n",
+"C=87/(1+K/(R)^0.5);\n",
+"S=(V/C)^2/R;\n",
+"B=round(B*10)/10;\n",
+"D=round(D*100)/100;\n",
+"mprintf('Width of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+"mprintf('\nBed slope=%f.',S);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.19: EX14_19.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"\n",
+"//example14.19\n",
+"//determine dimension of channel using chezy's equation\n",
+"//calculate the value of manning n\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=21.5; //discharge\n",
+"S=1/2500; //slope of bottom\n",
+"C=70;\n",
+"r=1/1.73;\n",
+"//taking R=0.5*D\n",
+"//and keeping it in Q=V*A;where V=C(RS)^0.5 and A=D^2(2*(4/3)^0.5-1/3^0.5);\n",
+"D=(21.5/1.7146)^(1/2.5);\n",
+"B=2*D*((4/3)^0.5-(1/3)^0.5);\n",
+"B=round(B*100)/100;\n",
+"D=round(D*100)/100;\n",
+"mprintf('side slope=%f.',r);\n",
+"mprintf('\nWidth of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+"\n",
+"R=0.5*D;\n",
+"V=C*(R*S)^0.5;\n",
+"n=R^(2/3)*S^0.5/V;\n",
+"n=round(n*1000)/1000;\n",
+"mprintf('\n\nvalue of manning n=%f.',n);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.1: EX14_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.1\n",
+"//design irrigation channel on Kennedy's theory\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=45; //discharge\n",
+"N=0.0225; //rogosity coefficient\n",
+"m=1.05; //critical velocity ratio\n",
+"S=1/5000; //bed slope\n",
+"\n",
+"D=2; //assume\n",
+"Vo=0.55*m*D^0.64;\n",
+"A=Q/Vo;\n",
+"//for a trapezoidal section\n",
+"B=(A-0.5*D^2)/2;\n",
+"P=B+D*5^0.5;\n",
+"R=A/P;\n",
+"C=(23+1/N+0.00155/S)*(R*S)^0.5/(1+(23+0.00155/S)*N/R^0.5);\n",
+"V=C*(R*S)^0.5;\n",
+"//Vo<V\n",
+"\n",
+"//assume D=2.2\n",
+"D=2.2;\n",
+"Vo=0.55*m*D^0.64;\n",
+"A=Q/Vo;\n",
+"B=(A-0.5*D^2)/D;\n",
+"P=B+D*5^0.5;\n",
+"R=A/P;\n",
+"C=(23+1/N+0.00155/S)*(R*S)^0.5/(1+(23+0.00155/S)*N/R^0.5);\n",
+"V=C*(R*S)^0.5;\n",
+"\n",
+"//ratio of V and Vo is almost equal to 1\n",
+"B=round(B*10)/10;\n",
+" mprintf('Width of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.20: EX14_20.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example14.20\n",
+"//design a regime channel\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=100; //discharge\n",
+"f=1.1; //silt factor\n",
+"s=1/2; //side slope\n",
+"\n",
+"V=(Q*f^2/140)^(1/6);\n",
+"A=Q/V;\n",
+"P=4.75*Q^0.5;\n",
+"D=(P-(P^2-6.944*A)^0.5)/3.472;\n",
+"B=P-2.236*D;\n",
+"R=5*V^2/(2*f);\n",
+"S=f^(5/3)/(3340*Q^(1/6));\n",
+"B=round(B*10)/10;\n",
+"D=round(D*100)/100;\n",
+"mprintf('Width of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+"mprintf('\nBed slope=%f.',S);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.21: EX14_21.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.21\n",
+"//design a channel using Laecy theory\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=40; //discharge\n",
+"s=1; //side slope\n",
+"md=0.8; //average size of base material\n",
+"\n",
+"f=1.76*(md)^0.5;\n",
+"V=(Q*f^2/140)^(1/6);\n",
+"A=Q/V;\n",
+"P=4.75*Q^0.5;\n",
+"//from equations of Area and perimeter of trapezoidal section;we get\n",
+"y=poly([42.41,-30.04,1.828],'x','c');\n",
+"D=roots(y);\n",
+"//we get D=14.873416 and 1.5598447\n",
+"//taking\n",
+"D=1.5598447;\n",
+"B=A/D-D;\n",
+"R=5*V^2/(2*f);\n",
+"S=f^(5/3)/(3340*Q^(1/6));\n",
+"B=round(B*100)/100;\n",
+"D=round(D*100)/100;\n",
+"mprintf('Width of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+"mprintf('\nBed slope=%f.',S);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.22: EX14_22.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example14.22\n",
+"//calculate bed width and floor depth\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=30; //discharge\n",
+"V=1; //velocity of flow\n",
+"\n",
+"A=Q/V;\n",
+"//perimeter of section=30/D-D/2\n",
+"//taking its derivative w.r.t to D\n",
+"D=1/((1.914/30)^0.5);\n",
+"//from equation of area\n",
+"B=30/D-D/2;\n",
+"B=round(B*10)/10;\n",
+"D=round(D*100)/100;\n",
+"mprintf('Width of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.23: EX14_23.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"//example 14.23\n",
+"//determine whether flow is critical or sub-critical\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=17; //discharge\n",
+"B=6; //base of channel\n",
+"s=1/2; //side slope\n",
+"D=1.5; //depth of channel\n",
+"\n",
+"A=D*((B+B/s)/2);\n",
+"V=Q/A;\n",
+"P=B+2*((D/s)^2+D^2)^0.5;\n",
+"R=A/P;\n",
+"F=V/(9.81*R)^0.5; //froud number\n",
+"F=round(F*100)/100;\n",
+"//since F<1;\n",
+"mprintf('Froud number=%f.\nF<1.\nFlow is sub-critical',F);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.24: EX14_24.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example14.24\n",
+"//calculate normal depth and average shear stress at channel bed\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"B=3.5; //bottom width of channel\n",
+"n=0.016; //manning n\n",
+"S=2.6/10000; //bed slope\n",
+"Q=8; //discharge\n",
+"lfs=1; //left side slope\n",
+"rhs=1.5; //rigth side slope\n",
+"gamma_w=9.81; //unit weigth of water\n",
+"\n",
+"//using the equation of area and perimeter of trapezoidal section;Manning's formula and V=Q/A we get D as\n",
+"//Manning formula: V=R^(2/3)*S^0.5/n\n",
+"//(D*(3.5+1.25*D))^2.5=78.281+71.951*D\n",
+"//solving it by trial and error method;we get\n",
+"D=1.5;\n",
+"R=(D*(3.5+1.25*D))/(3.5+3.217*D);\n",
+"tau=gamma_w*R*S*1000;\n",
+"tau=round(tau*100)/100;\n",
+"mprintf('Depth of section=%f m.',D);\n",
+"mprintf('\nAverage shear stress at channel bed=%f N/square-mm.',tau);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.25: EX14_25.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.25\n",
+"//calculate bed load transported by the channel in tonnes per day\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"S=1/5000; //bed slope\n",
+"B=40; //width of channel\n",
+"D=2.6; //depth of channel\n",
+"d=0.38; //mean diameter of bed material\n",
+"n=0.021; //Manning n\n",
+"D65=0.64D-3; //bed material size(m)\n",
+"w=1000; //density of water\n",
+"//B/D as large tau_c=0.075*d;\n",
+"tau_c=0.075*d;\n",
+"tau_b=w*D*S;\n",
+"N1=(D65)^(1/6)/24;\n",
+"r=N1/n;\n",
+"qs=4700*24*(tau_b*r^1.5-tau_c)^1.5/1000;\n",
+"qs40=qs*40;\n",
+"mprintf('bed load transported by the channel =%i t/m/day.',qs40);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.26: EX14_26.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.26\n",
+"//calculate bed width of channel;also check depth using Kutter equation\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=5; //discharge\n",
+"S=0.2/1000; //bed slope\n",
+"m=0.8; //critical velocity ratio\n",
+"s=1/2; //side slope of chanel\n",
+"C=30;\n",
+"//assuming\n",
+"D=1;\n",
+"Vo=0.55*m*D^0.64;\n",
+"A=Q/Vo;\n",
+"B=A/D-(s*D);\n",
+"P=B+2.43*D;\n",
+"R=A/P;\n",
+"V=C*(R*S)^0.5;\n",
+"//Vo>V\n",
+"//hence take second trial\n",
+"D=0.8; //assume\n",
+"Vo=0.55*m*D^0.64;\n",
+"A=Q/Vo;\n",
+"B=A/D-(s*D);\n",
+"P=B+2.43*D;\n",
+"R=A/P;\n",
+"V=C*(R*S)^0.5;\n",
+"//again Vo>V\n",
+"//hence we take third trial\n",
+"D=0.7;\n",
+"Vo=0.55*m*D^0.64;\n",
+"A=Q/Vo;\n",
+"B=A/D+(s*D);\n",
+"P=B+2.43*D;\n",
+"R=A/P;\n",
+"V=C*(R*S)^0.5;\n",
+"B=round(B*100)/100;\n",
+"//Vo is almost equal to V;\n",
+"mprintf('Width of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.27: EX14_27.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.27\n",
+"//design irrigation channel by Kennedy method\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=50; //discharge\n",
+"r=2.5; //B/D ratio\n",
+"m=1.1; //critical velocity ratio\n",
+"N=0.025; //rogosity coefficient\n",
+"s=0.5; //side slope of channel\n",
+"\n",
+"//using the equation of Vo and Q=A*V;we get\n",
+"D=(Q/1.815)^(1/2.64);\n",
+"B=r*D;\n",
+"R=(B*D+0.5*D^2)/(B+2.236*D);\n",
+"Vo=0.55*m*D^0.64;\n",
+"\n",
+"//applying kutters formula; V=C(RS)^0.5\n",
+"//where C=(23+1/N+0.00155/S)*(R*S)^0.5/(1+(23+0.00155/S)*N/R^0.5);\n",
+"//assuming S^0.5=y\n",
+"y=poly([-3.737D-7,2.46D-5,-0.0199,1],'x','c');\n",
+"roots(y);\n",
+"//taking real values of y\n",
+"S=0.0196171 ^2;\n",
+"B=round(B*100)/100;\n",
+"D=round(D*100)/100;\n",
+"mprintf('Width of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+"mprintf('\nBed slope=%f.',S);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.28: EX14_28.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.28\n",
+"//design a regime channel using Laecy's theory\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=35; //discharge\n",
+"f=0.9; //silt factor\n",
+"s=1/2; //side slope\n",
+"\n",
+"V=(Q*f/140)^(1/6);\n",
+"A=Q/V;\n",
+"P=4.75*Q^0.5;\n",
+"D=(P-(P^2-6.944*A)^0.5)/3.472;\n",
+"B=P-2.236*D;\n",
+"\n",
+"R=5*V^2/(2*f);\n",
+"S=f^(5/3)/(3340*Q^(1/6));\n",
+"D=round(D*100)/100;\n",
+"mprintf('Bed slope=%f.',S);\n",
+"mprintf('\nWidth of channel section=%i m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.29: EX14_29.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.29\n",
+"//design an irrigation canal for given data\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=15; //discharge\n",
+"m=1; //critical velocity ratio\n",
+"r=5.7; //B/D\n",
+"\n",
+"D=(Q/(0.55*6.2))^(1/2.64);\n",
+"B=D*r;\n",
+"R=(B*D+D^2/2)/(B+D*5^0.5);\n",
+"Vo=0.55*m*D^0.64;\n",
+"//applying kutters formula; V=C(RS)^0.5\n",
+"//where C=(23+1/N+0.00155/S)*(R*S)^0.5/(1+(23+0.00155/S)*N/R^0.5);\n",
+"//assuming S^0.5=y\n",
+"y=poly([-2D-5,1.55D-3,-0.968,67.5],'x','c');\n",
+"roots(y);\n",
+"//taking real values of y\n",
+"S=0.0141937^2;\n",
+"B=round(B*100)/100;\n",
+"D=round(D*100)/100;\n",
+"mprintf('Width of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+"mprintf('\nBed slope=%f.',S);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.2: EX14_2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.2\n",
+"//design an irrigation canal for given data\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=14; //discharge\n",
+"m=1; //critical velocity ratio\n",
+"r=5.7; //B/D\n",
+"\n",
+"D=(Q/(0.55*6.2))^(1/2.64);\n",
+"B=D*r;\n",
+"R=(B*D+D^2/2)/(B+D*5^0.5);\n",
+"Vo=0.55*m*D^0.64;\n",
+"//applying kutters formula; V=C(RS)^0.5\n",
+"//where C=(23+1/N+0.00155/S)*(R*S)^0.5/(1+(23+0.00155/S)*N/R^0.5);\n",
+"//assuming S^0.5=y\n",
+"y=poly([-1.98D-5,1.55D-3,-0.954,67.5],'x','c');\n",
+"roots(y);\n",
+"//taking real values of y\n",
+"S=0.0139906^2;\n",
+"B=round(B*100)/100;\n",
+"D=round(D*100)/100;\n",
+"mprintf('Width of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+"mprintf('\nBed slope=%f.',S);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.30: EX14_30.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.30\n",
+"//Design a section of unlined canal in a loomy soil\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=50; //discharge\n",
+"V=1; //permissible velocity\n",
+"s=2; //side slope\n",
+"r=6; //B/D ratio\n",
+"N=0.0225; //rogosity coefficient\n",
+"\n",
+"A=Q/V;\n",
+"D=(A/(r+2))^0.5;\n",
+"B=r*D;\n",
+"P=B+2*(5*D^2)^0.5;\n",
+"R=A/P;\n",
+"S=(V*N/R^(2/3))^2;\n",
+"mprintf('Width of channel section=%i m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+"mprintf('\nBed slope=%f.',S);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.31: EX14_31.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.31\n",
+"//calculate concentration of suspended load at depth\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"gamma_w=9.81; //unit weigth of water\n",
+"D=5; //depth of channel\n",
+"d=0.3; //grain size\n",
+"k=1.5; //size of roughness of channel bed\n",
+"S=1/4000; //bed slope\n",
+"G=2.65; //specific gravity\n",
+"V=0.02; //fall velocity\n",
+"c_=1000; //concentration at 0.3 m above bed\n",
+"a=0.3;\n",
+"y=2.5;\n",
+"k_=0.4; //van karman's constant\n",
+"\n",
+"R=5; //R=D for wide channel\n",
+"V_=(gamma_w*R*S)^0.5;\n",
+"c=c_*((a/y)*(D-y)/(D-a))^(V/(V_*k_));\n",
+"mprintf('concentration of suspended load=%i ppm.',c);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.32: EX14_32.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.32\n",
+"//calculate dimension of channel if it is design on the basis of Laecy theory and Kennedy's theory\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=40; //discharge\n",
+"f=1; //silt factor\n",
+"\n",
+"//Laecey's theory\n",
+"V=(Q*f/140)^(1/6);\n",
+"A=Q/V;\n",
+"P=4.75*Q^0.5;\n",
+"D=(P-(P^2-6.944*A)^0.5)/3.472;\n",
+"B=P-2.236*D;\n",
+"\n",
+"R=5*V^2/(2*f);\n",
+"S=f^(5/3)/(3340*Q^(1/6));\n",
+"B=round(B);\n",
+"D=round(D*100)/100;\n",
+"mprintf('\n\nBy Laecey theory:');\n",
+"mprintf('\nBed slope=%f.',S);\n",
+"mprintf('\nWidth of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+"\n",
+"//Kennedy's theory\n",
+"r=B/D; \n",
+"m=1; //critical velocity ratio\n",
+"N=0.0225; //rogosity coefficient\n",
+"//using equation of area of trapezoidal section;Vo=0.55mD^0.64 and Q=A*Vo\n",
+"\n",
+"D=(Q/8.058)^(1/2.64);\n",
+"B=r*D;\n",
+"B=round(B);\n",
+"D=round(D*100)/100;\n",
+"mprintf('\n\nBy Kennedy theory:');\n",
+"mprintf('\nWidth of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.33: EX14_33.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.33\n",
+"//design Laecey regime channel\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"A=100000; //culturable area(hectare)\n",
+"IR=0.4; //intensity of irrigation in kharif season\n",
+"IK=0.3; //intensity of irrigation in rabi season\n",
+"OR=1800; //outlet discharge factor in kharif season\n",
+"OK=800; //outlet discharge factor in kharif season\n",
+"l=0.1; //conveyance loss\n",
+"md=0.328; //average diameter of material\n",
+"\n",
+"AR=A*IR; //area under rabi\n",
+"AK=A*IK; //area under kharif \n",
+"Qr=AR/OR;\n",
+"Qk=AK/OK;\n",
+"Q=1.1*Qk;\n",
+"f=1.76*(md)^0.5;\n",
+"V=(Q*f^2/144)^(1/6);\n",
+"A=Q/V;\n",
+"P=4.75*(Q)^0.5;\n",
+"D=(P-(P^2-6.944*A)^0.5)/3.472;\n",
+"B=P-2.236*D;\n",
+"S=f^(5/3)/(3340*Q^(1/6));\n",
+"B=round(B*10)/10;\n",
+"D=round(D*100)/100;\n",
+"mprintf('\nBed slope=%f.',S);\n",
+"mprintf('\nWidth of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.34: EX14_34.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.34\n",
+"//calculate concentration at point 10 cm above the bed\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"D=2.8; //depth of flow\n",
+"c_=700; //concentration at 30 cm below water surface\n",
+"y=0.1;\n",
+"a=D-0.3;\n",
+"e=0.4; //exponent in rouse equation;\n",
+"\n",
+"c=c_*(a*(D-y)/(y*(D-a)))^e;\n",
+"mprintf('concentration at point 10 cm above the bed=%i ppm.',c);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.35: EX14_35.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.35\n",
+"//design the distributory using Laecey theory\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"f=0.85; //silt factor\n",
+"AR=3600; //area for rabi\n",
+"AK=1400; //area for kharif\n",
+"delta_r=0.135; //kor depth for rabi\n",
+"delta_k=0.19; //kor depth for kharif\n",
+"tr=4; //kor period for rabi\n",
+"tk=2.5; //kor period for kharif\n",
+"Du_r=8.64*tr*7/delta_r; //duty for rabi\n",
+"Du_k=8.64*tk*7/delta_k; //duty for kharif\n",
+"q_r=AR/Du_r; //discharge for rabi\n",
+"q_k=AK/Du_k; //discharge for kharif\n",
+"Q=q_r; //since q_r>q_k\n",
+"V=(Q*f^2/144)^(1/6);\n",
+"A=Q/V;\n",
+"P=4.75*(Q)^0.5;\n",
+"D=(P-(P^2-6.944*A)^0.5)/3.472;\n",
+"S=f^(5/3)/(3340*Q^(1/6));\n",
+"P=round(P*100)/100;\n",
+"D=round(D*100)/100;\n",
+"mprintf('\nBed slope=%f.',S);\n",
+"mprintf('\nPerimeter of channel section=%f m.',P);\n",
+"mprintf('\nDepth of channel section=%f m.',D);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.3: EX14_3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.3\n",
+"//design a channel on Kennedy's theory\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=45; //discharge\n",
+"m=1.05; //critical velocity ratio\n",
+"N=0.025; //rugosity coefficient\n",
+"S=1/5000; //bed slope\n",
+"\n",
+"l=S*Q^0.02/(N^2*m^2.02);\n",
+"//from fig.14.3 we get r=10\n",
+"//solving the equation by trial and error method we get\n",
+"r=9.7;\n",
+"D=(1.818*Q/(m*(r+0.5)))^(1/2.64);\n",
+"B=r*D;\n",
+"V=Q/(D^2*(r+0.5));\n",
+"Vo=0.55*D^0.64*m;\n",
+"B=round(B);\n",
+"D=round(D*100)/100;\n",
+"V=round(V*1000)/1000;\n",
+"Vo=round(Vo*1000)/1000;\n",
+"mprintf('Width of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+"mprintf('\nVelocity through the channel section=%f m/s.',V);\n",
+"mprintf('\nVo=%f m/s.\nHence Safe',Vo);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.4: EX14_4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.4\n",
+"//design channel using method of curve fitting based onKennedy's theory\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=45; //discharge\n",
+"N=0.0225; //rugosity coefficient\n",
+"m=1.05; //critical velocity ratio\n",
+"S=1/5000; //Bed slope\n",
+"\n",
+"r=(1.607*S^1.63*Q^0.033/(N^3.26*m^3.293)-0.258)^(-0.915);\n",
+"D=(1.818*Q/(m*(r+0.5)))^(1/2.64);\n",
+"B=r*D;\n",
+"B=round(B);\n",
+"D=round(D*100)/100;\n",
+"mprintf('Width of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.5: EX14_5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"//example 14.5\n",
+"//design channel using curve of CWPC for B/D ratio\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=45; //discharge\n",
+"N=0.0225; //rugosity coefficient\n",
+"m=1.05; //critical velocity ratio\n",
+"\n",
+"r=(15+6.44*Q)^0.382;\n",
+"S=(N^2/1.338*Q^0.02)*(0.258+(15+6.44*Q)^(-0.417))^0.6135;\n",
+"D=(1.818*Q/(m*(r+0.5)))^(1/2.64);\n",
+"B=r*D;\n",
+"B=round(B);\n",
+"D=round(D*100)/100;\n",
+"mprintf('Bed slope=%f.',S);\n",
+"mprintf('\nWidth of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.6: EX14_6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.6\n",
+"//design the channel section using the following data and calculate logitudnal section\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=30; //discharge\n",
+"f=1; //silt factor\n",
+"s=1/2; //side slope\n",
+"\n",
+"V=(Q*f/140)^(1/6);\n",
+"A=Q/V;\n",
+"P=4.75*Q^0.5;\n",
+"D=(P-(P^2-6.944*A)^0.5)/3.472;\n",
+"B=P-2.236*D;\n",
+"\n",
+"R=5*V^2/(2*f);\n",
+"S=f^(5/3)/(3340*Q^(1/6));\n",
+"B=round(B*100)/100;\n",
+"D=round(D*100)/100;\n",
+"mprintf('Bed slope=%f.',S);\n",
+"mprintf('\nWidth of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.7: EX14_7.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.7\n",
+"//design a channel in alluvial soil using tractive force approach\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=45; //discharge\n",
+"S=1/4800; //bed slope\n",
+"N=0.0225; //rogosity coefficient\n",
+"sigma=0.0035; //permissible tractive stress\n",
+"s=1/2; //side slope\n",
+"gamma_w=9.81; //unit weigth of water\n",
+"\n",
+"R=sigma/(gamma_w*S);\n",
+"V=R^(2/3)*S^0.5/N;\n",
+"A=Q/V;\n",
+"P=A/R;\n",
+"y=poly([-49,28.61,-1.736],'x','c');\n",
+"D=roots(y);\n",
+"//we get D=14.539034 and 1.9413812 \n",
+"//taking D=1.9413812 \n",
+"D=1.9413812;\n",
+"B=28.61-2.23*D;\n",
+"B=round(B*100)/100;\n",
+"D=round(D*100)/100;\n",
+"mprintf('Width of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+"\n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.8: EX14_8.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.8\n",
+"//designa channel section by Kennedy theory\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=28; //discharge\n",
+"m=1; //critical velocity ratio\n",
+"r=7.6; //B/D\n",
+"\n",
+"D=(Q/4.46)^(1/2.64);\n",
+"B=r*D;\n",
+"R=0.823*D;\n",
+"V=0.55*(D)^0.64;\n",
+"\n",
+"//applying kutters formula; V=C(RS)^0.5\n",
+"//where C=(23+1/N+0.00155/S)*(R*S)^0.5/(1+(23+0.00155/S)*N/R^0.5);\n",
+"//we get equation in S\n",
+"//assuming S^0.5=y\n",
+"y=poly([-1.42D-5,1.55D-3,-0.885,67.4],'x','c');\n",
+"roots(y);\n",
+"//taking real values of y\n",
+"S=0.0126305^2;\n",
+"B=round(B*10)/10;\n",
+"D=round(D*100)/100;\n",
+"mprintf('Width of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+"mprintf('\nBed slope=%f.',S);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.9: EX14_9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 14.9\n",
+"//design the channel section and calculate discharge\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"r=5.7; //B/D\n",
+"S=1/5000; //bed slope\n",
+"N=0.0225; //rogosity coefficient\n",
+"m=1; //critical velocity ratio(assumed)\n",
+"\n",
+"//applying kutters formula; V=C(RS)^0.5\n",
+"//where C=(23+1/N+0.00155/S)*(R*S)^0.5/(1+(23+0.00155/S)*N/R^0.5);\n",
+"//we get equation in d as\n",
+"//38.88*D^0.64-66.5*D^0.5+30.37*D^0.14=0\n",
+"//solving it by trial and error method\n",
+"//we get D=1.7 m.\n",
+"D=1.7;\n",
+"B=r*D;\n",
+"V=0.55*m*(D)^0.64;\n",
+"A=B*D+D^2/2;\n",
+"Q=A*V;\n",
+"Q=round(Q*100)/100;\n",
+"mprintf('Width of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+"mprintf('\n Discharge=%f cumecs.',Q);"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/15-IRRIGATION_CHANNEL_2_DESIGN_PROCEDURE.ipynb b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/15-IRRIGATION_CHANNEL_2_DESIGN_PROCEDURE.ipynb
new file mode 100644
index 0000000..b8151eb
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/15-IRRIGATION_CHANNEL_2_DESIGN_PROCEDURE.ipynb
@@ -0,0 +1,262 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 15: IRRIGATION CHANNEL 2 DESIGN PROCEDURE"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.1: EX15_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 15.1\n",
+"//design a channel by Kennedy theory using Garret's diagram\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=7; //full supply discharge\n",
+"N=0.0225; //rogosity coefficient\n",
+"S=1/4444; //bed slope\n",
+"m=1; //critical velocity ratio\n",
+"s=1/2; //side slope\n",
+"\n",
+"//Values of B and D are obtained by Garret's diagram fig. 15.3(b) and tabulated as below \n",
+"B=[6 7 6.75]; //width of bed from Garret diagram\n",
+"D=[1.5 1.35 1.38]; //depth of bed from Garret diagram\n",
+"Vo=[0.72 0.673 0.685]; //from Garret diagram\n",
+"\n",
+"mprintf('Bed width Depth Ratio of V/Vo: Remarks');\n",
+"for i=1:3\n",
+" A(i)=B(i)*D(i)+D(i)^2/2; //Area\n",
+" V(i)=Q/A(i); //Velocity\n",
+" r(i)=V(i)/Vo(i); //ratio V/Vo\n",
+" r(i)=round(r(i)*1000)/1000;\n",
+" if i==1 then\n",
+" s='small';\n",
+"else\n",
+" if (i==2) then\n",
+" s='more';\n",
+" \n",
+"else\n",
+" s='satisfactory';\n",
+"end\n",
+"end\n",
+" mprintf('\n%f %f %f %s',B(i),D(i),r(i),s);\n",
+"end\n",
+"mprintf('\nHence, B=%f m; D=%f m.',B(3),D(3));"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.2: EX15_2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 15.2\n",
+"//design an irrigation channel in alluvial soil by Laecy's theory\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=15; //Full supply discharge\n",
+"f=1; //silt factor\n",
+"s=1/2; //side slope of channel\n",
+"\n",
+"//from Laecey regime channel (Fig.15.4(b)) B and D is obtained as;\n",
+"B=15.1;\n",
+"D=1.38;\n",
+"//also from Fig.15.5 we get slope as\n",
+"S=0.19/1000;\n",
+"mprintf('Width of channel section=%f m.',B);\n",
+"mprintf('\nDepth of channel section=%f m.',D);\n",
+"mprintf('\nBed slope=%f.',S);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.3: EX15_3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 15.3\n",
+"//design and prepare the longitudnal section;schedule of area statistics and channel dimension of irrigation channel\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"dl=157.7; //datum level\n",
+"fsl=157; //full supply level of parent channel\n",
+"bl=156; //bed level of parent channel\n",
+"kor_r=4; //kor period of rabi\n",
+"kor_k=2.5; //kor period of kharif\n",
+"kord_r=13.4; //kor depth of rabi\n",
+"kord_k=19; //kor depth of kharif\n",
+"s=0.5; //side slope\n",
+"m=1; //critical velocity ratio\n",
+"N=0.0225; //Kutter n\n",
+"qo_r=8.64*7*kor_r*100/kord_r; //outlet discharge for rabi(calculation is wrong in book)\n",
+"qo_k=8.64*7*kor_k*100/kord_k; //outlet discharge for kharif(calculation is wrong in book)\n",
+"ca=16000; //culturable commanded area\n",
+"Ir=0.3; //intensity of irrigation in rabi\n",
+"Ik=0.125; //intensity of irrigation in rabi\n",
+"Ar=Ir*ca; //area under rabi\n",
+"Ak=ca*Ik; //area under kharif\n",
+"q_r=Ar/qo_r;\n",
+"q_k=Ak/qo_k;\n",
+"q_r=round(q_r*100)/100;\n",
+"q_k=round(q_k*100)/100;\n",
+"mprintf('discharge neede for rabi crop=%f cumecs.',q_r);\n",
+"mprintf('\ndischarge neede for kharif crop=%f cumecs.',q_k);\n",
+"mprintf('\noutlet discharge factor adopted=%i hectares per cumecs.',qo_r);\n",
+"//at km 5\n",
+"ca=8000; //culturable area\n",
+"Ar=Ir*ca; //area under rabi\n",
+"q_r=Ar/qo_r;\n",
+"l=0.5 //total loss after 5 km\n",
+"q=q_r+l; //total discharge\n",
+"dq=1.1*q; //desigm discharge\n",
+"S=1/4000; //slope\n",
+"B=[5.5 4.9 4.55]; //Bed width\n",
+"D=[0.73 0.79 0.84]; //water depth\n",
+"Vo=[0.448 0.472 0.488]; //critical velocity\n",
+"mprintf('\n\nBed width water depth area velocity critical velocity C.V.R');\n",
+"for i=1:3\n",
+" A(i)=B(i)*D(i)+D(i)^2/2;\n",
+" V(i)=dq/A(i);\n",
+" m(i)=V(i)/Vo(i);\n",
+" A(i)=round(A(i)*100)/100;\n",
+" V(i)=round(V(i)*1000)/1000;\n",
+" m(i)=round(m(i)*100)/100;\n",
+" mprintf('\n%f %f %f %f %f %f',B(i),D(i),A(i),V(i),Vo(i),m(i));\n",
+"end\n",
+"B=4.55;D=0.84;\n",
+"mprintf('\nhence take B=%f .; D=%f m.',B,D);\n",
+"//at km 4\n",
+"q=round(q*100)/100;\n",
+"mprintf('\ndischarge at 5 km=%f cumecs.',q);\n",
+"ca=10000; //culturable area\n",
+"Ar=Ir*ca; //area under rabi\n",
+"q_r=Ar/qo_r;\n",
+"l=0.5 //total loss below 5 km\n",
+"P=B+D*5^0.5; //wetted perimeter\n",
+"l1=P*1000*2/1000000; //loss between 5 km and 4km\n",
+"l2=l1+l;\n",
+"q=q_r+l2;\n",
+"dq=1.1*q;\n",
+"q=round(q*1000)/1000;\n",
+"mprintf('\ndischarge at 4 km =%f cumecs',q);\n",
+"mprintf('\nother discharge are calculated and are tabulated as:');\n",
+"x=[0:1:5];\n",
+"A1=[4800 4200 3600 3300 3000 2400];\n",
+"A2=[2000 1750 1500 1375 1250 1000];\n",
+"S=[22.5 22.5 22.5 24 24 25];\n",
+"B=[5.5 5.2 4.85 4.7 4.55 4.55];\n",
+"D=[1.04 1.007 0.975 0.945 0.915 0.840];\n",
+"dq=[3.56 3.17 2.8 2.6 2.4 2.02];\n",
+"V=[0.570 0.555 0.538 0.530 0.521 0.484];\n",
+"m=[1.015 1 1 1 1 0.992];\n",
+"mprintf('\n\nBelow km area to irrigate rabi area to irrigate kharif bed slope bed width water depth design discharge velocity C.V.R');\n",
+"for i=1:6\n",
+" mprintf('\n%i %i %i %f %f %f %f %f %f',x(i),A1(i),A2(i),S(i),B(i),D(i),dq(i),V(i),m(i));\n",
+"end\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.4: EX15_4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 15.4\n",
+"//calculate the economical depth of cutting for cross section of channel\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"B=5; //bed width\n",
+"t=2; //top width of banks\n",
+"h=2.92; //heigth of banks from bed\n",
+"n=1.5;\n",
+"\n",
+"//sectional area of digging=sectional area of two banks\n",
+"//By+zy^2=2(h-y)+2n(h-y)^2\n",
+"//substituting the values and on simplificatio we get\n",
+"s=poly([18.59,-13.26,1],'x','c');\n",
+"y=roots(s);\n",
+"//from this we get y=11.666556 and 1.5934436.\n",
+"//taking\n",
+"y=1.5934436;\n",
+"y=round(y*10)/10;\n",
+"mprintf('economical depth of cutting=%f m.',y);"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/16-WATERLOGGING_AND_CANAL_LINING.ipynb b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/16-WATERLOGGING_AND_CANAL_LINING.ipynb
new file mode 100644
index 0000000..722b709
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/16-WATERLOGGING_AND_CANAL_LINING.ipynb
@@ -0,0 +1,662 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 16: WATERLOGGING AND CANAL LINING"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.10: EX16_10.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 16.10\n",
+"//calculate the required depth of water to be applied\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Ecd=20; //electrical conductivity of drainage water\n",
+"Eci=1.5; //m mho/cm\n",
+"Dc=55.5; //consumptive use\n",
+"\n",
+"Lr=Eci/Ecd;\n",
+"D=Dc/(1-Lr);\n",
+"mprintf('required depth of water to be applied=%i mm.',D);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.11: EX16_11.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 16.11\n",
+"//calculate the required depth of water to be applied\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Eci=1.4; // m mho/cm\n",
+"Ece=11; //saturated extract of soil\n",
+"Dc=85; //consumptive use requirement of crop\n",
+"\n",
+"//let us assume Ecd=2Ece\n",
+"Lr=Eci/(2*Ece);\n",
+"Di=Dc/(1-Lr);\n",
+"Di=round(Di*10)/10;\n",
+"mprintf('required depth of water to be applied=%f mm.',Di);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.12: EX16_12.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 16.12\n",
+"//calculate average boundary shear stress;\n",
+"//percentage of earth work is saved in lined section\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"s=1.5; //side slope\n",
+"Q=15; //discharge\n",
+"S=1/4000; //bed slope\n",
+"Nl=0.014; //manning n for lined channel\n",
+"Nu=0.028; //manning n for ulined channel \n",
+"fb=0.75; //free board\n",
+"\n",
+"//considering the perimeter of trapezoidal section\n",
+"//taking minimum perimeter for given area\n",
+"//i.e dP/dD=0\n",
+"//we get\n",
+"//A=2.1D^2; R=D/2; and P=4.2D\n",
+"\n",
+"//for linrd channel\n",
+"//Q=AR^(2/3)*S^0.5\n",
+"//substituting above values we get\n",
+"D=(10.0396)^(3/8);\n",
+"B=0.6*D;\n",
+"R=D/2;\n",
+"tau=9.81*R*S*1000;\n",
+"tau=round(tau*1000)/1000;\n",
+"mprintf('for lined canal:');\n",
+"mprintf('\naverage boundary shear stress=%f N/square m.',tau);\n",
+"Dc=D+fb; //total depth of cutting\n",
+"A1=(B+1.5*Dc)*Dc;\n",
+"\n",
+"//for unlined channel\n",
+"//Q=AR^(2/3)*S^0.5\n",
+"//substituting above values we get\n",
+"D=3.08;\n",
+"B=0.6*D;\n",
+"R=D/2;\n",
+"tau=9.81*R*S*1000;\n",
+"tau=round(tau*100)/100;\n",
+"mprintf('\n\nfor unlined canal:');\n",
+"mprintf('\naverage boundary shear stress=%f N/square m.',tau);\n",
+"Dc=D+fb; //total depth of cutting\n",
+"A2=(B+1.5*Dc)*Dc;\n",
+"per=(A2-A1)*100/A2; \n",
+"per=round(per*100)/100;\n",
+"mprintf('\n\npercent saving of earth=%f percent.',per);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.13: EX16_13.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 16.13\n",
+"//design a lined canal\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=100; //discharge\n",
+"S=1/2500; //bed slope\n",
+"V=2; //maximum permissible velocity\n",
+"n=0.013; //manning n\n",
+"s=1.25; //side slope\n",
+"\n",
+"A=Q/V;\n",
+"//from manning formula V=(R^2/3*S^1/2)/N;\n",
+"R=(V*n/S^0.5)^1.5;\n",
+"P=A/R;\n",
+"\n",
+"//now using the equation of area and perimeter of trapezoid\n",
+"//area=D(B+2.5D)\n",
+"//perimeter=B+3.2D;\n",
+"//we get\n",
+"y=poly([50,-33.73,1.95],'x','c');\n",
+"D=roots(y);\n",
+"//we get D=15.660087 and 1.6373489\n",
+"//taking\n",
+"D=1.6373489;\n",
+"B=P-3.2*D;\n",
+"B=round(B*10)/10;\n",
+"D=round(D*100)/100;\n",
+"mprintf('required bed width=%f m.',B);\n",
+"mprintf('\nrequired bed depth=%f m',D);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.14: EX16_14.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 16.14\n",
+"//calculate to what extent discharge can be increased without changing bed slope\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"B=5; //bed width\n",
+"D=2; //bed depth\n",
+"S=1/1600; //bed slope\n",
+"n=0.015; //manning n\n",
+"\n",
+"A=B+2*D; //area of lining\n",
+"//let B1 and D1 be new width and depth of bed\n",
+"//for getting maximum discharge we diffrentiate Q and equating it to zero\n",
+"//Q=S^0.5*B1D1^5/3/n\n",
+"//we get\n",
+"D1=45/16;\n",
+"B1=9-2*D1;\n",
+"Q1=S^0.5*B1*D1^5/3/n;\n",
+"D1=round(D1*10000)/10000;\n",
+"mprintf('new width of bed=%f m.',B1);\n",
+"mprintf('\nnew depth of bed=%f m.',D1);\n",
+"mprintf('\n maximum discharge=%f cumec.',Q1);\n",
+"R=D;\n",
+"V=R^(2/3)*S^0.5/n;\n",
+"F=V/(9.81*D)^0.5; //froud number\n",
+"R=D1;\n",
+"V=R^(2/3)*S^0.5/n;\n",
+"F=V/(9.81*D1)^0.5; //froud number\n",
+"mprintf('\nFroud number is less than 1 in both case.\nHence,flow doesnot change from sub-critical to super critical.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.15: EX16_15.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 16.15\n",
+"//calculate maximum carrying capacity of canal\n",
+"//area to be irrigated\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"B=5; //bed width\n",
+"D=2.5; //bed depth\n",
+"s=1.5; //side slope\n",
+"S=1/1000; //bed slope\n",
+"n=0.016; //manning n\n",
+"k=10; //kor period\n",
+"d=150; //field irrigation requirement \n",
+"\n",
+"theta=acot(s);\n",
+"A=B*D+D^2*(theta+1/tan(theta));\n",
+"P=B+2*D*(theta+1/tan(theta));\n",
+"R=A/P;\n",
+"Q=A*R^(2/3)*S^0.5/n;\n",
+"V=Q*k*24*3600; //volum of water supply by channel\n",
+"A=V*10/(d*10000);\n",
+"Q=round(Q*100)/100;\n",
+"A=round(A)*100;\n",
+"mprintf('maximum carrying capacity of canal=%f cumec.',Q);\n",
+"mprintf('\nArea to be irrigated=%f hectares.',A);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.1: EX16_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 16.1\n",
+"//design a trapezoidal concrete lined channel\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=100; //discharge\n",
+"S=25/100000; //bed slope\n",
+"N=0.016; //rogsity coefficient\n",
+"s=1.5; //side slope\n",
+"V=1.5; //limiting velocity\n",
+"\n",
+"//using manning's equation V=(R^2/3*S^1/2)/N;\n",
+"R=(V*N/(S^0.5))^(1.5); //hydraulic mean depth\n",
+"\n",
+"//for s=1.5;\n",
+"theta=acot(1.5);\n",
+"A=Q/V;\n",
+"P=A/R;\n",
+"//using equation of area and perimeter of trapezium\n",
+"//perimeter of trapezium=b+2d(theta+cot(theta));\n",
+"//area of trapezium=bd+d^2(theta+cot(theta));\n",
+"//we get\n",
+"y=poly([31.9,-17.1,1],'x','c');\n",
+"d=roots(y);\n",
+"//we get D=14.968917 and 2.1310826.\n",
+"//taking\n",
+"d=2.1310826;\n",
+"b=P-4.18*d;\n",
+"b=round(b*100)/100;\n",
+"d=round(d*100)/100;\n",
+"mprintf('required bed width=%f m.',b);\n",
+"mprintf('\nrequired bed depth=%f m',d);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.2: EX16_2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 16.2\n",
+"//design a trapezoidal concrete lined channel\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=100; //discharge\n",
+"S=25/100000; //bed slope\n",
+"N=0.016; //rogsity coefficient\n",
+"s=1.5; //side slope\n",
+"r=8; //b/d ratio\n",
+"\n",
+"//using manning equation V=(R^2/3*S^1/2)/N;\n",
+"//Perimeter=A/R \n",
+"//V=Q/A and on simplification we get\n",
+"d=((101/10.09)*(12.18/10.09)^(2/3))^(3/8);\n",
+"b=r*d;\n",
+"b=round(b);\n",
+"d=round(d*100)/100;\n",
+"mprintf('required bed width=%f m.',b);\n",
+"mprintf('\nrequired bed depth=%f m',d);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.3: EX16_3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 16.3\n",
+"//design a concrete lined channel\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=45; //discharge\n",
+"S=1/10000; //bed slope\n",
+"s=5/4; //side slope\n",
+"N=0.018; //rogosity coefficient(manning N)\n",
+"\n",
+"//channel is assumed to be of triangular section\n",
+"theta=acot(s);\n",
+"//using manning equation V=(R^2/3*S^1/2)/N;\n",
+"//V=Q/A; \n",
+"//perimeter of trapezium=b+2d(theta+cot(theta));\n",
+"//area of trapezium=bd+d^2(theta+cot(theta));\n",
+"//we get\n",
+"d=(Q*2.86/1.925)^(3/8);\n",
+"d=round(d*100)/100;\n",
+"mprintf('\nrequired depth of triangular channel=%f m',d);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.4: EX16_4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 16.4\n",
+"//design a concrete lined channel of trapezoidal section\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=250; //discharge\n",
+"S=1/6000; //bed slope\n",
+"s=1.5; //side slope\n",
+"d=3; //limiting depth\n",
+"N=0.015; //rogosity coefficient\n",
+"\n",
+"//using Perimeter=A/R;\n",
+"//perimeter of trapezium=b+2d(theta+cot(theta));\n",
+"//area of trapezium=bd+d^2(theta+cot(theta));\n",
+"//Q=A*V; and on simplification\n",
+"//we get\n",
+"//(3b+18.81)^5/3/(b+12.54)^2/3=290.47;\n",
+"//solving it by trial and error method we get\n",
+"b=44.6;\n",
+"mprintf('required bed width=%f m.',b);\n",
+"mprintf('\nrequired bed depth=%i m',d);\n",
+"\n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.5: EX16_5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 16.5\n",
+"//calculate spacing of drains\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"H=10; //depth of impervious stratum from top soil\n",
+"D=1.8; //position of drain below top soil surface\n",
+"Hw=1.5; //depth of highest point of water\n",
+"k=1D-4; //permeability constant\n",
+"\n",
+"//since water has to be removed in 24 hours\n",
+"b=H-Hw;\n",
+"a=H-D;\n",
+"L=(4*k*(b^2-a^2)*100*24*3600/0.8)^0.5;\n",
+"mprintf('drains should be spaced at %i m c/c.',L);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.6: EX16_6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 16.6\n",
+"//calculate permeability coefficient\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"L=30; //spacing between drans\n",
+"Q=4D-6; //discharge\n",
+"a=8;\n",
+"b=8.3;\n",
+"\n",
+"k=1000000*Q*L/(4*(b^2-a^2));\n",
+"k=round(k*100)/100;\n",
+"mprintf('permeability coefficient=%fD-6 m/sec.',k);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.7: EX16_7.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 16.7\n",
+"//calculate annual average rainfall\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"L=50; //spacing between drains\n",
+"k=1D-5; //permeability coefficient\n",
+"a=10;\n",
+"b=10.3;\n",
+"\n",
+"Q=4*k*(b^2-a^2)/L;\n",
+"Pav=Q*24*3600*100*100/L;\n",
+"mprintf('annual average rainfall=%i cm',Pav);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.8: EX16_8.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example16.8\n",
+"//calculate ratio of discharge at A and B;ratio of average rainfall at A and B\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"r1=2; //ka/kb\n",
+"r2=1/1.5; //La/Lb\n",
+"r3=5/6; //(b^2-a^2)a/((b^2-a^2)b)\n",
+"\n",
+"Rq=r1*r3/r2;\n",
+"Rp=Rq/r2;\n",
+"mprintf('ratio of discharge at A and B=%f.',Rq);\n",
+"mprintf('\nratio of average rainfall at A and B=%f.',Rp);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.9: EX16_9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 16.9\n",
+"//decide whether it is economically feasible to provide canal lining\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"li=2.5; //seepage loss for lined channel\n",
+"p1=25; //wetted perimeter for lined channel\n",
+"t=12; //thickness of concrete lining\n",
+"lf=0.02; //seepage loss for unlined channel\n",
+"p2=20; //wetted perimeter for unlined channel\n",
+"\n",
+"//assume 1 km length of canal\n",
+"//annual benifit\n",
+"\n",
+"//(1).seepage\n",
+"A1=p1*1000; //area of wetted perimeter\n",
+"li=li*p1/1000; //seepage loss\n",
+"A2=p2*1000; //area of wetted perimmeter for unlined channel\n",
+"lf=p2*lf/1000; //seepage loss for unlined channel\n",
+"s=li-lf; //saving in water loss\n",
+"a1=s*p1*100000; //annual revenue saved\n",
+"\n",
+"//(2)maintainence\n",
+"a2=0.4*25000; //saving in maintainance cost\n",
+"ts=a1+a2; //total annual benifit\n",
+"\n",
+"//annual cost\n",
+"A1=p2*1000; //area of lining for unlinrd canal\n",
+"C=100*A1; //cost of lining\n",
+"//interest rate is 6%\n",
+"i=0.06;\n",
+"N=50;\n",
+"a=(C*i*(i+1)^N)/((1+i)^N-1); //annual cost of lining or capital recovery factor\n",
+"bcr=ts/a; //benifit cost ratio\n",
+"bcr=round(bcr*1000)/1000;\n",
+"mprintf('\nBenifit cost ratio=%f.',bcr);\n",
+"//as bcr>1\n",
+"mprintf(' ;Since it is more than 1.\nHence, it is economically justifiable. ');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/17-CANAL_OUTLETS.ipynb b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/17-CANAL_OUTLETS.ipynb
new file mode 100644
index 0000000..8c63d38
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/17-CANAL_OUTLETS.ipynb
@@ -0,0 +1,187 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 17: CANAL OUTLETS"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17.1: EX17_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 17.1\n",
+"//calculate discharge through the outlet\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"D=100.0; //F.S.L of distributory\n",
+"wc=99.90; //F.S.L of water course\n",
+"L=9; //length of pipe\n",
+"d=20; //diameter of pipe\n",
+"f=0.005; //coefficient of friction\n",
+"g=9.81; //acceleration due to gravity\n",
+"\n",
+"H=D-wc; //working head\n",
+"C=(d/((1.5*d/(400*f)+L)*f))^0.5/20;\n",
+"A=%pi*d^2/(4*10000);\n",
+"q=C*A*(2*g*H)^0.5;\n",
+"q=round(q*10000)/10000;\n",
+"mprintf('discharge through the outlet=%f cumec.',q);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17.2: EX17_2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 17.2\n",
+"//design a submerged pipe\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"q=0.04; //discharge through outlet\n",
+"D=100.0; //F.S.L of distributing canal\n",
+"wc=99.90; //F.S.L of water course\n",
+"dep=1.1; //full supply depth distributing canal\n",
+"C=0.7; //average value of coefficient of discharge\n",
+"g=9.81; //acceleration due to gravity\n",
+"\n",
+"H=D-wc; //available head\n",
+"A=q/(C*(2*g*H)^0.5);\n",
+"d=(4*A/%pi)^0.5*100;\n",
+"d=round(d*10)/10;\n",
+"mprintf('diameter of pipe required=%f cm.',d);\n",
+"mprintf('\nuse pipe of diameter 25 cm.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17.3: EX17_3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"//example 17.3\n",
+"//design submerged pipe\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"q=0.04; //discharge through outlet\n",
+"D=100.0; //F.S.L of distributing canal\n",
+"wc=99.90; //F.S.L of water course\n",
+"dep=1.1; //full supply depth distributing canal\n",
+"f=0.01; //coefficient of friction\n",
+"g=9.81; //acceleration due to gravity\n",
+"L=9; //Length of pipe\n",
+"\n",
+"H=D-wc; //working head\n",
+"//first trial\n",
+"//taking d=22.8 cm\n",
+"d=22.8;\n",
+"C=(d/((1.5*d/(400*f)+L)*f))^0.5/20;\n",
+"A=q/(C*(2*g*H)^0.5);\n",
+"d=(4*A/%pi)^0.5*100;\n",
+"//second trial\n",
+"C=(d/((1.5*d/(400*f)+L)*f))^0.5/20;\n",
+"A=q/(C*(2*g*H)^0.5);\n",
+"d=(4*A/%pi)^0.5*100;\n",
+"d=round(d*100)/100;\n",
+"mprintf('diameter of pipe required=%f cm.',d);\n",
+"mprintf('\nprovide diameter of pipe as 25 cm.');\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17.4: EX17_4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 17.4\n",
+"//design an open flume outlet\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=0.06; //discharge\n",
+"D=0.85; //full supply depth\n",
+"Hw=15; //available working head\n",
+"Bt=7;C=1.6; //let us choose\n",
+"H=(Q*100/(C*Bt))^(2/3);\n",
+"mh=0.2*H; //minimum modular head\n",
+"mh=round(mh*1000)/1000;\n",
+"mprintf('minimum modular head=%f m. < available working head.\nhemce,design is safe.',mh);\n",
+"o=H/D;\n",
+"o=round(o*1000)/1000;\n",
+"mprintf('\nsetting of outlet=%f. <0.9.\nhence,outlet will work as hyper propotional outlet.',o);"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/18-CANAL_REGULATION_WORKS.ipynb b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/18-CANAL_REGULATION_WORKS.ipynb
new file mode 100644
index 0000000..3847a66
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/18-CANAL_REGULATION_WORKS.ipynb
@@ -0,0 +1,583 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 18: CANAL REGULATION WORKS"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 18.1: EX18_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 18.1\n",
+"//design Sarda type fall\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=40; //full supply discharge\n",
+"sl_u=218.3; //supply level at upstream\n",
+"sl_d=216.8; //supply level at downstream\n",
+"D=1.8; //suplly depth\n",
+"L=26; //bed width\n",
+"bl_u=216.5; //bed level upstream\n",
+"bl_d=215; //bed level downstream\n",
+"drop=1.5;\n",
+"\n",
+"//from the eqauation; Q=1.99LH^1.5*(H/B)^(1/6);\n",
+"//B=0.55*(H+d)^0.5;\n",
+"//H+d=drop+D;\n",
+"//we get\n",
+"H=(0.774)^0.6;\n",
+"d=3.3-H;\n",
+"Hc=D-H;\n",
+"d=round(d*100)/100;\n",
+"H=round(H*100)/100;\n",
+"Hc=round(Hc*100)/100;\n",
+"mprintf('H=%f m.\nd=%f m.',H,d);\n",
+"mprintf('\ncrest height above bed=%f m.',Hc);\n",
+"\n",
+"//adopt trapezoidal crest\n",
+"B=1; //top width\n",
+"mprintf('\n\nD/S batter=1:3; U/S batter=1:8.');\n",
+"Va=Q/((27+D)*D);\n",
+"vh=Va^2/(2*9.81);\n",
+"tel_up=sl_u+vh;\n",
+"crest=sl_u-H;\n",
+"E=sl_u-crest;\n",
+"mprintf('\nR.L of crest=%f m.',crest);\n",
+"mprintf('\nE=%f m.',E);\n",
+"//design of cistern\n",
+"x=(E*drop)^(2/3)/4; //depth of cistern\n",
+"lc=5*(E*drop)^0.5; //length of cistern\n",
+"cb=bl_d-x;\n",
+"x=round(x*100)/100;\n",
+"cb=round(cb*1000)/1000;\n",
+"lc=round(lc*10)/10;\n",
+"mprintf('\n\ndepth of cistern=%f m.',x);\n",
+"mprintf('\nlength of cistern=%f m.',lc);\n",
+"mprintf('\nR.L of bed of cistern=%f m.',cb);\n",
+"mprintf('\nkeep cistern at R.L 214.69.');\n",
+"//design of impervious floor\n",
+"Hs=2.44; //seepage head\n",
+"c=8; //Bligh's coefficient\n",
+"li=Hs*c;\n",
+"d1=1;d2=1.6;\n",
+"vl=2*(d1+d2);\n",
+"lh=li-vl;\n",
+"mprintf('\n\ndesign of impervious floor:');\n",
+"mprintf('\nprovide upstream cut-off=%i m.; downstream cut-off=%f m.',d1,d2);\n",
+"mprintf('\nlength of horizontal impervious floor=%f m.',lh);\n",
+"mprintf('\nprovide 15 m length impervious floor.');\n",
+"ld=2*(D+1.2)+drop;\n",
+"mprintf('\nminimum length of impervious floor to the d/s of toe of crest wall=%f m.',ld);\n",
+"mprintf('\nprovide ld=8 m.');\n",
+"bl=15-8;\n",
+"mprintf('\nthe balance of the length %i m is to be provided under and u/s of the crest.',bl);\n",
+"\n",
+"tcl=15+2*(1+16);\n",
+"mprintf('\n\nuplift pressure is counter balanced by weigth of water.\n hence provide thickness of 0.4 m.');\n",
+"rho=2.24; \n",
+"static=2.44*(1-0.446)+x;\n",
+"t=static/(rho-1);\n",
+"t=round(t*100)/100;\n",
+"mprintf('\nfor other points; thickness required =%f m.',t);\n",
+"mprintf('\nprovide thickness of 1.40 m.');\n",
+"mprintf('\nat downstream end of floor provide thickness of 0.6 m overlaid by 0.2 m brick pitching.');\n",
+"\n",
+"n=d2/(Hs*5); //n=1/%pi*(lambda)^0.5\n",
+"//from khosla exit curve we get\n",
+"alpha=10.5;\n",
+"lambda=(1/(%pi*n))^2;\n",
+"alpha=((2*lambda-1)^2-1)^0.5;\n",
+"b=alpha*d2;\n",
+"b=round(b*100)/100;\n",
+"mprintf('\n\nchecking of floor thickness by khosla theory:');\n",
+"mprintf('\nlength of floor provided=%f m. > length by Bligh theory.',b);\n",
+"b=15;\n",
+"d2=1.8;\n",
+"alpha=b/d2;\n",
+"n=0.145;\n",
+"Ge=Hs*n/d2;\n",
+"Ge=round(Ge*10)/10;\n",
+"mprintf('\nexit gradient after increase in depth cut-off=%f. which is in permissible limit',Ge);\n",
+"mprintf('\nprovide depth cut-off to 1.8 m.');\n",
+"//calculation of pressure\n",
+"mprintf('\n\ncalculation of pressure:');\n",
+"mprintf('\nU/S cut-off:');\n",
+"d1=1;\n",
+"b=15;\n",
+"alpha_=d1/b;\n",
+"fic1=100-24;\n",
+"fid1=100-17;\n",
+"t=0.4;\n",
+"fic1=fic1+(fid1-fic1)*t/d1;\n",
+"mprintf('\ncorrected fic1=%f percent.',fic1);\n",
+"mprintf('\nD/S cut-off wall:');\n",
+"d2=1.8;\n",
+"b=15;\n",
+"alpha_=d1/b;\n",
+"fie2=31;\n",
+"fid2=21.5;\n",
+"t=0.6;\n",
+"fie2=fie2-(fie2-fid2)*t/1.8;\n",
+"fie2=round(fie2*10)/10;\n",
+"mprintf('\ncorrecte fie2=%f percent.',fie2);\n",
+"//calculation of thickness\n",
+"mprintf('\n\nprovide a minimum thickness of 0.4 m for u/s floor.');\n",
+"pre=fie2+(fic1-fie2)*8/b;\n",
+"static=pre*Hs/100+x;\n",
+"t=static/(rho-1);\n",
+"t=round(t*100)/100;\n",
+"mprintf('\nthickness at d/s toe of crest=%f m.',t);\n",
+"mprintf('\nprovide thickness of 1.4 m thick concrete overlaid by 0.2 m brick pitching.');\n",
+"pre=fie2+(fic1-fie2)*5/b;\n",
+"static=pre*Hs/100+x;\n",
+"t=static/(rho-1);\n",
+"t=round(t*100)/100;\n",
+"mprintf('\nthickness at 3 m from d/s toe of crest=%f m.',t);\n",
+"mprintf('\nprovide thickness of 1.2 m thick concrete overlaid by 0.2 m brick pitching.');\n",
+"pre=fie2+(fic1-fie2)*2/b;\n",
+"static=pre*Hs/100; //calculation is wrong in book\n",
+"t=static/(rho-1);\n",
+"t=round(t*100)/100;\n",
+"mprintf('\nthickness at 6m from d/s toe of crest=%f m.',t);\n",
+"mprintf('\nprovide thickness of 0.7 m thick concrete overlaid by 0.2 m brick pitching.');\n",
+"//design of downstream wings\n",
+"wing=6*(E*drop)^0.5;\n",
+"hw=D+0.5;\n",
+"mprintf('\n\nheigth of top of downstream wings above the bed=%f m.',hw);\n",
+"projec=hw*3;\n",
+"mprintf('\nlength of warped wing measured along centre line of canal=%f m.',projec);\n",
+"//downstream pitching\n",
+"l=9+2*1.5;\n",
+"mprintf('\n\nlength of bed pitching=%f m.',l);\n",
+"mprintf('\nlength of sloping pitching=7 m.\nlength of horizontal pitching=6 m.');\n",
+"mprintf('\nprovide one toe wall of 1 m depth and 0.4 m width.');\n",
+"mprintf('\nside pitching is curtailed at 45 degree from the end of bed pitching in plan.\nsupprot the side pitching on toe wall 0.4 m thick and 1 m deep. ');\n",
+"//energy dissipators\n",
+"q=Q/L;\n",
+"dc=(q^2/9.81)^(1/3);\n",
+"mprintf('\n\nsize and position of friction blocks:');\n",
+"L=2*dc;\n",
+"w=dc;\n",
+"h=dc;\n",
+"di=1.5*dc;\n",
+"L=round(L*10)/10;\n",
+"w=round(w*10)/10;\n",
+"h=round(h*10)/10;\n",
+"di=round(di);\n",
+"mprintf('\nlength of block=%f m.\nwidth of block=%f m.\nheight of block=%f m.\ndistance from toe of crest=%f m.',L,w,h,di);\n",
+"mprintf('\nprovide two rows staggered ata distance of 1 m from toe of crest.');\n",
+"mprintf('\nsize and position of cube blocks:');\n",
+"L=D/10;\n",
+"w=D/10;\n",
+"h=w;\n",
+"L=round(L*10)/10;\n",
+"w=round(w*10)/10;\n",
+"h=round(h*10)/10;\n",
+"mprintf('\nlength of block=%f m.\nwidth of block=%f m.\nheight of block=%f m.',L,w,h);\n",
+"mprintf('\nprovide two rows staggered at the end of impervious floor.');\n",
+"//u/s approach\n",
+"r=6*H;\n",
+"mprintf('\n\nprovide wing wall segmental with 5 m radius subtending angle of 60 degree at the centre.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 18.2: EX18_2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 18.2\n",
+"//design an unflumed straight glacis non-meter fall\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=40; //full supply discharge\n",
+"sl_u=218.3; //supply level at upstream\n",
+"sl_d=216.8; //supply level at downstream\n",
+"D=1.8; //suplly depth\n",
+"L=26; //bed width\n",
+"bl_u=216.5; //bed level upstream\n",
+"bl_d=215; //bed level downstream\n",
+"drop=1.5;\n",
+"Ge=1/6; //permissible exit gradient\n",
+"\n",
+"//design of crest\n",
+"mprintf('design of crest:');\n",
+"E=(Q/(1.84*L))^(2/3);\n",
+"V=Q/((L+D)*D);\n",
+"vh=V^2/(2*9.81);\n",
+"tel_up=sl_u+vh;\n",
+"cl=tel_up-E;\n",
+"w=2*E/3;\n",
+"w=round(w*10)/10;\n",
+"mprintf('\nlength of crest=%f m.',L);\n",
+"mprintf('\nwidth of crest=%f m.',w);\n",
+"//design of cistern\n",
+"q=Q/L;\n",
+"Hl=1.5;\n",
+"//from blench curve\n",
+"Ef2=1.44;\n",
+"cistern=sl_d+0.03-1.25*Ef2;\n",
+"mprintf('\n\nR.L of cistern=%f m. > d/s bed level.',cistern);\n",
+"mprintf('\nkeep R.L of cistern at 214.5 m.');\n",
+"l=6*Ef2;\n",
+"mprintf('\nlength of cistern=%f m.',l);\n",
+"mprintf('\nprovide cistern of 9 m length ');\n",
+"d=bl_d-214.5;\n",
+"mprintf('\ndepth of cistern=%f m.',d);\n",
+"\n",
+"//design of impervious floor\n",
+"d1=D/3;\n",
+"mprintf('\n\ndesign of impervious floor:');\n",
+"mprintf('\nprovide 0.4 m wide and 1 m deep curtain wall at u/s.');\n",
+"d2=D/2;\n",
+"mprintf('\nprovide 0.4 m wide and 1 m deep curtain wall at d/s.\nthe curtain wall will project the above the d/s bed by 0.18 m.');\n",
+"Hs=cl-bl_d;\n",
+"d2=1;\n",
+"n=d2*Ge/Hs; //n=1/(%pi*(lambda)^0.5)\n",
+"//from khosla exit curves we get\n",
+"alpha=40;\n",
+"lambda=(1/(%pi*n))^2;\n",
+"alpha=((2*lambda-1)^2-1)^0.5;\n",
+"b=alpha*d2;\n",
+"//since length is to excessive\n",
+"d2=2;\n",
+"n=d2*Ge/Hs; //n=1/(%pi*(lambda)^0.5)\n",
+"//from khosla exit curves we get\n",
+"alpha=10;\n",
+"lambda=(1/(%pi*n))^2;\n",
+"alpha=((2*lambda-1)^2-1)^0.5;\n",
+"b=alpha*d2+1;\n",
+"mprintf('\ntotal length=%i m.\nlength of cistern=9 m.\nlength of d/s glacis=5.88 m.\nwidth of crest=0.6 m.\nlength of u/s glacis=0.47 m.\nbalance to be provided to u/s of the u/s glacis=4.05 m.',b);\n",
+"\n",
+"//pressure calculations\n",
+"mprintf('\n\npressure calculations:');\n",
+"mprintf('\nupstream curtain wall:');\n",
+"d1=1;b=20;\n",
+"alpha_=d1/b;\n",
+"t=0.3;\n",
+"fic1=100-22;\n",
+"fid1=100-15;\n",
+"corec=(fid1-fic1)*t/d1\n",
+"fic1=fic1+corec;\n",
+"mprintf('\ncorrected fi_c1=%f percent.',fic1);\n",
+"mprintf('\ndownstream curtain wall:');\n",
+"d2=2;b=20;\n",
+"alpha_=d2/b;\n",
+"t=0.5;\n",
+"fie=29;\n",
+"fid=21;\n",
+"corec=(fie-fid)*t/d2\n",
+"fie=fie-corec;\n",
+"mprintf('\ncorrected fi_e=%f percent.',fie);\n",
+"mprintf('\ntoe of glacis:');\n",
+"//assuming linear variation of pressure\n",
+"p=fie+(80-fie)*9/20;\n",
+"mprintf('\npressure at downstream of the glacis=%f percent.',p);\n",
+"\n",
+"//floor thickness\n",
+"rho=2.24;\n",
+"mprintf('\n\nfloor thickness:\nprovide minimum thickness of 0.3 m at the u/s floor.');\n",
+"static=p*2.44/100+(bl_d-214.5);\n",
+"t=static/(rho-1);\n",
+"t=round(t*100)/100;\n",
+"mprintf('\nfloor thickness required at toe of glacis=%f m.\nprovide 1.5 m thick floor for length of 3 m.',t);\n",
+"p=fie+(80-fie)*6/20;\n",
+"static=p*2.44/100+(bl_d-214.5);\n",
+"t=static/(rho-1);\n",
+"t=round(t*100)/100;\n",
+"mprintf('\nfloor thickness required at 3m from toe of glacis=%f m.\nprovide 1.3 m thick floor from 3 m to 6.5 m from toe of glacis.',t);\n",
+"t=0.27*2.44/(rho-1);\n",
+"t=round(t*100)/100;\n",
+"mprintf('\nthickness of d/s end of cistern=%f m.\nprovide thickness of 0.6 m at d/s end of floor.',t);\n",
+"\n",
+"//design of d/s protection\n",
+"mprintf('\n\nno bed protection is needed as deflector wall is provided.');\n",
+"sp=3*D;\n",
+"mprintf('\nlength of side protection=%f m.\nprovide 5.5 m length of 20 cm thick brick pitching beyond impervious floor.\npitching will rest on toe wall 0.4 m wide and 0.9 m deep.\nprovide 0.4 m wide profile at the end of pitching',sp);\n",
+"//design of u/s approach\n",
+"mprintf('\n\nu/s wing wall is splayed at 45 degree from u/s end of impervious floor.\nextend 1 m into earthen banks from line of F.S.L.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 18.3: EX18_3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"//example 18.3\n",
+"//design a cross -regulator and head regulatorfor a distributory channel\n",
+"clc;funcprot(0);\n",
+"//givrn\n",
+"Q=100; //discharge of parent channel\n",
+"Qd=15; //discharge ofdistributory\n",
+"fsl_u=218.1; //F.S.L of upstream parent channel\n",
+"fsl_d=217.9; //F.S.L of downstream of parent channel\n",
+"bw_u=42; //bed width of parent channel upstream\n",
+"bw_d=38; //bed width of parent channel downstream\n",
+"hw=2.5; //depth of water in parent channel\n",
+"fsl_dis=217.1; //F.S.L of distributory\n",
+"hw_dis=1.5; //depth of water in distributory\n",
+"Ge=1/5; //permissible exit gradient\n",
+"\n",
+"//design of cross regulator\n",
+"mprintf('DESIGN OF CROSS-REGULATOR::');\n",
+"//design of crest and waterway\n",
+"mprintf('\n\ndesign of crest and waterway:');\n",
+"cl=fsl_u-hw;\n",
+"h=fsl_u-fsl_d;\n",
+"d=fsl_d-cl;\n",
+"C1=0.557;C2=0.8;\n",
+"L=Q/(2*C1*(2*9.81)^0.5*h^1.5/3+C2*d*(2*9.81*h)^0.5);\n",
+"L=round(L*10)/10;\n",
+"mprintf('\ncrest level=%f m.',cl);\n",
+"mprintf('\nlength of crest=%f m.',L);\n",
+"mprintf('\nprovide 4 bays of 7 m each with a clear water-way.');\n",
+"tw=28+4.5;\n",
+"mprintf('\nprovide 3 piers of 1.5 m width each.\ntotal width of cross regulator=%f m.',tw);\n",
+"//design of d/s floor\n",
+"L=28;\n",
+"q=Q/L;\n",
+"Hl=fsl_u-fsl_d;\n",
+"Ef2=1.89; //from blench curve\n",
+"fl_d=fsl_d-Ef2;\n",
+"mprintf('\n\ndesign of d/s floor:');\n",
+"mprintf('\nd/s floor level=%f m.; which is higher than d/s bed level.\nadopt floor level =d/s bed level=215.40 m.',fl_d);\n",
+"Ef1=Ef2+Hl;\n",
+"//from specific energy curve\n",
+"D1=0.7;D2=1.65;\n",
+"cil=5*(D2-D1); //cistern length\n",
+"tl=2*16/3;\n",
+"tl=round(tl*10)/10;\n",
+"mprintf('\ncistern length =%f m.\nlength of d/s floor=%f m.',cil,tl);\n",
+"//design of impervious floor\n",
+"d1=hw/3+0.6; //depth of u/s cut-off\n",
+"w=0.5; //width of cut-off\n",
+"d2=hw/2+0.6; //deth of d/s cut-off\n",
+"d2=2; //keep\n",
+"Hs=fsl_u-(fsl_d-hw); //maximum static head\n",
+"n=Ge*d2/Hs; //n=1/%pi*(lambda)^0.5;\n",
+"//from exit gradient curves we get\n",
+"alpha=8;n=0.148;\n",
+"b=alpha*d2;\n",
+"mprintf('\n\ndesign of impervious floor:');\n",
+"mprintf('\ntotal length of impervious floor=%i m.;which is divided as-',b);\n",
+"mprintf('\nd/s floor length=10.6 m.\nd/s glacis length with 2:1 slope=0.4 m.\nbalance to be provided upstream=5 m.');\n",
+"d1=1.5;b=16;\n",
+"alpha_=d1/b;\n",
+"//hence\n",
+"fic1=100-28;\n",
+"fid1=100-19;\n",
+"t=0.5;\n",
+"fic1=fic1+(fid1-fic1)*t/d1;\n",
+"mprintf('\n\npressure calculation:\nupstream cut-off:\npressure =%f percent.',fic1);\n",
+"d2=2;b=16;\n",
+"alpha_=d2/b;\n",
+"//hence\n",
+"t=0.6;\n",
+"fie2=31;fid2=22;\n",
+"fie2=fie2-(fie2-fid2)*t/d2;\n",
+"mprintf('\ndownstream cut-off:\npressure=%f percent.',fie2);\n",
+"t=10.6;\n",
+"p=fie2+(fic1-fie2)*t/b;\n",
+"p=round(p*10)/10;\n",
+"mprintf('\ntoe of glacis:\npressure=%f percent.',p);\n",
+"mprintf('\n\nthickness of floor:\nminimu thickness for u/s floor=0.5 m.');\n",
+"rho=2.24;\n",
+"t=fie2*2.7/(100*(rho-1));\n",
+"t=round(t*100)/100;\n",
+"mprintf('\nthickness of floor near d/s cut-off=%f m.\nprovide 0.7 m thick floor for last 2.1 m length.',t);\n",
+"t=1.6/(rho-1);\n",
+"t=round(t*100)/100;\n",
+"mprintf('\nthickness of floor at toe of glacis=%f m.',t);\n",
+"t=6.6;\n",
+"p=fie2+(fic1-fie2)*t/b;\n",
+"t=p*2.7/(100*(rho-1));\n",
+"t=round(t*100)/100;\n",
+"mprintf('\nthickness of floor at 4 m from toe of glais=%f m.\nprovide 1.1 m thick floor for next 2 m length',t);\n",
+"t=4.6;\n",
+"p=fie2+(fic1-fie2)*t/b;\n",
+"t=p*2.7/(100*(rho-1));\n",
+"t=round(t*100)/100;\n",
+"mprintf('\nthickness of floor at 6 m from toe of glais=%f m.\nprovide 0.9 m thick floor for next 2.5 m length',t);\n",
+"\n",
+"//design of u/s protection\n",
+"d1=hw/3+0.6;\n",
+"v=d1;\n",
+"v=round(v*100)/100;\n",
+"mprintf('\n\ndesign of u/s protection:\nvolume of block protection=%f cubic metre/metre.',v);\n",
+"mprintf('\nkeep thickness of protection=1 m.\nprovide 0.8mx0.8mx0.6m thick concret blocks over 0.4 m thick apron in length of 0.6 m.');\n",
+"cu=2.25*d1;\n",
+"cu=round(cu*100)/100;\n",
+"mprintf('\ncubic content of launching apron=%f cubic metre/metre.\nprovide 1 m thick and 3.5 m long launching apron.',cu);\n",
+"//design of d/s protection\n",
+"d2=hw/2+0.6;\n",
+"v=d2;\n",
+"v=round(v*100)/100;\n",
+"mprintf('\n\ndesign of d/s protection:\nvolume of inverted filter=%f cubic metre/metre.',v);\n",
+"mprintf('\nkeep thickness of concrete block=0.6 m.\nprovide 2 rows of 0.8mx0.8mx0.6m thick concret blocks over 0.6 m graded filter for length of 1.6 m.');\n",
+"cu=2.25*d2;\n",
+"cu=round(cu*100)/100;\n",
+"mprintf('\nlaunching apron volume=%f cubic metre/metre.\nprovide 1 m thick launching apron for length of 4.5 m.\nprovide a toe wall 0.4 m wide and 1.5 m deep between filter and launching apron.',cu);\n",
+"\n",
+"//design of head regulator\n",
+"mprintf('\n\n\nDESIGN OF DISTRIBUTORY HEAD REGULATOR::');\n",
+"//design of crest and waterway\n",
+"mprintf('\n\ndesign of crest and waterway:');\n",
+"cl=fsl_u-hw+0.5;\n",
+"h=fsl_u-fsl_dis;\n",
+"d=fsl_dis-cl;\n",
+"C1=0.557;C2=0.8;\n",
+"L=Qd/(2*C1*(2*9.81)^0.5*h^1.5/3+C2*d*(2*9.81*h)^0.5);\n",
+"L=round(L*100)/100;\n",
+"mprintf('\ncrest level=%f m.',cl);\n",
+"mprintf('\nlength of crest=%f m.',L);\n",
+"mprintf('\nprovide 2 bays of 3.5 m each with a 1 m thick pier in between.');\n",
+"tw=8;\n",
+"mprintf('\ntotal width of cross regulator=%f m.',tw);\n",
+"//design of d/s floor\n",
+"L=7.5;\n",
+"q=Q/L;\n",
+"Hl=fsl_u-fsl_dis;\n",
+"Ef2=1.58; //from blench curve\n",
+"fl_d=fsl_dis-Ef2;\n",
+"mprintf('\n\ndesign of d/s floor:');\n",
+"mprintf('\nd/s floor level=%f m.;\nkeepR.L of d/s floor=215.50 m.',fl_d);\n",
+"Ef1=Ef2+Hl;\n",
+"//from specific energy curve\n",
+"D1=0.42;D2=2.55;\n",
+"cil=5*(D2-D1); //cistern length\n",
+"tl=2*14/3;\n",
+"mprintf('\ncistern length =%f m.',cil);\n",
+"\n",
+"//design of impervious floor\n",
+"d1=hw/3+0.6; //depth of u/s cut-off\n",
+"w=0.5; //width of cut-off\n",
+"d2=hw_dis/2+0.6; //deth of d/s cut-off\n",
+"d2=2; //keep\n",
+"Hs=fsl_u-215.5; //maximum static head\n",
+"n=Ge*d2/Hs; //n=1/%pi*(lambda)^0.5;\n",
+"//from exit gradient curves we get\n",
+"alpha=7;n=0.154;\n",
+"b=alpha*d2;\n",
+"mprintf('\n\ndesign of impervious floor:');\n",
+"mprintf('\ntotal length of impervious floor=%i m.;which is divided as-',b);\n",
+"mprintf('\nlength below the toe of glacis=10.5 m\nlength of d/s glacis at 2:1 slope=1.2 m.\nwidth of crest=1 m.\nlength of u/s glacis at 1:1 slope=0.5 m.\nu/s floor:balnce=0.8 m.');\n",
+"d1=1.5;b=16;\n",
+"alpha_=d1/b;\n",
+"//hence\n",
+"fic1=100-28;\n",
+"fid1=100-19;\n",
+"t=0.5;\n",
+"fic1=fic1+(fid1-fic1)*t/d1;\n",
+"mprintf('\n\npressure calculation:\nupstream cut-off:\npressure =%f percent.',fic1);\n",
+"d2=2;b=16;\n",
+"alpha_=d2/b;\n",
+"//hence\n",
+"t=0.6;\n",
+"fie2=31;fid2=22;\n",
+"fie2=fie2-(fie2-fid2)*t/d2;\n",
+"mprintf('\ndownstream cut-off:\npressure=%f percent.',fie2);\n",
+"t=10.6;\n",
+"p=fie2+(fic1-fie2)*t/b;\n",
+"p=round(p*100)/100;\n",
+"mprintf('\ntoe of glacis:\npressure=%f percent.',p);\n",
+"mprintf('\n\nthickness of floor:\nminimu thickness for u/s floor=0.5 m.');\n",
+"rho=2.24;\n",
+"t=p*2.6/(100*(rho-1));\n",
+"t=round(t*100)/100;\n",
+"mprintf('\nthickness under the crest=1 m.');\n",
+"mprintf('\nthickness of floor at toe of glacis=%f m.',t);\n",
+"t=9.5;\n",
+"p=fie2+(fic1-fie2)*t/b;\n",
+"t=p*2.7/(100*(rho-1));\n",
+"t=round(t*100)/100;\n",
+"mprintf('\nthickness of floor at 2 m from toe of glais=%f m.\nprovide 1.1 m thick floor for next 4 m length',t);\n",
+"t=4.5;\n",
+"p=fie2+(fic1-fie2)*t/b;\n",
+"t=p*2.7/(100*(rho-1));\n",
+"t=round(t*100)/100;\n",
+"mprintf('\nthickness of floor at 6 m from toe of glais=%f m.\nprovide 0.9 m thick floor for next 2.5 m length',t);\n",
+"t=2;\n",
+"p=fie2+(fic1-fie2)*t/b;\n",
+"t=p*2.7/(100*(rho-1));\n",
+"t=round(t*100)/100;\n",
+"mprintf('\nthickness of floor at 8.5 m from toe of glais=%f m.\nprovide 0.7 m thick floor for next 2 m length',t);\n",
+"\n",
+"//design of upstream protection\n",
+"d=hw/3+0.6;\n",
+"d=round(d*10)/10;\n",
+"mprintf('\n\ndesign of u/s protection:\nu/s scour depth=%f m.\nprovide same protection as in cross regulator',d);\n",
+"\n",
+"//design of d/s protection\n",
+"d2=hw_dis/2+0.6;\n",
+"v=d2;\n",
+"mprintf('\n\ndesign of d/s protection:\nvolume of inverted filter=%f cubic metre/metre.',v);\n",
+"mprintf('\nkeep thickness of concrete block=0.5 m.\nprovide 2 rows of 0.8mx0.8mx0.5m thick concret blocks over 0.5 m thick graded filter.');\n",
+"cu=2.25*d2;\n",
+"mprintf('\nlaunching apron volume=%f cubic metre/metre.\nprovide 1 m thick launching apron for length of 3.5 m.\nprovide a masonary toe wall 0.4 m wide and 1.2 m deep between filter and launching apron.',cu);\n",
+"\n",
+""
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/19-CROSS_DRAINAGE_WORKS.ipynb b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/19-CROSS_DRAINAGE_WORKS.ipynb
new file mode 100644
index 0000000..69fca91
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/19-CROSS_DRAINAGE_WORKS.ipynb
@@ -0,0 +1,299 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 19: CROSS DRAINAGE WORKS"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19.1: EX19_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 19.1\n",
+"//design an expansion transition for canal by Mitra's method\n",
+"clc;funcprot(0)\n",
+"//given\n",
+"Lf=16; //length of flume\n",
+"Bf=9; //width of throat\n",
+"Bo=15; //width of canal\n",
+"\n",
+"//width at any distance x from flumed section is given by\n",
+"//Bx=Bo*Bf*Lf/(Lf*Bo-(Bo-Bf)x)\n",
+"//on solving we get\n",
+"//Bx=2160/(240-6x)\n",
+"\n",
+"x=[2:2:16]; //distance\n",
+"mprintf('width at any distance x from flumed section:');\n",
+"for i=1:8\n",
+" Bx(i)=2160/(240-6*x(i));\n",
+" Bx(i)=round(Bx(i)*100)/100;\n",
+" mprintf('\n%f',Bx(i));\n",
+"end"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19.2: EX19_2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 19.2\n",
+"//design an expansion transition for canal by Chaturvedi's method\n",
+"clc;funcprot(0);\n",
+"//given;\n",
+"Lf=16; //length of flume\n",
+"Bf=9; //width of throat\n",
+"Bo=15; //width of canal\n",
+"\n",
+"x=[2:2:16]; //distance\n",
+"\n",
+"//distance x is related as x=Lf*Bo^(2/3)(1-(Bf/Bx)^1.5)/(Bo^1.5-Bf^1.5)\n",
+"//on solving we get\n",
+"//(Bf/Bx)^1.5=1-(x/29.893) (relation is misprinted in book)\n",
+"//let (Bf/Bx)^1.5=r\n",
+"\n",
+"mprintf('width at any distance x from flumed section:');\n",
+"for i=1:8\n",
+" r(i)=1-(x(i)/29.893); //Bf/Bx^(1.5)\n",
+" R(i)=r(i)^(2/3); //Bf/Bx\n",
+" Bx(i)=Bf/R(i); \n",
+" Bx(i)=round(Bx(i)*100)/100; \n",
+" mprintf('\n%f.',Bx(i));\n",
+"end\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19.3: EX19_3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 19.3\n",
+"//design a syphon aqueduct\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=25; //design discharge of canal\n",
+"B=20; //bed width of canal\n",
+"D=1.5; //depth of water in canal\n",
+"bl=160; //bed level of canal\n",
+"hfq=400; //high flood discharge of drainage\n",
+"hfl=160.5; //high flood level of drainage\n",
+"bl_drain=158; //bed level of drainage\n",
+"gl=160; //general ground level\n",
+"\n",
+"//desing of drainage water-way\n",
+"P=4.75*(hfq)^0.5; //laecey P-Q formula\n",
+"mprintf('design of drainage water-way:\nwetted perimeter of river=%i m.\nprovide 13 spans of 6 m each,separated by 12 piers each of 1.25 m thick.',P);\n",
+"t=78+15;\n",
+"mprintf('\ntotal length of water-way=%i m.',t);\n",
+"v=2; //velocity through syphon\n",
+"hb=hfq/(78*v);\n",
+"ac=hfq/(6*2.5*1.3); //calculation is wrong in book\n",
+"hb=round(hb*100)/100;\n",
+"ac=round(ac*100)/100;\n",
+"mprintf('\nheight of barrels=%f m.\nprovide rectangular barrels 6 m wide and 2.5 m high.\nactual velocity through barrels=%f m/sec.',hb,ac);\n",
+"\n",
+"//design of canal waterway\n",
+"mprintf('\n\ndesign of canal waterway:\nType 3 aqueduct is adopted.');\n",
+"l1=B-10;\n",
+"l2=(20-10)*3/2;\n",
+"mprintf('\nproviding a splay 2:1 in expansion,length of contraction transition=%i m.\nproviding a splay of 3:1 in expansion,length of expansion transition=%i m.',l1,l2);\n",
+"mprintf('\nIn transition side slopes are warped from original slope of 1.5:1 to vertical.');\n",
+"\n",
+"//design of levels of different sectionn\n",
+"mprintf('\n\ndesign of levels of different sectionn:\nat section 4-4:');\n",
+"A=(B+1.5*D); //area\n",
+"V=Q/A; //velocity of flow\n",
+"vh=V^2/(2*9.81); //velocity head\n",
+"ws=gl+D; //R.L of water surface\n",
+"tel=ws+vh;\n",
+"tel=round(tel*1000)/1000;\n",
+"mprintf('\nR.L of T.E.L=%f m.\n at section 3-3:',tel);\n",
+"A=10*D; //area of trough\n",
+"V=Q/A; //velocity\n",
+"vh1=V^2/(2*9.81); //velocity head\n",
+"le=0.3*(vh1-vh); //loss of head in expansion from section 3-3 to 4-4\n",
+"tel=tel+le;\n",
+"rlw=tel-vh1;\n",
+"rlb=rlw-D;\n",
+"tel=round(tel*1000)/1000;\n",
+"rlb=round(rlb*1000)/1000;\n",
+"mprintf('\nelevation of T.E.L=%f m.\nR.L of bed to maintain constant water depth=%f m.',tel,rlb);\n",
+"\n",
+"//at section 2-2\n",
+"R=A/P;\n",
+"N=0.016;\n",
+"S=V^2*N^2/R^(4/3); //from manning's formula\n",
+"L=93; //length of trough\n",
+"hl=L*S; //head loss\n",
+"tel=tel+hl;\n",
+"rlw=tel-vh1;\n",
+"rlb=rlw-D;\n",
+"tel=round(tel*1000)/1000;\n",
+"rlb=round(rlb*1000)/1000;\n",
+"mprintf('\nat section 2-2:\nR.L of T.E.L=%f m.\nR.L of bed to maintain constant water depth=%f m.',tel,rlb);\n",
+"\n",
+"//at section 1-1\n",
+"hl=0.2*(vh1-vh); //loss of hed in contraction transition\n",
+"tel=tel+hl;\n",
+"rlw=tel-vh;\n",
+"rlb=tel-D;\n",
+"tel=round(tel*1000)/1000;\n",
+"rlb=round(rlb*1000)/1000;\n",
+"mprintf('\nat section 1-1:\nR.L of T.E.L=%f m.\nR.L of bed to maintain constant water depth=%f m.',tel,rlb);\n",
+"\n",
+"//design of contraction transition\n",
+"//it is designed on the basis of chaturvedi's formula\n",
+"Bo=20;\n",
+"Bf=10;\n",
+"L=10;\n",
+"//from chaturvedi formula we get relation between x and Bx as: x=15.45(1-(10/Bx)^1.5);\n",
+"Bx=[10:1:20];\n",
+"mprintf('\n\ndesign of contraction transition on the basis of chaturvedi formula:\nBx x');\n",
+"for i=1:11\n",
+" x(i)=15.45*(1-(10/Bx(i))^1.5);\n",
+" x(i)=round(x(i)*100)/100;\n",
+" mprintf('\n%i %f',Bx(i),x(i));\n",
+"end\n",
+"\n",
+"//design of expansion transition on the basis of chaturvedi formula\n",
+"L=15;\n",
+"Bf=10;Bo=20;\n",
+"//from chaturvedi formula we get relation between x and Bx as: x=23.15(1-(10/Bx)^1.5);\n",
+"mprintf('\n\ndesign of expansion transition on the basis of chaturvedi formula:\nBx x');\n",
+"for i=1:11\n",
+" x(i)=23.15*(1-(10/Bx(i))^1.5);\n",
+" x(i)=round(x(i)*100)/100;\n",
+" mprintf('\n%i %f',Bx(i),x(i));\n",
+"end\n",
+"\n",
+"//design of trough\n",
+"mprintf('\n\ndesign of the trough:');\n",
+"mprintf('\nflumed water way of canal=10 m.\ntrough carrying canal will divide into two compartments each 5 m wide an dseparated by 0.3 m thick partiions.\nheigth of trough will be = 2 m.\ntrough iss constructed using monolithic reinforced concrete.\nthe outer and inner walls ca be kept 0.4 m thick.\nthus,outer width of trough = 11.1 m.');\n",
+"\n",
+"//head loss through syphon barrels\n",
+"V=2.05; //velocity through barrels\n",
+"f1=0.505; //coefficient of loss of head at entry\n",
+"a=0.00316;b=0.030;\n",
+"R=(6*2.5)/(2*(6+2.5));\n",
+"f2=a(1+b/R);\n",
+"L=11.1; //length of barrel\n",
+"h=(1+f1+f2*L/R)*V^2/(2*9.81);\n",
+"hfl_up=hfl+h;\n",
+"h=round(h*1000)/1000;\n",
+"hfl_up=round(hfl_up*1000)/1000;\n",
+"mprintf('\n\nhead loss through syphon barrels=%f m.\nupstream H.F.L=%f m.',h,hfl_up)\n",
+"\n",
+"//uplift pressure on the roof\n",
+"bt=gl-0.4; //R.L of bottom of the trough\n",
+"hl=0.505*V^2/(2*9.81);\n",
+"u=hfl_up-hl-159.6;\n",
+"up=u*9.81;\n",
+"mprintf('\n\nuplift pressure on the roof=%f kN/square m.\ntrough slab is 0.4 m thick and exert a downward load of 9.42 kN.',up);\n",
+"mprintf('\nth ebalance of the uplift pressure has to be resisted by bending action of trough slab.\nso,reinforcement has to be provided at the top of the slab.');\n",
+"\n",
+"//uplift on the floor of the barrel and its design\n",
+"//(a) static head\n",
+"mprintf('\n\nuplift on the floor of the barrel and its design:\n(a) static head:');\n",
+"bf=bt-2.5; //R.L of barrel floor\n",
+"t=0.8; //tentative thickness of floor\n",
+"bot=bf-t;\n",
+"static=bl_drain-bot;\n",
+"static=round(static*100)/100;\n",
+"mprintf('\nstatic uplift on the floor=%f m.',static);\n",
+"\n",
+"//(b) seepage head\n",
+"L=10; //length of u/s transition\n",
+"bs=3; //half the barrel span\n",
+"df=11; //end drainage floor\n",
+"tcl=24; //total creep length\n",
+"tsh=161.5-bl_drain; //total seepage head\n",
+"rs=tsh*(1-13/tcl); //residual seepage at B\n",
+"tu=(static+rs)*9.81;\n",
+"tu=round(tu*100)/100;\n",
+"mprintf('\n(b) seepage head:\ntotal uplift=%f kN/square m.\nprovide thickness of floor 0.8 m',tu);\n",
+"bending=tu-17.58;\n",
+"bending=round(bending*100)/100;\n",
+"mprintf('\nuplift to be resisted by bending action of floor=%f kN/square m.',bending);\n",
+"\n",
+"//design of cut-off and protection works for drainage floor\n",
+"mprintf('\n\ndesign of cut-off and protection works for drainage floor:');\n",
+"Q=400;f=1;\n",
+"R=0.47*(Q/f)^(1/3);\n",
+"d_up=1.5*R; //depth of u/s cut-off\n",
+"bot_up=hfl_up-d_up; //R.L of bottom of u/s cut-off\n",
+"d_down=1.5*R; //depth of d/s cut-off\n",
+"bot_down=hfl-d_down; //R.L of bottom of d/s cut-off\n",
+"l_down=2.5*(bl_drain-bot_down);\n",
+"l_down1=2*(bl_drain-bot_up);\n",
+"bot_up=round(bot_up*100)/100;\n",
+"bot_down=round(bot_down*100)/100;\n",
+"l_down=round(l_down);\n",
+"l_down1=round(l_down1);\n",
+"mprintf('\nR.L of bottom of u/s cut-off=%f m.\nR.L of bottom of d/s cut-off=%f m.',bot_up,bot_down);\n",
+"mprintf('\nlength of d/s protection consisting of 40 cm brick pritching=%f m.\npitching is supported by toe wall 0.4 m wide and 1.5 m deep at its d/s end.\nlength of d/s protection consisting of 0.4 cm brick pritching=%f m.\npitching is supported by toe wall 0.4 m wide and 1 m deep at its u/s end.',l_down,l_down1);"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/2-METHODS_OF_IRRIGATION.ipynb b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/2-METHODS_OF_IRRIGATION.ipynb
new file mode 100644
index 0000000..7a217b7
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/2-METHODS_OF_IRRIGATION.ipynb
@@ -0,0 +1,359 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2: METHODS OF IRRIGATION"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.1: EX2_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 2.1\n",
+"//calculate time required to cover 0.1 hectare area by tubewell\n",
+"clc;\n",
+"//Given\n",
+"Q=0.0108, //discharge through well\n",
+"y=0.075, //average depth of flow\n",
+"I=0.05, //average infiltration rate\n",
+"A=0.1, //area to cover\n",
+"t=(60*2.303*y*log10(Q/(Q-I*A)))/I,\n",
+"t=round(t);\n",
+"mprintf('Time required to cover given area=%f minutes.',t);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.2: EX2_2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 2.2\n",
+"//calculate maximum area that can be irrigated\n",
+"clc;\n",
+"//Given\n",
+"Q=0.0108, //discharge through well\n",
+"y=0.075, //average depth of flow\n",
+"I=0.05, //average infiltration rate\n",
+"A=0.1, //area to cover\n",
+"Amax=Q/I;\n",
+"mprintf('Maximum area that can be irrigated =%f hectare.',Amax);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.3: EX2_3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 2.3 \n",
+"\n",
+"//calculate \n",
+"//time of water application\n",
+"//optimum length of each border strip\n",
+"//dischrge for each border strip\n",
+"\n",
+"clc;\n",
+"//Given\n",
+"d=0.05;//depth of root zone\n",
+"I=1.25D-5;//average infiltration rate\n",
+"s=0.0035//slope of border strip\n",
+"t=d/(I*3600);\n",
+"t=round(t*1000)/1000;\n",
+"mprintf('Time of water application=%f hours.',t);\n",
+"\n",
+"//Part (a)\n",
+"q=2D-3;//discharge entering water source\n",
+"qdash=q*100^2*60;\n",
+"n=0.55425-(0.0001386*qdash);\n",
+"yo=(n*q/(s^0.5))^0.6;\n",
+"y=0.665*yo;\n",
+"L=(q/I)*(1-%e^(-d/y));\n",
+"L=round(10*L)/10;\n",
+"mprintf('\nPart (a):');\n",
+"mprintf('\nOptimum length of each border strip=%f m.',L);\n",
+"\n",
+"//Part (b)\n",
+"Lgiven=150//given value of length\n",
+"//First Trial\n",
+"q=3D-3;\n",
+"qdash=q*100^2*60;\n",
+"n=0.55425-(0.0001386*qdash);\n",
+"yo=(n*q/(s^0.5))^0.6;\n",
+"y=0.665*yo;\n",
+"L=(q/I)*(1-%e^(-d/y));\n",
+"//second trial\n",
+"q=3.15D-3;\n",
+"qdash=q*100^2*60;\n",
+"n=0.55425-(0.0001386*qdash);\n",
+"yo=(n*q/(s^0.5))^0.6;\n",
+"y=0.665*yo;\n",
+"L=(q/I)*(1-%e^(-d/y));\n",
+"q=9*Lgiven*q*1000/L;\n",
+"q=round(q*10)/10;\n",
+"mprintf('\nPart (b):');\n",
+"mprintf('\nDischarge for each border strip=%f lps.',q);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.4: EX2_4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 2.4\n",
+"//calculate \n",
+"//deep percolation loss\n",
+"//water application efficiency and time of irrigation.\n",
+"\n",
+"clc;\n",
+"//Given\n",
+"B=12;//breadth of basin\n",
+"L=36//length of basin\n",
+"d=70//depth of irrigation\n",
+"Ic=70//cumulative infiltration\n",
+"kdash=9;\n",
+"ndash=0.42;\n",
+"//Part (a) \n",
+"a=5;\n",
+"b=0.6;\n",
+"q=1.5;//stream size\n",
+"Q=(q*B)/1000;\n",
+"tl=(L/a)^(1/b);\n",
+"td=(Ic/kdash)^(1/ndash);\n",
+"T=tl+td;\n",
+"p=(1-(td/T)^(ndash))*100;\n",
+"eita=(1-p/100)*100;\n",
+"Tdash=(d*L*B)/(10*eita*Q*60);\n",
+"p=round(p*100)/100;\n",
+"eita=round(eita*100)/100;\n",
+"Tdash=round(Tdash*10)/10;\n",
+"mprintf('Part (a):')\n",
+"mprintf('\nDeep percolation loss= %f percent.',p);\n",
+"mprintf('\nWater application efficiency= %f percent.',eita);\n",
+"mprintf('\nTime of irrigation= %f minutes.',Tdash);\n",
+"//part (b)\n",
+"a=8;\n",
+"b=0.6;\n",
+"q=3;\n",
+"Q=(q*B)/1000;\n",
+"tl=(L/a)^(1/b);\n",
+"td=(Ic/kdash)^(1/ndash);\n",
+"T=tl+td;\n",
+"p=(1-(td/T)^(ndash))*100;\n",
+"eita=(1-p/100)*100;\n",
+"Tdash=(d*L*B)/(10*eita*Q*60);\n",
+"p=round(p*100)/100;\n",
+"eita=round(eita*100)/100;\n",
+"Tdash=round(Tdash*10)/10;\n",
+"mprintf('\nPart (b):')\n",
+"mprintf('\nDeep percolation loss= %f percent.',p);\n",
+"mprintf('\nWater application efficiency= %f percent.',eita);\n",
+"mprintf('\nTime of irrigation= %f minutes.',Tdash);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.5: EX2_5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 2.5\n",
+"//calculate \n",
+"//size of cut-back stream.\n",
+"//time required for putting 37.5 mm depth of water\n",
+"//average depth of water applied\n",
+"\n",
+"clc;\n",
+"//given\n",
+"d=37.5//crop water requirement\n",
+"W=1//furrow spacing\n",
+"L=120//length of furrow\n",
+"n=-0.49;\n",
+"k=38;\n",
+"Ttotal=143;//Total time of irrigation\n",
+"A=[0 23 52 88 127]//given values of time of advance\n",
+"\n",
+"for i=1:5//loop to find respective values of time of ponding\n",
+" B(i)=143-A(i);\n",
+"end\n",
+"\n",
+"\n",
+"for j=1:5//loop to find respective furrow infiltration\n",
+" C(j)=B(j)^(n)*k;\n",
+"end\n",
+"\n",
+"\n",
+"for K=1:4//loop to find respective average infiltration\n",
+" \n",
+" D(K)=(C(K)+C(K+1))/2;\n",
+"end\n",
+"\n",
+"E(1)=D(1);\n",
+"for l=2:4//loop to determine cumulative infiltration\n",
+" E(l)=D(l)+E(l-1);\n",
+"end\n",
+"I=E(4);\n",
+"\n",
+"T=(30*d*W*(n+1)/k)^(1/(n+1));\n",
+"dav=((24.5*Ttotal)+(I*(T-Ttotal)))/L;\n",
+"q=((120*37.5)-(24.5*143))/62;\n",
+"T=round(T);\n",
+"dav=round(dav*10)/10;\n",
+"q=round(q*100)/100;\n",
+"I=round(I*100)/100;\n",
+"mprintf('Maximum size of cut-back stream=%f lpm.',I);\n",
+"mprintf('\nMinimum size of cut-back stream=%f lpm.',q);\n",
+"mprintf('\nTime required for putting 37.5mm depth of water=%f minutes.',T);\n",
+"mprintf('\nAverage depth of water required=%f mm.',dav);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.6: EX2_6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"//example 2.6\n",
+"//calculate Average depth of water applied\n",
+"clc;\n",
+"//Given\n",
+"L=100;//length of furrow\n",
+"W=1;//furrow spacing\n",
+"s=0.3//longitudnal slope of furrow\n",
+"t1=80//initial time flow of stream\n",
+"t2=35//final time flow of stream\n",
+"qm=0.6/s;\n",
+"q=qm*0.4;\n",
+"dav=((q*t2*60)+(2*t1*60))/100;\n",
+"mprintf('Average depth of water applied=%f mm.',dav);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7: EX2_7.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 2.7\n",
+"//calculate \n",
+"//time required to irrigate\n",
+"//maximum area that can be irrigated\n",
+"clc;\n",
+"//Given\n",
+"Q=0.0072;//discharge through well\n",
+"y=0.1;//average depth of flow\n",
+"I=0.05//infiltration capacity of soil\n",
+"A=0.04//area of land\n",
+"t=(2.303*y*60/I)*log10(Q/(Q-I*A));\n",
+"Amax=Q/I;\n",
+"t=round(t*100)/100;\n",
+"mprintf('Time required to irrigate=%f minutes.',t);\n",
+"mprintf('\nMaximum area that can be irrigated=%f ha.',Amax);"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/20-RIVER_ENGINEERING.ipynb b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/20-RIVER_ENGINEERING.ipynb
new file mode 100644
index 0000000..2e5c7dc
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/20-RIVER_ENGINEERING.ipynb
@@ -0,0 +1,120 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 20: RIVER ENGINEERING"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 20.1: EX20_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 20.1\n",
+"//design a guide bank required for a bridge in a river\n",
+"//calculate volume of stone required per m length of guide bank\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=50000; //discharge\n",
+"f=1.1; //silt factor\n",
+"bl=130; //bed level of river\n",
+"hfl=140; //high flood level\n",
+"L=4.75*(Q)^0.5;\n",
+"L=L+212; //providing 20 percent more length\n",
+"L_up=5*L/4; //upstream length of guide bund\n",
+"L_down=L/4; //downstream length of guide bund\n",
+"r_up=0.45*L; //radius of upstream curved head\n",
+"mprintf('upstream length of guide bund=%i m.',L_up);\n",
+"mprintf('\ndownstream length of guide bund=%i m.',L_down);\n",
+"mprintf('\nupstream radius of curved head=%i m.;it can be carved at 145 degrees.',r_up);\n",
+"mprintf('\ndownstream radius of curved head=287m.;it can be carved at 60 degrees.');\n",
+"\n",
+"fb=1.5; //free board\n",
+"ltop=fb+hfl; //level of top of guide bund\n",
+"mprintf('\n\nlevel of top of guide bund=%f m.',ltop);\n",
+"mprintf('\nadopt top level=142 m.');\n",
+"ltop=142;\n",
+"Hr=ltop-bl;\n",
+"mprintf('\nkeep top width=4 m. and side slope as 2:1.');\n",
+"T=0.06*(Q)^(1/3); //thickness of stone pitching\n",
+"T=round(T*100)/100;\n",
+"mprintf('\n\nThickness of stone pitching=%f m.',T);\n",
+"R=0.47*(Q/f)^(1/3); //depth of scour\n",
+"Rmax=1.25*R; //maximum scour\n",
+"rl=hfl-Rmax; //R.L at maximum anticipated cover\n",
+"D=bl-rl; //depth of maximum scour\n",
+"Lapron=1.5*D;\n",
+"R=round(R*100)/100;\n",
+"Lapron=round(Lapron*100)/100;\n",
+"mprintf('\ndepth of scour=%f m.',R);\n",
+"mprintf('\n\nfor straigtht reach of guide band:');\n",
+"mprintf('\nlength of apron=%f m.',Lapron);\n",
+"Rmax=1.5*R;\n",
+"rl=hfl-Rmax;\n",
+"D1=bl-rl;\n",
+"Lapron=1.5*D1;\n",
+"R=round(R*100)/100;\n",
+"mprintf('\n\nfor curvilinear transition portion of guide band:');\n",
+"mprintf('\nlength of apron=%f m.',Lapron);\n",
+"T1=1.9*T;\n",
+"T1=round(T1*10)/10;\n",
+"mprintf('\nthickness of apron=%f m.',T1);\n",
+"mprintf('\n\nvolume of stones:');\n",
+"ss=5^0.5*(141-130)*T;\n",
+"as=5^0.5*D*1.25*T;\n",
+"ss=round(ss*100)/100;\n",
+"as=round(as*100)/100;\n",
+"mprintf('\nat shank:');\n",
+"mprintf('\non slope=%f cubic metre/m.',ss);\n",
+"mprintf('\non apron with a slope 2:1 =%f cubic metre/m.',as);\n",
+"\n",
+"va=5^0.5*D1*1.25*T;\n",
+"vs=ss;\n",
+"vs=round(vs*100)/100;\n",
+"va=round(va*100)/100;\n",
+"mprintf('\nU/S andD/S curved portion:');\n",
+"mprintf('\non slope=%f cubic metre/m.',vs);\n",
+"mprintf('\non apron =%f cubic metre/m.',va);\n",
+"\n",
+"ta=va/(1.5*D1);\n",
+"ta=round(ta*10)/10;\n",
+"mprintf('\n\nthickness of launching apron=%f m.',ta);"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/21-WATER_POWER_ENGINEERING.ipynb b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/21-WATER_POWER_ENGINEERING.ipynb
new file mode 100644
index 0000000..8b43b69
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/21-WATER_POWER_ENGINEERING.ipynb
@@ -0,0 +1,161 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 21: WATER POWER ENGINEERING"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.1: EX21_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 21.1\n",
+"//calculate\n",
+"//total installed capacity\n",
+"//load factor\n",
+"//plant factor\n",
+"//utilization factor\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"c=10000; //capacity of each generator;\n",
+"n=3; //number of generator\n",
+"l1=12000; //initial load on plant\n",
+"l2=26000; //final load on plant\n",
+"\n",
+"tc=n*c;\n",
+"mprintf('Total installed capacity=%i kW.',tc);\n",
+"\n",
+"avg=(l1+l2)/2; //average load\n",
+"pk=l2; //peak load\n",
+"lf=avg*100/pk;\n",
+"lf=round(lf*10)/10;\n",
+"mprintf('\nload factor=%f percent.',lf);\n",
+"\n",
+"//take any time duration t hours\n",
+"pf=avg*100/tc;\n",
+"pf=round(pf*10)/10;\n",
+"mprintf('\nplant factor=%f percent.',pf);\n",
+"\n",
+"uf=pk*100/tc;\n",
+"uf=round(uf*10)/10;\n",
+"mprintf('\nutilization ratio=%f percent.',uf);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.2: EX21_2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 21.2\n",
+"//calculate maximum generation capacity of generator\n",
+"//pondage to be provided\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=40; // minimum flow in river\n",
+"H=30; //net head\n",
+"lf=0.73; //load factor\n",
+"eita=0.6; //plant efficiency\n",
+"\n",
+"P=9.81*Q*H*eita;\n",
+"pk=P/lf;\n",
+"pk=round(pk*10)/10;\n",
+"mprintf('maximum generation capacity of generator=%f kW.',pk);\n",
+"\n",
+"pp=pk-P; //power develop from pondage\n",
+"Q=pp/(9.81*H*eita);\n",
+"pr=Q*4*3600/10000;\n",
+"pr=round(pr*10)/10;\n",
+"mprintf('\nPondage required=%fD+4 cubic metre.',pr);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.3: EX21_3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 21.3\n",
+"//calculate minimum discharge required in the stream\n",
+"//maximum load factor\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"c=15000; //installed capacity of plant\n",
+"lf=0.3; //load factor\n",
+"eita=0.82; //plant efficiency\n",
+"H=25; //working head\n",
+"\n",
+"avg=c*lf; //average power developed\n",
+"Q=avg/(9.81*H*eita);\n",
+"Q=round(Q*100)/100;\n",
+"mprintf('minimum discharge required in the stream=%f cumecs.',Q);\n",
+"\n",
+"Q=32; //for second case\n",
+"P=9.81*H*Q*eita;\n",
+"lf=P*100/c;\n",
+"lf=round(lf*10)/10;\n",
+"mprintf('\nmaximum load factor=%f percent.',lf);"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/3-WATER_REQUIREMENTS_OF_CROPS.ipynb b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/3-WATER_REQUIREMENTS_OF_CROPS.ipynb
new file mode 100644
index 0000000..2df4cda
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/3-WATER_REQUIREMENTS_OF_CROPS.ipynb
@@ -0,0 +1,1227 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3: WATER REQUIREMENTS OF CROPS"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.10: EX3_10.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.10\n",
+"//calculate Duty of water\n",
+"clc;\n",
+"//Given\n",
+"B=120; //Base period\n",
+"delta=92; //total depth requirement of crop\n",
+"\n",
+"D=8.64*B*100/delta;\n",
+"D=round(D);\n",
+"mprintf('Duty of water=%f hectares/cumec.',D);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.11: EX3_11.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.11\n",
+"//calculate Dischage required at head of canal\n",
+"clc;\n",
+"//Given\n",
+"Cr=2; //crop ratio\n",
+"A=80000; //Area of field\n",
+"CI=85; //percent field culturable irrigable\n",
+"IK=30; //irrigation intensity during kharif season\n",
+"IR=60; //irrigation intensity for rabi season\n",
+"DuK=800; //Duty of water for kharif season\n",
+"DuR=1700; //Duty of water for rabi season\n",
+"\n",
+"CIA=A*CI/100; //Culturable irrigable area\n",
+"AK=CIA*IK/100; //Area under kharif season\n",
+"AR=CIA*IR/100; //Area under rabi season\n",
+"DK=AK/DuK;\n",
+"DR=AR/DuR;\n",
+"mprintf('Dischage required at head of canal during Kharif season=%f cumecs.',DK);\n",
+"mprintf('\nDischage required at head of canal during Rabi season=%f cumecs.',DR);\n",
+"mprintf('\nWater requirement during kharif is greater than during rabi season');\n",
+"mprintf('\nHence,canal should be designed to carry discharge of %f cumecs.',DK);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.12: EX3_12.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.12\n",
+"//calculate Dischage required at head of canal\n",
+"clc;\n",
+"//Given\n",
+"CA=2600; //culturable area\n",
+"IS=20; //irrigation intensity for sugarcane\n",
+"IR=40; //irrigation intensity for rice\n",
+"DuS=750; //Duty of water for sugarcane\n",
+"DuR=1800; //Duty of water for rice\n",
+"PK=1.2; //Peak demand\n",
+"\n",
+"AS=CA*IS/100; //Area under sugarcane \n",
+"AR=CA*IR/100; //Area under rice\n",
+"DS=AS/DuS;\n",
+"DR=AR/DuR;\n",
+"DT=DS+DR;\n",
+"DD=PK*DT-0.005333+0.01;\n",
+"DR=round(DR*1000)/1000;\n",
+"DT=round(DT*1000)/1000;\n",
+"mprintf('Water required for Rice=%f cumecs.',DR);\n",
+"mprintf('\n Sugarcane is a perennial crop.');\n",
+"mprintf('\nHence,Water required for Sugarcane=%f cumecs.',DT);\n",
+"mprintf('\nDesign dischage to meet the peak demand=%f cumecs.',DD);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.13: EX3_13.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.13\n",
+"//compare the efficiency\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"ql=20; //discharge in left branch\n",
+"Al=20000; //culturable area in left branch\n",
+"Bl=120; //Base period in left branch\n",
+"Il=0.8; //intensity of rabi in left branch\n",
+"qr=8; //discharge in rigth branch\n",
+"Ar=12000; //culturable area in rigth branch\n",
+"Br=120; //Base period in rigth branch\n",
+"Ir=0.5; //intensity of rabi in rigth branch\n",
+"\n",
+"//for left canal\n",
+"ARl=Al*Il;\n",
+"Dl=ARl/ql;\n",
+"mprintf('Duty for left canal is=%i hectares/cumecs.',Dl);\n",
+"\n",
+"//for rigth canal\n",
+"ARr=Ar*Ir;\n",
+"Dr=ARr/qr;\n",
+"mprintf('\nDuty for left canal is=%i hectares/cumecs.',Dr);\n",
+"mprintf('\nSince,left canal has higher duty,it is more efficient');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.14: EX3_14.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.14\n",
+"//calculate Discharge for water course\n",
+"clc;\n",
+"//Given\n",
+"CA=1200; //culturable area\n",
+"IA=0.4; //intensity of irrigation of crop A\n",
+"IB=0.35; //intensity of irrigation of crop B\n",
+"bA=20; //kor period of crop A\n",
+"bB=15; //kor period of crop B\n",
+"deltaA=0.1; //kor depth of crop A\n",
+"deltaB=0.16; //kor depth of crop B\n",
+"\n",
+"//crop A\n",
+"A=CA*IA;\n",
+"Du=8.64*bA/deltaA;\n",
+"qA=A/Du;\n",
+"qA=round(qA*1000)/1000;\n",
+"mprintf('Discharge required for crop A=%f cumec.',qA);\n",
+"\n",
+"//crop B\n",
+"A=CA*IB;\n",
+"Du=8.64*bB/deltaB;\n",
+"qB=A/Du;\n",
+"qB=round(qB*1000)/1000;\n",
+"mprintf('\nDischarge required for crop B=%f cumec.',qB);\n",
+"D=qA+qB;\n",
+"D=round(D*10)/10;\n",
+"mprintf('\nDesign discharge of water course=%f cumec.',D);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.15: EX3_15.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.15\n",
+"//calculate \n",
+"//duty of irrigation water\n",
+"//discharge required\n",
+"clc;\n",
+"//Given\n",
+"B=12; //transplantaion period\n",
+"D=0.5; //total depth of water required by the crop\n",
+"R=0.1; //rain falling on field\n",
+"L=0.2; //loss of water\n",
+"A=600; //irrigated area\n",
+"I=0.6; //intensity of irrigation\n",
+"delta=D-R;\n",
+"Dui=8.64*B/delta;\n",
+"//since water loss is 20 percent\n",
+"Du=(1-L)*Dui;\n",
+"mprintf('Duty of water required=%f hectares/cumec.',Du);\n",
+"\n",
+"TA=I*A;\n",
+"q=TA/Du;\n",
+"q=round(q*100)/100;\n",
+"mprintf('\nDischarge at head of water course=%f cumecs.',q);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.16: EX3_16.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.16\n",
+"//calculate \n",
+"//discharge required at the head\n",
+"//design discharge\n",
+"clc;\n",
+"//Given\n",
+"CF=0.8; //Capacity factory\n",
+"Tf=13/20; //time factor\n",
+"A=[850 120 600 500 360]; //given values of area\n",
+"B=[320 90 120 120 120]; //given values of Base period\n",
+"D=[580 580 1600 2000 600]; //given values of duty at head canal\n",
+"\n",
+"DS=A(1)/D(1); //discharge for sugarcane \n",
+"DOS=A(2)/D(2); //discharge for overlap sugarcane\n",
+"DW=A(3)/D(3); //discharge for wheat\n",
+"DB=A(4)/D(4); //discharge for bajri\n",
+"DV=A(5)/D(5); //discharge for vegetables\n",
+"DR=DS+DW;\n",
+"DM=DS+DB;\n",
+"DH=DS+DOS+DV;\n",
+"mprintf('Maximum demand is in hot weather');\n",
+"q=DH/Tf;\n",
+"D=q/CF;\n",
+"q=round(1000*q)/1000;\n",
+"D=round(100*D)/100;\n",
+"mprintf('\nFull supply discharge at head=%f cumecs',q);\n",
+"mprintf('\nDesign discharge=%f cumecs.',D);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.17: EX3_17.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.17\n",
+"//calculate resvior capacity\n",
+"clc;\n",
+"//Given\n",
+"CL=0.2; //Canal loss\n",
+"RL=0.12; //Reservior loss\n",
+"A=[4800 5600 2400 3200 1400]; //given values of area under crop\n",
+"D=[1800 800 1400 900 700]; //given values of duty at field\n",
+"B=[120 360 200 120 120]; //given values of base period\n",
+"\n",
+"//(a) Wheat\n",
+"d=A(1)/D(1);\n",
+"V1=d*B(1);\n",
+"//(b) Sugarcane\n",
+"d=A(2)/D(2);\n",
+"V2=d*B(2);\n",
+"//(c) Cotton\n",
+"d=A(3)/D(3);\n",
+"V3=round(d*B(3));\n",
+"//(d) Rice\n",
+"d=A(4)/D(4);\n",
+"V4=round(d*B(4));\n",
+"//(e) vegetables\n",
+"d=A(5)/D(5);\n",
+"V5=d*B(5);\n",
+"\n",
+"Vd=(V1+V2+V3+V4+V5)*8.64;\n",
+"SC=Vd/((1-CL)*(1-RL));\n",
+"mprintf('Reservior capacity=%f hectare-metres.',SC);\n",
+"\n",
+"//Alternative method\n",
+"\n",
+"for i=1:5\n",
+" delta(i)=8.64*B(i)/D(i);\n",
+"end\n",
+"\n",
+"for j=1:5\n",
+" V(j)=A(j)*delta(j);\n",
+"end\n",
+"s=0;\n",
+"for k=1:5\n",
+" s=s+V(k);\n",
+"end\n",
+"SC=s/((1-CL)*(1-RL));\n",
+"SC=round(SC);\n",
+"mprintf('\n By Alternative method.\nStorage capacity=%f hectare-metres.',SC);\n",
+"\n",
+"\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.18: EX3_18.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.18\n",
+"//Calculate \n",
+"//consumptive use\n",
+"//consumptive irrigatin requirement\n",
+"//field irrigatio reqiurement\n",
+"clc;\n",
+"//Given\n",
+"eita=0.7; //water application efficiency\n",
+"k=0.75; //crop factor\n",
+"T=[19 16 12.5 13]; //given values of temperature\n",
+"p=[7.19 7.15 7.30 7.03]; //daytime hours of the year\n",
+"RD=1.2; //rainfall in december\n",
+"RJ=0.8; //rainfall in january\n",
+"for i=1:4\n",
+" f(i)=p(i)*(1.8*T(i)+32)/40;\n",
+"end\n",
+"s=0;\n",
+"for i=1:4\n",
+" s=s+f(i);\n",
+"end\n",
+"C=k*s;\n",
+"R=RD+RJ;\n",
+"CIR=C-R;\n",
+"FIR=CIR/eita;\n",
+"C=round(10*C)/10;\n",
+"CIR=round(CIR*10)/10;\n",
+"FIR=round(FIR*10)/10;\n",
+"mprintf('Consumptive use=%f cm.',C);\n",
+"mprintf('\nconsumptive irrigatin requirement=%f cm.',CIR);\n",
+"mprintf('\nfield irrigatio reqiurement=%f cm.',FIR);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.19: EX3_19.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.19\n",
+"//calculate\n",
+"//consumptive use of rice using penman's formula in january\n",
+"clc;\n",
+"//Given\n",
+"L=20; //latitude of place(degree North)\n",
+"T=15; //mean monthly temperature(degree celcius)\n",
+"RH=0.5; //relative humidity\n",
+"E=250; //elevation of area\n",
+"V=25; //wind velocity at 2 m heigth\n",
+"//from table 3.10\n",
+"VP=12.79; //saturation vapour pressure\n",
+"s=0.8; //slope of curve between vapur pressure and temperature\n",
+"//from table 3.11\n",
+"R=10.8;\n",
+"//from table 3.12\n",
+"N=11.1;\n",
+"//from table 3.9\n",
+"n=7.74;\n",
+"p=n/N;\n",
+"e=VP*RH;\n",
+"Ea=0.002187*(160+V)*(VP-e);\n",
+"r=0.2;\n",
+"alpha=0.49;\n",
+"sigma=2.01D-9;\n",
+"Ta=293;\n",
+"H=R*(1-r)*(0.29*cos(%pi/9)+0.55*p)-sigma*Ta^4*(0.56-0.092*e^0.5)*(0.10+0.9*p);\n",
+"Et=(s*H+alpha*Ea)*31/(s+alpha);\n",
+"Et=round(Et*10)/10;\n",
+"mprintf('consumptive use of rice in january=%f mm of water.',Et);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.1: EX3_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.1\n",
+"//classify the irrigation water\n",
+"clc;\n",
+"//Given\n",
+"Na=24; //concentration of sodium ion\n",
+"Ca=3.6; //concentration of calcium ion\n",
+"Mg=2; //concentration of magnesium ion\n",
+"EC=180; //electrical conductivity\n",
+"SAR=Na/(((Ca+Mg)/2)^(0.5)); //Sodium absorption ratio\n",
+"SAR=round(SAR*100)/100;\n",
+"mprintf('SAR=%f.',SAR);\n",
+"mprintf('\nWater falls under S2 class.'); //from table 3.2\n",
+"mprintf('\nFor EC=180,');\n",
+"mprintf('\nwater falls under C1 class.'); //from table 3.1\n",
+"mprintf('\nWater is medium sodium and low saline water.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.20: EX3_20.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.20\n",
+"//calculate\n",
+"//maximum storage capacity;depth of irrigation water\n",
+"//field irrigation requirement;water required at canal outlet\n",
+"clc;\n",
+"//Given\n",
+"Fc=0.27; //Field capacity\n",
+"pwp=0.13; //permanent wilting point\n",
+"d=80; //depth of soil(cm)\n",
+"gammad=1.5; //dry unit weigth of soil(g/cc)\n",
+"gammaw=1; //unit weigth of water(g/cc)\n",
+"M=0.18; //avearge soil moisture\n",
+"eita=0.8; //field efficiency\n",
+"FC=0.15; //field channel\n",
+"SC=gammad*d*(Fc-pwp)/gammaw;\n",
+"D=gammad*d*(Fc-M)/gammaw;\n",
+"FIR=D/eita;\n",
+"W=FIR/(1-FC);\n",
+"W=round(W*10)/10;\n",
+"mprintf('maximum storage capacity=%f cm',SC);\n",
+"mprintf('\ndepth of irrigation water=%f cm',D);\n",
+"mprintf('\nfield irrigation requirement=%f cm',FIR);\n",
+"mprintf('\nwater required at canal outlet=%f cm',W);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.21: EX3_21.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.21\n",
+"//calculate reservior capacity\n",
+"clc;\n",
+"//given\n",
+"W=0.4; //amount of water available from precipitation\n",
+"Cl=0.15; //Channel loss\n",
+"RL=0.1; //reservior loss\n",
+"B=[120 320 120 200 100]; //Base period\n",
+"D=[1800 800 900 1400 1200];//Duty at field\n",
+"A=[500 600 300 1200 500]; //Area under crop\n",
+"\n",
+"for i=1:5\n",
+" delta(i)=8.64*B(i)/D(i);\n",
+"end\n",
+"\n",
+"for i=1:5\n",
+" V(i)=delta(i)*A(i);\n",
+" \n",
+"end\n",
+"s=0;\n",
+"for i=1:5\n",
+" s=s+V(i);\n",
+"end\n",
+"C=s*(1-W)/((1-Cl)*(1-RL));\n",
+"\n",
+"mprintf('Reservior capacity=%i ha-m.',C);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.22: EX3_22.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.22\n",
+"//calculate\n",
+"//discharge required at head of distributory\n",
+"clc;\n",
+"//given\n",
+"GCA=10000; //gross commanded area\n",
+"CCA=0.75*GCA; //Culturable commanded area\n",
+"IR=0.6; //intensity of irrigation during rabi season\n",
+"IK=0.3; //intensity of irrigation during kharif season \n",
+"DuR=2500; //duty during rabi season\n",
+"DuK=1000; //duty during kharif season\n",
+"AR=IR*CCA; //area under irrigation in rabi season\n",
+"AK=IK*CCA; //area under irrigation in kharif season\n",
+"DR=AR/DuR;\n",
+"DK=AK/DuK;\n",
+"mprintf('discharge required at head of distributory=%f cumecs.',DK);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.23: EX3_23.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.23\n",
+"//calculate irrigation schedule\n",
+"clc;\n",
+"//given\n",
+"Fc=0.18; //field capacity\n",
+"wc=0.07; //wilting cofficient\n",
+"Sg=1.35; //bulk density of soil\n",
+"d=1.2; //root zone depth\n",
+"m=Fc-wc;\n",
+"mo=wc+m/3;\n",
+"dw=100*Sg*d*(Fc-mo);\n",
+"mprintf('Depth of water required=%f cm',dw);\n",
+"ev1=1.1; //average evapotranspiration rates in 1 NOV-30 NOV\n",
+"ev2=1.7; //average evapotranspiration rates in 1 DEC-31 DEC\n",
+"ev3=2.4; //average evapotranspiration rates in 1 JAN-31 JAN\n",
+"ev4=1.5; //average evapotranspiration rates in 1 FEB-28 FEB\n",
+"ev5=3.5; //average evapotranspiration rates in 1 MAR-25 MAR\n",
+"//irrigation requirement from 1 NOV to 3 JAn\n",
+"dev=(ev1*30+ev2*31+ev3*3)/10;\n",
+"mprintf('\n\nWater consumed by evapotranspiration=%f cm.',dev);\n",
+"mprintf('\nNo water is required during 1 NOV-3 JAN');\n",
+"\n",
+"//irrigation requirement after 3rd JAN\n",
+"ws=(ev3-1.5)*16/10; //water consumed from soil from 4 JAN-19 JAN\n",
+"ts=ws+dev; //water withdrawn from soil from 1 NOV-19 JAN\n",
+"s=(dw-ts)*10;\n",
+"day=s/ev3;\n",
+"depth=ts+(4*ev3)/10+(2*ev3)/10;\n",
+"mprintf('\n\ndepth of water required in first irrigation=%f cm.',depth);\n",
+"///irrigation requirement from 26 JAn to 25 MAR\n",
+"w1=ev3*6;\n",
+"w2=ev4*28;\n",
+"w3=ev5*25;\n",
+"W=w1+w2+w3;\n",
+"x=(dw*10-(14.4+42))/ev5;\n",
+"mprintf('\n\nHence second irrigation is required after %f days i.e on 18th March.',x);\n",
+"depth1=(W-(dw*10))/10;\n",
+"mprintf('\nrequired water depth=%f cm',depth1);\n",
+"mprintf('\n\nFirst Watering on 29 JAn and 30 JAN=%f cm.\nSecond watering required on 18th March=%f cm.',depth,depth1);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.24: EX3_24.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.24\n",
+"//calculate daily consumptive\n",
+"//discharge in canal\n",
+"clc;\n",
+"//given\n",
+"Fc=0.26; //Field capacity of soil\n",
+"A=3000; //Area of field\n",
+"OM=0.12; //optimum moisture \n",
+"pwp=0.1; //permanent wilting point\n",
+"d=80; //depth of root zone\n",
+"RD=1.4; //relative density of soil\n",
+"f=10; //frequency of irrigation\n",
+"eita=0.23; //overall efficiency\n",
+"D=RD*d*(Fc-OM);\n",
+"U=D*10/f;\n",
+"Wr=A*D*100;\n",
+"q=Wr/(f*24*3600);\n",
+"q=round(q*100)/100;\n",
+"mprintf('daily consumptive=%f mm.',U);\n",
+"mprintf('\ndischarge in canal=%f q cumecs.',q);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.25: EX3_25.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.25\n",
+"//calculate total water to be delivered\n",
+"clc;\n",
+"//given\n",
+"C1=0.2; //consumptive requirement of crop for 1 to 15 days\n",
+"C2=0.3; //consumptive requirement of crop for 16 to 40 days\n",
+"C3=0.5; //consumptive requirement of crop for 41 to 50 days\n",
+"C4=0.1; //consumptive requirement of crop for 51 to 55 days\n",
+"A=50; //area of land\n",
+"wr=5; //presowing water requirement\n",
+"R=3.5; //rainfall during 36th and 45th day\n",
+"w1=15*C1*100;\n",
+"w2=25*C2*100;\n",
+"w3=10*C3*100;\n",
+"w4=5*C4*100;\n",
+"w5=5*100;\n",
+"W=w1+w2+w3+w4+w5;\n",
+"ER=3.5*100;\n",
+"q=(W-ER)*A;\n",
+"mprintf('total water to be delivered=%i cubic metre.',q);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.26: EX3_26.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.26\n",
+"//calculate watering interval\n",
+"clc;\n",
+"//given\n",
+"Fc=0.3; //field capacity\n",
+"pwp=0.11; //permanent wilting percent\n",
+"gammad=1300; //density of soil\n",
+"gammaw=1000; //density of water\n",
+"d=700; //root zone depth\n",
+"CW=12; //daily consumptive use of water\n",
+"WHC=Fc-pwp;\n",
+"mo=Fc-(0.75*WHC);\n",
+"D=gammad*d*(Fc-mo)/gammaw;\n",
+"I=D/CW;\n",
+"mprintf(' watering interval=%i days',I); \n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.27: EX3_27.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.27\n",
+"//calculate Duty of water\n",
+"//discharge required in water course\n",
+"clc;\n",
+"//given\n",
+"A=1000; //total area\n",
+"AI=0.7*A; //area under irrigation\n",
+"B=15; //Base period\n",
+"d=500; //depth of water required during transplantation\n",
+"R=120; //useful rain falling\n",
+"Wl=0.2; //water loss\n",
+"delta=d-R;\n",
+"Du=8.64*B*1000/delta;\n",
+"DuH=Du*(1-Wl);\n",
+"q=AI/DuH;\n",
+"q=round(q*100)/100;\n",
+"mprintf('Duty of water=%i hec/cumec.',Du);\n",
+"mprintf('\ndischarge required in water course=%f cumecs.',q);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.28: EX3_28.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.28\n",
+"//calculate reservior capacity\n",
+"clc;\n",
+"//given\n",
+"Ar=4000; //culturable commanded area\n",
+"CL=0.25; //canal loss\n",
+"RL=0.15; //reservior loss\n",
+"B=[120 360 180 120 120]; //base period\n",
+"D=[1800 1700 1400 800 700];//duty of water\n",
+"I=[20 20 10 15 15]; //intensity of irrigation\n",
+"for i=1:5\n",
+" A(i)=Ar*I(i)/10; //area under crop\n",
+"end\n",
+"for i=1:5\n",
+" Q(i)=A(i)/D(i); //discharge required\n",
+"end\n",
+"for i=1:5\n",
+" V(i)=8.64D4*Q(i)*B(i); //quantity of water\n",
+"end\n",
+"s=0;\n",
+"for i=1:5\n",
+" s=s+V(i);\n",
+"end\n",
+"SC=round(s/((1-CL)*(1-RL)*1000000));\n",
+"mprintf('Storage capacity=%iD+06 cubic metre.',SC);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.2: EX3_2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.2\n",
+"//calculate\n",
+"//Depth of moisture in root zone at field capacity\n",
+"//Depth of moisture in root zone at permanent wilting point\n",
+"//Depth of moisture available in root zone\n",
+"clc;\n",
+"//Given\n",
+"gammad=15; //dry weigth of soil\n",
+"gammaw=9.81; //unit weigth of water\n",
+"Fc=0.3; //field capacity\n",
+"pwp=0.08; //permanent wilting point\n",
+"d=0.8; //root zone depth\n",
+"d1=gammad*Fc*1000/gammaw;\n",
+"d2=gammad*pwp*1000/gammaw;\n",
+"d3=gammad*d*(Fc-pwp)*1000/gammaw;\n",
+"d1=round(d1);\n",
+"d2=round(d2);\n",
+"d3=round(d3);\n",
+"mprintf('Depth of moisture in root zone at field capacity=%f mm/m.',d1);\n",
+"mprintf('\nDepth of moisture in root zone at permanent wilting point=%f mm/m.',d2);\n",
+"mprintf('\nDepth of moisture available in root zone=%f mm/m.',d3);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.3: EX3_3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.3\n",
+"//calculate\n",
+"//depth upto which soil profile is wetted\n",
+"clc;\n",
+"//Given\n",
+"gammad=15.3; //dry weigth of soil\n",
+"gammaw=9.81; //unit weigth of water\n",
+"Fc=0.15; //field capacity\n",
+"Mc=0.08; //moisture content before irrigation\n",
+"D=60; //Depth of water applied\n",
+"d=(gammaw*D)/(gammad*(Fc-Mc));\n",
+"d=round(d);\n",
+"mprintf('Depth upto which soil profile is wetted=%f mm.',d);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.4: EX3_4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.4\n",
+"//calculate\n",
+"//Depth of water required to irrigate the soil\n",
+"clc;\n",
+"//Given\n",
+"Sg=1.6; //Apparent specific gravity\n",
+"Fc=0.2; //Field capacity\n",
+"M1=150; //mass of sample soil\n",
+"M2=136; //mass of sample after drying\n",
+"d=0.9; //depth of soil to be irrigated\n",
+"Mc=(M1-M2)/M2;\n",
+"D=Sg*d*1000*(Fc-Mc);\n",
+"D=round(D);\n",
+"mprintf('Depth of water required to irrigate the soil=%f mm.',D);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.5: EX3_5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.5\n",
+"//calculate Field Capacity\n",
+"clc;\n",
+"//Given\n",
+"d=2; //root zone depth\n",
+"Wc=0.05; //existing water content\n",
+"gammad=15; //dry density of soil\n",
+"gammaw=9.81; //unit weigth of water\n",
+"Vw=500 //water applied to the soil\n",
+"Wl=0.1; //water loss\n",
+"A=1000; //area of plot\n",
+"Vu=Vw*0.9; //volume of water used in soil \n",
+"Wu=Vu*gammaw; //weigth of water used in soil\n",
+"Ws=A*d*gammad; //total dry weigth of soil\n",
+"Wa=Wu*100/Ws; //percent water added\n",
+"Fc=Wc*100+Wa; \n",
+"Fc=round(Fc*100)/100;\n",
+"mprintf('The Field Capacity of soil is=%f percent.',Fc);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.6: EX3_6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.6\n",
+"//calculate\n",
+"//storage capcity of soil\n",
+"//Water depth required to be applied\n",
+"clc;\n",
+"//Given\n",
+"Fc=0.22; //Field Capacity\n",
+"wc=0.1; //wilting coefficient\n",
+"gammad=15; //dry unit weigth of soil\n",
+"gammaw=9.81; //unit wiegth of water\n",
+"d=0.7; //root zone depth\n",
+"w=0.14; //falled moisture content\n",
+"E=0.75; //water application efficiency\n",
+"SC=gammad*d*(Fc-wc)*100/gammaw;\n",
+"D=gammad*d*(Fc-w)*1000/gammaw;\n",
+"FIR=D/E; //Field irrigation requirement\n",
+"SC=round(SC*10)/10;\n",
+"D=round(D);\n",
+"FIR=round(FIR)+1;\n",
+"mprintf('Maximum storage capacity of soil=%f cm.',SC);\n",
+"mprintf('\nWater depth required to be applied=%f mm',D);\n",
+"mprintf('\nField Irrigation Requirement=%f mm',FIR);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.7: EX3_7.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.7\n",
+"//calculate watering frequency\n",
+"clc;\n",
+"//Given\n",
+"Fc=0.27; //Field capacity\n",
+"pwp=0.14; //permanent wilting point\n",
+"gammad=15; //dry density of soil\n",
+"gammaw=9.81; //unit weigth of water\n",
+"d=0.75; //effective depth of root zone\n",
+"Du=11; //daily consumptive use of water\n",
+"Am=Fc-pwp; //Available moisture\n",
+"//let readily available moisture be 80 percent of available moisture\n",
+"RAm=0.8*Am;\n",
+"Mo=Fc-RAm;\n",
+"D=gammad*d*(Fc-Mo)*100/gammaw;\n",
+"WF=D*10/Du;\n",
+"mprintf('Watering Frequency=%i days.',WF);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.8: EX3_8.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.8\n",
+"//calculate\n",
+"//net depth of irrigation water reqiured\n",
+"//time required to irrigate field\n",
+"clc;\n",
+"//given\n",
+"Fc=0.22; //Field capacity\n",
+"Sg=1.56; //Apparent specific gravity\n",
+"d=0.6; //root zone depth\n",
+"//irrigation is started when 70 percent of moisture is used\n",
+"l=250; //length of field\n",
+"b=40; //width of field\n",
+"q=20; //Discharge\n",
+"\n",
+"\n",
+"m=(1-0.7)*Fc;\n",
+"D=Sg*d*(Fc-m)*1000;\n",
+"A=l*b;\n",
+"t=A*D/(q*3600);\n",
+"D=round(D);\n",
+"t=round(t);\n",
+"mprintf('Net depth of irrigation water required=%f mm.',D);\n",
+"mprintf('\nTime required to irrigate field=%f hours.',t);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.9: EX3_9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 3.9\n",
+"//calculate delta for crop\n",
+"clc;\n",
+"//Given\n",
+"B=110; //Base period\n",
+"D=1400; //Duty of water\n",
+"\n",
+"delta=8.64*B*100/D;\n",
+"delta=round(delta);\n",
+"mprintf('Delta for crop is=%f cm.',delta);"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/4-HYDROLOGY.ipynb b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/4-HYDROLOGY.ipynb
new file mode 100644
index 0000000..e70aada
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/4-HYDROLOGY.ipynb
@@ -0,0 +1,3002 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: HYDROLOGY"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.10: EX4_10.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.10\n",
+"//calculate average depth of precipitation using depth area curve\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"I=[25:-1:16]; //isohytes\n",
+"a=[407 1008 1522 1909 2216 2460 2651 2782 2910 2936]; //enclosed area\n",
+"ia(1)=407;\n",
+"for i=2:10\n",
+" ia(i)=a(i)-a(i-1);\n",
+"end\n",
+"r=[25.5:-1:16.5]\n",
+"for i=1:10\n",
+" rv(i)=r(i)*ia(i);\n",
+"end\n",
+"cv(1)=10378;\n",
+"for i=2:10\n",
+" cv(i)=cv(i-1)+rv(i);\n",
+"end\n",
+"for i=1:10\n",
+" eud(i)=cv(i)/a(i); //mean precipitation\n",
+"end\n",
+"\n",
+"mprintf('From depth area curve we obtain average depth of precipitation=24.1 mm for an \narea of 1800 sq. km.');\n",
+"//graph is plotted between eud and a."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.11: EX4_11.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 8.11\n",
+"//calculate\n",
+"//24h max. rainfall with return period of 8,15 and 25.\n",
+"//24h max rainfall with 40%,24% and 8% probability.\n",
+"//probabilty of rainfall of magnitude equal to or exceeding 100 mm.\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"N=20;\n",
+"r=[142 126 116 108 102 95 92 88 86 82 80 78 76 73 71 69 68 66 65 64]; //rainfall in respective years\n",
+"m=[1:1:20]; //ranking of storm\n",
+"for i=1:20\n",
+" p(i)=m(i)*100/(N+1); //probability(percent)\n",
+" T(i)=100/p(i); //recurrence interval\n",
+"end\n",
+"//from frequency curve obtained we get\n",
+"//Part (a)\n",
+"T1=[8 15 25];\n",
+"r1=[119 134 149];\n",
+"mprintf('T(years) Rainfall(mm)');\n",
+"for i=1:3\n",
+" mprintf('\n%i %i',T1(i),r1(i));\n",
+"end\n",
+"\n",
+"//Part (b)\n",
+"p1=[40 24 8];\n",
+"r2=[87 101 130];\n",
+"mprintf('\n\nprobability(percent) Rainfall(mm)');\n",
+"for i=1:3\n",
+" mprintf('\n%i %i',p1(i),r2(i));\n",
+"end\n",
+"//graph is plotted on semi-log graph between r and p\n",
+"\n",
+"mprintf('\n\nFor rainfall=100 m.\nT=4 years.\nProbability=25 percent.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.12: EX4_12.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.12\n",
+"//plot IDF curve for return period of 10,2 and 1 years using california formula\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"t=[5 10 20 30 60 90 120]; //duration\n",
+"//value of P for respective return period is\n",
+"p10=[10.6 14.7 19.3 20.8 25.5 29 34.7]; //rainfall for T=10 years\n",
+"p2=[8.2 10.3 13.2 14.2 16.6 19.4 21.4]; //rainfall for T=2 years\n",
+"p1=[3.5 6.2 8.9 10 13.2 15 16.5]; //rainfall for T=1 year\n",
+"for i=1:7\n",
+" i1(i)=p10(i)*60/t(i); //intensity of rainfall with return period of 10 years\n",
+" i2(i)=p2(i)*60/t(i); //intensity of rainfall with return period of 2 years\n",
+" i3(i)=p1(i)*60/t(i); //intensity of rainfall with return period of 1 year\n",
+"end\n",
+"//graph is plotted between\n",
+"//t and i1\n",
+"//t and i2\n",
+"//t and i3"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.13: EX4_13.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.13\n",
+"//calculate maximum and minimum rainfall\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"N=20;\n",
+"m=[1:1:20]; //rank number\n",
+"rd=[82 78 75 72 70 68 65 63 61 58 56 54 52 50 46 40 36 34 32 30]; //rainfall in decresing order\n",
+"for i=1:20\n",
+" ri(i)=rd(21-i);\n",
+"end\n",
+"for i=1:20\n",
+" T(i)=N/(m(i)-0.5);\n",
+"end\n",
+"//from the curves\n",
+"mprintf('maximum rainfall=79cm for T=15 years.');\n",
+"mprintf('\nminimum rainfall =31 cm for T=15 years.');\n",
+"//graph is plotted between rd and T;ri and T\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.14: EX4_14.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.14\n",
+"//calculate daily lake evaporation\n",
+"//average evaporation for one week\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"w=[12 5 2 -3 1 6 11]; //water added or taken out\n",
+"r=[0 6 8 12 9 5 0]; //rainfall\n",
+"for i=1:7\n",
+" pan(i)=w(i)+r(i); //Pan evaporation\n",
+" le(i)=0.8*pan(i); //lake evaporation\n",
+"end\n",
+"\n",
+"s=0;\n",
+"for i=1:7\n",
+" s=s+le(i);\n",
+"end\n",
+"mprintf('daily lake evaporation(mm):');\n",
+"for i=1:7\n",
+" mprintf('\n%f',le(i));\n",
+"end\n",
+"av=s/7;\n",
+"av=round(av*100)/100;\n",
+"mprintf('\n\naverage evaporation for one week=%f mm.',av);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.15: EX4_15.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.15\n",
+"//calculate average evaporation loss from reservior\n",
+"//total depth and volume of evaporation loss\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Rh=0.4; //relative humidity\n",
+"A=4.8; //average surface spread of reservior\n",
+"v3=18; //wind velocity at 3m above ground\n",
+"es=31.81; //saturated vapour pressure\n",
+"Km=0.36; //for large deep waters\n",
+"\n",
+"//using Meyer's formula\n",
+"ea=es*Rh;\n",
+"v9=v3*(9/3)^(1/7);\n",
+"E=Km*(es-ea)*(1+v9/16);\n",
+"d=7*E;\n",
+"v=d*A*100/1000;\n",
+"E=round(E*10)/10;\n",
+"d=round(d*10)/10;\n",
+"v=round(v*100)/100;\n",
+"mprintf('using Meyers formula:');\n",
+"mprintf('\naverage evaporation loss from reservior=%f mm/day.',E);\n",
+"mprintf('\ntotal depth=%f mm',d);\n",
+"mprintf('\ntotal volume=%f hectare-m.',v);\n",
+"\n",
+"//using Rohwer's formula\n",
+"Pa=760;\n",
+"vdash=(0.6/2)^(1/7)*18;\n",
+"E=0.771*(1.465-0.000732*Pa)*(0.44+0.0733*vdash)*(es-ea);\n",
+"d=7*E;\n",
+"v=d*A*100/1000;\n",
+"E=round(E*10)/10;\n",
+"d=round(d*10)/10;\n",
+"v=round(v*10)/10;\n",
+"mprintf('\n\nusing Rohwers formula:');\n",
+"mprintf('\naverage evaporation loss from reservior=%f mm/day.',E);\n",
+"mprintf('\ntotal depth=%f mm',d);\n",
+"mprintf('\ntotal volume=%f hectare-m.',v);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.16: EX4_16.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.16\n",
+"//plot infiltration capacity curve\n",
+"//calculate constant rate of infiltration\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"D=30; //diameter of inside ring of infiltrometer\n",
+"A=%pi*D^2/4;\n",
+"V=[0 200 470 840 1405 1840 2245 2510 2745 2885 2990 3130 3270]; //cumulative volume;\n",
+"t=[0 2 5 10 20 30 45 60 80 100 120 150 180]; //Time(minutes)\n",
+"dt(1)=0;\n",
+"for i=2:13\n",
+" dt(i)=(t(i)-t(i-1))/60;\n",
+"end\n",
+"for i=1:13\n",
+" F(i)=V(i)/A;\n",
+"end\n",
+"Fd(1)=F(1);\n",
+"for i=2:13\n",
+" Fd(i)=F(i)-F(i-1);\n",
+"end\n",
+"for i=2:13\n",
+" ft(i)=Fd(i)/dt(i); //infirltration rate\n",
+"end\n",
+"//from the graph\n",
+"mprintf('constant rate of infiltration=0.40 cm/hr.');\n",
+"avg10=F(4)*60/10;\n",
+"avg30=F(6)*60/30;\n",
+"avg10=round(avg10*100)/100;\n",
+"avg30=round(avg30*100)/100;\n",
+"mprintf('\naverage rate of infiltration for first 10 min=%f cm/hr.',avg10);\n",
+"mprintf('\naverage rate of infiltration for first 30 min=%f cm/hr.',avg30);\n",
+"//graph is plotted between ft and t"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.17: EX4_17.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.17\n",
+"//calculate\n",
+"//drainage desity\n",
+"//form factor\n",
+"//channel slope\n",
+"//average overland flow length\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"A=82; //area of watershed\n",
+"d=12.6; //distance between outlet and farther most point\n",
+"l=440; //total length of channel\n",
+"e=656; //elevation differnce between outlet and further most point\n",
+"\n",
+"Dd=l/A;\n",
+"ff=A/d^2;\n",
+"cs=e/(d*1000);\n",
+"lo=1000/(2*Dd);\n",
+"Dd=round(Dd*100)/100;\n",
+"ff=round(ff*1000)/1000;\n",
+"mprintf('drainage desity=%f km/square.km.',Dd);\n",
+"mprintf('\nform factor=%f.',ff);\n",
+"mprintf('\nchannel slope=%f.',cs);\n",
+"mprintf('\naverage overland flow length=%i m.',lo);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.18: EX4_18.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.18\n",
+"//compute fi and W index\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"R=3.6; //surface runoff\n",
+"r=[0 1.3 2.8 4.1 3.9 2.8 2.0 1.8 0.9]; //rainfall at respective time\n",
+"t=4; //total time\n",
+"s=0;\n",
+"for i=3:8\n",
+" s=s+r(i)\n",
+"end\n",
+"fi=(s-R*2)/6;\n",
+"//since fi >1.3 and <1.8\n",
+"mprintf('fi index=%f cm.',fi);\n",
+"mprintf('\ncomputations are correct.');\n",
+"\n",
+"s=0;\n",
+"for i=1:9\n",
+" s=s+r(i);\n",
+"end\n",
+"P=s/2;\n",
+"Sr=0;\n",
+"W=(P-R-Sr)/t;\n",
+"mprintf('\nW index=%f cm/hr.',W);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.19: EX4_19.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example4.19\n",
+"//calculate fi index and time of rainfall excess\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"T=[1:1:9]; //time from start\n",
+"r=[0.7 1.4 2.4 3.7 2.9 2.6 1.7 0.8 0.5]; //increamental rainfall\n",
+"R=9.3; //total run-off\n",
+"s=0;\n",
+"for i=1:9\n",
+" s=s+r(i);\n",
+"end\n",
+"ti=s-R;\n",
+"\n",
+"//first trial\n",
+"tr=9; //assumed\n",
+"fi1=ti/tr;\n",
+"//this makes 1st,8th and 9th hour ineffective\n",
+"\n",
+"//second trial\n",
+"tr=6;\n",
+"ti=s-R-r(1)-r(8)-r(9);\n",
+"fi=ti/tr;\n",
+"for i=1:9\n",
+" P(i)=r(i)-fi;\n",
+" if (P(i)<0) then\n",
+" P(i)=0;\n",
+" end\n",
+"end\n",
+"mprintf('Time(h) rainfall excess.');\n",
+"for i=1:9\n",
+" mprintf('\n%f %f',T(i),P(i));\n",
+"end\n",
+"mprintf('\n\nfi index=%f cm/hr.',fi);\n",
+"mprintf('\n\ntime of rainfall excess=%i hours..',tr);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.1: EX4_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.1\n",
+"//calculate mean rainfall;additional guages needed\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"p=[78.8 90.2 98.6 102.4 70.4]; //rain guage readings at respective stations\n",
+"s=0;\n",
+"for i=1:5\n",
+" s=s+p(i);\n",
+"end\n",
+"pavg=s/5;\n",
+"u=0;\n",
+"for i=1:5\n",
+" u=u+(p(i)-pavg)^2;\n",
+"end\n",
+"sx=(u/4)^0.5;\n",
+"Cv=sx*100/pavg;\n",
+"N=(Cv/6)^2;\n",
+"N=round(N*100)/100;\n",
+"mprintf('mean rainfall=%f cm.',pavg);\n",
+"mprintf('\ntotal stations needed=%f.',N);\n",
+"//taking N=7\n",
+"N=7;\n",
+"n=N-5;\n",
+"mprintf('\nadditional guages needed=%i.',n);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.20: EX4_20.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.20\n",
+"//calculate relation between R and P\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"P=[72.2 70.1 73.3 42.5 81.3 50.6 52.9 59.4 60.3 64.3 68.8 56.7 77.2 40.5 44.1 65.5]; //Precipitation\n",
+"R=[24.1 22.7 25.6 11.3 28.4 12.7 13.4 15.7 16.2 17.7 19.2 14.9 25.4 10.6 11.7 17.9]; //runoff\n",
+"for i=1:16\n",
+" Ps(i)=P(i)^2;\n",
+" Rs(i)=R(i)^2;\n",
+" PR(i)=P(i)*R(i);\n",
+"end\n",
+"\n",
+"s=0;t=0;u=0;q=0;w=0;\n",
+"for i=1:16\n",
+" s=s+Ps(i);\n",
+" t=t+Rs(i);\n",
+" u=u+PR(i);\n",
+" q=q+P(i);\n",
+" w=w+R(i);\n",
+"end\n",
+"N=16;\n",
+"a=(N*u-q*w)/(N*s-q^2);\n",
+"b=(w-a*q)/N;\n",
+"b=round(b*1000)/1000;\n",
+"a=round(a*10000)/10000;\n",
+"mprintf('Equation is:\n%fP%f.',a,b);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.21: EX4_21.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example4.21\n",
+"//calculateeffective rainfall hyetograph and volume of diret run-off\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"A=8.6; //catchment area\n",
+"T=[0:0.5:4]; //time\n",
+"r=[0 0.4 1.1 2.3 3.8 4.8 5.6 6.2 6.7]; //accumulated rainfall\n",
+"fi=0.4; //fi index\n",
+"dt=0.5; //time interval\n",
+"d(1)=0;\n",
+"for i=2:9\n",
+" d(i)=r(i)-r(i-1); //accumulated rainfall\n",
+"end\n",
+"mprintf('Intensity of effective Rainfall:');\n",
+"I(1)=0;\n",
+"s=0;\n",
+"for i=2:9\n",
+" p(i)=d(i)-fi; //effective rainfall\n",
+" I(i)=p(i)/dt; //Intensity of effective Rainfall\n",
+" s=s+I(i);\n",
+" mprintf('\n%f',I(i));\n",
+"end\n",
+"//graph is plotted between I and T\n",
+"run=s*dt;\n",
+"V=run*A*10000;\n",
+"mprintf('\nVolume of direct run-off=%f cubic metre.',V);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.22: EX4_22.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.22\n",
+"//calculate\n",
+"//total rainfall\n",
+"//total rainfall excess\n",
+"//W index\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"r=[3.5 6.5 8.5 7.8 6.4 4 4 6]; //rainfall intensity\n",
+"T=[0:30:240]; //time\n",
+"dt=30; //time interval\n",
+"//graph is plotted between r and T\n",
+"s=0;\n",
+"for i=1:8\n",
+" s=s+r(i);\n",
+"end\n",
+"P=s*dt/60;\n",
+"Pe=((6.5-4.5)+(8.5-4.5)+(7.8-4.5)+(6.4-4.5)+(6-4.5))*dt/60; //area of graph above r=4.5.\n",
+"w=(P-Pe)/4;\n",
+"mprintf('total rainfall=%f cm.',P);\n",
+"mprintf('\ntotal rainfall excess=%f cm.',Pe);\n",
+"mprintf('\nW index=%f cm/hr.',w);\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.23: EX4_23.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.23\n",
+"//calculate fi index\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"r=[0 8 22 74 92 105 114 120]; //raccumulated rainfall\n",
+"T=[0 2 4 6 8 10 12 14]; //time for start of rainfall\n",
+"V=2D6; //volume of run-off\n",
+"A=40; //catchment area\n",
+"tr=14; //duration of rainfall\n",
+"\n",
+"d=V*1000/(40*1000000);\n",
+"\n",
+"l=r(8)-d;\n",
+"W=l/tr;\n",
+"for i=2:8\n",
+" I(i)=r(i)-r(i-1); //incremental rainfall\n",
+"end\n",
+"\n",
+"//rainfall excess is available in 4 time intervals of 2 hrs\n",
+"tre=8;\n",
+"fi=(l-I(2)-I(7)-I(8))/tre;\n",
+"fi=round(fi*100)/100;\n",
+"mprintf('fi index=%f mm/hr.',fi);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.24: EX4_24.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.24\n",
+"//calculate average infiltration index\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"r=[2.0 2.5 7.6 3.8 10.6 5.0 7.0 10.0 6.4 3.8 1.4 1.4]; //rainfall depths\n",
+"R=25.5; //total rum-off\n",
+"s=0;\n",
+"for i=1:12\n",
+" s=s+r(i);\n",
+"end\n",
+"tf=s-R;\n",
+"af=tf/12;\n",
+"//rainfall is less than average infiltration in1st,2nd,11th and 12th hours\n",
+"\n",
+"f=(tf-r(1)-r(2)-r(11)-r(12))/8;\n",
+"f=round(f*10)/10;\n",
+"mprintf('average infiltration index=%f cm/hour.',f);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.25: EX4_25.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.25\n",
+"//calculate average depth of hourly rainfall excess\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"r=[2.0 2.5 7.6 3.8 10.6 5.0 7.0 10.0 6.4 3.8 1.4 1.4]; //rainfall depths\n",
+"A1=20;\n",
+"A2=40;\n",
+"A3=60;\n",
+"A=A1+A2+A3;\n",
+"fi1=7.6;\n",
+"fi2=3.8;\n",
+"fi3=1.0;\n",
+"for i=1:12\n",
+" R1(i)=r(i)-fi1; //rainfall excess\n",
+" R2(i)=r(i)-fi2;\n",
+" R3(i)=r(i)-fi3;\n",
+" if (R1(i)<0) then\n",
+" R1(i)=0;\n",
+"end\n",
+"if (R2(i)<0) then\n",
+" R2(i)=0;\n",
+"end\n",
+"if (R3(i)<0) then\n",
+" R3(i)=0;\n",
+"end\n",
+"end\n",
+"mprintf('average depth of hourly rainfall excess(cm/hr)');\n",
+"for i=1:12\n",
+" a1(i)=R1(i)*A1/A; //average rainfall excess\n",
+" a2(i)=R2(i)*A2/A;\n",
+"a3(i)=R3(i)*A3/A;\n",
+"T(i)=a1(i)+a2(i)+a3(i); //total hourly rainfall excess\n",
+"T(i)=round(T(i)*100)/100;\n",
+"mprintf('\n%f',T(i));\n",
+"end\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.26: EX4_26.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example4.26\n",
+"//derive the unit hydrograph\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"A=92; //area of drainage basin\n",
+"t=[6 8 10 12 14 16 18 20 22 24 2 4 6 8 10 12 14 16]; //time\n",
+"r=[10.6 9.7 107.8 175.6 193.9 150.3 126.2 106.9 90 72.8 58.2 48 36.2 28.4 20.2 14 10.2 10.4]; //total run-off\n",
+"B=[10.6 9.7 9.73 9.77 9.8 9.83 9.87 9.9 9.93 9.97 10 10.03 10.07 10.10 10.13 10.16 10.20 10.40]; //base flow\n",
+"s=0;\n",
+"for i=1:18\n",
+" d(i)=r(i)-B(i); //direct run-off ordinate\n",
+"s=s+d(i);\n",
+"end\n",
+"n=0.36*s*2/A;\n",
+"mprintf('ordinates of unit hydrograph:');\n",
+"for i=1:18\n",
+" u(i)=d(i)/n; //ordinates of unit hydrograph\n",
+" u(i)=round(u(i)*100)/100;\n",
+" mprintf('\n%f',u(i));\n",
+"end\n",
+"mprintf('\nHydograph is 4-hr unit hydrograph');\n",
+"//graph is plotted between:\n",
+"//r and t\n",
+"//u and t"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.27: EX4_27.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.27\n",
+"//calculate rainfall excess\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"A=316; //drainage area\n",
+"B=17; //base flow\n",
+"t=6;\n",
+"O=[17.0 113.2 254.5 198.0 150.0 113.2 87.7 67.9 53.8 42.5 31.1 22.6 17.0]; //ordinates of storm hydrograph\n",
+"for i=1:13\n",
+" Or(i)=O(i)-B; //ordinates of direct run-off\n",
+" Oh(i)=Or(i)/6.477; //ordinates of unit hydrograph\n",
+"end\n",
+"s=0;\n",
+"for i=1:13\n",
+" s=s+Or(i);\n",
+"end\n",
+"re=s*60*60*t/(A*10000);\n",
+"re=round(re*1000)/1000;\n",
+"mprintf('rainfall excess=%f cm.',re);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.28: EX4_28.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.28\n",
+"//calculate ordinates of storm hydrograph\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"fi=2.5; //infiltration index\n",
+"B=10; //Base flow\n",
+"O=[0 110 365 500 390 310 250 235 175 130 95 65 40 22 10 0 0 0]; //ordinates of unit hydrograph\n",
+"R1=2;R2=6.75;R3=3.75;\n",
+"r1=(R1*10-(fi*3)-5)/10; //rainfall excess in first three hour\n",
+"r2=(R2*10-(fi*3))/10; //rainfall excess in second three hour\n",
+"r3=(R3*10-(fi*3))/10; //rainfall excess in third three hour\n",
+"\n",
+"for i=1:18\n",
+" s1(i)=r1*O(i); \n",
+"end\n",
+"for i=2:18\n",
+" s2(i)=r2*O(i-1);\n",
+"end\n",
+"for i=3:18\n",
+" s3(i)=r3*O(i-2);\n",
+"end //surface run-off from rainfall excess during succesive unit periods\n",
+"mprintf('ordinates of storm hydrograph');\n",
+"for i=1:18\n",
+" T(i)=s1(i)+s2(i)+s3(i);\n",
+" t(i)=T(i)+B;\n",
+" t(i)=round(t(i)*10)/10;\n",
+" mprintf('\n%f',t(i));\n",
+"end\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.29: EX4_29.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example4.29\n",
+"//derive and plot 6 hr unit hydrograph\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"A=103.4; //area of basin\n",
+"t=[0:3:36]; //time\n",
+"q=[0 21 80 82 189 123 184 87 55.5 25.25 9 6 0]; //flow\n",
+"mprintf('ordinates of unit hydrograph are:');\n",
+"u(1)=0;\n",
+"u(2)=q(2)/2;\n",
+"u(3)=(q(3)-4*u(1))/2;\n",
+"u(4)=(q(4)-4*u(2))/2;\n",
+"for i=5:9\n",
+" u(i)=(q(i)-3*u(i-4)-4*u(i-2))/2; //ordinates of unit hydrograph\n",
+"end\n",
+"for i=1:9\n",
+" mprintf('\n%f',u(i));\n",
+"end\n",
+"mprintf('\n\nThe succesive unit hydrograph will have same ordinates but will be shifted\nlaterally by 6 hrs.');\n",
+"//graph is plotted between u and t."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.2: EX4_2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.2\n",
+"//calculate precipitation at A using arithmatic mean method\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"pB=48; //precipitation at B\n",
+"pC=51; //precpitation at C\n",
+"pD=45; //precipitation at D\n",
+"\n",
+"pA=(pB+pC+pD)/3;\n",
+"mprintf('precipitation at A=%i mm.',pA);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.30: EX4_30.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.30\n",
+"//derive ordinates of 6 hrs unit hydrograph\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"R=[0 1 2.7 5 8 9.8 9 7.5 6.3 5 4 2.9 2.1 1.3 0.5 0 0 0 0 0]; //2hrs unit hydrograph\n",
+"mprintf('ordinates of 6 hrs unit hydrograph');\n",
+"for i=1:18\n",
+" O1(i+2)=R(i);\n",
+" \n",
+" \n",
+"end\n",
+"for i=1:16\n",
+" O2(i+4)=R(i);\n",
+"end //offset unit hydrograph\n",
+"for i=1:20\n",
+" S(i)=O1(i)+O2(i)+R(i); //sum\n",
+" f(i)=S(i)/3; //ordinates of 6 hrs unit hydrograph\n",
+" f(i)=round(f(i)*10)/10;\n",
+" mprintf('\n%f',f(i));\n",
+"end\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.31: EX4_31.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.31\n",
+"//calculate ordinate of 9 hr unit hydrograph\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"t=[0:3:45]; //time\n",
+"O=[0 9 20 35 49 43 35 28 22 17 12 9 6 3 0 0]; //ordinate of 2 hr unit hydrograph\n",
+"of(1)=0;\n",
+"of(2)=0;\n",
+"for i=3:16\n",
+" of(i)=O(i-2)+of(i-2); //offset ordinate\n",
+"end \n",
+"for i=1:16\n",
+" s(i)=O(i)+of(i); //ordinate of s-curve\n",
+"end \n",
+"of1(3)=0; \n",
+"for i=4:16\n",
+" of1(i)=s(i-3); //offset of s-curve\n",
+"end\n",
+"mprintf('ordinates of 9 hrs unit hydrograph:');\n",
+"for i=1:16\n",
+" y(i)=s(i)-of1(i);\n",
+" u(i)=2*y(i)/3; //ordinate of 9 hrs unit hydrograph\n",
+" u(i)=round(u(i)*10)/10;\n",
+" mprintf('\n%f',u(i));\n",
+"end\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.32: EX4_32.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.32\n",
+"//calculate recurrence interval of flood using\n",
+"//california method\n",
+"//Hazens method\n",
+"//gumbels method\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"q=[9200 7800 6600 5800 5260 4980 4525 3810 3630 3250 3110 3090 2380 2390 1723]; //Discharge arranged in decreasing order\n",
+"N=15;\n",
+"C=0.3;\n",
+"m=[1:1:15];\n",
+"C=[0.3 0.44 0.52 0.57 0.61 0.66 0.7 0.74 0.78 0.82 0.86 0.88 0.94 0.96 1]; //from table 4.25\n",
+"mprintf('California Hazen Gumbel');\n",
+"for i=1:15\n",
+" Ca(i)=N/m(i);\n",
+" H(i)=2*N/(2*m(i)-1);\n",
+" G(i)=N/(m(i)+C(i)-1);\n",
+" Ca(i)=round(Ca(i)*100)/100;\n",
+" G(i)=round(G(i)*100)/100;\n",
+" H(i)=round(H(i)*100)/100;\n",
+" mprintf('\n%f %f %f',Ca(i),H(i),G(i));\n",
+"end\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.33: EX4_33.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.33\n",
+"//calculate flood magnitude with return period of 240 years\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"T1=40;T2=80; //Return period\n",
+"F1=27000;F2=31000; //Peak flood\n",
+"y80=-(2.303*log10(2.303*log10(T2/(T2-1))));\n",
+"y40=-(2.303*log10(2.303*log10(T1/(T1-1))));\n",
+"y=(F2-F1)/(y80-y40);\n",
+"T=240;\n",
+"y240=-(2.303*log10(2.303*log10(T/(T-1))));\n",
+"x240=F2+(y240-y80)*y;\n",
+"mprintf('flood magnitude with return period of 240 years=%i cumec.',x240);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.34: EX4_34.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.34\n",
+"//calculate flood discharge with recurrence period of 100 years and 200 years\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"N=40;\n",
+"Sn=1.1413;yn=0.5436; //from table 4.21 (a) and(b)\n",
+"q=[1330 1095 1030 980 975 950 945 940 925 855 853 840 835 825 810 795 756 710 708 705 700 670 625 620 610 605 595 585 570 550 530 505 500 495 485 465 460 420 390 380]; //discharge\n",
+"s=0;\n",
+"for i=1:40\n",
+" s=s+q(i);\n",
+" end\n",
+"xavg=s/N;\n",
+"w=0;\n",
+"for i=1:40\n",
+" t(i)=(q(i)-xavg)^2;\n",
+" w=w+t(i);\n",
+"end\n",
+"sigma=(w/(N-1))^0.5;\n",
+"N=10;\n",
+"y10=-(2.303*log10(2.303*log10(N/(N-1))));\n",
+"K10=(y10-yn)/Sn;\n",
+"x10=xavg+K10*sigma;\n",
+"N=20;\n",
+"y20=-(2.303*log10(2.303*log10(N/(N-1))));\n",
+"K20=(y20-yn)/Sn;\n",
+"x20=xavg+K20*sigma;\n",
+"N=5;\n",
+"y5=-(2.303*log10(2.303*log10(N/(N-1))));\n",
+"K5=(y5-yn)/Sn;\n",
+"x5=xavg+K5*sigma;\n",
+"\n",
+"T=100;\n",
+"y100=-(2.303*log10(2.303*log10(T/(T-1))));\n",
+"K100=(y100-yn)/Sn;\n",
+"x100=xavg+K100*sigma;\n",
+"\n",
+"T=200;\n",
+"y200=-(2.303*log10(2.303*log10(T/(T-1))));\n",
+"K200=(y200-yn)/Sn;\n",
+"x200=xavg+K200*sigma;\n",
+"x100=round(x100);\n",
+"mprintf('For T=100 years:\nflood discharge=%f cumecs.\n\nFor T=200 years:\nflood discharge=%i cumecs.',x100,x200);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.35: EX4_35.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.35\n",
+"//calculate 200 year flood for stream using gumbel's method\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"sigma=1.1413; //standard deviation\n",
+"yn=0.5436;\n",
+"T=50;\n",
+"y50=-2.303*log10(2.303*log10(T/(T-1)));\n",
+"K50=(y50-yn)/sigma;\n",
+"T=100;\n",
+"y100=-2.303*log10(2.303*log10(T/(T-1)));\n",
+"K100=(y100-yn)/sigma;\n",
+"x50=878; x100=970; //given peak flood\n",
+"A=[K50 1;K100 1];\n",
+"B=[x50;x100];\n",
+"C=A\B;\n",
+"xavg=C(2);\n",
+"sigmad=C(1);\n",
+"T=200;\n",
+"y200=-2.303*log10(2.303*log10(T/(T-1)));\n",
+"K200=(y200-yn)/sigma;\n",
+"x200=xavg+K200*sigmad;\n",
+"x200=round(x200);\n",
+"mprintf('200 year flood for stream=%f cumecs.',x200);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.36: EX4_36.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.36\n",
+"//calculate\n",
+"//risk of failure of cofferdam\n",
+"//return period\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"T=30; //deign for period\n",
+"n=6; //period of construction\n",
+"R=(1-(1-(1/T))^n)*100;\n",
+"R1=0.1; //reduced risk\n",
+"T1=1/(1-(1-R1)^(1/6));\n",
+"R=round(R*10)/10;\n",
+"T1=round(T1*100)/100;\n",
+"mprintf('risk of failure of cofferdam=%f percent.',R);\n",
+"mprintf('\nreturn period=%f years.',T1);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.37: EX4_37.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.37\n",
+"//calculate\n",
+"//probability of excedence\n",
+"//probability of flood magnitude occuring at:\n",
+"//at least once in 10 years\n",
+"//two times in 10 succesive years\n",
+"//once in 10 succesive years\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"T=40; //return period\n",
+"P=1/T;\n",
+"n=10;\n",
+"Rsk=1-(1-P)^n;\n",
+"s=1;t=1;\n",
+"for i=1:n\n",
+" s=s*i;\n",
+"end\n",
+"for i=1:(n-2)\n",
+" t=t*i;\n",
+"end\n",
+"P2n=s*P^2*(1-P)^8/(t*2);\n",
+"P1n=n*P*(1-P)^(n-1);\n",
+"Rsk=round(Rsk*1000)/1000;\n",
+"P2n=round(P2n*10000)/10000;\n",
+"P1n=round(P1n*1000)/1000;\n",
+"mprintf('probability of excedence=%f.',P);\n",
+"mprintf('\nprobability of flood magnitude occuring at least once in 10 years=%f',Rsk);\n",
+"mprintf('\nprobability of flood magnitude occuring at two times in 10 succesive years=%f',P2n);\n",
+"mprintf('\nprobability of flood magnitude occuring at once in 10 succesive years=%f',P1n);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.38: EX4_38.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.38\n",
+"//calculate peak rate of run off\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"C1=0.22;C2=0.12;C3=0.32; //run-off coefficient\n",
+"A1=3.2;A2=4.8;A3=1.8; //calculated area\n",
+"L=2.4; //length of water course\n",
+"H=30; //fall\n",
+"T=30; //frequency\n",
+"t=60*0.000323*(L*1000)^0.77*(H/(L*1000))^(-0.385);\n",
+"i=78*T^0.22/(t+12)^0.45;\n",
+"q=2.778*i*(C1*A1+C2*A2+C3*A3);\n",
+"q=round(q*10)/10;\n",
+"mprintf('peak rate of run off=%f cumecs.',q);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.39: EX4_39.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.39\n",
+"//calculate peak flow rate\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"T=30; //return period\n",
+"A=2.4; //area of watershed\n",
+"s=1/200; //slope oof catchment\n",
+"L=1.8; //length of travel of water\n",
+"C=0.25; //average run-off coefficient\n",
+"r=[2.5 3.8 4.8 5.9 6.7 7.4 8.4 8.7 9.2]; //rsinfall depth\n",
+"t=60*0.000323*(L*1000)^0.77*(s)^(-0.385); \n",
+"rmax=r(7)+(r(8)-r(7))*7.84/10;\n",
+"i=rmax*60/t;\n",
+"q=2.778*C*A*i;\n",
+"q=round(q*100)/100;\n",
+"mprintf('peak flow rate=%f cumecs.',q);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3: EX4_3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.3\n",
+"//calculate precipitation at x\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"pA=6.6; //precipitation at A\n",
+"pB=4.8; //precpitation at B\n",
+"pC=3.7; //precipitation at C\n",
+"nA=72.6; //normal precipitation at A\n",
+"nB=51.8; //normal precipitation at B\n",
+"nC=38.2; //normal precipitation at C\n",
+"nX=65.6; //normal precipitation at X\n",
+"\n",
+"pX=(nX*pA/nA+nX*pB/nB+nX*pC/nC)/3;\n",
+"pX=round(pX*100)/100;\n",
+"mprintf('precipitation at x=%f cm.',pX);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.40: EX4_40.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.40\n",
+"//calculate precipitation at x\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"pA=75; //precipitation at A\n",
+"pB=58; //precpitation at B\n",
+"pC=47; //precipitation at C\n",
+"nA=826; //normal precipitation at A\n",
+"nB=618; //normal precipitation at B\n",
+"nC=482; //normal precipitation at C\n",
+"nX=757; //normal precipitation at X\n",
+"\n",
+"pX=(nX*pA/nA+nX*pB/nB+nX*pC/nC)/3;\n",
+"pX=round(pX*10)/10;\n",
+"mprintf('precipitation at x=%f cm.',pX);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.41: EX4_41.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.1\n",
+"//calculate mean rainfall;additional guages needed\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"p=[41 51 32 55 50 68]; //rain guage readings at respective stations\n",
+"s=0;\n",
+"for i=1:6\n",
+" s=s+p(i);\n",
+"end\n",
+"pavg=s/6;\n",
+"u=0;\n",
+"for i=1:6\n",
+" u=u+(p(i)-pavg)^2;\n",
+"end\n",
+"sx=(u/5)^0.5;\n",
+"Cv=sx*100/pavg;\n",
+"N=(Cv/8)^2;\n",
+"N=round(N*100)/100;\n",
+"mprintf('mean rainfall=%f cm.',pavg);\n",
+"mprintf('\ntotal stations needed=%f.',N);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.42: EX4_42.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.42\n",
+"//calculate mean precipitaion using thiesson polygon method\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"a=4; //dimension of plot sides\n",
+"P1=4.8;P2=13;P3=8;P4=5.4;P5=3.2;P6=9.4; //precipitaion at respective stations\n",
+"A1=a^2/8+a^2/(4*1.73);\n",
+"A2=a^2/8;\n",
+"A3=A2;A4=A1;\n",
+"A5=a^2/(4*1.73);\n",
+"A6=a^2/2;\n",
+"A=A1+A2+A3+A4+A5+A6;\n",
+"Pavg=(P1*A1+P2*A2+P3*A3+P4*A4+P5*A5+P6*A6)/A;\n",
+"mprintf('Mean precipitaion=%f cm.',Pavg);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.43: EX4_43.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.43\n",
+"//calculate average depth of precipitation\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"A=[90 140 125 140 85 40 20]; //area of isohytes\n",
+"I=[13:-2:1]; //average isohytel interval\n",
+"s=0;t=0;\n",
+"for i=1:7\n",
+" s=s+A(i)*I(i);\n",
+" t=t+A(i);\n",
+"end\n",
+"Pavg=s/t;\n",
+"Pavg=round(Pavg*10)/10;\n",
+"mprintf(' average depth of precipitation=%f cm.',Pavg);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.44: EX4_44.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.44\n",
+"//calculate mean rainfall;additional guages needed\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"p=[120 95 96 60 65 70 45 21]; //rain guage readings at respective stations\n",
+"s=0;\n",
+"for i=1:8\n",
+" s=s+p(i);\n",
+"end\n",
+"pavg=s/8;\n",
+"u=0;\n",
+"for i=1:8\n",
+" u=u+(p(i)-pavg)^2;\n",
+"end\n",
+"sx=(u/7)^0.5;\n",
+"Cv=sx*100/pavg;\n",
+"N=(Cv/13.99)^2;\n",
+"N=round(N*100)/100;\n",
+"mprintf('mean rainfall=%f cm.',pavg);\n",
+"mprintf('\ntotal stations needed=%f.',N);\n",
+"//taking N=10\n",
+"N=10;\n",
+"n=N-8;\n",
+"mprintf('\nadditional guages needed=%i.',n);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.45: EX4_45.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.45\n",
+"//compute maximum rainfall intensities for 5,10,15,20,25,30,35,40,45,50 minutes\n",
+"//plot intensity duration graph\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"CR=[0 1.02 2.08 3.30 4.72 5.58 6.40 7.16 7.88 8.54 9.14]; //cumulative rainfall\n",
+"\n",
+"c5(2)=CR(2);\n",
+"c10(3)=CR(3);\n",
+"c15(4)=CR(4);\n",
+"c20(5)=CR(5);\n",
+"c25(6)=CR(6);\n",
+"c30(7)=CR(7);\n",
+"c35(8)=CR(8);\n",
+"c40(9)=CR(9);\n",
+"c45(10)=CR(10);\n",
+"c50(11)=CR(11);\n",
+"for i=3:11\n",
+" c5(i)=CR(i)-CR(i-1);\n",
+"end\n",
+"for i=4:11\n",
+" c10(i)=CR(i)-CR(i-2);\n",
+"end\n",
+"for i=5:11\n",
+" c15(i)=CR(i)-CR(i-3);\n",
+"end\n",
+"for i=6:11\n",
+" c20(i)=CR(i)-CR(i-4);\n",
+"end\n",
+"for i=7:11\n",
+" c25(i)=CR(i)-CR(i-5);\n",
+"end\n",
+"for i=8:11\n",
+" c30(i)=CR(i)-CR(i-6);\n",
+"end\n",
+"for i=9:11\n",
+" c35(i)=CR(i)-CR(i-7);\n",
+"end\n",
+"for i=10:11\n",
+" c40(i)=CR(i)-CR(i-8);\n",
+"end\n",
+"for i=11:11\n",
+" c45(i)=CR(i)-CR(i-9);\n",
+"end //rainfall in any possible time interval\n",
+"\n",
+"mprintf('5min 10min 15min 20min 25min 30min 35min 40min 45min 50min');\n",
+"for i=1:11\n",
+" mprintf('\n%f %f %f %f %f %f %f %f %f %f',c5(i),c10(i),c15(i),c20(i),c25(i),c30(i),c35(i),c40(i),c45(i),c50(i));\n",
+"end\n",
+"I=[17.04 15.84 14.80 14.16 13.39 12.80 12.27 11.82 11.39 10.97]; //maximum intensity at respective durations\n",
+"D=[5:5:50]; //durations\n",
+"//graph is plotted between I and D"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.46: EX4_46.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.46\n",
+"//draw storm hyetograph and intensity duration curve\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"p=[0 5 7.5 8.5 9]; //accumulated precipitation\n",
+"t=[0 30 60 90 120]; //time\n",
+"r(1)=0;\n",
+"mprintf('Rainfall intensity:');\n",
+"for i=2:5\n",
+" r(i)=p(i)-p(i-1); //rainfall in succesive 30 min interval\n",
+" I(i)=r(i)*60/30; //rainfall intensity\n",
+" mprintf('\n%f',I(i));\n",
+"end\n",
+"//graph is plotted between I and t.\n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.47: EX4_47.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.47\n",
+"//calculate average depth of precipitation using depth area curve\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"I=[21:-1:12]; //isohytes\n",
+"a=[543 1345 2030 2545 2955 3280 3535 3710 3880 3915]; //enclosed area\n",
+"ia(1)=543;\n",
+"for i=2:10\n",
+" ia(i)=a(i)-a(i-1); //net incremental area between isohytes\n",
+"end\n",
+"r=[21.5:-1:12.5]\n",
+"for i=1:10\n",
+" rv(i)=r(i)*ia(i); //rainfall volume\n",
+"end\n",
+"cv(1)=11675;\n",
+"for i=2:10\n",
+" cv(i)=cv(i-1)+rv(i); //cumulative volume\n",
+"end\n",
+"for i=1:10\n",
+" eud(i)=cv(i)/a(i); //depth(mm)\n",
+"end\n",
+"\n",
+"mprintf('From depth area curve we obtain average depth of precipitation=20.15 mm for an\narea of 2400 sq. km.');\n",
+"//graph is plotted between eud and a"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.48: EX4_48.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.48\n",
+"//calculate evaporation from reservior surface during the week\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"h1=7.75; //initial depth of water\n",
+"r=3.80; //rainfall during the week\n",
+"hr=2.50; //depth of water removed\n",
+"C=0.7; //pan coefficient\n",
+"ha=r-hr;\n",
+"hl=ha+h1;\n",
+"h2=8.32;\n",
+"ev=hl-h2;\n",
+"evs=ev*C;\n",
+"evs=round(evs*100)/100;\n",
+"mprintf('evaporation from reservior surface during the week=%f cm.',evs);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.49: EX4_49.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example4.49\n",
+"//calculate fi index and time of rainfall excess\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"T=[1:1:12]; //time from start\n",
+"r=[1.8 2.6 7.8 3.9 10.6 5.4 7.8 9.2 6.5 4.4 1.8 1.6]; //increamental rainfall\n",
+"R=24.4; //total run-off\n",
+"s=0;\n",
+"for i=1:12\n",
+" s=s+r(i);\n",
+"end\n",
+"ti=s-R;\n",
+"\n",
+"//first trial\n",
+"tr=7; //assumed\n",
+"ti=s-R-r(1)-r(2)-r(4)-r(11)-r(12);\n",
+"fi=ti/tr;\n",
+"for i=1:12\n",
+" P(i)=r(i)-fi;\n",
+" if (P(i)<0) then\n",
+" P(i)=0;\n",
+" end\n",
+"end\n",
+"mprintf('Time(h) rainfall excess.');\n",
+"for i=1:12\n",
+" mprintf('\n%f %f',T(i),P(i));\n",
+"end\n",
+"mprintf('\n\nfi index=%f cm/hr.',fi);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.4: EX4_4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.4\n",
+"//calculate precipitation at A by inverse distance method\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"pB=74; //precipitation at B\n",
+"pC=88; //precpitation at C\n",
+"pD=71; //precipitation at D\n",
+"pE=80; //precipitation at E\n",
+"Bx=9;By=6;\n",
+"Cx=12;Cy=-9;\n",
+"Dx=-11;Dy=-6;\n",
+"Ex=-7;Ey=7;\n",
+"Ax=0;Ay=0;\n",
+"Db=(Bx^2+By^2);\n",
+"Dc=(Cx^2+Cy^2);\n",
+"Dd=(Dx^2+Dy^2);\n",
+"De=(Ex^2+Ey^2);\n",
+"Wb=1/Db;\n",
+"Wc=1/Dc;\n",
+"Wd=1/Dd;\n",
+"We=1/De;\n",
+"s=pB*Wb+pC*Wc+pD*Wd+pE*We;\n",
+"pA=s/(Wb+Wc+Wd+We);\n",
+"pA=round(pA*10)/10;\n",
+"mprintf('precipitation at A=%f mm.',pA);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.50: EX4_50.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.50\n",
+"//calculate fi index\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"r=[0.6 1.35 2.25 3.45 2.7 2.4 1.5 0.75]; //incremental rainfall\n",
+"T=[1:1:8]; //time from start of rainfal\n",
+"t=8;\n",
+"P=15; //total rainfall\n",
+"R=8.7; //direct run-off\n",
+"W=(P-R)/t;\n",
+"//since fi wil be more than W\n",
+"tre=6;\n",
+"fi=((P-R)-r(1)-r(8))/tre;\n",
+"mprintf('fi index=%f cm/hr.',fi);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.51: EX4_51.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 4.51\n",
+"//calculate total infiltration depth lasting 6 hrs\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"I=10; //total infiltration rate\n",
+"fI=5; //final infiltration rate\n",
+"k=0.95; //rate of decay of difference between final and initial infiltration rate\n",
+"\n",
+"q=integrate('fI+(I-fI)*%e^(-k*t)','t',0,6);\n",
+"q=round(q*100)/100;\n",
+"mprintf('total infiltration depth=%f mm.',q);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.52: EX4_52.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 4.52\n",
+"//find the equation of infiltration capacity\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"fc=1; //constant infiltration rate\n",
+"ft=[10.4 5.6 3.2 2.1 1.5 1.2 1.1 1 1]; //infiltration capacity\n",
+"f=ft(1)-fc;\n",
+"t=[0:0.25:2];\n",
+"\n",
+"for i=1:9\n",
+" r(i)=ft(i)-fc;\n",
+" \n",
+"end\n",
+"for i=1:7\n",
+" h(i)=log10(r(i));\n",
+"end\n",
+"s=0.775; //from graph\n",
+"k=1/(log10(%e)*s);\n",
+"k=round(k*100)/100;\n",
+"mprintf('Equation is:\nft=fc+%fe^(-%ft)',f,k);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.53: EX4_53.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.53\n",
+"//calculate\n",
+"//total rainfall\n",
+"//net run-off\n",
+"//W index\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"r=[2 2 8 7 1.25 1.25 4.5]; //rainfall intensity\n",
+"T=[15 30 45 60 70 90 105]; //time\n",
+"dt=15; //time interval\n",
+"fi=3; //fi index\n",
+"//graph is plotted between r and T\n",
+"s=0;\n",
+"for i=1:7\n",
+" s=s+r(i);\n",
+"end\n",
+"P=s*dt/60;\n",
+"Pe=((8-3)+(7-3)+(4.5-3))*dt/60; //area of graph above r=3.0.\n",
+"w=(P-Pe)/(105/60);\n",
+"w=round(w*1000)/1000;\n",
+"mprintf('total rainfall=%f cm.',P);\n",
+"mprintf('\nnet run-off=%f cm.',Pe);\n",
+"mprintf('\nW index=%f cm/hr.',w);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.54: EX4_54.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.54\n",
+"//calculate Total rainfall in catchment\n",
+"//run-off by rainfall of 3.3cm in 3hrs\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"A=[36 18 66]; //area of catchment\n",
+"fi=[0.9 1.1 0.5]; //fi index\n",
+"r1=[0.6 0.9 1.0]; //rainfall in first hour\n",
+"r2=[2.4 2.1 2.0]; //rainfall in second hour\n",
+"r3=[1.3 1.5 0.9]; //rainfall in third hour\n",
+"\n",
+"t36=r1(1)+r2(1)+r3(1);\n",
+"t18=r1(2)+r2(2)+r3(2);\n",
+"t66=r1(3)+r2(3)+r3(3);\n",
+"\n",
+"p=(t36*A(1)+t18*A(2)+t66*A(3))/(A(1)+A(2)+A(3));\n",
+"mprintf('Total rainfall in catchment=%f cm.',p);\n",
+"\n",
+"ro1=[0 0 0.5];ro2=[1.5 1.0 1.5];ro3=[0.4 0.4 0.4]; //rainfall-fi\n",
+"t1=ro1(1)+ro2(1)+ro3(1);\n",
+"t2=ro1(2)+ro2(2)+ro3(2);\n",
+"t3=ro1(3)+ro2(3)+ro3(3);\n",
+"run=(A(1)*t1+A(2)*t2+A(3)*t3)/(A(1)+A(2)+A(3)); //run-off from entire catchment\n",
+"mprintf('\nrun-off by rainfall of 3.3cm in 3hrs=%f cm.',run);\n",
+"fia=(fi(1)*A(1)+fi(2)*A(2)+fi(3)*A(3))/(A(1)+A(2)+A(3));\n",
+"tr=(1.1-fia)*3;\n",
+"mprintf('\nTotal run-off=%f cm.',tr);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.55: EX4_55.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.55\n",
+"//calculate relation between R and P\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"P=[4 22 28 15 12 8 4 15 10 5]; //Precipitation\n",
+"R=[0.2 7.1 10.9 4.0 3.0 1.3 0.4 4.1 2.0 0.3]; //runoff\n",
+"for i=1:10\n",
+" Ps(i)=P(i)^2;\n",
+" Rs(i)=R(i)^2;\n",
+" PR(i)=P(i)*R(i);\n",
+"end\n",
+"\n",
+"s=0;t=0;u=0;q=0;w=0;\n",
+"for i=1:10\n",
+" s=s+Ps(i);\n",
+" t=t+Rs(i);\n",
+" u=u+PR(i);\n",
+" q=q+P(i);\n",
+" w=w+R(i);\n",
+"end\n",
+"N=10;\n",
+"a=(N*u-q*w)/(N*s-q^2);\n",
+"b=(w-a*q)/N;\n",
+"a=round(a*10000)/10000;\n",
+"b=round(b*10000)/10000;\n",
+"mprintf('Equation is:\n%fP%f.',a,b);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.56: EX4_56.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.56\n",
+"//calculate peak discharge of 6 hrs unit hydrograph\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=470; //peak discharge of flood hydrograph\n",
+"B=15; //base flow\n",
+"l=0.25; //infiltration loss\n",
+"Qr=Q-B;\n",
+"d=8; //average depth of rainfall\n",
+"re=d-l*6; //rainfall excess\n",
+"q=Qr/re;\n",
+"mprintf('peak discharge of 6 hrs unit hydrograph=%i cumecs.',q);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.57: EX4_57.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.57\n",
+"//calculate ordinates of storm hydrograph\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"fi=0.25; //infiltration index\n",
+"B=20; //Base flow\n",
+"O=[0 20 60 150 120 90 70 50 30 20 10 0 0 0]; //ordinates of unit hydrograph\n",
+"R1=5;R2=0.8;R3=3;\n",
+"r1=R1-(fi*4); //rainfall excess in first four hour\n",
+"r2=R2-(fi*4); //rainfall excess in second four hour\n",
+"r3=R3-(fi*4); //rainfall excess in third four hour\n",
+"if r2<0\n",
+" r2=0;\n",
+" end \n",
+"\n",
+"for i=1:14\n",
+" s1(i)=r1*O(i);\n",
+"end\n",
+"for i=2:14\n",
+" s2(i)=r2*O(i-1);\n",
+"end\n",
+"for i=3:14\n",
+" s3(i)=r3*O(i-2);\n",
+"end //surface run-off from rainfall excess during succesive unit periods\n",
+"mprintf('ordinates of storm hydrograph');\n",
+"for i=1:14\n",
+" T(i)=s1(i)+s2(i)+s3(i); //sub-total\n",
+" t(i)=T(i)+B; //ordinate of flood hydrograph\n",
+" mprintf('\n%i',t(i));\n",
+"end"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.58: EX4_58.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.58\n",
+"//calculate ordinates of discharge hydrograph and peak discharge\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"fi=2.5; //fi index\n",
+"t=24;\n",
+"A=200; //area of catchment\n",
+"R1=7.5;R2=2.0;R3=5; //rainfall\n",
+"r1=R1-fi;r2=R2-fi;r3=R3-fi;\n",
+"r2=0;\n",
+"r=[5 0 2.5]; //excess rainfall\n",
+"D=[5 15 40 25 10 5 0 0 0]; //distribution\n",
+"for i=1:9\n",
+" d1(i)=D(i)*r(1)/100;\n",
+"end\n",
+"for i=1:8\n",
+" d2(i+1)=D(i)*r(2)/100;\n",
+"end\n",
+"for i=1:7\n",
+" d3(i+2)=D(i)*r(3)/100;\n",
+"end //distribution run-off for rainfall excess\n",
+"\n",
+"for i=1:9\n",
+" tr1(i)=d1(i)+d2(i)+d3(i); //total run-off as depth\n",
+" tr2(i)=23.148*tr1(i); //total run-off as discharge\n",
+" tr2(i)=round(tr2(i)*1000)/1000;\n",
+"end\n",
+"s=0;\n",
+"for i=1:9\n",
+" s=s+tr2(i);\n",
+"end\n",
+"mprintf('Total run-off:');\n",
+"mprintf('\nas depth as discharge');\n",
+"for i=1:9\n",
+" mprintf('\n%f %f',tr1(i),tr2(i));\n",
+"end\n",
+"r=0.36*s*t/A;\n",
+"r=round(r*10)/10;\n",
+"mprintf('\ntotal run-off=%f cm.',r);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.59: EX4_59.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.59\n",
+"//calculate ordinate of 6 hr unit hydrograph\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"O=[10 30 90 220 280 220 166 126 92 62 40 20 10]; //ordinates of 6 hr flood hydrograph\n",
+"B=10; //Base flow\n",
+"for i=1:13\n",
+" r(i)=O(i)-B; //ordinates of direct run-off\n",
+"end\n",
+"mprintf('Ordinates of 6 hr unit hydrograph');\n",
+"u(1)=0;\n",
+"for i=2:13\n",
+" u(i)=r(i)-u(i-1); //ordinates of 6 hrs unit hydrograph\n",
+"end\n",
+"for i=1:13\n",
+" mprintf('\n%i',u(i));\n",
+"end\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.5: EX4_5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.5\n",
+"//calculate average rainfall using\n",
+"//arithmatic average method\n",
+"//isohytel method\n",
+"//thiesson polygon method\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"p=[58 61 69 56 84 86 69 79 71]; //values of precipitation\n",
+"s=0;\n",
+"for i=1:9\n",
+" s=s+p(i);\n",
+"end\n",
+"ar=s/9;\n",
+"ar=round(ar*10)/10;\n",
+"mprintf('using arithmatic average method:')\n",
+"mprintf('\nAverage rainfall=%f cm.',ar);\n",
+"\n",
+"I=[86 85 80 75 70 65 60 55 50]; //isphytes\n",
+"A=[0.43 5.20 4.0 5.04 5.85 4.53 4.09 1.27]; //area between isohytes\n",
+"for i=1:8\n",
+" a(i)=(I(i)+I(i+1))/2;\n",
+"end\n",
+"for i=1:8\n",
+" P(i)=A(i)*a(i);\n",
+"end\n",
+"s=0;\n",
+"for i=1:8\n",
+" s=s+P(i);\n",
+"end\n",
+"t=0;\n",
+"for i=1:8\n",
+" t=t+A(i);\n",
+"end\n",
+"ar=s/t;\n",
+"ar=round(ar*10)/10;\n",
+"mprintf('\n\nisohytel method:')\n",
+"mprintf('\nAverage rainfall=%f cm.',ar);\n",
+"\n",
+"A=[3.26 0.39 1.61 2.04 2.46 0.84 3.91 5.09 0.41 3.94 2.06 4.40]; //thiessen area\n",
+"p=[58 63 71 69 86 81 84 56 53 69 61 79]; //observed precipitation\n",
+"for i=1:12\n",
+" P(i)=A(i)*p(i);\n",
+"end\n",
+"s=0;\n",
+"for i=1:12\n",
+" s=s+P(i);\n",
+"end\n",
+"disp(s);\n",
+"t=0;\n",
+"for i=1:12\n",
+" t=t+A(i);\n",
+"end\n",
+"ar=s/t;\n",
+"ar=round(ar*10)/10;\n",
+"mprintf('\n\nthiesson polygon method:')\n",
+"mprintf('\nAverage rainfall=%f cm.',ar);\n",
+"//mean rainfall obtained by thiesson polygon method is different from book as product(A*P) is round offed in book."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.60: EX4_60.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.60\n",
+"//determine the ordinates of 1 cm-6 hour hydrograph\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"t=6;\n",
+"A=450; //catchment area\n",
+"O=[5 15 40 80 60 50 25 15 5]; //ordinates of flood hydrograph\n",
+"B=5; //base flow assumed\n",
+"s=0;\n",
+"for i=1:9\n",
+" r(i)=O(i)-B; //ordinates of direct run-off\n",
+"s=s+r(i);\n",
+"end\n",
+"n=s*0.36*12/A;\n",
+"mprintf('ordinates of unit hydrograph');\n",
+"for i=1:9\n",
+" u(i)=r(i)/n;\n",
+" u(i)=round(u(i)*100)/100;\n",
+" mprintf('\n%f',u(i));\n",
+"end\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.61: EX4_61.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.61\n",
+"//obtain ordinates 24 hr unit hydrograph\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"O=[0 5.5 13.5 26.5 45 82 162 240 231 165 112 79 57 42 31 22 14 9.5 6.6 4 2 1 0 0 0 0 0]; //ordinates of 1st 8 hrs unit hydrograph\n",
+"for i=1:25\n",
+" o1(i+2)=O(i); //ordinates of 2nd 8 hrs unit hydrograph\n",
+" o2(i+4)=O(i); //ordinates of 3rd 8 hrs unit hydrograph\n",
+"end\n",
+"mprintf('ordinates 24 hr unit hydrograph:');\n",
+"for i=1:27\n",
+" o3(i)=o1(i)+o2(i)+O(i); //total 24 hr hydrograph of 3 cm run-off\n",
+" t(i)=o3(i)/3;\n",
+" t(i)=round(t(i)*10)/10;\n",
+" mprintf('\n%f',t(i));\n",
+"end\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.62: EX4_62.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 4.62\n",
+"//ordinates of 1 hr unit hydrograph\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"t=[0:1:12]; //time\n",
+"O=[0 0 54 0 175 0 127 0 58 0 25 0 0 0]; //ordinate of 2 hr unit hydrograph\n",
+"of(1)=0;\n",
+"of(2)=0;\n",
+"for i=3:13\n",
+" if modulo(i,2)==0;\n",
+" of(i)=0;\n",
+" \n",
+"else \n",
+" of(i)=O(i-2)+of(i-2);\n",
+"end\n",
+"end\n",
+"s=[0 25 54 120 229 300 356 390 414 430 439 439 439]; //Ordinates of S-curve\n",
+"for i=2:13\n",
+" of1(i)=s(i-1);\n",
+"end\n",
+"mprintf('ordinates of 1 hr unit hydrograph:');\n",
+"for i=1:13\n",
+" y(i)=s(i)-of1(i);\n",
+"u(i)=y(i)*2;\n",
+"mprintf('\n%i',u(i));\n",
+"end\n",
+"//graph is plotted between u and t\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.63: EX4_63.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.63\n",
+"//calculate design disharge\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"xavg=1200; //sample mean\n",
+"n=50; //assurance year\n",
+"A=0.95; //assurance percent\n",
+"Rsk=1-A;\n",
+"sigma=650; //standard deviation\n",
+"yn=0.53622; //mean of reduced variate\n",
+"sigma30=1.11238; //standard deviation of reduced variate\n",
+"\n",
+"T=1/(1-(1-Rsk)^(1/n));\n",
+"yt=-2.303*log10(2.303*log10(T/(T-1)));\n",
+"K=(yt-yn)/sigma30;\n",
+"xt=xavg+K*sigma;\n",
+"mprintf(' design disharge=%i cumecs.',xt);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.64: EX4_64.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.64\n",
+"//calculate flood magnitude with return period of 500 years\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"T1=50;T2=100; //Return period\n",
+"F1=20600;F2=22150; //Peak flood\n",
+"y100=-(2.303*log10(2.303*log10(T2/(T2-1))));\n",
+"y50=-(2.303*log10(2.303*log10(T1/(T1-1))));\n",
+"y=(F2-F1)/(y100-y50);\n",
+"T=500;\n",
+"y500=-(2.303*log10(2.303*log10(T/(T-1))));\n",
+"x500=F2+(y500-y100)*y;\n",
+"x500=round(x500);\n",
+"mprintf('flood magnitude with return period of 240 years=%f cumec.',x500);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.65: EX4_65.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.65\n",
+"//calculate recurrence interval of 10 minutes storm using Gumbel's method\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"xavg=1.65; //mean of data\n",
+"sigma=0.45; //standard deviation\n",
+"x=3;\n",
+"y=1.2825*(x-xavg)/sigma+0.577;\n",
+"l=%e^(%e^(-y));\n",
+"T=l/(l-1);\n",
+"T=round(T*10)/10;\n",
+"mprintf('recurrence interval of 10 minutes storm=%f years.',T);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.66: EX4_66.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.66\n",
+"//calculate flood magnitude with return period of 200 years\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"T1=50;T2=100; //Return period\n",
+"F1=30800;F2=36300; //Peak flood\n",
+"y100=-(2.303*log10(2.303*log10(T2/(T2-1))));\n",
+"y50=-(2.303*log10(2.303*log10(T1/(T1-1))));\n",
+"y=(F2-F1)/(y100-y50);\n",
+"T=200;\n",
+"y200=-(2.303*log10(2.303*log10(T/(T-1))));\n",
+"x200=F2+(y200-y100)*y;\n",
+"x200=round(x200);\n",
+"mprintf('flood magnitude with return period of 240 years=%f cumecs.',x200);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.67: EX4_67.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.67\n",
+"//calculate return period of flood of 9950 cumec/s\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"xavg=4200; //mean\n",
+"sigma=1705; //standard deviation\n",
+"xt=9550; //flood value\n",
+"K=(xt-xavg)/sigma;\n",
+"yt=1.2825*K+0.577;\n",
+"l=%e^(%e^(-yt));\n",
+"T=l/(l-1);\n",
+"T=round(T*100)/100;\n",
+"mprintf('Return period of flood of 9950 cumec/s=%f years.',T);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.68: EX4_68.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.68\n",
+"//calculate flood magnitude with return period of 1000 years\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"T1=100;T2=50; //Return period\n",
+"F1=485;F2=445; //Peak flood\n",
+"y50=-(2.303*log10(2.303*log10(T2/(T2-1))));\n",
+"y100=-(2.303*log10(2.303*log10(T1/(T1-1))));\n",
+"y=(F2-F1)/(y50-y100);\n",
+"T=1000;\n",
+"y1000=-(2.303*log10(2.303*log10(T/(T-1))));\n",
+"x1000=F2+(y1000-y50)*y;\n",
+"x1000=round(x1000*10)/10;\n",
+"mprintf('flood magnitude with return period of 240 years=%f cumecs.',x1000);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.69: EX4_69.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.69\n",
+"//calculate\n",
+"//probability of exceedence\n",
+"//probability of occurence in next 12 years\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"T=25; //return period\n",
+"n=12;\n",
+"P=1/T;\n",
+"Rsk=1-(1-P)^n;\n",
+"P=round(P*100)/100;\n",
+"Rsk=round(Rsk*10000)/10000;\n",
+"mprintf('probability of exceedence=%f.',P);\n",
+"mprintf('\nprobability of occurence in next 12 years=%f.',Rsk);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.6: EX4_6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.6\n",
+"//ceck whether data at station X is consistence\n",
+"//year in which regime is indicated\n",
+"//compute the adjusted rainfall atX\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"X=[69 55 62 67 87 70 65 75 90 100 90 95 85 90 75 95]; //annual rainfall at X\n",
+"Y=[77 62 67 68 86 90 65 75 70 70 70 75 65 70 55 75]; //average rainfall at 10 base stations\n",
+"cx(1)=69; //accumulated annual values at station X \n",
+"for i=2:16 \n",
+" cx(i)=cx(i-1)+X(i);\n",
+"end\n",
+"cy(1)=77;\n",
+"for i=2:16\n",
+" cy(i)=cy(i-1)+Y(i); //accumulated annual values at ten stations\n",
+" \n",
+"end\n",
+"\n",
+"//since curve is not having unform slope\n",
+"mprintf('Record at X is not consistent.');\n",
+"mprintf('\nFrom the curve regime is observed in the year 1978.')\n",
+"\n",
+"Q=[1970 1971 1972 1973 1974 1975 1976 1977];\n",
+"O=[95 75 90 85 95 90 100 90];\n",
+"for i=1:8\n",
+" A(i)=0.7051*O(i);\n",
+"end\n",
+"mprintf('\n\nYear Observed rainfall Adjusted rainfall');\n",
+"for i=1:8\n",
+" mprintf('\n%i %i %i',Q(i),O(i),A(i));\n",
+"end\n",
+"//graph is plotted between cx and cy"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.7: EX4_7.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.7\n",
+"//construct hyetograph\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"c=[0 12.4 22.1 35.1 52.7 63.7 81.9 109.2 123.5 132.6 143.3 146 146]; //cumulative rainfall\n",
+"T=[0:1:13]; //Time\n",
+"t=15/60; //time interval\n",
+"r(1)=0;\n",
+"mprintf('Rainfall intensity:');\n",
+"I(1)=0;\n",
+"for i=2:13\n",
+" r(i)=c(i)-c(i-1); \n",
+" I(i)=r(i)/t; //Rainfall intensity\n",
+"mprintf('\n%f',I(i));\n",
+"end\n",
+"\n",
+"//graph is plotted between I and T"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.8: EX4_8.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.8\n",
+"//compute maximum rainfall intensities for 15,30,45,60,90,120 minutes\n",
+"//plot intensity duration graph\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"CR=[0 12.4 22.1 35.1 52.7 63.7 81.9 109.2 123.5 132.6 143.3 146.0 146.0]; //cumulative rainfall\n",
+"\n",
+"c15(2)=12.4;\n",
+"c30(3)=22.1;\n",
+"c45(4)=35.1;\n",
+"c60(5)=52.7;\n",
+"c90(7)=81.9;\n",
+"c120(9)=123.5;\n",
+"for i=3:13\n",
+" c15(i)=CR(i)-CR(i-1);\n",
+"end\n",
+"for i=4:13\n",
+" c30(i)=CR(i)-CR(i-2);\n",
+"end\n",
+"for i=5:13\n",
+" c45(i)=CR(i)-CR(i-3);\n",
+"end\n",
+"for i=6:13\n",
+" c60(i)=CR(i)-CR(i-4);\n",
+"end\n",
+"for i=8:13\n",
+" c90(i)=CR(i)-CR(i-6);\n",
+"end\n",
+"for i=10:13\n",
+" c120(i)=CR(i)-CR(i-8);\n",
+"end\n",
+"mprintf('15min 30min 45min 60min 90min 120min');\n",
+"for i=1:13\n",
+" mprintf('\n%f %f %f %f %f %f',c15(i),c30(i),c45(i),c60(i),c90(i),c120(i));\n",
+"end\n",
+"I=[109.2 91 79.7 74.1 67.6 61.75]; //maximum intensity at respective durations\n",
+"D=[15 30 45 60 90 120]; //durations\n",
+"//greph is plotted between I and D"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.9: EX4_9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 4.9\n",
+"//calculate preciptation value which has recurrence period of 6 years\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"p=[475 377 731 1066 361 305 926 628 409 236 337 853]; //precipitation value\n",
+"N=12; //total number of years\n",
+"T=6; //recurrence interval\n",
+"m=N/T;\n",
+"mprintf('Ranking of storm=%i.',m);\n",
+"//hence pick 2nd severest storm\n",
+"mprintf('\npreciptation value which has recurrence period of 6 years=%i mm.',p(7));\n",
+""
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/5-GROUND_WATER_WELL_IRRIGATION.ipynb b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/5-GROUND_WATER_WELL_IRRIGATION.ipynb
new file mode 100644
index 0000000..578cab9
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/5-GROUND_WATER_WELL_IRRIGATION.ipynb
@@ -0,0 +1,1009 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: GROUND WATER WELL IRRIGATION"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.10: EX5_10.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.10\n",
+"//calculate culturable area\n",
+"clc;\n",
+"//given\n",
+"Q=150; //discharge from tubewell\n",
+"t=4000; //working period of tubewell\n",
+"I=0.45; //intensity of irrigation\n",
+"d=0.38; //average depth of rabi and kharif crop\n",
+"V=Q*t;\n",
+"A=V/d;\n",
+"CA=A/(I*10000);\n",
+"CA=round(CA);\n",
+"mprintf('culturable area=%f hectares.',CA);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.11: EX5_11.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.11\n",
+"//calculate discharge if one well discharges\n",
+"//percent decrease when two well discharges\n",
+"clc;\n",
+"//given\n",
+"d=0.2; //diameter of well\n",
+"r=d/2;\n",
+"B=100; //distance between wells\n",
+"b=12; //thickness of acquifer\n",
+"k=60; //coefficient of permeability\n",
+"s=3; //dispersion head\n",
+"R=250; //radius of influence\n",
+"Q=2.72*b*k*s/(24*log10(R/r));\n",
+"mprintf('discharge if one well discharges=%i cubic metre/hour.',Q);\n",
+"//when both well are discharging\n",
+"Q1=2.72*k*b*s/(24*log10(R^2/(r*B)));\n",
+"Q1=round(Q1*10)/10;\n",
+"mprintf('\ndischarge if both wells discharges=%f cubic metre/hour.',Q1);\n",
+"PE=(Q-Q1)*100/Q;\n",
+"PE=round(PE*100)/100;\n",
+"mprintf('\npercentage decrease in discharge=%f percent.',PE);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.12: EX5_12.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.12\n",
+"//calculate radius of zero drawdown\n",
+"//coefficient of permeability\n",
+"//drawdown in well\n",
+"//specific capacity\n",
+"//maximum rate at which water can be pumped\n",
+"clc;\n",
+"//given\n",
+"d=0.6; //diameter of well;\n",
+"rw=d/2;\n",
+"H=40; //depth of water in well before pumping\n",
+"Q=2000; //discharge from well\n",
+"s1=4; //drawdown in well\n",
+"B1=10; //distance between well\n",
+"s2=2;\n",
+"B2=20;\n",
+"//Part (a)\n",
+"h1=H-s1;\n",
+"h2=H-s2;\n",
+"t=(H^2-h2^2)/(H^2-h1^2);\n",
+"R=(B2/(B1^t))^(1/(1-t));\n",
+"R=round(R*100)/100;\n",
+"mprintf(' radius of zero drawdown=%f m',R);\n",
+"//Part (b)\n",
+"r=10;\n",
+"k=Q*log10(R/r)*60*24/(1.36*(H^2-h1^2)*1000);\n",
+"k=round(k*100)/100;\n",
+"mprintf('\ncoefficient of permeability=%f m/day.',k);\n",
+"\n",
+"//part (c)\n",
+"Ho=(H^2-(Q*log10(R/rw)*24*60/(1000*1.36*k)))^0.5;\n",
+"D=H-Ho;\n",
+"D=round(D*100)/100;\n",
+"mprintf('\ndrawdown in well=%f m.',D);\n",
+"\n",
+"//part (d)\n",
+"C=Q/(1000*R);\n",
+"//for R=1 m;Q=Sc\n",
+"//hence on putting the values in discharge equation we get\n",
+"//Sc*log10(61.2*Sc)=0.3223.\n",
+"//on solving this by trial and error method we get Sc=0.266 m^2/min.\n",
+"mprintf('\nSpecific capacity=0.266 cubic metre/minutes/metre.');\n",
+"\n",
+"//part (e)\n",
+"//this is obtained when Q=H\n",
+"//hence from equation of discharge,we get\n",
+"//Q*log10(69.2*Q)=6.528.\n",
+"//solving it by trial and error method we get Q=2.85 m^3/min.\n",
+"mprintf('\nmaximum rate at which water can be pumped=2.85 cubic metre/min');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.13: EX5_13.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.13\n",
+"//calculate formation constant of acquifer using theis method\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=2500; //discharge(l/min)\n",
+"r=60; //distance of observation well from acquifer\n",
+"tmin=[1 1.5 2 2.5 3 4 5 6 8 10 12 14 18 24 30 40 50 60 80 100 120 150 180 210 240]; //time in minutes\n",
+"s=[0.2 0.26 0.3 0.33 0.36 0.41 0.45 0.48 0.53 0.56 0.59 0.62 0.66 0.71 0.75 0.80 0.83 0.86 0.91 0.95 0.98 1.03 1.05 1.08 1.10]; //drawdown\n",
+"u=[1:1:9];\n",
+"Wu=[0.2194 0.04891 0.01315 0.003779 0.001148 0.000360 0.000116 0.0000377 0.0000125];\n",
+"for i=1:25\n",
+" tday(i)=tmin(i)/(60*24);\n",
+"end\n",
+"\n",
+"for i=1:25\n",
+" rt(i)=r^2/tday(i);\n",
+"end\n",
+"//graph is plotted between s and r^2/t and W(u) and u and they are superimposed.\n",
+"//from which we get\n",
+"s1=0.52;\n",
+"Wu1=2.96;\n",
+"rt1=700000; u1=0.03;\n",
+"Q=3600; //discharge in cumec/day\n",
+"T=Q*Wu1/(4*%pi*s1);\n",
+"S=4*u1*T/rt1;\n",
+"T=round(T);\n",
+"mprintf('formation constant of acquifer:');\n",
+"mprintf('\nT=%f cubic metre/day/m.\nS=%f.',T,S);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.14: EX5_14.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.14\n",
+"//calculate formation constant of acquifer using Jacob's method\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=2500; //discharge(l/min)\n",
+"r=60; //distance of observation well from acquifer\n",
+"tmin=[1 1.5 2 2.5 3 4 5 6 8 10 12 14 18 24 30 40 50 60 80 100 120 150 180 210 240]; //time in minutes\n",
+"s=[0.2 0.26 0.3 0.33 0.36 0.41 0.45 0.48 0.53 0.56 0.59 0.62 0.66 0.71 0.75 0.80 0.83 0.86 0.91 0.95 0.98 1.03 1.05 1.08 1.10]; //drawdown\n",
+"for i=1:25\n",
+" tday(i)=tmin(i)/(60*24);\n",
+"end\n",
+"//from the graph between s and t we get\n",
+"ds=0.38;\n",
+"Q=3600; //discharge in cumec/day\n",
+"T=2.303*Q/(4*%pi*ds);\n",
+"//extending the straight line we get\n",
+"to=0.00024;\n",
+"S=2.25*T*to/r^2;\n",
+"mprintf('formation constant of acquifer:');\n",
+"mprintf('\nT=%i cubic metre/day/m.\nS=%f.',T,S);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.15: EX5_15.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//example 5.15\n",
+"//calculate formation constant of acquifer using Chow's method\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Q=2500; //discharge(l/min)\n",
+"r=60; //distance of observation well from acquifer\n",
+"tmin=[1 1.5 2 2.5 3 4 5 6 8 10 12 14 18 24 30 40 50 60 80 100 120 150 180 210 240]; //time in minutes\n",
+"s=[0.2 0.26 0.3 0.33 0.36 0.41 0.45 0.48 0.53 0.56 0.59 0.62 0.66 0.71 0.75 0.80 0.83 0.86 0.91 0.95 0.98 1.03 1.05 1.08 1.10]; //drawdown\n",
+"for i=1:25\n",
+" tday(i)=tmin(i)/(60*24);\n",
+"end\n",
+"//graph is plotted between s and t\n",
+"//point P is choosen on it whose ordinate is:\n",
+"s1=0.45;\n",
+"t=0.00347;\n",
+"ds=0.38; //for one log cycle of time\n",
+"Fu=s1/ds;\n",
+"//from fig 5.43\n",
+"//or using relation\n",
+"Wu=2.303*Fu; \n",
+"u=0.035; //from table 5.2\n",
+"Q=3600; //discharge in cumec/day\n",
+"T=Q*Wu/(4*%pi*s1);\n",
+"S=4*u*t*T/r^2;\n",
+"mprintf('formation constant of acquifer:');\n",
+"mprintf('\nT=%i cubic metre/day/m.\nS=%f.',T,S);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.16: EX5_16.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.16\n",
+"//calculate transmissibility of acquifer\n",
+"//draw daown in main well\n",
+"clc;\n",
+"//given\n",
+"H=25; //static water level\n",
+"rw=0.15; //radius of well\n",
+"Q=5400; //discharge(litre/min)\n",
+"t=24; //time of discharge\n",
+"r1=30; //distance of first well\n",
+"s1=1.11; //drawdown\n",
+"h1=H-s1;\n",
+"r2=90; //distance of second well\n",
+"s2=0.53; //drawdown\n",
+"h2=H-s2;\n",
+"k=(Q*2.303*log10(r2/r1))/(%pi*(h2^2-h1^2)*60000);\n",
+"T=k*H;\n",
+"T=round(T*10000)/10000;\n",
+"mprintf('transmissibility of acquifer=%f cumec/sec.',T);\n",
+"hw=(h2^2-(Q*2.303*log10(r2/rw))/(%pi*k*60000))^0.5;\n",
+"sw=H-hw;\n",
+"sw=round(sw*100)/100;\n",
+"printf('\ndraw daown in main well=%f m.',sw);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.17: EX5_17.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.17\n",
+"//calculate discharge at 18m drawdown\n",
+"clc;\n",
+"//given\n",
+"Q=250; //discharge(lit/min)\n",
+"H=100; //water level in acquifer\n",
+"s1=12; //drawdown\n",
+"h1=H-s1;\n",
+"//let t=ln(R/r)/(pi*k)\n",
+"t=(H^2-h1^2)/Q;\n",
+"h2=H-18;\n",
+"Q1=(H^2-h2^2)/t;\n",
+"mprintf('discharge at 18m drawdown=%i lpm',Q1);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.18: EX5_18.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.18\n",
+"//calculate effective well diameter\n",
+"clc;\n",
+"//given\n",
+"b=10; //thickness of acquifer\n",
+"k=48; //permeability coefficient\n",
+"R=500; //radius of influence\n",
+"s=12; //drawdown\n",
+"Q=5000; //discharge(cumec/day)\n",
+"r=R/%e^(2*%pi*b*k*s/Q);\n",
+"D=2*r;\n",
+"D=round(D*100)/100;\n",
+"mprintf('effective well diameter=%f m.',D);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.19: EX5_19.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.19\n",
+"//calculate drawdown at 40m\n",
+"clc;\n",
+"//given\n",
+"Q=1500; //discharge(lit/min)\n",
+"S=0.004; //storage coefficient\n",
+"k=35; //permeability\n",
+"t=20; //time of pumping\n",
+"b=30; //thickness of acquifer\n",
+"r=40; //distance of observation well\n",
+"T=k*b;\n",
+"s=Q*(2.303*log10(4*T*t*3600/(60*60*24*r^2*S))-0.5772)*60*60*24/(4*%pi*T*60000); //Jacob's equation\n",
+"s=round(s*100)/100;\n",
+"mprintf('drawdown at 40m=%f m.',s);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.1: EX5_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.1\n",
+"//design an open wellin fine sand\n",
+"clc;\n",
+"//given\n",
+"Q=0.003; //required discharge\n",
+"H=2.5; //depression head\n",
+"A=Q*3600/(0.5*H);\n",
+"d=(4*A/%pi)^0.5;\n",
+"d=round(d*100)/100\n",
+"mprintf('Well diameter=%f m.',d);\n",
+"\n",
+"//Alternative solution\n",
+"C=7.5D-5; //permeability constant from table 5.2\n",
+"A=Q/(C*H);\n",
+"d=(16*3/%pi)^0.5;\n",
+"d=round(d*10)/10;\n",
+"mprintf('\nBy alternative solution:')\n",
+"mprintf('\nWell diameter=%f m',d);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.20: EX5_20.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.20\n",
+"////calculate\n",
+"//yield from well\n",
+"clc;\n",
+"//given\n",
+"h1=2.5; //initial pumping depression\n",
+"h=1.8; //heigth after recuperation\n",
+"t=80; //time\n",
+"h2=h1-h;\n",
+"KbyA=2.303*60*log10(h1/h2)/t;\n",
+"d=4; //diameter of well\n",
+"H=3; //depression head\n",
+"A=%pi*d^2/4;\n",
+"Q=(KbyA)*A*H/3.6;\n",
+"Q=round(Q);\n",
+"mprintf('\nYield from well=%f lit/sec.',Q);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.21: EX5_21.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.21\n",
+"//calculate transmissibility\n",
+"//drawdown at pumping well\n",
+"clc;\n",
+"//given\n",
+"rw=0.15; //radius of well\n",
+"b=40; //depth of acquifer\n",
+"Q=1500; //discharge(lpm)\n",
+"s1=3.5; //drawdown of first well\n",
+"s2=2; //drawdown of second well\n",
+"H=40; \n",
+"r1=25; //distance of first well\n",
+"r2=75; //distance of second well\n",
+"h1=H-s1;\n",
+"h2=H-s2;\n",
+"k=Q*2.303*log10(r2/r1)/(%pi*1000*60*(h2^2-h1^2));\n",
+"T=b*k*1000;\n",
+"mprintf('transmissibility=%fD-3 square metre/sec',T);\n",
+"\n",
+"hw=(h2^2-(Q*2.303*log10(r2/rw)/(%pi*k*60000)))^0.5;\n",
+"sw=H-hw;\n",
+"sw=round(sw*100)/100;\n",
+"mprintf('\ndrawdown at pumping well=%f m.',sw);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.22: EX5_22.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.22\n",
+"//calculate coefficient of permeability\n",
+"//drawdown in test well\n",
+"clc;\n",
+"//given\n",
+"r=0.25; //radius of test well\n",
+"r1=10; //distance of first well\n",
+"r2=60; //distance of second well\n",
+"Q=0.1; //discharge(cumec/sec)\n",
+"s1=4; //drawdown of first well\n",
+"s2=3; //drawdown of second well\n",
+"b=20; //thickness of well\n",
+"k=1000*Q*log10(r2/r1)/(2.72*b*(s1-s2));\n",
+"mprintf('coefficient of permeability=%fD-3 m/sec',k);\n",
+"s=s2+Q*log10(r2/r)/(2.72*b*k);\n",
+"s=round(s*100)/100;\n",
+"mprintf('\ndrawdown in test well=%f m.',s); \n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.23: EX5_23.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.23\n",
+"//calculate\n",
+"//diameter of well\n",
+"clc;\n",
+"//given\n",
+"h1=2.1; //initial pumping depression\n",
+"h=1.6; //heigth after recuperation\n",
+"t=90; //time\n",
+"h2=h1-h;\n",
+"KbyA=2.303*60*log10(h1/h2)/t;\n",
+"Q=10; //yield(lit/sec)\n",
+"H=2;\n",
+"A=Q*3.6/(H*(KbyA));\n",
+"d=(4*A/%pi)^0.5;\n",
+"d=round(d*10)/10;\n",
+"mprintf('\nDaimeter of well=%f m',d);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.24: EX5_24.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.24\n",
+"//calculate yield from well\n",
+"clc;\n",
+"//given\n",
+"h1=2.5; //initial pumping depression\n",
+"h=1; //heigth after recuperation\n",
+"t=60; //time\n",
+"h2=h1-h;\n",
+"KbyA=2.303*60*log10(h1/h2)/t;\n",
+"d=2; //diameter of well\n",
+"H=3; //depression head\n",
+"A=%pi*d^2/4;\n",
+"Q=(KbyA)*A*H;\n",
+"Q=round(Q*1000)/1000;\n",
+"mprintf('\nYield from well=%f cubic metre/hour.',Q);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2: EX5_2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.2\n",
+"//calculate\n",
+"//yield from well\n",
+"//diameter of well\n",
+"clc;\n",
+"//given\n",
+"h1=2.5; //initial pumping depression\n",
+"h=1.8; //heigth after recuperation\n",
+"t=80; //time\n",
+"h2=h1-h;\n",
+"KbyA=2.303*60*log10(h1/h2)/t;\n",
+"\n",
+"\n",
+"//Part (a)\n",
+"d=4; //diameter of well\n",
+"H=3; //depression head\n",
+"A=%pi*d^2/4;\n",
+"Q=(KbyA)*A*H/3.6;\n",
+"mprintf('Part (a)');\n",
+"Q=round(Q);\n",
+"mprintf('\nYield from well=%f lit/sec.',Q);\n",
+"\n",
+"//Part (b)\n",
+"Q=8; //yield(lit/sec)\n",
+"H=2;\n",
+"A=Q*3.6/(H*(KbyA));\n",
+"d=(4*A/%pi)^0.5;\n",
+"d=round(d*10)/10;\n",
+"mprintf('\nPart (b)');\n",
+"mprintf('\nDaimeter of well=%f m',d);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.3: EX5_3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.3\n",
+"//calculate yield from well\n",
+"clc;\n",
+"//given\n",
+"d=30; //well diameter\n",
+"L=15; //strainer length\n",
+"P=50; //coefficient of permeability\n",
+"s=0.2; //effective size of sand\n",
+"b=3; //drawdown\n",
+"r=150; //radius of drawdown\n",
+"\n",
+"Q=2.72*L*P*b/(log10(r*2*100/d)*24*3.6);\n",
+"Q=round(Q*10)/10;\n",
+"mprintf(' yield from well=%f lit/sec.',Q);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.4: EX5_4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.4\n",
+"//calculate discharge from tubewell\n",
+"clc;\n",
+"//given\n",
+"d=30; //diameter of well\n",
+"s=2; //drawdown\n",
+"L=10; //length of stainer\n",
+"k=0.05; //coefficient of permeability\n",
+"r=300; //radius of zero drawdown\n",
+"Q=2.72*k*s*(L+s/2)/(100*log10(2*100*r/d));\n",
+"Q=round(Q*10000)/10000;\n",
+"mprintf(' discharge from tubewell=%f cumec.',Q);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.5: EX5_5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.5\n",
+"//design tube well\n",
+"clc;\n",
+"//given\n",
+"Q=0.08; //yield required\n",
+"b=30; //thickness of acquifer\n",
+"R=300; //Radius of circle of influence\n",
+"k=60; //permeability coefficient\n",
+"s=5; //Drawdown\n",
+"r=R/(10^(2.72*b*s*k/(3600*24*Q)));\n",
+"r=round(r*10000)/10000;\n",
+"mprintf('Radius of well=%f m',r);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.6: EX5_6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.6\n",
+"//calculate yield from well\n",
+"clc;\n",
+"//given\n",
+"b=30; //thickness of acquifer\n",
+"s=4; //drawdown\n",
+"r=0.1; //well radius\n",
+"k=36; //permeability coefficient\n",
+"R=3000*s*(k/(24*3600))^0.5;\n",
+"\n",
+"Q=2.72*b*k*s/(log10(R/r)*24*3.6);\n",
+"Q=round(Q*10)/10;\n",
+"mprintf('yield from well=%f lit/sec.',Q);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.7: EX5_7.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.7\n",
+"//calculate discharge and percent increase in discharge\n",
+"clc;\n",
+"//given\n",
+"k=0.005; //coefficient of permeability\n",
+"r=0.1; //well radius\n",
+"s=4; //drawdown\n",
+"b=10; //thickness\n",
+"R=300; //radius of circle of influence\n",
+"//Part(a)\n",
+"Q1=2.72*b*k*s/log10(R/r);\n",
+"Q1=round(Q1*10000)/10000;\n",
+"mprintf('Discharge=%f cumec',Q1);\n",
+"\n",
+"//Part (b)\n",
+"r=0.2;\n",
+"Q2=2.72*b*k*s/log10(R/r);\n",
+"I=(Q2-Q1)*100/Q1;\n",
+"I=round(I*10)/10;\n",
+"mprintf('\npercent increase in discharge=%f percent.',I);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.8: EX5_8.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.8\n",
+"//calculate coefficient of permeability\n",
+"//percentage error\n",
+"//actual radius of influence\n",
+"clc;\n",
+"//given\n",
+"d=0.2; //diameter of well\n",
+"Q=240; //discharge\n",
+"RL1=240.5; //reduce level of original water surface\n",
+"RL2=235.6; //reduced level of water at pumping\n",
+"RL3=210; //reduced level of impervious layer\n",
+"RL4=239.8; //reduced level of water in well\n",
+"D=50; //radial distance of well from tube well\n",
+"//Part(a)\n",
+"h1=RL2-RL3;\n",
+"h2=RL4-RL3;\n",
+"k1=Q*24*log10(D*2/d)/(1.36*(h2^2-h1^2));\n",
+"k1=round(k1*100)/100;\n",
+"mprintf('Part(a)');\n",
+"mprintf('\ncoefficient of permeability=%f m/day.',k1);\n",
+"//Part (b)\n",
+"R=300; //radius of influence\n",
+"H=RL1-RL3;\n",
+"h=RL2-RL3;\n",
+"k2=Q*24*log10(R*2/d)/(1.36*(H^2-h^2));\n",
+"PE=(k2-k1)*100/k1;\n",
+"mprintf('\nPart(b)');\n",
+"mprintf('\npercentage error=%i percent.',PE);\n",
+"//Part (b)\n",
+"R=(d/2)*10^(1.36*k1*(H^2-h^2)/(24*Q));\n",
+"mprintf('\nPart(c)');\n",
+"mprintf('\nActual radius of influence=%i m.',R);\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9: EX5_9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 5.9\n",
+"//calculate input h.p of pump\n",
+"clc;\n",
+"//given\n",
+"A=20; //area of field\n",
+"H=129; //level to the highest land\n",
+"h1=120.2; //water level in well during discharge\n",
+"Du=800; //duty for rise;\n",
+"eita=0.6; //efficiency of the pump\n",
+"Q=A/Du;\n",
+"w=Q*1000;\n",
+"lift=H-h1;\n",
+"//design lift is taken as 9m\n",
+"wd=w*9;\n",
+"o=wd/75;\n",
+"i=o/eita;\n",
+"mprintf('Input h.p of pump=%i h.p',i);"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/6-RESERVIOR_PLANNING.ipynb b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/6-RESERVIOR_PLANNING.ipynb
new file mode 100644
index 0000000..d2f9446
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/6-RESERVIOR_PLANNING.ipynb
@@ -0,0 +1,543 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6: RESERVIOR PLANNING"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.10: EX6_10.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 6.10\n",
+"//calculate \n",
+"//minimum capacity of reservior\n",
+"//the initial storage storage required to maintain uniform demand\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"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)\n",
+"s=0;\n",
+"for i=1:12\n",
+" s=s+in(i);\n",
+"end\n",
+"avd=s/12; //average demand(x10^5)\n",
+"s=0;t=0;\n",
+"for i=1:12\n",
+" e(i)=avd-in(i);\n",
+" if e(i)<0 then\n",
+" S(i)=-e(i); //surplus(x10^5)\n",
+" s=s+S(i);\n",
+" else\n",
+" D(i)=e(i); //Deficit(x10^5)\n",
+" t=t+D(i);\n",
+" end\n",
+"end\n",
+"\n",
+"d=(s-(t-D(1)-D(2)-D(3)));\n",
+"s=s;\n",
+"\n",
+"mprintf('minimum capacity of reservior=%fD+5 cumec.',s);\n",
+"mprintf('\nstorage required to maintain uniform demand=%fD+5 cumec',d);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.1: EX6_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//exampple 6.1\n",
+"//determine maximum reservior level\n",
+"//maximum discharge over spillway\n",
+"//plot inflow and routed hydrograph and find peak flow and peak lag\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"e=[100 100.3 100.6 100.9 101.2 101.5 101.8 102.1 102.4 102.7]; //elevation(km)\n",
+"A=[405 412 420 425 428 436 445 453 460 469]; //area\n",
+"o=[0 14.9 42.2 77.3 119 169 217 272 334 405]; //outflow\n",
+"c(1)=0;\n",
+"for i=2:10\n",
+" dh(i)=e(i)-e(i-1);\n",
+" s(i)=dh(i)/3*(A(i-1)+A(i)+(A(i-1)*A(i))^0.5); //storage between contours\n",
+" c(i)=c(i-1)+s(i); //cumulative storage\n",
+" h(i)=c(i)/1.08; //2s/t\n",
+" h1(i)=h(i)-o(i); //2s/t-o\n",
+" h2(i)=h(i)+o(i); //2s/t+o\n",
+"end\n",
+"T=[0:6:102];\n",
+"I=[42 45 57 88 147 210 272 340 350 338 314 288 263 240 198 170 143 120]; //inflow\n",
+"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\n",
+"O=[0 10 24 42 74 130 194 260 316 334 328 312 286 264 236 204 177 150]; //outflow read from curve a\n",
+"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\n",
+"for i=2:17\n",
+" t(i)=I(i-1)+I(i); //I1+I2\n",
+" h3(i)=t(i)+h4(i); //2s/t+O\n",
+"end\n",
+"pt=T(10)-T(9);\n",
+"d=I(9)-O(10);\n",
+"//results\n",
+"mprintf(' maximum reservior level=%f m.',re(10));\n",
+"mprintf('\nmaximum discharge over spillway=%f cumecs.',O(10));\n",
+"mprintf('\nreduction in peak discharge=%f cumecs.',d);\n",
+"mprintf('\npeak lag=%f hours.',pt);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.2: EX6_2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example6.2\n",
+"//calculate required useful storage\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"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)\n",
+"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\n",
+"p=[0.8 1.2 0 0 0 4.8 12.2 18.6 8.6 1.5 0 0] //precipitation\n",
+"D=[14.5 15.8 16.2 16.8 17.5 18 18 17 16.5 16 15.8 15]; //Demand\n",
+"s=0;\n",
+"for i=1:12\n",
+" if in(i)<10 then\n",
+" r(i)=in(i); //D/S requirement\n",
+" else\n",
+" r(i)=10;\n",
+" end\n",
+" E(i)=3.6*pan(i); //Evaporation over reservior area\n",
+" P(i)=3.5*p(i); //Precipitation\n",
+" I(i)=in(i)-r(i)-E(i)+P(i); //Adjusted inflow\n",
+" S(i)=D(i)-I(i); //Water required from storage\n",
+" if S(i)<0 then\n",
+" S(i)=0;\n",
+" end\n",
+" s=s+S(i);\n",
+"end\n",
+"mprintf('required useful storage=%f ha-m.',s);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.3: EX6_3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 6.3\n",
+"//calculate storage capacity of reservior\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"V=475; //flow required to be maintained throughout the year\n",
+"Y=V*365*8.64; //yearly demand\n",
+"//yearly demand gives the slope of demand curve\n",
+"t=[0:1:36]; //number of season startin from 1960;each year is diveded into 3 seasons.\n",
+"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\n",
+"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\n",
+"cv(1)=v(1);\n",
+"for i=2:37\n",
+" cv(i)=cv(i-1)+v(i);\n",
+"end\n",
+"//each year is divided into three seasons(monsoon,winter and summer).and readings are taken for 12 years\n",
+"//mass inflow curve is plotted and tangent are drawn at the apexes and parellel to demand curve slope;\n",
+"//the respectiv ordinates represent the deficiency during dry period\n",
+"//maximum of these ordinates gives the desired reservior capacity\n",
+"mprintf('storage capacity of reservior=1.6 million ha-m.');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.4: EX6_4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 6.4\n",
+"//calculate probable life of reservior\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"asi=3.6; //annual sediment inflow(x10^6)\n",
+"gamma_s=12; //specific weigth of sediment\n",
+"vs=asi/12;\n",
+"ir=30; //initial reservior capacity\n",
+"fr=60; //final reservior capacity \n",
+"r=ir/fr; //initial capacity/inflow ratio\n",
+"//r=0.5; hence we start capacity/inflow ratio from 0.5\n",
+"c=[0.5:-0.1:0.1]; //capacity inflow ratio\n",
+"e=[0.96 0.955 0.95 0.93 0.87]; //trap efficiency\n",
+"for i=1:4\n",
+" ae(i)=(e(i)+e(i+1))/2; //average efficiency for interval\n",
+"end\n",
+"as=[0.2872 0.2857 0.2820 0.2700]; //annual sediment trapped\n",
+"s=0;\n",
+"for i=1:4\n",
+" y(i)=6/as(i); //year to fill\n",
+" s=s+y(i);\n",
+"end\n",
+"mprintf(' probable life of reservior=%i years.',s);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.5: EX6_5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 6.5\n",
+"//calculate maximum outflow discharge over spillway\n",
+"//corresponding maximum level of water above spillway crest\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"I=[60 480 900 470 270 160 110 80 60]; //inflow\n",
+"//for the first time interval 0 hours to 3 hours\n",
+"I1=I(1);\n",
+"I2=I(2);\n",
+"t=3*3600;\n",
+"ti=(I1+I2)*t/2; //total inflow\n",
+"//outflow=1.62*h1^1.5;\n",
+"//storage change=(30+3h1)h1\n",
+"//from the basic equation i.e total inflow=total outflow+change in storage\n",
+"//on solving we get\n",
+"//h1^2+0.54h1^1.5+10h1-0.972=0;\n",
+"//solving it by trial and error method;we get\n",
+"h1=0.0954;\n",
+"//for the second time interval 3 hours to 6 hours\n",
+"I1=I(2);\n",
+"I2=I(3);\n",
+"t=3*3600;\n",
+"ti=(I1+I2)*t/2; //total inflow\n",
+"//outflow=0.0477+1.62*h2^1.5;\n",
+"//storage change=(30+3h2)h2\n",
+"//from the basic equation i.e total inflow=total outflow+change in storage\n",
+"//on solving we get\n",
+"//h2^2+0.54h2^1.5+10h2-3.4312=0;\n",
+"//solving it by trial and error method;we get\n",
+"h2=0.323;\n",
+"//for the third time interval 6 hours to 9 hours\n",
+"I1=I(3);\n",
+"I2=I(4);\n",
+"t=3*3600;\n",
+"ti=(I1+I2)*t/2; //total inflow\n",
+"//outflow=0.2974+1.62*h3^1.5;\n",
+"//storage change=(30+3h3)h3\n",
+"//from the basic equation i.e total inflow=total outflow+change in storage\n",
+"//on solving we get\n",
+"//h3^2+0.54h3^1.5+10h3-5.7012=0;\n",
+"//solving it by trial and error method;we get\n",
+"h3=0.522;\n",
+"//for the fourth time interval 9 hours to 12 hours\n",
+"I1=I(4);\n",
+"I2=I(5);\n",
+"t=3*3600;\n",
+"ti=(I1+I2)*t/2; //total inflow\n",
+"//outflow=0.611+1.62*h4^1.5;\n",
+"//storage change=(30+3h4)h4\n",
+"//from the basic equation i.e total inflow=total outflow+change in storage\n",
+"//on solving we get\n",
+"//h4^2+0.54h4^1.5+10h4-6.6208=0;\n",
+"//solving it by trial and error method;we get\n",
+"h4=0.601;\n",
+"//for the fifth time interval 12 hours to 15 hours\n",
+"I1=I(5);\n",
+"I2=I(6);\n",
+"t=3*3600;\n",
+"ti=(I1+I2)*t/2; //total inflow\n",
+"//outflow=0.7548+1.62*h5^1.5;\n",
+"//storage change=(30+3h5)h5\n",
+"//from the basic equation i.e total inflow=total outflow+change in storage\n",
+"//on solving we get\n",
+"//h5^2+0.54h5^1.5+10h5-6.8936=0;\n",
+"//solving it by trial and error method;we get\n",
+"h5=0.624;\n",
+"//for the sixth time interval 12 hours to 15 hours\n",
+"I1=I(6);\n",
+"I2=I(7);\n",
+"t=3*3600;\n",
+"ti=(I1+I2)*t/2; //total inflow\n",
+"//outflow=0.7985.62*h6^1.5;\n",
+"//storage change=(30+3h6)h6\n",
+"//from the basic equation i.e total inflow=total outflow+change in storage\n",
+"//on solving we get\n",
+"//h6^2+0.54h6^1.5+10h6-6.8492=0;\n",
+"//solving it by trial and error method;we get\n",
+"h6=0.620;\n",
+"hmax=h5;\n",
+"q=300*(h5)^1.5; //equation given\n",
+"q=round(q*100)/100;\n",
+"mprintf('maximum outflow discharge over spillway=%f cumecs.',q);\n",
+"mprintf('\nmaximum level of water above spillway crest=%f m.',h5);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.6: EX6_6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 6.6\n",
+"//calculate the allocations to each project purpose\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"t=240; //total cost of project(million rupees)\n",
+"s=[32 88 72]; //separable cost\n",
+"eb=[40 138 112]; //estimated benifit\n",
+"sp=[47 104 101]; //alternate single purpose cost\n",
+"//using remaining benifit method\n",
+"ts=s(1)+s(2)+s(3); //total separable cost\n",
+"tj=t-ts; //total joint cost\n",
+"w=0;\n",
+"for i=1:3\n",
+" if eb(i)<sp(i) then\n",
+" b(i)=eb(i); //benifit limited by alternate cost\n",
+" else\n",
+" b(i)=sp(i);\n",
+" end\n",
+" rb(i)=b(i)-s(i); //remaining benifit\n",
+" w=w+rb(i); \n",
+" \n",
+"end\n",
+"y=0;\n",
+"for i=1:3\n",
+" aj(i)=tj*rb(i)/w; //allocated joint cost\n",
+" ta(i)=s(i)+aj(i); //total allocations\n",
+" y=y+ta(i);\n",
+"end\n",
+"mprintf('Using remaining benifit method.');\n",
+"mprintf('\n\nallocations to each project purpose(percent):');\n",
+"for i=1:3\n",
+" per(i)=ta(i)*100/y; //total allocation percent\n",
+" mprintf('\n%f',per(i));\n",
+"end\n",
+"\n",
+"\n",
+"//using alternate justifiable method\n",
+"w=0;\n",
+"for i=1:3\n",
+" ac(i)=sp(i)-s(i); //alternate cost less separable cost\n",
+" w=w+ac(i); \n",
+" \n",
+"end\n",
+"y=0;\n",
+"for i=1:3\n",
+" ajc(i)=tj*ac(i)/w; //allocated joint cost\n",
+" ta(i)=s(i)+ajc(i); //total allocation\n",
+" y=y+ta(i);\n",
+"end\n",
+"mprintf('\n\nUsing alternate justifiable expenditure method method.');\n",
+"mprintf('\n\nallocations to each project purpose(percent):');\n",
+"for i=1:3\n",
+" pr(i)=ta(i)*100/y; //total allocation percent\n",
+"mprintf('\n%f',pr(i));\n",
+"end\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.8: EX6_8.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 6.8\n",
+"//calculate outflow hydrograph\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"I=[35 55 92 130 160 140]; //inflow(cumec/sec)\n",
+"x=0.28;K=1.6; //studied value\n",
+"t=6;\n",
+"K=K*24; //in hours\n",
+"co=(-K*x+0.5*t)/(K-K*x+0.5*t);\n",
+"c1=(K*x+0.5*t)/(K-K*x+0.5*t);\n",
+"c2=(K-K*x-0.5*t)/(K-K*x+0.5*t);\n",
+"c=co+c1+c2;\n",
+"//c=1; which implies (OK)\n",
+"//from Muskingum equation\n",
+"O(1)=35;\n",
+"mprintf('outflow hydrograph:\n%f',O(1));\n",
+"for i=2:6\n",
+" p1(i)=co*I(i);\n",
+" p2(i)=c1*I(i-1);\n",
+" p3(i)=c2*O(i-1);\n",
+" O(i)=p1(i)+p2(i)+p3(i);\n",
+" O(i)=round(O(i)*100)/100;\n",
+" mprintf('\n%f',O(i));\n",
+"end\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.9: EX6_9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 6.9\n",
+"//calculate minimum storage to meet the demand\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"md=[50 75 80 85 130 120 25 25 40 45 50 60]; //monthly demand\n",
+"e=[6 8 13 17 22 22 14 11 13 12 7 5]; //evaporation\n",
+"r=[1 0 0 0 0 19 43 39 22 6 2 1]; //rainfall\n",
+"in=[50 40 30 25 20 30 200 225 150 90 70 60]; //monthly inflow\n",
+"A=30; //area of reservior\n",
+"Cr=0.4; //run-off coefficient\n",
+"for i=1:12\n",
+" er(i)=0.4*r(i); //effective rainfall\n",
+" ni(i)=er(i)-e(i); //net inflow\n",
+" niv(i)=ni(i)*0.01*A; //net inflow volume\n",
+" nd(i)=md(i)-niv(i); //net demand\n",
+"end\n",
+"cnd(1)=nd(1); //cumulative demand\n",
+"ci(1)=in(1); //cumulative inflow\n",
+"for i=2:12\n",
+" cnd(i)=cnd(i-1)+nd(i);\n",
+" ci(i)=ci(i-1)+in(i);\n",
+"end\n",
+"mprintf('Excess demand:');\n",
+"for i=1:12\n",
+" ed(i)=cnd(i)-ci(i); //excess demand\n",
+" if ed(i)<0 then \n",
+" es(i)=ed(i); //excess supply\n",
+" ed(i)=0;\n",
+" end\n",
+" mprintf('\n%f',ed(i));\n",
+"end\n",
+"mprintf('\nminimum storage required=Maximum of excess demand=%f Mm^3.',ed(6));"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/8-GRAVITY_DAMS.ipynb b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/8-GRAVITY_DAMS.ipynb
new file mode 100644
index 0000000..2bdd4e7
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/8-GRAVITY_DAMS.ipynb
@@ -0,0 +1,1307 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 8: GRAVITY DAMS"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.10: EX8_10.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 8.10\n",
+"//calculate width of base if no tension is to develop\n",
+"//check the stability\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"c=1;\n",
+"hw=6; //heigth of water in reservior\n",
+"Bt=1.5; //width of top of dam\n",
+"H=6; //heigth of the dam\n",
+"gamma_m=20; //unit weigth of masonary \n",
+"gamma_w=9.81; //weigth density of water\n",
+"f=1800; //compressive strength\n",
+"miu=0.6; //coefficient of friction\n",
+"\n",
+"//to develop no tension e=b/6;x=b/3.\n",
+"//hence on solving the relations we get\n",
+"\n",
+"P=poly([-39.074 2.944 1],'b','c'); //equation is written wrong in book\n",
+"wb=roots(P); //sign of coefficient is 2.944 is not taken correctly in book\n",
+"\n",
+"\n",
+"//roots are 4.94 and -7.89\n",
+"//since negative value cannot be taken\n",
+"\n",
+"wb=4.94;\n",
+"mprintf('Neglecting the negative value.\nWidth of base is=4.94 m.');\n",
+"W1=Bt*gamma_m*H;\n",
+"W2=gamma_m*H*(wb-Bt)/2;\n",
+"L1=(wb-Bt)+(Bt/2);\n",
+"L2=(2*(wb-Bt))/3;\n",
+"M1=W1*L1,\n",
+"M2=W2*L2;\n",
+"U=gamma_w*H*c*wb/2;\n",
+"L4=2*wb/3;\n",
+"M4=U*L4;\n",
+"W3=gamma_w*H^2/2;\n",
+"L3=hw/3;\n",
+"M3=W3*L3;\n",
+"SumW=W1+W2-U;\n",
+"SumM=M1+M2-M4-M3;\n",
+"pn=2*SumW/wb;\n",
+"pn=round(pn*10)/10;\n",
+"mprintf('\nMaximum stress=%f kN/square.m.',pn);\n",
+"mprintf('\nDam is safe against compression');\n",
+"FOS=miu*SumW/W3;\n",
+"FOS=round(FOS*100)/100;\n",
+"mprintf('\nFactor of safety against sliding=%f. <1',FOS);\n",
+"mprintf('\nDam is unsafe against sliding.');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.11: EX8_11.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 8.11\n",
+"//calculate width of base if no tension is to develop\n",
+"//check the stability if uplift is neglected\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"c=1;\n",
+"hw=6; //heigth of water in reservior\n",
+"Bt=1.5; //width of top of dam\n",
+"H=6; //heigth of the dam\n",
+"gamma_m=20; //unit weigth of masonary \n",
+"gamma_w=9.81; //weigth density of water\n",
+"f=1800; //compressive strength\n",
+"miu=0.6; //coefficient of friction\n",
+"\n",
+"//to develop no tension e=b/6;x=b/3.\n",
+"//hence on solving the relations we get\n",
+"\n",
+"P=poly([-19.908 1.5 1],'b','c')\n",
+"wb=roots(P);\n",
+"\n",
+"//roots are 3.774 and -5.27\n",
+"//since negative value cannot be taken\n",
+"\n",
+"wb=3.77;\n",
+"mprintf('Neglecting the negative value.\nWidth of base is=3.77 m.');\n",
+"\n",
+"W1=Bt*gamma_m*H;\n",
+"W2=gamma_m*H*(wb-Bt)/2;\n",
+"L1=(wb-Bt)+(Bt/2);\n",
+"L2=(2*(wb-Bt))/3;\n",
+"M1=W1*L1,\n",
+"M2=W2*L2;\n",
+"W3=gamma_w*H^2/2;\n",
+"L3=hw/3;\n",
+"M3=W3*L3;\n",
+"SumW=W1+W2;\n",
+"SumM=M1+M2-M3;\n",
+"pn=2*SumW/wb;\n",
+"pn=round(pn*10)/10;\n",
+"mprintf('\nMaximum stress=%f kN/square.m.',pn);\n",
+"mprintf('\nDam is safe against compression');\n",
+"\n",
+"FOS=miu*SumW/W3;\n",
+"FOS=round(FOS*1000)/1000;\n",
+"mprintf('\nFactor of safety against sliding=%f. > 1',FOS);\n",
+"mprintf('\nDam is safe against sliding.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.12: EX8_12.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example8.12\n",
+"// calculate maximum permissible heigth of shutter so that no tension develops\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"Bt=3; //width of top of dam\n",
+"H=12; //heigth of the dam\n",
+"wb=9; //width of base of dam\n",
+"gamma_m=21; //unit weigth of masonary\n",
+"gamma_w=9.81; //weigth density of water\n",
+"\n",
+"W1=Bt*gamma_m*H;\n",
+"W2=gamma_m*H*(wb-Bt)/2;\n",
+"\n",
+"//taking moment about a point on base at 3m from toe\n",
+"L1=3+Bt/2;\n",
+"L2=(2*(wb-Bt)/3)-3;\n",
+"M1=W1*L1,\n",
+"M2=W2*L2;\n",
+"M=M1+M2;\n",
+"\n",
+"//net moment about this point should be zero for equilibrium\n",
+"s=(M*6/gamma_w)^(1/3)-12;\n",
+"s=round(s*100)/100;\n",
+"mprintf('maximum permissible heigth of shutter=%f m.',s);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.13: EX8_13.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 8.13\n",
+"//calculate hydrodynamic earthquake pressure\n",
+"//moment at 50m below water surface\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"c=1;\n",
+"H=100; //heigth of dam\n",
+"hw=100; //heigth of water in reservior\n",
+"FB=1; //free board\n",
+"s=0.15; //slope of upstream face\n",
+"gamma_w=9.81; //unit weigth of water\n",
+"alphah=0.1;\n",
+"\n",
+"theta=atan(s);\n",
+"y=50;\n",
+"Cm=0.735*(1-(theta*2/%pi));\n",
+"Cy=(Cm/2)*((y*(2-y/hw)/hw)+(y*(2-y/hw)/hw)^0.5);\n",
+"pe=Cy*alphah*gamma_w*hw;\n",
+"F=0.726*pe*y;\n",
+"M=0.299*pe*y^2;\n",
+"pe=round(pe*1000)/1000;\n",
+"F=round(F*10)/10;\n",
+"M=round(M*10)/10;\n",
+"mprintf('hydrodynamic earthquake pressure=%f kN/square.m\nshear=%f kN/m.\nMoment=%f kN-m/m.',pe,F,M);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.14: EX8_14.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 8.14\n",
+"//check stability\n",
+"//calculate stresses at toe and heel\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"c=1;\n",
+"H=10; //heigth of dam\n",
+"hw=10; //heigth of water in reservior\n",
+"wb=8.25; //bottom width\n",
+"Bt=1; //top width\n",
+"Hs1=0.1; //slope on upstream side\n",
+"gamma_w=9.81; //unit weigth of water\n",
+"gamma_m=22.4; //unit weigth of masonary\n",
+"f=1400; //permissible shear stress at joint\n",
+"miu=0.75; //coefficient of friction\n",
+"fi=atan(0.625);\n",
+"theta=atan(0.1);\n",
+"\n",
+"W1=Bt*H*gamma_m;\n",
+"W2=H*H*Hs1*gamma_m/2;\n",
+"W3=H*6.25*gamma_m/2;\n",
+"W4=hw*gamma_w*H*Hs1/2;\n",
+"P=gamma_w*hw^2/2;\n",
+"U=wb*gamma_w*hw*c/2;\n",
+"SumV=W1+W2+W3+W4-U;\n",
+"L3=2*(wb-(Hs1*H)-Bt)/3;\n",
+"L1=(wb-(Hs1*H)-Bt)+Bt/2;\n",
+"L2=(wb-(Hs1*H)-Bt)+Bt+(Hs1*H/3);\n",
+"L4=(wb-(Hs1*H)-Bt)+Bt+(2*Hs1*H/3);\n",
+"L5=2*wb/3;L6=hw/3;\n",
+"M1=W1*L1;M2=W2*L2;M3=W3*L3;M4=W4*L4;\n",
+"M5=U*L5;M6=P*L6;\n",
+"SumM=M1+M2+M3+M4-M5-M6;\n",
+"Mplus=M1+M2+M3+M4;\n",
+"Mminus=M5+M6;\n",
+"FOS=miu*SumV/P;\n",
+"SFF=(miu*SumV+wb*1400)/P;\n",
+"FOO=Mplus/Mminus;\n",
+"FOS=round(FOS*100)/100;\n",
+"SFF=round(SFF*10)/10;\n",
+"FOO=round(FOO*100)/100;\n",
+"mprintf('Factor of safety against sliding=%f. >1 ',FOS);\n",
+"mprintf('\nShear friction factor=%f.',SFF);\n",
+"mprintf('\nFactor of safety against overturning=%f. <1.5',FOO);\n",
+"mprintf('\nDam is unsafe against overturning');\n",
+"\n",
+"x=SumM/SumV;\n",
+"e=wb/2-x;\n",
+"p=hw*gamma_w;\n",
+"pnt=(SumV/wb)*(1+(6*e/wb)); //calculation is done wrong in book;value of b is not taken correctly\n",
+"pnh=(SumV/wb)*(1-(6*e/wb));\n",
+"sigmat=pnt*sec(fi)^2;\n",
+"sigmah=pnh*sec(theta)^2-p*tan(theta)^2;\n",
+"taut=pnt*tan(fi);\n",
+"tauh=-(pnh-p)*tan(theta);\n",
+"pnt=round(pnt*10)/10;\n",
+"pnh=round(pnh*10)/10;\n",
+"sigmat=round(sigmat*10)/10;\n",
+"sigmah=round(sigmah*10)/10;\n",
+"taut=round(taut*10)/10;\n",
+"tauh=round(tauh*10)/10;\n",
+"mprintf('\n\nNormal stress at toe=%f kN/square.m.',pnt);\n",
+"mprintf('\nNormal stress at heel=%f kN/square.m.',pnh);\n",
+"mprintf('\nPrincipal stress at toe=%f kN/square.m.',sigmat);\n",
+"mprintf('\nPrincipal stress at heel=%f kN/square.m.',sigmah);\n",
+"mprintf('\nShear stress at toe=%f kN/square.m.',taut);\n",
+"mprintf('\nShear stress at heel=%f kN/square.m.',tauh);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.15: EX8_15.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 8.15\n",
+"//Check the stability and determine sliding factor and shear factor\n",
+"clc; funcprot(0);\n",
+"//Given\n",
+"c=1;\n",
+"miu=0.75; //coefficient of friction\n",
+"H=90; //heigth of dam\n",
+"wb=73.1; //width of base\n",
+"Bt=7; //width of top of dam\n",
+"hw=89; //heigth of water in reservior\n",
+"Hs1=28; //heigth of slope on upstream side\n",
+"Hs2=83; //heigth of slope on downstream side\n",
+"Cm=0.735;\n",
+"alphah=0.1;\n",
+"gamma_m=23.5; //unit weigth of concrete\n",
+"gamma_w=9.81; //unit weigth of water\n",
+"theta=atan(8/28);\n",
+"fi=atan(0.7);\n",
+"//self weigth of dam\n",
+"W1=(Hs1*8*gamma_m)/2,\n",
+"W2=(Bt*H*gamma_m),\n",
+"W3=(Hs2^2*0.7*gamma_m)/2,\n",
+"//weigth of superimposed water\n",
+"W4=(Hs1*8*gamma_w)/2,\n",
+"W5=(hw-Hs1)*8*gamma_w,\n",
+"U=hw*wb*2*gamma_w/6; //uplift force\n",
+"wp=hw^2*gamma_w/2; //water pressure\n",
+"hp=0.726*Cm*alphah*gamma_w*hw^2; //hydrodynamic pressure\n",
+"Mhp=0.299*Cm*alphah*gamma_w*hw^3; //moment due to hydrodynamic pressure\n",
+"//inertial load due to horizontal acceleration\n",
+"I1=W2/10;\n",
+"I2=W3/10;\n",
+"I3=W1/10;\n",
+"SumV=W1+W2+W3+W4+W5-U;\n",
+"SumH=wp+hp+I1+I2+I3;\n",
+"L1=(wb-8)+8/3,\n",
+"L2=(0.7*Hs2)+(Bt/2),\n",
+"L3=(2*Hs2*0.7)/3,\n",
+"L4=(wb-8)+(2*8)/3,\n",
+"L5=(wb-8)+(8/2),\n",
+"L6=hw/3;\n",
+"L7=2*wb/3;\n",
+"M1=W1*L1,M2=W2*L2,M3=W3*L3,M4=W4*L4;\n",
+"M5=W5*L5;\n",
+"M6=wp*L6;\n",
+"M7=U*L7;\n",
+"M8=I1*45;\n",
+"M9=I2*83/3;\n",
+"M10=I3*28/3;\n",
+"Mplus=M1+M2+M3+M4+M5;\n",
+"Mminus=M6+M7+M8+M9+M10+Mhp;\n",
+"SumM=Mplus-Mminus;\n",
+"x=SumM/SumV;\n",
+"e=wb/2-x;\n",
+"pnt=(SumV/wb)*(1+(6*e/wb));\n",
+"pnh=(SumV/wb)*(1-(6*e/wb));\n",
+"sigmat=pnt*sec(fi)^2;\n",
+"p=hw*gamma_w;\n",
+"pe=Cm*alphah*gamma_w*hw;\n",
+"sigmah=pnh*sec(theta)^2-(p+pe)*tan(theta)^2;\n",
+"taut=pnt*tan(fi);\n",
+"tauh=-(-pnh-(p+pe))*tan(theta);\n",
+"mprintf('Normal stress at toe=%i kN/square.m.',pnt);\n",
+"mprintf('\nNormal stress at heel=%i kN/square.m.',pnh);\n",
+"mprintf('\nPrincipal stress at toe=%i kN/square.m.',sigmat);\n",
+"mprintf('\nPrincipal stress at heel=%i kN/square.m.',sigmah);\n",
+"mprintf('\nShear stress at toe=%i kN/square.m.',taut);\n",
+"mprintf('\nShear stress at heel=%i kN/square.m.',tauh);\n",
+"\n",
+"FOS=miu*SumV/SumH;\n",
+"SFF=(miu*SumV+wb*1400)/SumH;\n",
+"FOO=Mplus/Mminus;\n",
+"Ffi=1.2;Fc=2.4;\n",
+"F=(miu*SumV/Ffi+1400*wb/Fc)/SumH;\n",
+"FOS=round(FOS*100)/100;\n",
+"F=round(F*100)/100;\n",
+"SFF=round(SFF*100)/100;\n",
+"FOO=round(FOO*100)/100;\n",
+"mprintf('\n\nFactor of safety against sliding as per IS:6512-1972=%f. <1.5',FOS);\n",
+"mprintf('\nFactor of safety against sliding as per IS:6512-1984=%f. >1',F);\n",
+"mprintf('\nShear friction factor=%f. <6',SFF);\n",
+"mprintf('\nFactor of safety against overturning=%f. <1.5',FOO);\n",
+"mprintf('\n\nDam is unsafe for given loading conditions');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.16: EX8_16.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 8.16\n",
+"//Check the stability and determine principal and shear stress at toe and heel\n",
+"clc; funcprot(0);\n",
+"//Given\n",
+"c=1;\n",
+"miu=0.7; //coefficient of friction\n",
+"H=70; //heigth of dam\n",
+"ht=0; //heigth of tail water\n",
+"Lf=6.5; //location of foundation gallery from heel\n",
+"wb=52.5; //width of base\n",
+"Bt=7; //width of top of dam\n",
+"hw=70; //heigth of water in reservior\n",
+"Hs1=35; //heigth of slope on upstream side\n",
+"Hs2=60; //heigth of slope on downstream side\n",
+"gamma_m=24; //unit weigth of concrete\n",
+"gamma_w=9.81; //unit weigth of water\n",
+"theta=atan(0.1);\n",
+"fi=atan(0.7);\n",
+"//self weigth of dam\n",
+"W1=(Hs1*3.5*gamma_m)/2,\n",
+"W2=(Bt*H*gamma_m),\n",
+"W3=(Hs2^2*0.7*gamma_m)/2,\n",
+"//weigth of superimposed water\n",
+"W4=(Hs1*3.5*gamma_w)/2,\n",
+"W5=(hw-Hs1)*3.5*gamma_w,\n",
+"wp=hw^2*gamma_w/2; //water pressure\n",
+"Pt=gamma_w*ht,\n",
+"Ph=gamma_w*hw,\n",
+"Pg=(ht+(hw-ht)/3)*gamma_w,\n",
+"U=(Pt*(wb-Lf))+(Pg*Lf)+((Ph-Pg)*Lf/2)+((Pg-Pt)*(wb-Lf)/2)*c,\n",
+"l1=(wb-Lf)/2,l2=(2*(wb-Lf))/3,l3=(wb-Lf)+(Lf/2),l4=(wb-Lf)+((2*Lf)/3),\n",
+"L7=(((Pt*(wb-Lf))*l1)+((Pg-Pt)*(wb-Lf)*l2/2)+((Pg*Lf)*l3)+((Ph-Pg)*Lf*l4/2))/U,\n",
+"L1=(wb-3.5)+3.5/3,\n",
+"L2=(0.7*Hs2)+(Bt/2),\n",
+"L3=(2*Hs2*0.7)/3,\n",
+"L4=(wb-3.5)+(2*3.5)/3,\n",
+"L5=(wb-3.5)+(3.5/2),\n",
+"L6=hw/3;\n",
+"M1=W1*L1,M2=W2*L2,M3=W3*L3,M4=W4*L4;\n",
+"M5=W5*L5;\n",
+"M6=wp*L6;\n",
+"M7=U*L7;\n",
+"SumV1=W1+W2+W3;\n",
+"SumM1=M1+M2+M3;\n",
+"SumV2=SumV1+W4+W5;\n",
+"SumM2=SumM1+M4+M5-M6;\n",
+"SumV3=SumV2-U;\n",
+"SumM3=SumM2-M7;\n",
+"Mplus=1547377;\n",
+"Mminus=870421;\n",
+"SumH=wp;\n",
+"\n",
+"//case 1. Reservior empty\n",
+"x=SumM1/SumV1;\n",
+"e=wb/2-x;\n",
+"pnt=(SumV1/wb)*(1+(6*e/wb));\n",
+"pnh=(SumV1/wb)*(1-(6*e/wb));\n",
+"sigmat=pnt*sec(fi)^2;\n",
+"sigmah=pnh*sec(theta)^2;\n",
+"taut=pnt*tan(fi);\n",
+"tauh=pnh*tan(theta);\n",
+"pnt=round(pnt*10)/10;\n",
+"pnh=round(pnh*10)/10;\n",
+"sigmat=round(sigmat*10)/10;\n",
+"sigmah=round(sigmah*10)/10;\n",
+"taut=round(taut*10)/10;\n",
+"tauh=round(tauh*10)/10;\n",
+"mprintf('case 1. Reservior empty:');\n",
+"mprintf('\nNormal stress at toe=%f kN/square.m.',pnt);\n",
+"mprintf('\nNormal stress at heel=%f kN/square.m.',pnh);\n",
+"mprintf('\nPrincipal stress at toe=%f kN/square.m.',sigmat);\n",
+"mprintf('\nPrincipal stress at heel=%f kN/square.m.',sigmah);\n",
+"mprintf('\nShear stress at toe=%f kN/square.m.',taut);\n",
+"mprintf('\nShear stress at heel=%f kN/square.m.',tauh);\n",
+"\n",
+"//case2. reservior full without uplift\n",
+"x=SumM2/SumV2;\n",
+"e=wb/2-x;\n",
+"p=hw*gamma_w;\n",
+"pnt=(SumV2/wb)*(1+(6*e/wb));\n",
+"pnh=(SumV2/wb)*(1-(6*e/wb));\n",
+"sigmat=pnt*sec(fi)^2;\n",
+"sigmah=pnh*sec(theta)^2-p*tan(theta)^2;\n",
+"taut=pnt*tan(fi);\n",
+"tauh=-(pnh-p)*tan(theta);\n",
+"pnt=round(pnt*10)/10;\n",
+"pnh=round(pnh*10)/10;\n",
+"sigmat=round(sigmat*10)/10;\n",
+"sigmah=round(sigmah*10)/10;\n",
+"taut=round(taut*10)/10;\n",
+"tauh=round(tauh*10)/10;\n",
+"mprintf('\n\ncase 2. reservior full without uplift:');\n",
+"mprintf('\nNormal stress at toe=%f kN/square.m.',pnt);\n",
+"mprintf('\nNormal stress at heel=%f kN/square.m.',pnh);\n",
+"mprintf('\nPrincipal stress at toe=%f kN/square.m.',sigmat);\n",
+"mprintf('\nPrincipal stress at heel=%f kN/square.m.',sigmah);\n",
+"mprintf('\nShear stress at toe=%f kN/square.m.',taut);\n",
+"mprintf('\nShear stress at heel=%f kN/square.m.',tauh);\n",
+"\n",
+"//case3. reservior full with uplift\n",
+"x=SumM3/SumV3;\n",
+"e=wb/2-x;\n",
+"p=hw*gamma_w;\n",
+"pnt=(SumV3/wb)*(1+(6*e/wb));\n",
+"pnh=(SumV3/wb)*(1-(6*e/wb));\n",
+"sigmat=pnt*sec(fi)^2;\n",
+"sigmah=pnh*sec(theta)^2-p*tan(theta)^2;\n",
+"taut=pnt*tan(fi);\n",
+"tauh=-(pnh-p)*tan(theta);\n",
+"pnt=round(pnt);\n",
+"pnh=round(pnh);\n",
+"sigmat=round(sigmat);\n",
+"sigmah=round(sigmah);\n",
+"taut=round(taut);\n",
+"tauh=round(tauh);\n",
+"mprintf('\n\ncase 3. reservior full with uplift:');\n",
+"mprintf('\nNormal stress at toe=%f kN/square.m.',pnt);\n",
+"mprintf('\nNormal stress at heel=%f kN/square.m.',pnh);\n",
+"mprintf('\nPrincipal stress at toe=%f kN/square.m.',sigmat);\n",
+"mprintf('\nPrincipal stress at heel=%f kN/square.m.',sigmah);\n",
+"mprintf('\nShear stress at toe=%f kN/square.m.',taut);\n",
+"mprintf('\nShear stress at heel=%f kN/square.m.',tauh);\n",
+"\n",
+"FOS=miu*SumV3/SumH;\n",
+"SFF=(miu*SumV3+wb*1400)/SumH;\n",
+"FOO=Mplus/Mminus;\n",
+"Ffi=1.5;Fc=3.6;\n",
+"F=(miu*SumV3/Ffi+1400*wb/Fc)/SumH;\n",
+"FOS=round(FOS*1000)/1000;\n",
+"SFF=round(SFF*100)/100;\n",
+"FOO=round(FOO*100)/100;\n",
+"F=round(F*1000)/1000;\n",
+"mprintf('\n\nFactor of safety against sliding=%f.',FOS);\n",
+"mprintf('\nShear friction factor=%f.',SFF);\n",
+"mprintf('\nFactor of safety against overturning=%f.',FOO);\n",
+"mprintf('\nFactor of safety for load combination B=%f. > 1',F);\n",
+"mprintf('\nDam is safe ');\n",
+"\n",
+"//Case4.considering seismic forces\n",
+"Cm=0.712;\n",
+"alphah=0.1;\n",
+"alphav=0.08;\n",
+"hp=0.726*Cm*alphah*gamma_w*hw^2; //hydrodynamic pressure\n",
+"Mhp=0.299*Cm*alphah*gamma_w*hw^3; //moment due to hydrodynamic pressure\n",
+"//inertial load due to horizontal acceleration\n",
+"I1=W2/10;\n",
+"I2=W3/10;\n",
+"I3=W1/10;\n",
+"v=SumV1*alphav;\n",
+"Mv=116444;\n",
+"SumV4=SumV3-v;\n",
+"SumH1=SumH+I1+I2+I3+hp;\n",
+"M8=I1*35;\n",
+"M9=I2*20;\n",
+"M10=I3*35/3;\n",
+"Mminus1=1161849;\n",
+"SumM4=SumM3-M8-M9-M10-Mhp-Mv;\n",
+"\n",
+"x=SumM4/SumV4;\n",
+"e=wb/2-x;\n",
+"p=hw*gamma_w;\n",
+"pe=Cm*alphah*gamma_w*hw;\n",
+"pnt=(SumV4/wb)*(1+(6*e/wb));\n",
+"pnh=(SumV4/wb)*(1-(6*e/wb));\n",
+"sigmat=pnt*sec(fi)^2;\n",
+"sigmah=pnh*sec(theta)^2-(p+pe)*tan(theta)^2;\n",
+"taut=pnt*tan(fi);\n",
+"tauh=(-pnh+(p+pe))*tan(theta);\n",
+"pnt=round(pnt);\n",
+"pnh=round(pnh);\n",
+"sigmat=round(sigmat);\n",
+"sigmah=round(sigmah);\n",
+"taut=round(taut);\n",
+"tauh=round(tauh);\n",
+"mprintf('\n\ncase 4.considering seismic forces');\n",
+"mprintf('\nNormal stress at toe=%f kN/square.m.',pnt);\n",
+"mprintf('\nNormal stress at heel=%f kN/square.m.',pnh);\n",
+"mprintf('\nPrincipal stress at toe=%f kN/square.m.',sigmat);\n",
+"mprintf('\nPrincipal stress at heel=%f kN/square.m.',sigmah);\n",
+"mprintf('\nShear stress at toe=%f kN/square.m.',taut);\n",
+"mprintf('\nShear stress at heel=%f kN/square.m.',tauh); //answer is wrong in book\n",
+"\n",
+"FOS=miu*SumV4/SumH1;\n",
+"SFF=(miu*SumV4+wb*1400)/SumH1;\n",
+"FOO=Mplus/Mminus1;\n",
+"Ffi=1.2;Fc=2.7;\n",
+"F=(miu*SumV4/Ffi+1400*wb/Fc)/SumH1;\n",
+"FOS=round(FOS*1000)/1000;\n",
+"SFF=round(SFF*100)/100;\n",
+"FOO=round(FOO*100)/100;\n",
+"F=round(F*100)/100;\n",
+"mprintf('\n\nFactor of safety against sliding=%f.',FOS);\n",
+"mprintf('\nShear friction factor=%f.',SFF);\n",
+"mprintf('\nFactor of safety against overturning=%f.',FOO);\n",
+"mprintf('\nFactor of safety for load combination E=%f. > 1',F);\n",
+"mprintf('\nDam is safe ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.17: EX8_17.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 8.17\n",
+"//design practical profile of gravity dam\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"c=1;\n",
+"rlb=1450; //R.L of base of dam\n",
+"rlw=1480.5; //R.L of water level\n",
+"Sg=2.4; //specific gravity of masonary\n",
+"gamma_w=9.81; //unit weigth of water\n",
+"w=1; //heigth of waves\n",
+"f=1200; //safe compressive stress for masonary\n",
+"FB=1.5*w;\n",
+"rlt=FB+rlw; //R.L of top of dam\n",
+"H=rlt-rlb; //heigth of dam\n",
+"LH=f/(gamma_w*(Sg+1))\n",
+"LH=round(LH*100)/100;\n",
+"mprintf('Heigth of dam=%f m.',H);\n",
+"mprintf('\nlimiting heigth of dam=%f m.',LH);\n",
+"mprintf('\nDam is low gravity dam');\n",
+"hw=rlw-rlb;\n",
+"//keep top width,a=4.5.\n",
+"a=4.5;\n",
+"P=hw/(Sg^0.5);\n",
+"P=round(P*10)/10;\n",
+"mprintf('\nBase width of elementary profile=%f m.',P);\n",
+"uo=a/16;\n",
+"wb=uo+P;\n",
+"wb=round(wb);\n",
+"mprintf('\nBase width=%f m.',wb);\n",
+"D=2*a*(Sg^0.5);\n",
+"D=round(D);\n",
+"mprintf('\nDistance upto which u/s slope is vertical from water level=%f m.',D);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.18: EX8_18.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 8.18\n",
+"//determine if dam is safe against sliding\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"hw=97; //heigth of water in reservior\n",
+"Bt=7; //width of top of dam\n",
+"H=100; //heigth of the dam\n",
+"Hs2=90; //heigth of slope on downstream side\n",
+"wb=75; //width of base of dam\n",
+"miu=0.75; //coefficient of friction\n",
+"gamma_d=2.4; //weigth density of concrete\n",
+"gamma_w=1000; //weigth density of water\n",
+"\n",
+"P=gamma_w*hw^2/(2*1000);\n",
+"W1=Bt*gamma_d*H;\n",
+"W2=(wb-Bt)*Hs2*gamma_d/2;\n",
+"W=W1+W2;\n",
+"FOS=miu*W/P;\n",
+"FOS=round(FOS*1000)/1000;\n",
+"mprintf('Factor of safety against sliding=%f.',FOS);\n",
+"mprintf('\nDam is safe against sliding');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.19: EX8_19.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 8.19\n",
+"//calculate \n",
+"//Factor of safety against overturning\n",
+"//Factor of safety against sliding\n",
+"//Shear friction factor\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"c=1;\n",
+"H=10; //heigth of dam\n",
+"hw=10; //heigth of water in reservior\n",
+"wb=8.25; //bottom width\n",
+"Bt=1; //top width\n",
+"Hs1=0.1; //slope on upstream side\n",
+"gamma_w=9.81; //unit weigth of water\n",
+"gamma_m=22.4; //unit weigth of masonary\n",
+"f=1400; //permissible shear stress at joint\n",
+"miu=0.75; //coefficient of friction\n",
+"fi=atan(0.625);\n",
+"theta=atan(0.1);\n",
+"\n",
+"W1=Bt*H*gamma_m;\n",
+"W2=H*H*Hs1*gamma_m/2;\n",
+"W3=H*6.25*gamma_m/2;\n",
+"W4=hw*gamma_w*H*Hs1/2;\n",
+"P=gamma_w*hw^2/2;\n",
+"U=wb*gamma_w*hw*c/2;\n",
+"SumV=W1+W2+W3+W4-U;\n",
+"L3=2*(wb-(Hs1*H)-Bt)/3;\n",
+"L1=(wb-(Hs1*H)-Bt)+Bt/2;\n",
+"L2=(wb-(Hs1*H)-Bt)+Bt+(Hs1*H/3);\n",
+"L4=(wb-(Hs1*H)-Bt)+Bt+(2*Hs1*H/3);\n",
+"L5=2*wb/3;L6=hw/3;\n",
+"M1=W1*L1;M2=W2*L2;M3=W3*L3;M4=W4*L4;\n",
+"M5=U*L5;M6=P*L6;\n",
+"SumM=M1+M2+M3+M4-M5-M6;\n",
+"Mplus=M1+M2+M3+M4;\n",
+"Mminus=M5+M6;\n",
+"FOS=miu*SumV/P;\n",
+"SFF=(miu*SumV+wb*1400)/P;\n",
+"FOO=Mplus/Mminus;\n",
+"FOS=round(FOS*100)/100;\n",
+"SFF=round(SFF*10)/10;\n",
+"FOO=round(FOO*100)/100;\n",
+"mprintf('Factor of safety against sliding=%f.',FOS);\n",
+"mprintf('\nShear friction factor=%f.',SFF);\n",
+"mprintf('\nFactor of safety against overturning=%f.',FOO);\n",
+"mprintf('\nDam is unsafe against overturning');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.1: EX8_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 8.1\n",
+"//calculate forces induced due to earthquake\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"H=100; //heigth of dam\n",
+"wb=70; //width of base of dam\n",
+"wt=7; //width of top of dam\n",
+"l=1; //length of dam\n",
+"hw=98; //heigth of water in dam\n",
+"hsu=90; //heigth of slope on downstream side\n",
+"s=1/0.7; //slope on downstream side\n",
+"gammad=24; //unit weigth of dam\n",
+"gammaw=9.81; //unit weigth of water\n",
+"E=2.05D7; //modulus of elasticity\n",
+"\n",
+"//(a) inertial forces and moments\n",
+"alpha0=0.05; //from table 8.1\n",
+"alphah=2*alpha0;\n",
+"//at 10m from top\n",
+"F10=integrate('25.2-0.25*y','y',0,10);\n",
+"M10=integrate('25.2*(1-0.01*y)*(10-y)','y',0,10);\n",
+"//at 100m below top\n",
+"F100=F10+integrate('0.15*(1-0.01*y)*16.8*y','y',10,100);\n",
+"M100=M10+90*F10+integrate('0.15*(1-0.01*y)*16.8*y*(100-y)','y',10,100);\n",
+"mprintf('Inertial forces:\nAt 10m from top: F=%f kn;M=%ikn-m\nAt 100m from top: F=%f kn;M=%ikn-m.',F10,M10,F100,M100);\n",
+"\n",
+"//(b) hydrodynamic pressure and moment\n",
+"//at 10m from top\n",
+"y=8;\n",
+"W10=1680;\n",
+"alphah=F10/W10;\n",
+"Cm=0.735;\n",
+"Cy=(Cm/2)*((y*(2-y/hw)/hw)+(y*(2-y/hw)/hw)^0.5);\n",
+"p=Cy*alphah*gammaw*hw;\n",
+"P10=0.726*p*y;\n",
+"Mp10=0.299*p*y^2;\n",
+"P10=round(P10*100)/100;\n",
+"Mp10=round(Mp10*100)/100;\n",
+"//at 100m from top\n",
+"y=98;\n",
+"W100=84840;\n",
+"alphah=F100/W100;\n",
+"Cm=0.735;\n",
+"Cy=(Cm/2)*(y*(2-y/hw)/hw+(y*(2-y/hw)/hw)^0.5);\n",
+"p=Cy*alphah*gammaw*hw;\n",
+"P100=0.726*p*y;\n",
+"Mp100=0.299*p*y^2;\n",
+"mprintf('\nHydrodynamic forces:\nAt 10m from top: F=%f kn;M=%fkn-m\nAt 100m from top: F=%i kn;M=%ikn-m.',P10,Mp10,P100,Mp100);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.20: EX8_20.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 8.20\n",
+"//calculate streeses at heel and toe of dam\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"c=1;\n",
+"hw=80; //heigth of water in reservior\n",
+"Bt=6; //width of top of dam\n",
+"H=84; //heigth of the dam\n",
+"Hs2=75; //heigth of slope on downstream side\n",
+"wb=56; //width of base of dam\n",
+"Lf=8; //distance of foundation gallery from heel\n",
+"gamma_d=23.5; //weigth density of concrete\n",
+"gamma_w=9.81; //weigth density of water\n",
+"ht=6; //heigth of tail water\n",
+"\n",
+"W1=Bt*gamma_d*H;\n",
+"W2=gamma_d*Hs2*(wb-Bt)/2;\n",
+"W3=gamma_w*ht*4/2;\n",
+"W4=gamma_w*hw^2/2;\n",
+"W5=gamma_w*ht^2/2;\n",
+"Pt=gamma_w*ht,\n",
+"Ph=gamma_w*hw,\n",
+"Pg=(ht+(hw-ht)/3)*gamma_w,\n",
+"U=(Pt*(wb-Lf))+(Pg*Lf)+((Ph-Pg)*Lf/2)+((Pg-Pt)*(wb-Lf)/2)*c,\n",
+"l1=(wb-Lf)/2,l2=(2*(wb-Lf))/3,l3=(wb-Lf)+(Lf/2),l4=(wb-Lf)+((2*Lf)/3),\n",
+"L6=(((Pt*(wb-Lf))*l1)+((Pg-Pt)*(wb-Lf)*l2/2)+((Pg*Lf)*l3)+((Ph-Pg)*Lf*l4/2))/U,\n",
+"L1=(wb-Bt)+(Bt/2),\n",
+"L2=(2*(wb-Bt))/3,\n",
+"L3=4/3;\n",
+"L4=hw/3;\n",
+"L5=ht/3;\n",
+"M1=W1*L1,M2=W2*L2,M3=W3*L3,M4=W4*L4,M5=W5*L5,M6=U*L6;\n",
+"SumV=W1+W2+W3-U;\n",
+"SumH=W4-W5;\n",
+"SumM=M1+M2+M3-M4+M5-M6;\n",
+"x=SumM/SumV;\n",
+"e=wb/2-x;\n",
+"pnt=(SumV/wb)*(1+(6*e/wb));\n",
+"pnh=(SumV/wb)*(1-(6*e/wb));\n",
+"pnt=round(pnt*10)/10;\n",
+"pnh=round(pnh*10)/10;\n",
+"mprintf('Maximum Normal stress at toe=%f kN/square.m.',pnt);\n",
+"mprintf('\nMaximum Normal stress at heel=%f kN/square.m.',pnh);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.2: EX8_2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 8.2\n",
+"//calculate forces induced due to earthquake by responce spectrum method\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"H=100; //heigth of dam\n",
+"wb=70; //width of base of dam\n",
+"wt=7; //width of top of dam\n",
+"l=1; //length of dam\n",
+"hw=98; //heigth of water in dam\n",
+"hsu=90; //heigth of slope on downstream side\n",
+"s=1/0.7; //slope on downstream side\n",
+"gammad=24; //unit weigth of dam\n",
+"gammaw=9.81; //unit weigth of water\n",
+"E=2.05D7; //modulus of elasticity\n",
+"beta=1;\n",
+"I=2;\n",
+"Fo=0.25; //from table 8.2\n",
+" //t=Sa/g;\n",
+"t=0.19; //from fig. 8.4\n",
+"alphah=beta*I*Fo*t;\n",
+"T=5.55*H^2/wb*(gammad/(gammaw*E))^0.5;\n",
+"//(a) Base shear\n",
+"W=l*gammad*(wt*H+((hsu/s)*hsu)/2);\n",
+"Fb=0.6*W*alphah;\n",
+"mprintf('Base shear=%f KN.',Fb);\n",
+"\n",
+"//(b) Base moment\n",
+"hbar=((wt*H^2/2)+((hsu/s)*hsu^2/6))/((wt*H)+(hsu/s)*hsu/2);\n",
+"Mb=0.9*W*hbar*alphah;\n",
+"mprintf('\nBase moment=%f KN-m.',Mb);\n",
+"\n",
+"//(c) shear at 10m from top\n",
+"Cv=0.08;\n",
+"F10=Cv*Fb;\n",
+"F10=round(F10);\n",
+"mprintf('\nshear at 10m from top=%f KN.',F10);\n",
+"\n",
+"//(d) Moment at 10m from top\n",
+"Cm=0.02;\n",
+"M10=Cm*Mb;\n",
+"M10=round(M10);\n",
+"mprintf('\nmoment at 10m from top=%f KN.',M10);\n",
+"//(e) Hydrodynamic pressure\n",
+"//at 10m from top\n",
+"y=8;\n",
+"W10=1680;\n",
+"Cm=0.735;\n",
+"Cy=(Cm/2)*((y*(2-y/hw)/hw)+(y*(2-y/hw)/hw)^0.5);\n",
+"p=Cy*alphah*gammaw*hw;\n",
+"P10=0.726*p*y;\n",
+"Mp10=0.299*p*y^2;\n",
+"P10=round(P10*100)/100;\n",
+"Mp10=round(Mp10*100)/100;\n",
+"//at 100m from top\n",
+"y=98;\n",
+"W100=84840;\n",
+"Cm=0.735;\n",
+"Cy=(Cm/2)*(y*(2-y/hw)/hw+(y*(2-y/hw)/hw)^0.5);\n",
+"p=Cy*alphah*gammaw*hw;\n",
+"P100=0.726*p*y;\n",
+"Mp100=0.299*p*y^2;\n",
+"mprintf('\nHydrodynamic forces:\nAt 10m from top: F=%f kn;M=%fkn-m\nAt 100m from top: F=%i kn;M=%ikn-m.',P10,Mp10,P100,Mp100);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.3: EX8_3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 8.3\n",
+"//calculate forces induced due to earthquake\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"H=100; //heigth of dam\n",
+"wb=70; //width of base of dam\n",
+"wt=7; //width of top of dam\n",
+"l=1; //length of dam\n",
+"hw=98; //heigth of water in dam\n",
+"hsu=90; //heigth of slope on downstream side\n",
+"s=1/0.7; //slope on downstream side\n",
+"gammad=24; //unit weigth of dam\n",
+"gammaw=9.81; //unit weigth of water\n",
+"E=2.05D7; //modulus of elasticity\n",
+"//(a) Seismic coefficient method\n",
+"alpha0=0.05; //from table 8.1\n",
+"alphah=2*alpha0;\n",
+"alphav=0.75*alphah;\n",
+"//at 10m from top\n",
+"F10=integrate('alphav*168*(1-0.01*y)','y',0,10);\n",
+"//at 100m below top\n",
+"F100=F10+integrate('alphav*(1-0.01*y)*16.8*y','y',10,100);\n",
+"mprintf('Part(a):\nAt 10m from top: F=%f kn\nAt 100m from top: F=%f kn.',F10,F100);\n",
+"\n",
+"//(b)Response spectrum method\n",
+"beta=1;\n",
+"I=2;\n",
+"Fo=0.25; //from table 8.2\n",
+" //t=Sa/g;\n",
+"t=0.19; //from fig. 8.4\n",
+"alphah=beta*I*Fo*t;\n",
+"alphav=0.75*alphah;\n",
+"//at 10m from top\n",
+"F10=integrate('alphav*168*(1-0.01*y)','y',0,10);\n",
+"//at 100m below top\n",
+"F100=F10+integrate('alphav*(1-0.01*y)*16.8*y','y',10,100);\n",
+"F100=round(F100*100)/100;\n",
+"mprintf('\nPart(b):\nAt 10m from top: F=%f kn\nAt 100m from top: F=%f kn.',F10,F100);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.4: EX8_4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 8.4\n",
+"//calculate hydrodynamic pressure on10m,40m and 100m from top\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"H=100; //heigth of dam\n",
+"wb=73; //width of base of dam\n",
+"wt=7; //width of top of dam\n",
+"l=1; //length of dam\n",
+"hw=98; //heigth of water in dam\n",
+"hsu=90; //heigth of slope on downstream side\n",
+"s=1/0.7; //slope on downstream side\n",
+"gammad=24; //unit weigth of dam\n",
+"gammaw=9.81; //unit weigth of water\n",
+"E=2.05D7; //modulus of elasticity\n",
+"\n",
+"//at 10m from top\n",
+"y=8;\n",
+"alphah=0.1;\n",
+"Cm=0.72;\n",
+"Cy=(Cm/2)*((y*(2-y/hw)/hw)+(y*(2-y/hw)/hw)^0.5);\n",
+"p10=Cy*alphah*gammaw*hw;\n",
+"F10=0.726*p10*y;\n",
+"Mp10=0.299*p10*y^2;\n",
+"\n",
+"//at 40m from top\n",
+"y=38;\n",
+"alphah=0.1;\n",
+"Cm=0.72;\n",
+"Cy=(Cm/2)*((y*(2-y/hw)/hw)+(y*(2-y/hw)/hw)^0.5);\n",
+"p40=Cy*alphah*gammaw*hw;\n",
+"F40=0.726*p40*y;\n",
+"Mp40=0.299*p40*y^2;\n",
+"\n",
+"//at 100m from top\n",
+"y=98;\n",
+"alphah=0.1;\n",
+"Cm=0.72;\n",
+"Cy=(Cm/2)*((y*(2-y/hw)/hw)+(y*(2-y/hw)/hw)^0.5);\n",
+"p100=Cy*alphah*gammaw*hw;\n",
+"F100=0.726*p100*y;\n",
+"Mp100=0.299*p100*y^2;\n",
+"p10=round(p10*1000)/1000;\n",
+"F10=round(F10*1000)/1000;\n",
+"Mp10=round(Mp10*10)/10;\n",
+"p40=round(p40*1000)/1000;\n",
+"F40=round(F40*1000)/1000;\n",
+"Mp40=round(Mp40*10)/10;\n",
+"p100=round(p100*100)/100;\n",
+"F100=round(F100*1000)/1000;\n",
+"Mp100=round(Mp100*10)/10;\n",
+"mprintf('\nHydrodynamic Forces:\nAt 10m from top: P=%f KN/square m;F=%f KN;M=%f KN-m.\nAt 40m from top: P=%f KN/square m.;F=%f KN;M=%f KN-m.\nAt 100m from top: P=%f KN/square m;F=%f KN;M=%f KN-m.',p10,F10,Mp10,p40,F40,Mp40,p100,F100,Mp100);\n",
+"\n",
+"//vertical component of reservior water on horizontal section\n",
+"s1=3/60;\n",
+"Wh=(F100-F40)*s1;\n",
+"Wh=round(Wh*100)/100;\n",
+"mprintf('\n\nvertical component of reservior water on horizontal section=%f kN/m.',Wh);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.8: EX8_8.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 8.8\n",
+"//calculate Heigth of dam when\n",
+"//no tension is permissible\n",
+"//factor of safety against slidingis 1.5\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"\n",
+"wb=3; //width of dam;\n",
+"miu=0.5; //coefficient of friction\n",
+"Sg=2.4; //specific gravity of masonary\n",
+"gamma_w=9.81; //unit weigth of water\n",
+"c=1;\n",
+"\n",
+"//when uplift is considered\n",
+"//when no tension is permissible then e=wb/6;\n",
+"\n",
+"p1=wb*Sg*gamma_w;\n",
+"p2=c*wb*gamma_w/2;\n",
+"p3=p1-p2;\n",
+"p4=p1*wb/2-p2*2;\n",
+"p5=gamma_w/6;\n",
+"d1=p4/p3; d2=p5/p3;\n",
+"d3=1.5-d1;\n",
+"H=((0.5-d3)/d2)^0.5;\n",
+"H=round(H*100)/100;\n",
+"mprintf('when uplift is considered:')\n",
+"mprintf('\nHeigth of dam when no tension is permissible=%f m.',H);\n",
+"H=p3*0.5/(1.5*p5*3);\n",
+"mprintf('\nHeigth of dam when factor of safety against sliding is 1.5=%f m.',H);\n",
+"\n",
+"//when uplift is not considered\n",
+"p1=wb*Sg*gamma_w;\n",
+"p4=p1*wb/2;\n",
+"p5=gamma_w/6;\n",
+"d1=p4/p1;\n",
+"d2=p5/p1;\n",
+"H=(0.5/d2)^0.5;\n",
+"H=round(H*100)/100;\n",
+"mprintf('\n\nwhen uplift is not considered:')\n",
+"mprintf('\nHeigth of dam when no tension is permissible=%f m.',H);\n",
+"H=p1*0.5/(1.5*p5*3);\n",
+"mprintf('\nHeigth of dam when factor of safety against sliding is 1.5=%f m.',H);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.9: EX8_9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"\n",
+"//example 8.9\n",
+"//calculate streeses at heel and toe of dam\n",
+"clc;funcprot(0);\n",
+"//given\n",
+"c=1;\n",
+"hw=6; //heigth of water in reservior\n",
+"Bt=1.5; //width of top of dam\n",
+"H=6; //heigth of the dam\n",
+"wb=4.5; //width of base of dam\n",
+"Sg=2.4; //specific gravity of masonary\n",
+"gamma_w=9.81; //weigth density of water\n",
+"\n",
+"W1=Bt*gamma_w*Sg*H;\n",
+"W2=gamma_w*Sg*H*(wb-Bt)/2;\n",
+"L1=(wb-Bt)+(Bt/2);\n",
+"L2=(2*(wb-Bt))/3,\n",
+"M1=W1*L1,M2=W2*L2,\n",
+"\n",
+"//Reaervior empty\n",
+"SumW=W1+W2;\n",
+"SumM=M1+M2;\n",
+"x=SumM/SumW;\n",
+"e=wb/2-x;\n",
+"pnt=(SumW/wb)*(1+(6*e/wb));\n",
+"pnh=(SumW/wb)*(1-(6*e/wb));\n",
+"pnt=round(pnt*10)/10;\n",
+"pnh=round(pnh*10)/10;\n",
+"mprintf('Reservior empty:');\n",
+"mprintf(' \nNormal stress at toe=%f kN/square.m.',pnt);\n",
+"mprintf('\nNormal stress at heel=%f kN/square.m.',pnh);\n",
+"\n",
+"//Reservior full\n",
+"W3=gamma_w*H^2/2;\n",
+"U=gamma_w*H*c*wb/2;\n",
+"SumV=SumW-U;\n",
+"L3=hw/3;\n",
+"L4=2*wb/3; //lever arm\n",
+"M3=W3*L3;\n",
+"M4=U*L4; //moment about toe\n",
+"SumM1=SumM-M4-M3;\n",
+"x=SumM1/SumV;\n",
+"e=wb/2-x;\n",
+"pnt=(SumV/wb)*(1+(6*e/wb));\n",
+"pnh=(SumV/wb)*(1-(6*e/wb));\n",
+"pnt=round(pnt*10)/10;\n",
+"pnh=round(pnh*10)/10;\n",
+"mprintf('\n\nReservior full:');\n",
+"mprintf(' \nNormal stress at toe=%f kN/square.m.',pnt);\n",
+"mprintf('\nNormal stress at heel=%f kN/square.m.',pnh);\n",
+""
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}