summaryrefslogtreecommitdiff
path: root/2087/CH12
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2087/CH12
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '2087/CH12')
-rwxr-xr-x2087/CH12/EX12.1/example12_1.sce48
-rwxr-xr-x2087/CH12/EX12.10/example12_10.sce20
-rwxr-xr-x2087/CH12/EX12.11/example12_11.sce161
-rwxr-xr-x2087/CH12/EX12.12/example12_12.sce51
-rwxr-xr-x2087/CH12/EX12.2/example12_2.sce105
-rwxr-xr-x2087/CH12/EX12.3/example12_3.sce161
-rwxr-xr-x2087/CH12/EX12.4/example12_4.sce198
-rwxr-xr-x2087/CH12/EX12.5/example12_5.sce31
-rwxr-xr-x2087/CH12/EX12.6/example12_6.sce45
-rwxr-xr-x2087/CH12/EX12.7/example12_7.sce15
-rwxr-xr-x2087/CH12/EX12.8/example12_8.sce40
-rwxr-xr-x2087/CH12/EX12.9/example12_9.sce28
12 files changed, 903 insertions, 0 deletions
diff --git a/2087/CH12/EX12.1/example12_1.sce b/2087/CH12/EX12.1/example12_1.sce
new file mode 100755
index 000000000..0a38fde25
--- /dev/null
+++ b/2087/CH12/EX12.1/example12_1.sce
@@ -0,0 +1,48 @@
+
+
+//example 12.1
+//calculate average hydraulic gradient
+//uplift presuures and thickness of floor at 6m, 12m and 18m from u/s
+clc;funcprot(0);
+//given
+rho=2.24; //relative density of material
+gamma_w=9.81; //unit weigth of water
+L=22; //total length
+lc=(2*6)+L+(2*8); //length of creep
+hg=4/lc; //hydraulic gradient
+mprintf("avearge hydraulic gradient=%f.",hg);
+//at 6 m from u/s
+x=6;
+lg=(6*2)+x;
+h1=4*(1-lg/50); //unbalanced head
+up=gamma_w*h1;
+t=4*h1/(3*(rho-1));
+up=round(up*100)/100;
+t=round(t*100)/100;
+mprintf("\n\nuplift at 6 m from u/s=%f kN/square metre.",up);
+mprintf("\nthickness at 6 m from u/s=%f m.",t);
+
+//at 12 m from u/s
+x=12;
+lg=(6*2)+x;
+h1=4*(1-lg/50); //unbalanced head
+up=gamma_w*h1;
+t=4*h1/(3*(rho-1));
+up=round(up*100)/100;
+t=round(t*100)/100;
+mprintf("\n\nuplift at 12 m from u/s=%f kN/square metre.",up);
+mprintf("\nthickness at 12 m from u/s=%f m.",t);
+
+//at 18m from u/s
+x=18;
+lg=(6*2)+x;
+h1=4*(1-lg/50); //unbalanced head
+up=gamma_w*h1;
+t=4*h1/(3*(rho-1));
+up=round(up*10)/10;
+t=round(t*100)/100;
+mprintf("\n\nuplift at 18 m from u/s=%f kN/square metre.",up);
+mprintf("\nthickness at 18 m from u/s=%f m.",t);
+
+
+
diff --git a/2087/CH12/EX12.10/example12_10.sce b/2087/CH12/EX12.10/example12_10.sce
new file mode 100755
index 000000000..6c01786f2
--- /dev/null
+++ b/2087/CH12/EX12.10/example12_10.sce
@@ -0,0 +1,20 @@
+
+
+//example 12.10
+//calculate critical exit gradient and factor of safety of system
+clc;funcprot(0);
+//given
+b=60; //length of floor
+H=6; //static head of weir
+d=6; //downstream depth of pile
+n=0.3; //porousity of soil particles
+G=2.7; //relative density of soil particles
+
+alpha=b/d;
+lambda=(1+(1+alpha^2)^0.5)/2;
+Ge=H/(d*%pi*(lambda)^0.5);
+e=n/(1-n);
+chg=(G-1)/(1+e);
+f=chg/Ge;
+f=round(f*100)/100;
+mprintf("critical exit gradient=%f.\nfactor of safety of system=%f.",chg,f);
diff --git a/2087/CH12/EX12.11/example12_11.sce b/2087/CH12/EX12.11/example12_11.sce
new file mode 100755
index 000000000..f5c75adff
--- /dev/null
+++ b/2087/CH12/EX12.11/example12_11.sce
@@ -0,0 +1,161 @@
+
+
+//example 12.11
+//design a vertical drop weir on Bligh's theory
+//test floor by Khosla's theory
+clc;funcprot(0);
+//given
+Q=2800; //maximum flood discharge
+hfl=285; //H.F.L before construction
+hw=278; //minimum water level
+fsl=284; //F.S.L of canal
+c=12; //coefficient of creep
+flux=1; //allowable afflux
+Ge=1/6; //permissible exit gradient
+rho=2.24; //specific gravity of concrete
+
+//Hydraulic calculation
+L=4.75*Q^0.5;
+q=Q/L;
+q=round(q*10)/10;
+mprintf("Hydraulic calculation:");
+mprintf("\ndischarge per unit width of river=%f cumecs.",q);
+f=1;
+R=1.35*(q^2/f)^(1/3);
+R=round(R*100)/100;
+mprintf("\nregime scour depth=%f m.",R);
+V=q/R; //regime velocity
+vh=V^2/(2*9.81); //velocity head
+l_down=hfl+vh;
+l_up=l_down+flux;
+hfl_up=l_up-vh;
+hfl_down=hfl-0.5;
+hfl_down=round(hfl_down*100)/100;
+mprintf("\nactual d/s H.F.L allowing 0.5 m for retrogation=%f m.",hfl_down);
+K=(q/1.7)^(2/3);
+cl=l_up-K; //crest level
+cl=round(cl*100)/100;
+mprintf("\ncrest level=%f m.",cl);
+pl=fsl+0.5; //pond level
+s=hfl_down-cl; //heigth of shutter
+mprintf("\nheigth of shutter=%f m.",s);
+rl_up_pile=hfl_up-1.5*R; //R.L of bottom u/s pile
+d_up_cut=hw-276; //depth of upstream cut-off
+mprintf("\ndepth of upstream cut-off=%f m.",d_up_cut);
+mprintf("\n provide concrete cut off 2 m depth.");
+rl_bot_ds=hfl_down-2*R;
+Hs=hfl_down-hw; //seepage head
+Hc=cl-hw; //heigth of crest
+mprintf("\nR.L of gates crest=%f m.",Hs);
+mprintf("\nHeigth of crest=%f m.",Hc);
+
+//design of weir wall
+d=hfl_up-cl;
+a=d/(rho)^0.5;
+a=3*d/(2*rho); //from sliding consideration
+a=s+1; //from practical consieration
+a=a+1;
+mprintf("\n\ndesign of weir wall:")
+mprintf("\nprovide top width of %i m.",a);
+Mo=9.81*Hs^3/6; //overtirning moment
+//equating the moment of resistance to overturning moment and putting the values we get
+y=poly([-1.084,0.020,0.039],'x','c');
+b=roots(y);
+//we get b= - 5.5347261 and 5.0219056
+//taking
+b=5;
+//when weir is submerged
+C=0.58;
+d=(q^2/((2*C/3)^2*2*9.81))^(1/3);
+Mo=9.81*d*Hc^2/2;
+//from equation of moment of resistence we get
+y=poly([-77.55,3,1],'x','c');
+b=roots(y);
+//we get b= - 10.433085 and 7.4330846
+//taking
+b=8;
+mprintf("\nbottom width=%i m.",b);
+
+//design of impervious and pervious aprons
+C=12;
+L=C*Hs;
+mprintf("\n\ndesign of impervious and pervious aprons:");
+mprintf("\ntotal creep length=%i m.",L);
+l1=2.21*C*(Hs/13)^0.5;
+l1_=l1+1;
+mprintf("\nlength of downstream impervious apron=%i m.",l1_);
+d1=hw-276;
+d2=hw-271;
+l2=L-l1-(b+2*d1+2*d2);
+mprintf("\nlength of upstream impervious apron=%i m.",l2);
+l3=18*C*(Hs*q/975)^0.5;
+mprintf("\ntotal length of d/s apron=%i m.",l3); //calculation is wrong in book
+l=l3-l1;
+le=l/2;
+le=round(le*100)/100;
+mprintf('\nprovide filter of length %f m. and launching apron of length %f m.',le,le);
+t=d2*10^0.5/le;
+mprintf("\nthickness of launching apron in horizontal position=%f m.",t);
+mprintf("\nprovide launching apron of thickness 1.5 m.");
+T=2*d1;
+V=d1*10^0.5;
+ta=V/T;
+ta=round(ta*10)/10;
+mprintf("\nthickness of apron in horizontal position=%f m.",ta);
+Hr=Hs-Hs*(4+33+8)/L;
+t=4*Hr/(3*(rho-1));
+t=round(t*10)/10;
+mprintf('\nprovide thickness of %f m from d/s of weir wall to point 6 m from it.',t);
+Hr=Hs-Hs*(4+33+8+6)/L;
+t=4*Hr/(3*(rho-1));
+t=round(t*10)/10;
+mprintf("\nprovide thickness of %f m from 6 m to 12 m from d/s end of weir wall.",t);
+Hr=Hs-Hs*(4+33+8+12)/L;
+t=4*Hr/(3*(rho-1));
+t=round(t*10)/10;
+mprintf("\nprovide thickness of %f m for rest of length of weir floor.",t);
+
+//check by khosla's theory
+b=33+8+19; //total horizontal length of impervious floor
+d=7; //depth of downstream pile
+alpha=b/d;
+n=0.14; //n=1/%pi*(lambda)^0.5;
+Ge=Hs*n/d;
+mprintf("\n\ncheck by Khosla theory:");
+mprintf("\nexit gradient=%f. < 1/6\n hence safe",Ge);
+alpha_=d/b;
+fic1=0.83;fid1=0.88;
+corec_c1=(fid1-fic1)*100/2;
+bdash=b;
+d=2;D=7;
+C1=19*(D/bdash)^0.5*(d+D)/b;
+fic1=fic1*100+corec_c1+C1;
+Pc=Hs*fic1/100; //pressure head at C
+alpha_=d/b;
+fie2=0.31;fid2=0.21;
+corec_e1=(fie2-fid2)*1.7*100/7;
+bdash=b;
+d=7;D=2;
+C1=19*(D/bdash)^0.5*(d+D)/b;
+fie2=fie2*100-corec_e1-C1; //in book 3.53 value is wrong
+Pe=Hs*fie2/100; //pressue head at E
+//assuming linear variation of pressure for intermediate points
+Pa=Pc-(Pc-Pe)*(33+8)/b;
+t=Pa/1.24;
+Pa=round(Pa*100)/100;
+t=round(t*100)/100;
+mprintf("\npressure at d/s of weir wall=%f m.",Pa);
+mprintf("\nthickness at d/s of weir wall=%f m. < thickness by Bligh theory;\nhence safe.",t);
+Pb=Pc-(Pc-Pe)*(33+8+6)/b;
+t=Pb/1.24;
+Pa=round(Pa*100)/100;
+t=round(t*100)/100;
+mprintf("\npressure at 6 m from d/s of weir wall=%f m.",Pb);
+mprintf("\nthickness at 6m from d/s of weir wall=%f m. < thickness by Bligh theory;\nhence safe.",t);
+Pc=Pc-(Pc-Pe)*(33+8+12)/b;
+t=Pc/1.24;
+Pa=round(Pa*100)/100;
+t=round(t*100)/100;
+mprintf("\npressure at 12 m from d/s of weir wall=%f m.",Pc);
+mprintf("\nthickness at 12m from d/s of weir wall=%f m. > thickness by Bligh theory;\nhence unsafe.",t);
+mprintf("\nhence increase th ethickness to 1.9 m for a length of 7 m of impervious floor.");
diff --git a/2087/CH12/EX12.12/example12_12.sce b/2087/CH12/EX12.12/example12_12.sce
new file mode 100755
index 000000000..f42021a1f
--- /dev/null
+++ b/2087/CH12/EX12.12/example12_12.sce
@@ -0,0 +1,51 @@
+
+
+//example 12.12
+//calculate
+//number of gates required for the barrage
+//head regulator if each gate has 10 m clear span(neglect end contractions and approach velocity)
+//length and R.L of basin floor if silting basin is provided downstream of barrage
+clc;funcprot(0);
+//given
+Lmax=212; //maximum reservior level
+Lp=211; //pond level
+hfl=210; //downstream high flood level in the river
+Qmax=3500; //maximum design flood discharge
+Lcrest=207; //crest level of the barrage
+Lcrest_r=208; //crest level of head regulator
+Cd=2.1; //coefficient of discharge for barrage
+Cd_r=1.5; //coefficient of discharge for head regulator
+rbl=205; //river bed level
+Q=500; //design discharge of main canal
+
+//design of water way for barrage during flood
+H=Lmax-Lcrest;
+L=Qmax/(Cd*H^1.5);
+//which gives L=149.07.
+//provide 15 bays of 10m clear span
+mprintf("nunmber of gates for the barrage=15.");
+
+//design of waterway for canal head regulator
+H=Lp-Lcrest_r;
+L1=Q/(Cd_r*H^1.5);
+//which gives L=64.2
+//hence provide 7 bays of 10 m each
+mprintf("\n\nnunmber of gates for the head regulator=7.");
+
+//design of stilling basin
+Hl=Lmax-hfl;
+q=Qmax/L;
+yc=(q^2/9.81)^(1/3);
+Z=Hl/yc;
+//since Z<1
+Y=1+0.93556*Z^0.368;
+y2=Y*yc;
+Lc=5*y2;
+Lc=round(Lc*10)/10;
+mprintf("\n\nLength of cistern=%f m.",Lc);
+Ef2=yc*(Y+1/(2*Y^2));
+j=hfl-Ef2;
+j=round(j*10)/10;
+mprintf("\nR.L of cistern=%f m.",j);
+
+
diff --git a/2087/CH12/EX12.2/example12_2.sce b/2087/CH12/EX12.2/example12_2.sce
new file mode 100755
index 000000000..b2956c85d
--- /dev/null
+++ b/2087/CH12/EX12.2/example12_2.sce
@@ -0,0 +1,105 @@
+
+
+//example 12.2
+//calculate uplift pressure and exit gradient
+//check whether section is safe against overturning and piping
+clc;funcprot(0);
+//given
+b=54; //width of section
+D1D2=16; //distance between points D1 and D2
+D2D3=37; //distance between points D2 and D3
+
+//first pipe line
+//taking data from figure
+d=105-97;
+b1=0.5;
+alpha=b/d;
+//from the curves we get
+fic1=0.665;
+fid1=0.76;
+fie1=1;
+t=105-104; //floor thickness
+corec=(fid1-fic1)*100*t/d; //correction for floor thickness
+//for pile no. 2
+D=104-97;
+d=104-97;
+bdash=16;
+C=19*(D/bdash)^0.5*(d+D)/b; //correction for pile no. 2
+fic1=fic1*100+corec+C; //corrected pressures
+
+//intermedite pipe line
+d=105-97;
+b1=16.5;
+alpha=b/d;
+r=b1/b; //ratio b1/b
+//from the curves we get
+fic2=0.52;
+fie2=0.725;
+fid2=0.615;
+corec_c1=(fid2-fic2)*100*t/d;
+corec_e1=(fie2-fid2)*100/d;
+
+//for pile no. 1
+C1=C;
+d=104-97;
+bdash=37;
+D=104-95;
+C2=19*(D/bdash)^0.5*(d+D)/b;
+//correction due to slope
+corec_e2=3.3; //from table 12.4
+//correction is negative due to upwrd slope
+l=4; //horizontal length of slope
+corec_c2=corec_e2*l/bdash;
+
+fie2=fie2*100-corec_e1-corec_e2;
+fic2=fic2*100+corec_c1+C2-corec_c2;
+
+//pile no. 3 at d/s end
+d=103.5-95;
+alpha_=d/b;
+//for curves
+fie3=0.35;fid3=0.242;
+corec_t=(fie3-fid3)*100*(103.5-102)/d;
+
+//correction for interference at pile no. 2
+d=102-95;
+D=102-97;
+C3=19*(D/bdash)^0.5*(d+D)/b;
+fie3=fie3*100-corec_t-C3;
+
+point=['C1' 'C2' 'E2' 'E3']; //Point
+P=[fic1 fic2 fie2 fie3]; //pressure percent
+P_=[3.55 2.78 3.39 1.58]; //pressure head
+mprintf("Points Pressure percent Pressure head");
+for i=1:4
+ P(i)=round(P(i)*10)/10;
+ mprintf("\n%s %f %f",point(i),P(i),P_(i));
+end
+
+//check for floor thickness
+Pa=P_(2)-((P_(2)-P_(4))*6.5/37);
+Pb=P_(2)-((P_(2)-P_(4))*24/37);
+Pc=P_(2)-((P_(2)-P_(4))*30/37);
+rho=2.24; //specific gravity of concrete
+ta=Pa/(rho-1);
+tb=Pb/(rho-1);
+tc=Pc/(rho-1);
+ta=round(ta*100)/100;
+tb=round(tb*100)/100;
+tc=round(tc*100)/100;
+mprintf("\n\nThickness required at A=%f m.",ta);
+mprintf("\nThickness required at B=%f m.",tb);
+mprintf("\nThickness required at C=%f m.",tc);
+t=103.5-102;
+mprintf("\nThickness provided=%f m.",t);
+mprintf("\nFloor thickness at B and C are adequate");
+
+//exit gradient
+H=108.5-103.5; //seepage head
+d=103.5-95; //depth cut-off
+//from exit gradient curve
+alpha=6.35;
+lambda=(1+(1+alpha^2)^0.5)/2;
+Ge=H/(d*%pi*lambda^0.5);
+mprintf("\n\nexit gradient=%f.",Ge);
+mprintf("\n it is less than permissible exit gradient < 1/6\nHence safe..");
diff --git a/2087/CH12/EX12.3/example12_3.sce b/2087/CH12/EX12.3/example12_3.sce
new file mode 100755
index 000000000..4140d389f
--- /dev/null
+++ b/2087/CH12/EX12.3/example12_3.sce
@@ -0,0 +1,161 @@
+
+
+//example 12.3
+//design a vertical drop weir on Bligh's theory
+//test floor by Khosla's theory
+clc;funcprot(0);
+//given
+Q=2800; //maximum flood discharge
+hfl=285; //H.F.L before construction
+hw=278; //minimum water level
+fsl=284; //F.S.L of canal
+c=12; //coefficient of creep
+flux=1; //allowable afflux
+Ge=1/6; //permissible exit gradient
+rho=2.24; //specific gravity of concrete
+
+//Hydraulic calculation
+L=4.75*Q^0.5;
+q=Q/L;
+q=round(q*10)/10;
+mprintf("Hydraulic calculation:");
+mprintf("\ndischarge per unit width of river=%f cumecs.",q);
+f=1;
+R=1.35*(q^2/f)^(1/3);
+R=round(R*100)/100;
+mprintf("\nregime scour depth=%f m.",R);
+V=q/R; //regime velocity
+vh=V^2/(2*9.81); //velocity head
+l_down=hfl+vh;
+l_up=l_down+flux;
+hfl_up=l_up-vh;
+hfl_down=hfl-0.5;
+hfl_down=round(hfl_down*100)/100;
+mprintf("\nactual d/s H.F.L allowing 0.5 m for retrogation=%f m.",hfl_down);
+K=(q/1.7)^(2/3);
+cl=l_up-K; //crest level
+cl=round(cl*100)/100;
+mprintf("\ncrest level=%f m.",cl);
+pl=fsl+0.5; //pond level
+s=hfl_down-cl; //heigth of shutter
+mprintf("\nheigth of shutter=%f m.",s);
+rl_up_pile=hfl_up-1.5*R; //R.L of bottom u/s pile
+d_up_cut=hw-276; //depth of upstream cut-off
+mprintf("\ndepth of upstream cut-off=%f m.",d_up_cut);
+mprintf("\n provide concrete cut off 2 m depth.");
+rl_bot_ds=hfl_down-2*R;
+Hs=hfl_down-hw; //seepage head
+Hc=cl-hw; //heigth of crest
+mprintf("\nR.L of gates crest=%f m.",Hs);
+mprintf("\nHeigth of crest=%f m.",Hc);
+
+//design of weir wall
+d=hfl_up-cl;
+a=d/(rho)^0.5;
+a=3*d/(2*rho); //from sliding consideration
+a=s+1; //from practical consieration
+a=a+1;
+mprintf("\n\ndesign of weir wall:")
+mprintf("\nprovide top width of %i m.",a);
+Mo=9.81*Hs^3/6; //overtirning moment
+//equating the moment of resistance to overturning moment and putting the values we get
+y=poly([-1.084,0.020,0.039],'x','c');
+b=roots(y);
+//we get b= - 5.5347261 and 5.0219056
+//taking
+b=5;
+//when weir is submerged
+C=0.58;
+d=(q^2/((2*C/3)^2*2*9.81))^(1/3);
+Mo=9.81*d*Hc^2/2;
+//from equation of moment of resistence we get
+y=poly([-77.55,3,1],'x','c');
+b=roots(y);
+//we get b= - 10.433085 and 7.4330846
+//taking
+b=8;
+mprintf("\nbottom width=%i m.",b);
+
+//design of impervious and pervious aprons
+C=12;
+L=C*Hs;
+mprintf("\n\ndesign of impervious and pervious aprons:");
+mprintf("\ntotal creep length=%i m.",L);
+l1=2.21*C*(Hs/13)^0.5;
+l1_=l1+1;
+mprintf("\nlength of downstream impervious apron=%i m.",l1_);
+d1=hw-276;
+d2=hw-271;
+l2=L-l1-(b+2*d1+2*d2);
+mprintf("\nlength of upstream impervious apron=%i m.",l2);
+l3=18*C*(Hs*q/975)^0.5;
+mprintf("\ntotal length of d/s apron=%i m.",l3); //calculation is wrong in book
+l=l3-l1;
+le=l/2;
+le=round(le*100)/100;
+mprintf('\nprovide filter of length %f m. and launching apron of length %f m.',le,le);
+t=d2*10^0.5/le;
+mprintf("\nthickness of launching apron in horizontal position=%f m.",t);
+mprintf("\nprovide launching apron of thickness 1.5 m.");
+T=2*d1;
+V=d1*10^0.5;
+ta=V/T;
+ta=round(ta*10)/10;
+mprintf("\nthickness of apron in horizontal position=%f m.",ta);
+Hr=Hs-Hs*(4+33+8)/L;
+t=4*Hr/(3*(rho-1));
+t=round(t*10)/10;
+mprintf('\nprovide thickness of %f m from d/s of weir wall to point 6 m from it.',t);
+Hr=Hs-Hs*(4+33+8+6)/L;
+t=4*Hr/(3*(rho-1));
+t=round(t*10)/10;
+mprintf("\nprovide thickness of %f m from 6 m to 12 m from d/s end of weir wall.",t);
+Hr=Hs-Hs*(4+33+8+12)/L;
+t=4*Hr/(3*(rho-1));
+t=round(t*10)/10;
+mprintf("\nprovide thickness of %f m for rest of length of weir floor.",t);
+
+//check by khosla's theory
+b=33+8+19; //total horizontal length of impervious floor
+d=7; //depth of downstream pile
+alpha=b/d;
+n=0.14; //n=1/%pi*(lambda)^0.5;
+Ge=Hs*n/d;
+mprintf("\n\ncheck by Khosla theory:");
+mprintf("\nexit gradient=%f. < 1/6\n hence safe",Ge);
+alpha_=d/b;
+fic1=0.83;fid1=0.88;
+corec_c1=(fid1-fic1)*100/2;
+bdash=b;
+d=2;D=7;
+C1=19*(D/bdash)^0.5*(d+D)/b;
+fic1=fic1*100+corec_c1+C1;
+Pc=Hs*fic1/100; //pressure head at C
+alpha_=d/b;
+fie2=0.31;fid2=0.21;
+corec_e1=(fie2-fid2)*1.7*100/7;
+bdash=b;
+d=7;D=2;
+C1=19*(D/bdash)^0.5*(d+D)/b;
+fie2=fie2*100-corec_e1-C1; //in book 3.53 value is wrong
+Pe=Hs*fie2/100; //pressue head at E
+//assuming linear variation of pressure for intermediate points
+Pa=Pc-(Pc-Pe)*(33+8)/b;
+t=Pa/1.24;
+Pa=round(Pa*100)/100;
+t=round(t*100)/100;
+mprintf("\npressure at d/s of weir wall=%f m.",Pa);
+mprintf("\nthickness at d/s of weir wall=%f m. < thickness by Bligh theory;\nhence safe.",t);
+Pb=Pc-(Pc-Pe)*(33+8+6)/b;
+t=Pb/1.24;
+Pa=round(Pa*100)/100;
+t=round(t*100)/100;
+mprintf("\npressure at 6 m from d/s of weir wall=%f m.",Pb);
+mprintf("\nthickness at 6m from d/s of weir wall=%f m. < thickness by Bligh theory;\nhence safe.",t);
+Pc=Pc-(Pc-Pe)*(33+8+12)/b;
+t=Pc/1.24;
+Pa=round(Pa*100)/100;
+t=round(t*100)/100;
+mprintf("\npressure at 12 m from d/s of weir wall=%f m.",Pc);
+mprintf("\nthickness at 12m from d/s of weir wall=%f m. > thickness by Bligh theory;\nhence unsafe.",t);
+mprintf("\nhence increase th ethickness to 1.9 m for a length of 7 m of impervious floor.");
diff --git a/2087/CH12/EX12.4/example12_4.sce b/2087/CH12/EX12.4/example12_4.sce
new file mode 100755
index 000000000..f688c2648
--- /dev/null
+++ b/2087/CH12/EX12.4/example12_4.sce
@@ -0,0 +1,198 @@
+
+
+//example 12.4
+//design a slopeing glacis
+clc;funcprot(0);
+//given
+q=10; //maximum discharge intensity on weir crest
+hfl=255; //H.F.L before construction of weir
+rb=249.5; //R.L of river bed
+pl=254; //pond level
+s=1; //heigth of crest shutter
+dhw=251.5; //anticipated downstream water level in river when water is dischrging with pond level upstream
+br=0.5; //bed retrogression
+f=0.9; //Laecey silt factor
+Ge=1/7; //permissible exit gradient
+flux=1; //permissible afflux
+
+cl=pl-s; //crest level
+mprintf("crest level=%f m.",cl);
+K=(q/1.7)^(2/3);
+tel_up=cl+K;
+tel_up=round(tel_up*100)/100;
+mprintf("\nelevation of u/s T.E.L=%f m.",tel_up);
+R=1.35*(q^2/f)^(1/3);
+R=round(R*10)/10;
+mprintf("\nregime scour depth=%f m.",R);
+V=q/R; //regime velocity
+vh=V^2/(2*9.81); //velocity head
+hfl_up=tel_up-vh;
+tel_down=hfl+vh;
+flux=hfl_up-hfl;
+flux=round(flux*100)/100;
+mprintf("\nafflux=%f. which is near to permissible",flux);
+hfl_down=hfl-br; //downstream H.F.L after retrogression
+tel_down=tel_down-br; //downstream T.F.L after retrogression
+Hl=tel_up-tel_down; //loss of head in flood
+Hl=round(Hl*100)/100;
+mprintf("\nloss of head in at high flood=%f m.",Hl);
+K=pl-cl; //head over crest
+q_=1.7*(K)^1.5;
+Hl_=pl-dhw; //loss of head
+mprintf("\nloss of head=%f m.",Hl_);
+Ef2=4.3;
+Ef2_=1.7; //from Blench curve
+jump=tel_down-Ef2;
+jump_=251.5-Ef2_; //level at which jump will form
+Ef1=Ef2+Hl;
+Ef1_=Ef2_+Hl_;
+D1=1.03;
+D1_=0.15; //calculated from Ef1 and Ef1_ respectively
+D2=3.96;D2_=1.68; //calculated from Ef2 and Ef2_ respectively
+hj=D2-D1;
+hj_=D2_-D1_; //heigth of jump
+concrete=5*hj;
+concrete_=5*hj_; //length of concrete floor
+mprintf("\n\nHydraulic jump calculation:");
+mprintf("\nheigth of jump for high flood condition=%f m.",hj);
+mprintf("\nlength of concrete floor for high flood condition=%f m.",concrete);
+mprintf("\nheigth of jump for pond level condition=%f m.",hj_);
+mprintf("\nlength of concrete floor for high pond level condition=%f m.",concrete_);
+
+cw=2; //crets width
+us=2; //upstream slope
+ds=3; //downstream slope
+l=15;
+mprintf("\n\n upstream slope of glacis=%i:1.",us);
+mprintf("\ndownstream slope of glacis=%i:1.",ds);
+mprintf("\nhorizontal length of floor beyond the toe=%i m..",l);
+
+R=6.5;
+sh_up=hfl_up-1.5*R;
+sh_down=hfl_down-2*R;
+sh_up=round(sh_up*100)/100;
+mprintf("\nR.L of bottom of upstream sheet pile=%f m.",sh_up);
+mprintf("\nR.L of downstream sheet pile=%f m.",sh_down);
+mprintf("\nprovide intermediate sheet pile at d/s toe of glacis.");
+Hs=pl-249.6; //maximum percolation head
+d=249.6-sh_down; //depth of d/s cut-off
+n=Ge*d/Hs; //n=1/(%pi*lambda^0.5);
+//from khosla exit gradient curve
+alpha=1.5;
+b=alpha*d;
+mprintf("\n\nlength of impervious floor=%f m.",b);
+fl=(2*(253-249.5))+2+(3*(253-249.6))+15;
+us=36-fl;
+mprintf("\nlength of floor already provide=%f m.",fl);
+mprintf("\nwhich is more than required from permissible exit gradient.\nno upstream floor is required.");
+mprintf("\nprovide %f m upstream floor so that total length becomes 36 m.",us);
+alpha_1=0.089;
+alpha_2=0.225; //alpha_=1/alpha
+b1=21;
+alpha=4.44;
+mprintf("\n\nPressure percent at points:");
+point=['C1' 'D1' 'C2' 'E2' 'D2' 'D3' 'E3'];
+bc=[72 82 31.5 45.5 58.5 29 44];
+crt=[3.1 0 3.5 0 -3.2 0 0 -3.6];
+crs=[0 0 0 0 2.3 0 0 0];
+cri=[3.7 0 6.4 0 -2.4 0 -6.4];
+mprintf("\nPoints Before correction After correction");
+for i=1:7
+ after(i)=bc(i)+crt(i)+crs(i)+cri(i);
+ mprintf("\n%s %i %f",point(i),bc(i),after(i));
+end
+Hs=254-249.6; //no flow condition
+Hs_=256.13-254.5; //high flood condition
+Hs__=254-251.5; //flow at pond level
+mprintf("\n\nelevation of subsoil H.G above datum:");
+mprintf("\nno flow condition:");
+fie1=1*Hs;
+fid1=0.82*Hs;
+fic1=0.788*Hs;
+fie2=0.552*Hs;
+fid2=0.455*Hs;
+fic2=0.414*Hs;
+fie3=0.34*Hs;
+fid3=0.29*Hs;
+fic3=0;
+fie1=round(fie1*100)/100;fid1=round(fid1*100)/100;fic1=round(fic1*100)/100;
+fie2=round(fie2*100)/100;fid2=round(fid2*100)/100;fic2=round(fic2*100)/100;
+fie3=round(fie3*100)/100;fid3=round(fid3*100)/100;fic3=round(fic3*100)/100;
+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);
+mprintf("\nhigh flood condition:");
+fie1=1*Hs_;
+fid1=0.82*Hs_;
+fic1=0.788*Hs_;
+fie2=0.552*Hs_;
+fid2=0.455*Hs_;
+fic2=0.414*Hs_;
+fie3=0.34*Hs_;
+fid3=0.29*Hs_;
+fic3=0;
+fie1=round(fie1*100)/100;fid1=round(fid1*100)/100;fic1=round(fic1*100)/100;
+fie2=round(fie2*100)/100;fid2=round(fid2*100)/100;fic2=round(fic2*100)/100;
+fie3=round(fie3*100)/100;fid3=round(fid3*100)/100;fic3=round(fic3*100)/100;
+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);
+mprintf("\nflow at pond level:");
+fie1=1*Hs__;
+fid1=0.82*Hs__;
+fic1=0.788*Hs__;
+fie2=0.552*Hs__;
+fid2=0.455*Hs__;
+fic2=0.414*Hs__;
+fie3=0.34*Hs__;
+fid3=0.29*Hs__;
+fic3=0;
+fie1=round(fie1*100)/100;fid1=round(fid1*100)/100;fic1=round(fic1*100)/100;
+fie2=round(fie2*100)/100;fid2=round(fid2*100)/100;fic2=round(fic2*100)/100;
+fie3=round(fie3*100)/100;fid3=round(fid3*100)/100;fic3=round(fic3*100)/100;
+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);
+
+mprintf("\n\nPrejump profile:");
+mprintf("\nhigh flood condition:");
+dist=[3 6 8.4]; //distance
+glacis=[252 251 250.32]; //R.L of glacis
+D1=[1.3 1.15 1.03];
+mprintf("\nEf1 D1");
+for i=1:3
+ Ef1(i)=256.25-glacis(i);
+ mprintf("\n%f %f",Ef1(i),D1(i));
+end
+mprintf("\npond level flow:");
+dist=[3 6 9 9.6]; //distance
+glacis=[252 251 250 249.9]; //R.Lof glacis
+D1=[0.31 0.23 0.16 0.15];
+mprintf("\nEf1 D1");
+for i=1:4
+ Ef1(i)=254-glacis(i);
+ mprintf("\n%f %f",Ef1(i),D1(i));
+end
+
+
+rho=2.24;
+Uf=4; //unbalanced head for high flood condtion
+Us=2.56; //unbalanced static head
+Hf=2*Uf/3;
+t=Hf/(rho-1);
+t=round(t*10)/10;
+mprintf("\n\nfloor thickness at the point of formation of hydraulic jump=%f m.",t);
+Uf=2.9; //unbalanced head for high flood condtion
+Us=2.2; //unbalanced static head
+Hf=2*Uf/3;
+t=Us/(rho-1);
+t=round(t*10)/10;
+mprintf("\nfloor thickness at the point of formation of hydraulic jump at the pond level condition=%f m.",t);
+P=1.5; //pressure head at d/s end of floor
+t=P/(rho-1);
+t=round(t*10)/10;
+mprintf("\n\nfloor thickness at downstream side of sloping glacis=%f m.",t);
+D=rb-sh_up; //depth of u/s scour hole above bed level
+a=1.5*D;
+a=round(a*10)/10;
+mprintf("\n\nminimum length of upstream launching apron=%f m.",a);
+mprintf("\nprovide 1.5 m thick apron for length of 5 m.");
+D=249.6-241.5;
+a=1.5*D;
+mprintf("\n\nminimum length of downstream launching apron=%f m.",a);
+mprintf("\nprovide 1.5 m thick apron for length of 12 m.");
+
diff --git a/2087/CH12/EX12.5/example12_5.sce b/2087/CH12/EX12.5/example12_5.sce
new file mode 100755
index 000000000..2cc29b121
--- /dev/null
+++ b/2087/CH12/EX12.5/example12_5.sce
@@ -0,0 +1,31 @@
+
+
+//example 12.5
+//calculate uplift pressure at the junction of inner faces of pile with weir floor using Khosla theory
+clc;funcprot(0);
+//given
+b=16; //total length of floor
+d=5; //depth of downstream pile
+D=4; //depth of upstream pile
+H=2.5; //head created by weir
+
+//pressure at E
+alpha=b/d;
+lambda=(1+(1+alpha^2)^0.5)/2;
+fie=acos((lambda-2)/lambda)/%pi;
+C=19*(D/b)^0.5*((d+D)/b);
+fie=fie*100-C;
+P=H*fie/100;
+P=round(P*1000)/1000;
+mprintf("Pressure at E=%f m.",P);
+
+//pressure at C1
+alpha=b/D;
+lambda=(1+(1+alpha^2)^0.5)/2;
+fie=acos((lambda-2)/lambda)/%pi;
+fic=1-fie; //by principle reversibility of flow
+C=19*(d/b)^0.5*((d+D)/b);
+fic=fic*100+C;
+P=fic*H/100;
+P=round(P*1000)/1000;
+mprintf("\n Pressure at C=%f m.",P);
diff --git a/2087/CH12/EX12.6/example12_6.sce b/2087/CH12/EX12.6/example12_6.sce
new file mode 100755
index 000000000..e2fcf7869
--- /dev/null
+++ b/2087/CH12/EX12.6/example12_6.sce
@@ -0,0 +1,45 @@
+
+
+//example 12.6
+//calculate floor thickness at mid length and at junction with u/s and d/s cut-off walls
+clc;funcprot(0);
+//given
+b=13; //length of floor
+d=2; //depth of downstream wall
+D=1.5; //depth of upstream cut-off
+rho=2.24; //relative density
+H=1.5;
+
+//at junction of d/s cut-off with floor
+alpha=b/d;
+lambda=(1+(1+alpha^2)^0.5)/2;
+fie=acos((lambda-2)/lambda)/%pi;
+C=19*(D/b)^0.5*((d+D)/b);
+fie=fie*100-C;
+P=H*fie/100;
+t=P/(rho-1);
+t=round(t*10)/10;
+mprintf("floor thickness at junction of d/s cut-off with floor=%f m.",t);
+
+//at junction of u/s cut-off with floor
+alpha=b/D;
+lambda1=(1+(1+alpha^2)^0.5)/2;
+fie=acos((lambda1-2)/lambda1)/%pi;
+fic=1-fie; //by principle reversibility of flow
+C=19*(D/b)^0.5*((d+D)/b);
+fiec=fic*100+C;
+P=fiec*H/100;
+t=0.3; //this the uplift will be counter balanced by downward weigth of impounded water
+mprintf("\nfloor thickness at junction of u/s cut-off with floor=%f m.",t);
+
+//at mid-length
+P=(1.08+0.489)/2; //assuming linear variation
+t=P/(rho-1);
+t=round(t*100)/100;
+mprintf("\nfloor thickness at mid-length=%f m.",t);
+
+//exit gradient
+G=H/(d*%pi*(lambda)^0.5);
+G=round(G*1000)/1000;
+//since G<0.18
+mprintf("\n G=%f. <0.18./nfloor is safe against failure by piping.",G);
diff --git a/2087/CH12/EX12.7/example12_7.sce b/2087/CH12/EX12.7/example12_7.sce
new file mode 100755
index 000000000..d6b20376d
--- /dev/null
+++ b/2087/CH12/EX12.7/example12_7.sce
@@ -0,0 +1,15 @@
+
+
+//example12.7
+//calculate heigth of weir to be built
+clc;funcprot(0);
+//given
+B=30; //stream width
+D=3; //stream depth
+V=1.25; //mean velocity
+Cd=0.95; //discharge coefficient
+Q=B*D*V;
+C=2*Cd*(2*9.81)^0.5/3;
+x=4-(Q/(C*B))^(2/3);
+x=round(x*1000)/1000;
+mprintf("heigth of weir to be built=%f m.",x);
diff --git a/2087/CH12/EX12.8/example12_8.sce b/2087/CH12/EX12.8/example12_8.sce
new file mode 100755
index 000000000..4dd5a64f1
--- /dev/null
+++ b/2087/CH12/EX12.8/example12_8.sce
@@ -0,0 +1,40 @@
+
+
+//example 12.8
+//calculate uplift pressure at two cut-off
+clc;funcprot(0);
+//given
+b=50; //length of floor
+d=8; //depth of downstream pile
+D=8; //depth of upstream pile
+H=5; //effective head
+tu=1; //floor thickness at upstream
+td=2; //floor thickness at downstream
+
+//downstream cut-off
+alpha=b/d;
+lambda=(1+(1+alpha^2)^0.5)/2;
+fie=acos((lambda-2)/lambda)/%pi;
+fid=acos((lambda-1)/lambda)/%pi;
+Ct=(fie-fid)*td/d;
+C=19*(D/b)^0.5*((d+D)/b);
+fie=fie*100-C-Ct*100;
+P=H*fie/100;
+P=round(P*100)/100;
+mprintf("Pressure at downstream cut-off=%f m.",P);
+
+//upstream cut-off
+fie=acos((lambda-2)/lambda)/%pi;
+fid=acos((lambda-1)/lambda)/%pi;
+fic1=1-fie;
+fid1=1-fid;
+Ct=(fic1-fid1)*td/d;
+C=-19*(D/b)^0.5*((d+D)/b);
+fic1=fic1*100-C-Ct*100;
+P=H*fic1/100;
+P=round(P*100)/100;
+mprintf("\nPressure at upstream cut-off=%f m.",P);
+G=H/(d*%pi*(lambda)^0.5);
+mprintf("\nExit Gradient=%f.",G);
+
+
diff --git a/2087/CH12/EX12.9/example12_9.sce b/2087/CH12/EX12.9/example12_9.sce
new file mode 100755
index 000000000..b838621b4
--- /dev/null
+++ b/2087/CH12/EX12.9/example12_9.sce
@@ -0,0 +1,28 @@
+
+
+//example 12.9
+//calculate depth of downstream cut-off
+clc;funcprot(0);
+//given
+Q=1000; //discharge of river
+L=256; //crest length of diversion
+f=1.1; //silt factor
+seg=1/6; //safe exit gradient
+hfl=103; //high flood level
+cf=100; //reduced level of downstream concrete floor
+H=2.4; //maximum static head of weir
+b=40; //length of concrete floor
+
+q=Q/L;
+R=1.35*(q^2/f)^(1/3);
+rld=hfl-1.5*R;
+d=cf-rld;
+d=round(d*100)/100;
+mprintf("depth of downstream cut-off=%f m.",d);
+
+alpha=b/d;
+lambda=(1+(1+alpha^2)^0.5)/2;
+G=H/(d*%pi*(lambda)^0.5);
+//since G<seg
+mprintf("\n G=%f. <1/6./nfloor is safe against failure by piping.",G);
+