summaryrefslogtreecommitdiff
path: root/Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/8-GRAVITY_DAMS.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/8-GRAVITY_DAMS.ipynb')
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B_C_Punmia/8-GRAVITY_DAMS.ipynb1307
1 files changed, 1307 insertions, 0 deletions
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
+}