summaryrefslogtreecommitdiff
path: root/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash
diff options
context:
space:
mode:
Diffstat (limited to 'Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash')
-rw-r--r--Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/11-Flow_Measurement.ipynb497
-rw-r--r--Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/2-Properties_of_Fluids.ipynb267
-rw-r--r--Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/3-Hydro_Static_Pressure.ipynb926
-rw-r--r--Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/4-Measurement_of_Pressure.ipynb512
-rw-r--r--Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/5-Fundamentals_of_Flow.ipynb952
-rw-r--r--Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/6-Orifices.ipynb716
-rw-r--r--Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/7-Flow_through_pipes.ipynb923
7 files changed, 4793 insertions, 0 deletions
diff --git a/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/11-Flow_Measurement.ipynb b/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/11-Flow_Measurement.ipynb
new file mode 100644
index 0000000..bc63293
--- /dev/null
+++ b/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/11-Flow_Measurement.ipynb
@@ -0,0 +1,497 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 11: Flow Measurement"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.10: Find_the_discharge.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 11.10\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"Cd=0.62;//Coeff of discharge\n",
+"H=250/1000;//meter\n",
+"L=400/1000;//meter\n",
+"g=9.81;//gravity acceleration\n",
+"Q=2/3*Cd*sqrt(2*g)*L*H^(3/2);//m^3/s or cumec\n",
+"disp(Q,'Discharge in cumec : ');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.11: Discharge_over_cipoletti_weir.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 6.11\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',8);\n",
+"//Given data :\n",
+"g=9.81;//constant\n",
+"Cd=0.6;//Coefficient of discharge\n",
+"B=1.3;//meter\n",
+"H1=6-(1.8+1.5);//meter\n",
+"H2=6-1.5;//meter\n",
+"Q=2/3*Cd*B*sqrt(2*g)*(H2^(3/2)-H1^(3/2));//m^3/sec\n",
+"disp(Q,'Discharge through the orifice in m^3/sec : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.12: Find_the_maximum_discharge.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 11.12\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"Cd=0.60;//Coeff of discharge\n",
+"L=36;//meter\n",
+"H=1.1;//meter\n",
+"A=50;//m^2\n",
+"g=9.81;//gravity acceleration\n",
+"Qmax=1.705*Cd*L*H^(3/2);//m^3/s\n",
+"disp(Qmax,'Maximum Discharge in m^3/sec : ');\n",
+"Va=Qmax/A;//m/s(velocity of approach)\n",
+"Q=1.705*Cd*L*[(H+Va^2/2/g)^(3/2)-(Va^2/2/g)^(3/2)];//m^3/s\n",
+"disp(Q,'New discharge considering velocity of approach in m^3/sec : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.13: Number_of_spillway.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 11.13\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"w=1.5;//m\n",
+"d=0.75;//m\n",
+"Cd=0.64;//Coeff of discharge\n",
+"QT=45;//cumec\n",
+"h=8;//meter\n",
+"A=w*d;//m^2\n",
+"g=9.81;//gravity acceleration\n",
+"Q=Cd*A*sqrt(2*g*h);//m^3/sec\n",
+"n=QT/Q;//no. of spillways\n",
+"disp(round(n),'No. of spillways : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.14: Calculate_the_discharge.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 11.14\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"B=1;//meter\n",
+"b=0.4;//meter\n",
+"H=0.57;//meter\n",
+"h=0.5;//meter\n",
+"A=B*H;//m^2\n",
+"g=9.81;//gravity constant\n",
+"a=b*h;//m^2\n",
+"Q=A*a/sqrt(A^2-a^2)*sqrt(2*g*(H-h));//m^3/sec\n",
+"disp(Q,'Discharge in m^3/sec : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.1: Velocity_of_flow.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 11.1\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',5);\n",
+"//Given data :\n",
+"staticPHead=5;//meter\n",
+"stagnationPHead=6;//meter\n",
+"h=stagnationPHead-staticPHead;//meter\n",
+"g=9.81;//constant\n",
+"Cv=0.98;//Coeff of pilot tube\n",
+"V=Cv*sqrt(2*g*h);//m/s\n",
+"disp(V,'Velocity of flow in m/sec : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.2: calculate_Velocity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 11.2\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',5);\n",
+"//Given data :\n",
+"Cv=0.975;//Coeff of pilot tube\n",
+"h=100/1000;//meter\n",
+"g=9.81;//constant\n",
+"Sm=13.6;//Sp. gravity\n",
+"S=0.86;//gravity of turpinre\n",
+"V=Cv*sqrt(2*g*h*(Sm/S-1));//m/s\n",
+"disp(V,'Velocity in m/sec : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.3: Rate_of_discharge_of_steam.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 11.3\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9);\n",
+"//Given data :\n",
+"l=2;//meter\n",
+"d0=0;//meter\n",
+"d1=0.3;//meter\n",
+"d2=1.0;//meter\n",
+"d3=1.2;//meter\n",
+"d4=1.6;//meter\n",
+"d5=2.0;//meter\n",
+"d6=1.4;//meter\n",
+"d7=1.0;//meter\n",
+"d8=0.4;//meter\n",
+"d9=0.3;//meter\n",
+"d10=0.2;//meter\n",
+"V0=0;//meter\n",
+"V1=0.5;//meter\n",
+"V2=0.7;//meter\n",
+"V3=0.8;//meter\n",
+"V4=1.0;//meter\n",
+"V5=1.2;//meter\n",
+"V6=0.9;//meter\n",
+"V7=0.8;//meter\n",
+"V8=0.6;//meter\n",
+"V9=0.5;//meter\n",
+"V10=0.3;//meter\n",
+"Q=l/3*(d0*V0+4*d1*V1+2*d2*V2+4*d3*V3+2*d4*V4+4*d5*V5+2*d6*V6+4*d7*V7+2*d8*V8+4*d9*V9+2*d10*V10+d0*V0);//cum/sec\n",
+"disp(Q,'Rate of discharge in cum/sec : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.4: Find_the_discharge.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 11.4\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"Cd=0.62;//constant\n",
+"H=0.12;//meter\n",
+"L=0.3;//meter\n",
+"g=9.81;//constant\n",
+"Q=2/3*Cd*sqrt(2*g)*L*H^(3/2);//m^3/s\n",
+"disp(Q,'Discharge in m^3/sec : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.5: Find_the_discharge.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 11.5\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',8);\n",
+"//Given data :\n",
+"Cd=0.66;//constant\n",
+"H=0.15;//meter\n",
+"L=0.40;//meter\n",
+"g=9.81;//constant\n",
+"Q=2/3*Cd*sqrt(2*g)*L*H^(3/2);//m^3/s\n",
+"disp(Q,'Discharge in m^3/sec : ');\n",
+"disp(Q*10^3,'Discharge in litres/sec : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.6: Discharge_over_the_notch.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 11.6\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"Cd=0.62;//constant\n",
+"H=200/1000;//meter\n",
+"theta=90;//degree\n",
+"g=9.81;//constant\n",
+"Q=8/15*Cd*sqrt(2*g)*tand(theta/2)*H^(5/2);//m^3/s\n",
+"Q=Q*1000*60;//litres/minute\n",
+"disp(Q,'Discharge in litres/minute : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.7: Position_of_apex_of_notch.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 11.7\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"Cd=0.62;//constant\n",
+"Q=250;//litres/sec\n",
+"Q=Q*10^-3;//m^3/s\n",
+"theta=90;//degree\n",
+"g=9.81;//constant\n",
+"d=1.3;//meter\n",
+"H=(Q/8*15/Cd/sqrt(2*g)/tand(theta/2))^(2/5);//m\n",
+"h=d-H;//meter\n",
+"disp(h,'Position above the bed in meter : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.8: calculate_time_take.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 11.8\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"Cd=0.65;//constant\n",
+"A=220;//m^2\n",
+"g=9.81;//constant\n",
+"l=30/100;//meter\n",
+"H1=16.8/100;//meter\n",
+"H2=6.8/100;//meter\n",
+"T=A/[2/3*Cd*l*sqrt(2*g)]*integrate('h^(-3/2)','h',H2,H1);//sec\n",
+"disp('Time taken is '+string(floor(T/60))+' minute '+string((T/60-floor(T/60))*60)+' sec.')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.9: Discharge_flowing_over_the_weir.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 11.9\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"H=0.40;//meter\n",
+"L=5;//meter\n",
+"disp('(i) End contractions are Suppressed : ');\n",
+"Q=1.84*L*H^(3/2);//m^3/s\n",
+"disp(Q,'Discharge in m^3/sec : ');\n",
+"disp(Q*1000,'Discharge in litres/sec : ');\n",
+"disp('(ii) End contractions are Considered : ');\n",
+"n=2;\n",
+"Q=1.84*(L-0.1*n*H)*H^(3/2);//m^3/s\n",
+"disp(Q,'Discharge in m^3/sec : ');\n",
+"disp(Q*1000,'Discharge in litres/sec : ');"
+ ]
+ }
+],
+"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/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/2-Properties_of_Fluids.ipynb b/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/2-Properties_of_Fluids.ipynb
new file mode 100644
index 0000000..808bd71
--- /dev/null
+++ b/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/2-Properties_of_Fluids.ipynb
@@ -0,0 +1,267 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2: Properties of Fluids"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.1: Sp_Weight_Mass_density_Sp_Gravity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 2.1\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"\n",
+"//Given data :\n",
+"V=10;//in m^3\n",
+"W=80;//in kN\n",
+"g=9.81;//gravity accelerat\n",
+"w_water=9.81;//specific weight of water\n",
+"format('v',6);\n",
+"w=W/V;//specific weight in kN/m^3\n",
+"disp(w,'Specific weight of liquid in kN/m^3 : ');\n",
+"mass_density=w*1000/g;//kg/m^3\n",
+"disp(mass_density,'Mass density of liquid in kg/m^3 : ');\n",
+"specific_gravity=w/w_water;//unitless\n",
+"disp(specific_gravity,'Specific gravity : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.2: Bulk_modulus_of_elesticity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 2.2\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"\n",
+"//Given data :\n",
+"p1=750;//N/cm^2\n",
+"p2=1400;//N/cm^2\n",
+"dvBYV=-0.150;//in %\n",
+"format('v',9);\n",
+"dp=p2-p1;//in N/cm^2\n",
+"dp=dp*10^4;//in N/m^2\n",
+"K=-dp/(dvBYV/100);//N/m^2\n",
+"disp(K,'Bulk modulus(N/m^2) : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.3: Increase_of_pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 2.3\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"\n",
+"//Given data :\n",
+"Kwater=2.10*10^6;//kN/m^2\n",
+"Kair=140;//kN/m^2\n",
+"dvBYV=-1;//in %\n",
+"format('v',9);\n",
+"//For Water : \n",
+"dp=-Kwater*dvBYV/100;//kN/m^2\n",
+"disp(dp,'Increase of pressure in water in kN/m^2');\n",
+"//For Air : \n",
+"dp=-Kair*dvBYV/100;//kN/m^2\n",
+"disp(dp,'Increase of pressure in air in kN/m^2');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.4: Force_and_power_required.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 2.4\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"\n",
+"//Given data :\n",
+"A=0.2;//m^2\n",
+"dy=0.02/100;//m\n",
+"du=20/100;//cm/s\n",
+"mu=0.001;//Ns/m^2\n",
+"tau=mu*du/dy;//in N/m^2\n",
+"F=tau*A;//N\n",
+"disp(F,'Force required in N : ');\n",
+"Power=F*du;//Watts\n",
+"disp(Power,'Power required in W : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.5: Kinematic_Viscosity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 2.5\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"//Given data :\n",
+"format('e',10);\n",
+"mu=0.1;//Ns/m^2\n",
+"Sp_gravity_liquid=2.1;\n",
+"mass_density_water=1000;//in kg/m^3\n",
+"rho=Sp_gravity_liquid*mass_density_water;//kg/m^3\n",
+"v=mu/rho;//m^2/sec\n",
+"disp(v,'Kinematic viscosity of liquid in m^2/sec : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.6: Calculate_capillary_rise.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 2.6\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"//Given data :\n",
+"format('v',6);\n",
+"d=2;//in mm\n",
+"d=d/1000;//in m\n",
+"sigma_water=0.073;//N/m\n",
+"sigma_mercury=0.510;//N/m\n",
+"//Water-glass contact\n",
+"w1=9.81;//kN/m^3(specific weight of water)\n",
+"w1=w1*10^3;//N/m^3\n",
+"theta=0;//in degree\n",
+"h=4*sigma_water*cosd(theta)/w1/d;//in mm\n",
+"disp(h*1000,'capillary rise for water glass contact in mm : ');\n",
+"//Mercury-glass contact\n",
+"w2=13.6*9.81;//kN/m^3(specific weight of mercury)\n",
+"w2=w2*10^3;//N/m^3\n",
+"theta=130;//in degree\n",
+"h=4*sigma_mercury*cosd(theta)/w2/d;//in mm\n",
+"disp(h*1000,'capillary rise for mercury glass contact in mm: ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7: Intensity_of_Pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 2.7\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"\n",
+"//Given data :\n",
+"format('v',5);\n",
+"d=6;//in mm\n",
+"d=d/1000;//in m\n",
+"sigma=0.0755;//N/m\n",
+"//At equillibrium : p*%pi*r^2=sigma*2*%pi*r\n",
+"r=d/2;//in m\n",
+"p=2*sigma/r;//N/m^2\n",
+"disp(p,'Intensity of pressure in N/m^2 or Pascals : ');"
+ ]
+ }
+],
+"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/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/3-Hydro_Static_Pressure.ipynb b/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/3-Hydro_Static_Pressure.ipynb
new file mode 100644
index 0000000..c392124
--- /dev/null
+++ b/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/3-Hydro_Static_Pressure.ipynb
@@ -0,0 +1,926 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3: Hydro Static Pressure"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.10: Total_pressure_and_centre_of_pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.10\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9);\n",
+"//Given data :\n",
+"g=9.81;//gravity\n",
+"xbar=8;//meter\n",
+"D=4;//meter\n",
+"A=%pi*D^2/4;//meter^2\n",
+"w=g*1000;//in N/m^3\n",
+"p=w*A*xbar/10^3;//in kN\n",
+"disp(p,'Total pressure in kN : ');\n",
+"IG=%pi*D^4/64;//in m^4\n",
+"h_bar=IG/A/xbar+xbar;//in meter\n",
+"disp('Depth of centre of pressure is '+string(h_bar)+' meter.');\n",
+"//Answer of total pressure is wrong in the book."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.11: Total_pressure_and_centre_of_pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.11\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"g=9.81;//gravity\n",
+"D=4;//meter\n",
+"xbar=(10+7)/2;//meter\n",
+"A=%pi*D^2/4;//meter^2\n",
+"w=g*1000;//in N/m^3\n",
+"p=w*A*xbar/10^6;//in MN\n",
+"disp(p,'Total pressure in MN : ');\n",
+"BC=3;//meter\n",
+"AB=4;//mete\n",
+"sin_theta=BC/AB;\n",
+"IG=%pi*D^4/64;//in m^4\n",
+"h_bar=IG/A/xbar*sin_theta^2+xbar;//in meter\n",
+"disp('Position of centre of pressure is '+string(h_bar)+' meter.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.12: Determine_total_pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.12\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"a=3;//meter\n",
+"b=4;//meter(altitude)\n",
+"S=1.2;//specific gravity\n",
+"theta=30;//degree\n",
+"d=2.5;//meter\n",
+"g=9.81;//gravity\n",
+"AG=b/3;//meter\n",
+"xbar=d+AG*sind(theta);//meter\n",
+"A=1/2*a*b;//meter^2\n",
+"w=S*g*1000;//in N/m^3\n",
+"p=w*A*xbar/10^3;//in kN\n",
+"disp(p,'Total pressure in kN : ');\n",
+"IG=a*b^3/36;//in m^4\n",
+"h_bar=IG/A/xbar*(sind(theta))^2+xbar;//in meter\n",
+"disp('Depth of centre of pressure is '+string(h_bar)+' meter.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.13: Total_pressure_and_centre_of_pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.13\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"a=8;//meter\n",
+"b=6;//meter\n",
+"h=3;//meter\n",
+"CD=2;//meter\n",
+"theta=30;//degree\n",
+"A=(a+b)/2*h;//meter^2\n",
+"AB=(a+2*b)/(a+b)*h/3;//meter\n",
+"x1bar=AB;//meter\n",
+"BC=AB*sind(theta);//meter\n",
+"BD=BC+CD;//meter\n",
+"xbar=BD;//meter\n",
+"g=9.81;//gravity\n",
+"w=g*1000;//in N/m^3\n",
+"p=w*A*xbar/10^3;//in kN\n",
+"disp(p,'Total pressure in kN : ');\n",
+"IG=(a^2+b^2+4*a*b)/(a+b)*h^3/36;//in m^4\n",
+"h_bar=IG/A/xbar*(sind(theta))^2+xbar;//in meter\n",
+"disp('Depth of centre of pressure is '+string(h_bar)+' meter.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.14: Force_and_reaction_at_hinge.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.14\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"l=2;//meter\n",
+"b=2;//meter\n",
+"p_i=98.1;//kN/m^3(Pressure intensity)\n",
+"w=9.81;//kN/m^2\n",
+"BC=1;//meter\n",
+"AB=2;//meter\n",
+"theta=30;//degree\n",
+"B=p_i/w;//m\n",
+"BD=BC*sind(theta);//m\n",
+"xbar=10+0.5;//meter\n",
+"A=l*b;//m^2\n",
+"p=w*A*xbar;//kN\n",
+"IG=(2*l^3)/12;//in m^4\n",
+"h_bar=IG/A/xbar*(sind(theta))^2+xbar;//in meter\n",
+"DI=h_bar-xbar;//m\n",
+"FC=DI/sind(theta);//m\n",
+"FB=FC+BC;//meter\n",
+"P=p*FB/AB;//kN\n",
+"disp(P,'Force in kN : ');\n",
+"RB=p-P;//kN\n",
+"disp(RB,'Reaction at hinge B in kN : ');\n",
+"//Answer in the book is slightly differ due to limited accuracy used in the book as compared to SCILAB."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.15: Horizontal_force.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.15\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"l=4;//meter\n",
+"b=2;//meter\n",
+"h=1.8;//meter\n",
+"w=9.81;//kN/m^2\n",
+"xbar=6-2//meter\n",
+"A=l*b;//m^2\n",
+"P=w*A*xbar;//kN\n",
+"IG=(2*l^3)/12;//in m^4\n",
+"h_bar=IG/A/xbar+xbar;//in meter\n",
+"// As P acts at h_bar-xbar : \n",
+"F=P*((h_bar-xbar)-(b-h))/h;//kN\n",
+"disp(F,'Horizontal Force in kN : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.16: Total_pressure_and_centre_of_pfressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.16\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"b=2;//meter\n",
+"d=3;//meter\n",
+"h=2;//meter\n",
+"w=9.81;//kN/m^2\n",
+"xbar=2+3/2;//meter\n",
+"A=b*d;//m^2\n",
+"P=w*A*xbar;//kN\n",
+"disp(P,'Total Pressure in kN : ');\n",
+"IG=(b*d^3)/12;//in m^4\n",
+"h_bar=IG/A/xbar+xbar;//in meter\n",
+"disp(h_bar,'Position of centre of pressure in meter : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.17: Total_pressure_and_centre_of_pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.17\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"b=4;//meter\n",
+"d=4;//meter\n",
+"h=8;//meter\n",
+"w=9.81;//kN/m^2\n",
+"xbar=8;//meter\n",
+"A=b*d;//m^2\n",
+"P=w*A*xbar;//kN\n",
+"disp(P,'Total Pressure in kN : ');\n",
+"IG=(b*d^3)/12;//in m^4\n",
+"h_bar=IG/A/xbar+xbar;//in meter\n",
+"disp(h_bar,'Position of centre of pressure in meter : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.18: Total_Pressure_and_centre_of_pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.18\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"D=1.5;//meter\n",
+"BE=2;//meter\n",
+"AD=0.75;//meter\n",
+"CE=AD;//meter\n",
+"BC=BE-AD;//meter\n",
+"FG=CE+BC/2;//meter\n",
+"xbar=FG;//meter\n",
+"w=9.81;//kN/m^2\n",
+"A=%pi*D^2/4;//m^2\n",
+"AB=D;//meter\n",
+"sin_theta=BC/AB;\n",
+"P=w*A*xbar;//kN\n",
+"disp(P,'Total Pressure in kN : ');\n",
+"IG=(%pi/64*D^4);//in m^4\n",
+"h_bar=IG/A/xbar*sin_theta^2+xbar;//in meter\n",
+"disp(h_bar,'Position of centre of pressure in meter : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.19: Total_pressure_and_centre_of_pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.19\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"b=3;//meter\n",
+"a=3;//meter\n",
+"S_oil=0.8;//specific gravity of oil\n",
+"w=9.81*S_oil;//kN/m^2\n",
+"xbar=1/3*b;//meter\n",
+"A=1/2*a*b;//m^2\n",
+"P=w*A*xbar;//kN\n",
+"disp(P,'Total Pressure in kN : ');\n",
+"IG=(a*b^3)/36;//in m^4\n",
+"h_bar=IG/A/xbar+xbar;//in meter\n",
+"disp(h_bar,'Centre of pressure in meter : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.1: Intensity_of_pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.1\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"D=30*10^-2;//in m\n",
+"F=9810;//in N\n",
+"A=%pi*D^2/4;//in m^2\n",
+"p=F/A;//in N/m^2 or Pa\n",
+"p=p/1000;//kPa\n",
+"disp(p,'Intensity of pressure at the bottom of container in kPa : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.20: Total_hydro_static_pressure_and_centre_of_pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.20\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"a=2;//meter\n",
+"b=1;//meter\n",
+"d=2;//meter\n",
+"w=9.81;//kN/m^2\n",
+"xbar=2+a/2;//meter\n",
+"A=a*b;//m^2\n",
+"P=w*A*xbar;//kN\n",
+"disp(P,'Total Pressure in kN : ');\n",
+"IG=(b*d^3)/12;//in m^4\n",
+"h_bar=IG/A/xbar+xbar;//in meter\n",
+"disp(h_bar,'Position of centre of pressure in meter : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.21: Resultant_pressure_and_direction.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.21\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"r=2;//meter\n",
+"l=4;//meter\n",
+"A=r*l;//m^2\n",
+"xbar=2+r/2;//meter\n",
+"w=9.81;//kN/m^2\n",
+"PH=w*A*xbar;//kN\n",
+"disp(PH,'Horizontal component of resulting Pressure in kN : ');\n",
+"PV=2*r*l*w+%pi*r^2/4*l*w;//kN\n",
+"disp(PV,'Verticalal component of resulting Pressure in kN : ');\n",
+"IG=(l*r^3)/12;//in m^4\n",
+"h_bar=IG/A/xbar+xbar;//in meter\n",
+"disp(h_bar,'Position of centre of horizontal component of pressure in meter : ');\n",
+"x=(2*r+%pi*r^2/4*(4*r/3/%pi))/(2*r+%pi*r^2/4);//meter\n",
+"P=sqrt(PH^2+PV^2);//kN\n",
+"disp(P,'Resultant pressure in kN : ');\n",
+"theta=atand(PV/PH);//degree\n",
+"disp(theta,'Direction of resultant pressure in degree : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.22: Resultant_pressure_and_angle_of_pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.22\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"A=2*1;//m^2\n",
+"xbar=2+2/2;//meter\n",
+"w=9.81;//kN/m^2\n",
+"PH=w*A*xbar;//kN\n",
+"disp(PH,'Horizontal component of resultant Pressure in kN : ');\n",
+"PV=w*[2*2+2*2-%pi*2^2/4]*1;//kN\n",
+"disp(PV,'Verticalal component of resultant Pressure in kN : ');\n",
+"P=sqrt(PH^2+PV^2);//kN\n",
+"disp(P,'Resultant pressure in kN : ');\n",
+"theta=atand(PV/PH);//degree\n",
+"disp(theta,'Direction of resultant pressure in degree : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.23: Gorizontal_and_vertical_components_of_pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.23\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"ABbar=sqrt(2)*4;//meter\n",
+"xbar=ABbar/2;//meter\n",
+"A=ABbar*1;//m^2\n",
+"w=9.81;//kN/m^2\n",
+"PH=w*A*xbar;//kN\n",
+"disp(PH,'Horizontal component of resultant Pressure in kN : ');\n",
+"hbar=2/3*ABbar;//meter\n",
+"disp('Position of horizontal component of pressure is '+string(hbar)+' meter below free water surface.');\n",
+"PV=w*[%pi*4^2/4-4*4/2]*1;//kN\n",
+"disp(PV,'Verticalal component of resultant Pressure in kN : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.24: Maximum_and_minimum_stress.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.24\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9);\n",
+"//Given data :\n",
+"h=24;//meter\n",
+"b=15;//meter\n",
+"g=9.81;//gravity constant\n",
+"Wm=2000*g;//N/m^3\n",
+"W=b*h/2*Wm;//N\n",
+"w=9.81;//kN/m^2\n",
+"PH=w*20^2/2*1000;//N\n",
+"y=PH/W*20/3+5;//meter\n",
+"e=y-b/2;//meter\n",
+"MaxStress=W/b*(1+6*e/b);//N/m^2\n",
+"disp(MaxStress,'Maximum stress in N/m^2 : ');\n",
+"MinStress=W/b*(1-6*e/b);//N/m^2\n",
+"disp(MinStress,'Minimum stress in N/m^2 : ');\n",
+"//Answer in the book is slightly differ due to limited accuracy used in the book as compared to SCILAB."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.2: Intensity_of_pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.2\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"h=1.5;//in m\n",
+"w_w=9.81;//in kN/m^3\n",
+"w_g=1.26;//in kN/m^3\n",
+"w_m=13.6;//in kN/m^3\n",
+"f=h*w_w;//kN/m^2\n",
+"disp(f,'Intensity of pressure exerted by water column in kN/m^2 : ');\n",
+"f=h*w_w*w_g;//kN/m^2\n",
+"disp(f,'Intensity of pressure exerted by glycerine column in kN/m^2 : ');\n",
+"f=h*w_w*w_m;//kN/m^2\n",
+"disp(f,'Intensity of pressure exerted by mercury column in kN/m^2 : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.3: Depth_of_alcohol.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.3\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"p=2;//in kN/m^2\n",
+"w_w=9.81;//in kN/m^3\n",
+"w_alcohol=w_w*0.789;//in kN/m^3\n",
+"w_m=13.6;//in kN/m^3\n",
+"H=p/w_alcohol;//in m\n",
+"disp(H,'Depth of alcohol in meter : ');\n",
+"P_head_w=p/w_w;//m\n",
+"disp(P_head_w,'Pressure head in terms of water in meter : ');\n",
+"P_head_m=p/w_w/w_m;//m\n",
+"disp(P_head_m,'Pressure head in terms of mercury in meter : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.4: Convert_pressure_head.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.4\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"Hwater=6;//m(Pressure head of water)\n",
+"S_oil=0.70;//(specific gravity of oil)\n",
+"H_oil=Hwater/S_oil;//in m(Pressure head in terms of oil)\n",
+"disp(H_oil,'Pressure head of water in terms of oil in meter : ');\n",
+"S_oil=0.825;//(specific gravity of oil)\n",
+"S_mercury=13.6;//(specific gravity of mercury)\n",
+"Hmercury=70/100;//m(Pressure head of mercury)\n",
+"H_oil=S_mercury/S_oil*Hmercury;//in m(Pressure head in terms of oil)\n",
+"disp(H_oil,'Pressure head of mercury in terms of oil in meter : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.5: Calculate_total_pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.5\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"w=9.81;//in kN/m^3\n",
+"l=3;//in m\n",
+"b=2;//in m\n",
+"h=1;//in m\n",
+"f_bottom=w*h;//in kN/m^2(Pressure intensity at bottom)\n",
+"p_bottom=f_bottom*l*b;//kN\n",
+"disp(p_bottom,'Total pressure on the bottom in kN : ');\n",
+"f_long_vertical=f_bottom/2;//kN\n",
+"p_long_vertical=f_long_vertical*l*h;//kN\n",
+"disp(p_long_vertical,'Total pressure on long vertical wall in kN : ');\n",
+"f_short_vertical=f_bottom/2;//kN\n",
+"p_short_vertical=f_short_vertical*b*h;//kN\n",
+"disp(p_short_vertical,'Total pressure on short vertical wall in kN : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.6: Calculate_force_on_vertical_wall.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.6\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"p_water=1000;//in kg/m^3\n",
+"p_liquid=800;//in kg/m^3\n",
+"g=9.81;//gravity constant\n",
+"h1=1.5;//m\n",
+"px1=p_liquid*g*h1/1000;//kN/m^2\n",
+"disp(px1,'Pressure at a point 1.5 meter below free surface in kN/m^2 : ');\n",
+"h2=2;//m\n",
+"px2=p_liquid*g*h2/1000;//kN/m^2\n",
+"disp(px2,'Pressure at a point 2 meter below free surface in kN/m^2 : ');\n",
+"h31=2;//m(for liquid)\n",
+"h32=0.5;//m(for water)\n",
+"px1=p_liquid*g*h31/1000;//kN/m^2\n",
+"px2=p_water*g*h32/1000;//kN/m^2\n",
+"px3=(px1+px2);//kN/m^2\n",
+"disp(px3,'Pressure at a point 2.5 meter below free surface in kN/m^2 : ');\n",
+"h=2;//meter(water level)\n",
+"b=8;//meter(width of wall)\n",
+"p_bottom=px1+(p_water*g*h)/1000;//kN/m^2\n",
+"p_avg1=(px1+0)/2;//kN/m^2(top 2m liquid layer)\n",
+"p_avg2=(px1+p_bottom)/2;//kN/m^2(top 2m water layer)\n",
+"F_per_meter=p_avg1*h*1+p_avg2*h*1;//kN\n",
+"Fwall=F_per_meter*b;//kN\n",
+"disp(Fwall,'Force on the wall in kN : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.7: Find_force_and_depth.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.7\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"b=3;//in meter\n",
+"h=3;//in meter\n",
+"S_oil=0.8;//(specific gravity of oil)\n",
+"A=1/2*h*b;//in m^2\n",
+"x_bar=2/3*3;//in meter\n",
+"SW_water=9.81*1000;//in N/m^3\n",
+"SW_oil=SW_water*S_oil;//in N/m^3\n",
+"F_surface=SW_oil*A*x_bar;//in kN\n",
+"IG=b*h^3/36;//in m^3\n",
+"h_bar=IG/A/x_bar+x_bar;//in meter\n",
+"disp(h_bar,'Force shall act at depth of centre of pressure. This depth in meter is : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.8: Total_pressure_and_centre_of_pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.8\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"l=3;//in meter\n",
+"b=2;//in meter\n",
+"p=2*10^6;//in Pa\n",
+"g=9.81;//gravity constant\n",
+"w=g*1000;//in N/m^3\n",
+"h=p/w;//in meter\n",
+"xbar=h-1.5;//in meter\n",
+"A=l*b;//in m^2\n",
+"p_gate=w*A*xbar/10^6;//in MN\n",
+"disp(p_gate,'Total pressure on the gate in MN : ');\n",
+"IG=b*l^3/12;//in m^3\n",
+"h_bar=IG/A/xbar+xbar;//in meter\n",
+"disp('Position of centre of pressure is '+string(h_bar-xbar)+' meter below the centroid of gate.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.9: Total_pressure_and_centre_of_pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 3.9\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9);\n",
+"//Given data :\n",
+"g=9.81;//gravity\n",
+"GH=4;//meter\n",
+"IJ=4;//meter\n",
+"IC=2;//meter\n",
+"GC=3;//meter\n",
+"AG=(10-4)/2;//meter\n",
+"BH=(10-4)/2;//meter\n",
+"EI=AG*IC/GC;//meter\n",
+"JF=AG*IC/GC;//meter\n",
+"EF=EI+IJ+JF;//meter\n",
+"A=(8+4)/2*2;//in m^2\n",
+"a=4;//meter\n",
+"b=8;//meter\n",
+"d=2;//meter\n",
+"xbar=(2*a+b)/(a+b)*d/3;//in meter\n",
+"w=g*1000;//in N/m^3\n",
+"p_gate=w*A*xbar/10^3;//in kN\n",
+"disp(p_gate,'Total pressure in kN : ');\n",
+"IG=(a^2+4*a*b+b^2)/(a+b)*d^3/36;//in m^3\n",
+"h_bar=IG/A/xbar+xbar;//in meter\n",
+"disp('Depth of centre of pressure is '+string(h_bar)+' meter.');"
+ ]
+ }
+],
+"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/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/4-Measurement_of_Pressure.ipynb b/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/4-Measurement_of_Pressure.ipynb
new file mode 100644
index 0000000..fec0910
--- /dev/null
+++ b/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/4-Measurement_of_Pressure.ipynb
@@ -0,0 +1,512 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: Measurement of Pressure"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.10: Pressure_difference_between_two_vessels.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.10\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9);\n",
+"//Given data :\n",
+"S1=0.81;//sp. gravity\n",
+"S2=1.2;//sp. gravity\n",
+"S3=13.6;//sp. gravity\n",
+"h3=200/1000;//m\n",
+"h2=50/1000;//m\n",
+"h1=100/1000;//m\n",
+"w=1000;//kg/m^3\n",
+"pAB=((h1*(S2-S1)+h2*(S3-S1)-h3*S1))*w;//Kg/m^2\n",
+"disp(pAB,'Pressure difference between the two vessel in kg/m^2: ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.11: Difference_of_pressure_between_two_vessels.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.11\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9);\n",
+"//Given data :\n",
+"S1=1.9;//sp. gravity\n",
+"S2=1.2;//sp. gravity\n",
+"S3=0.79;//sp. gravity\n",
+"h2=545/1000;//m\n",
+"h1=750/1000;//m\n",
+"h3=h1-h2;//m\n",
+"w=1000*9.81;//N/m^3\n",
+"pAB=(h1*S1-h2*S2-h3*S3)*w;//N/m^2\n",
+"disp(pAB,'Pressure difference between the two vessel in N/m^2: ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.12: Pressure_difference_between_vessels.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.12\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9);\n",
+"//Given data :\n",
+"S1=0.005;//sp. gravity\n",
+"S2=0.79;//sp. gravity\n",
+"S3=13.6;//sp. gravity\n",
+"h=30/1000;//m\n",
+"w=1000*9.81;//N/m^3\n",
+"pAB=h*(S3-S2)*w;//N/m^2\n",
+"disp(pAB,'Pressure difference between the two vessel in N/m^2: ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.13: Reading_of_manometer.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.13\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',4);\n",
+"//Given data :\n",
+"S1=1.25;//sp. gravity\n",
+"S2=1.05;//sp. gravity\n",
+"S3=0.79;//sp. gravity\n",
+"h=30/1000;//m\n",
+"w=1000;//kg/m^3\n",
+"//pA=pB\n",
+"h=(0.15*w*S2-S1*w*0.15)/(S3*w-w*S2);//m\n",
+"h=h*1000;//mm\n",
+"disp(h,'Reading of manometer in mm : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.14: Difference_of_pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.14\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9);\n",
+"//Given data :\n",
+"S1=1;//sp. gravity of water\n",
+"S2=1;//sp. gravity of water\n",
+"S3=0.9;//sp. gravity of oil\n",
+"h3=100/1000;//meter\n",
+"w=9.81*1000;//N/m^3\n",
+"pAB=w*(h3-h3*S3);//N/m^2\n",
+"disp(pAB,'Difference of pressure in N/m^2 or Pa : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.1: Gauge_units_and_absolute_units.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.1\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9);\n",
+"//Given data :\n",
+"p=5;//kg/cm^2\n",
+"disp('Gauge units : ');\n",
+"disp(p/10^-4,'Pressure Intensity in kg/m^2 : ');\n",
+"g=9.81;//gravity constant\n",
+"disp(p*g/10^-4,'Pressure Intensity in N/m^2 : ');\n",
+"disp(p*g/10^-4,'Pressure Intensity in Pa : ');\n",
+"disp(p*g/10^3/10^-4,'Pressure Intensity in kPa : ');\n",
+"disp(p*g/10^6/10^-4,'Pressure Intensity in MPa : ');\n",
+"disp('In terms of head : ');\n",
+"w=1000;//kg/m^3 for water\n",
+"h=p*10^4/w;//meter of water\n",
+"disp('Pressure is : '+string(h)+' meter of water.');\n",
+"w=13.6*1000;//kg/m^3 for mercury\n",
+"h=p*10^4/w;//meter of mercury\n",
+"disp('Pressure is : '+string(h)+' meter of mercury.');\n",
+"disp('Absolute units : ');\n",
+"Patm=760;//mm of mercury\n",
+"Patm=760*13.6/1000;//m of water\n",
+"Patm=Patm*1000;//kg/m^2\n",
+"Pabs=p+Patm;//kg/m^2\n",
+"disp(Pabs,'Absolute pressure in kg/m^2 : ');\n",
+"disp(Pabs*10^4,'Absolute pressure in kg/cm^2 : ');\n",
+"disp(Pabs*10^4*g,'Absolute pressure in N/m^2 : ');\n",
+"disp(Pabs*10^4*g,'Absolute pressure in Pa : ');\n",
+"disp(Pabs*10^5/10^3,'Absolute pressure in kPa : ');\n",
+"disp(Pabs*10^5/10^6,'Absolute pressure in MPa : ');\n",
+"h1=p*10^4/w;//meter of water\n",
+"h2=p*10^4/1000;//meter of water\n",
+"h=h1+h2;////meter of water\n",
+"disp(h,'Absolute pressure head in terms of water in meter : ');\n",
+"w=13.6*1000;//kg/m^3 for mercury\n",
+"h=p*10^4/w+760/1000;//meter of mercury\n",
+"disp(h,'Absolute pressure head in terms of mercury in meter : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.2: Pressure_intensity_and_tube_reading.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.2\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9);\n",
+"//Given data :\n",
+"w=1000;//kg/m^3\n",
+"h=50/1000;//m\n",
+"p=w*h;//kg/m^2\n",
+"p=p*9.81;//N/m^2 or Pa\n",
+"disp(p,'Pressure Intensity in Pa : ');\n",
+"alfa=30;//degree\n",
+"h=50;//mm\n",
+"l=h/sind(alfa);//mm\n",
+"disp(l,'Reading in tube in mm : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3: Convert_pressure_head.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.3\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"S1=13.6;//sp. gravity of mercury\n",
+"S2=1;//sp. gravity of water\n",
+"H1=5;//m\n",
+"H2=S1*H1/S2;//m\n",
+"disp('(i) Pressure is '+string(H2)+' meter of water.');\n",
+"S2=0.79;//sp. gravity of kerpsene\n",
+"H1=5;//m\n",
+"H2=S1*H1/S2;//m\n",
+"disp('(ii) Pressure is '+string(H2)+' meter of kerosene.');\n",
+"S2=1.7;//sp. gravity of fluid\n",
+"H1=5;//m\n",
+"H2=S1*H1/S2;//m\n",
+"disp('(iii) Pressure is '+string(H2)+' meter of fluid.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.4: Pressure_in_the_tribe.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.4\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"S=0.9;//sp. gravity of liquid\n",
+"Sm=13.6;//sp. gravity of mercury\n",
+"S1=Sm/S;//sp. gravity\n",
+"w=S*9.81;//kN/m^3\n",
+"h2=500/1000;//m\n",
+"h1=300/1000;//m\n",
+"a_BY_A=1/80;//ratio of area\n",
+"pa=w*(h2*[(S1-1)*a_BY_A+S1]-h1);//kPa\n",
+"disp(pa,'Pressure in the pipe in kPa: ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.5: Pressure_intensity_of_liquid.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.5\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',8);\n",
+"//Given data :\n",
+"S1=1.2;//sp. gravity\n",
+"S2=13.6;//sp. gravity\n",
+"w=1000;//kg/m^3\n",
+"h2=50/1000;//m\n",
+"h1=200/1000;//m\n",
+"pa=w*(S2*h1-S1*h2);//kg/m^2\n",
+"disp(pa,'Pressure in the pipe in kg/m^2: ');\n",
+"disp(pa*9.81,'Pressure in the pipe in Pa: ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.6: calculate_Pressure_intensity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.6\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',8);\n",
+"//Given data :\n",
+"S=1;//sp. gravity\n",
+"w=1000;//kg/m^3\n",
+"h2=50/1000;//m\n",
+"h1=200/1000;//m\n",
+"pa=w*S*(h1-h2);//kg/m^2\n",
+"disp(pa,'Pressure in the pipe in kg/m^2: ');\n",
+"disp(pa*9.81,'Pressure in the pipe in Pa: ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.7: Calculate_pressure_intensity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.7\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9);\n",
+"//Given data :\n",
+"S1=0.005;//sp. gravity\n",
+"S2=1;//sp. gravity\n",
+"Patm=1.014*10^5;//Pa\n",
+"h=50/1000;//m\n",
+"w=1000;//kg/m^3\n",
+"pa=-w*S2*h;//kg/m^2\n",
+"Pabs=pa*9.81+Patm;//\n",
+"disp(abs(pa*9.81),'Pressure intensity of gas in Pa(Vaccum): ');\n",
+"disp(Pabs,'Absolute pressure in the pipe in Pa: ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.8: Difference_of_pressure_head.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.8\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9);\n",
+"//Given data :\n",
+"S1=0.9;//sp. gravity\n",
+"S2=13.6;//sp. gravity\n",
+"h1=12.5/100;//m\n",
+"P_AB=h1*(S2-S1);//meter of water\n",
+"disp('Difference in pressure head at the points A & B is '+string(P_AB)+' meter of water');\n",
+"w=1000;//kg/m^3\n",
+"P_diff=P_AB*w*9.81;//Pa or Nm^2\n",
+"disp(P_diff,'In terms A pressure entirely, the difference of pressure in N/m^2 : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.9: Difference_of_Pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 4.9\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9);\n",
+"//Given data :\n",
+"S1=1;//sp. gravity\n",
+"S2=13.6;//sp. gravity\n",
+"h1=120/1000;//m\n",
+"P_diff=h1*(S2-S1);//meter of water\n",
+"disp('Difference in pressure head is '+string(P_diff)+' meter of water');\n",
+"w=1000;//kg/m^3\n",
+"P_diff=P_diff*w*9.81;//Pa or Nm^2\n",
+"disp(P_diff,'In terms of pressure intensity, the difference of pressure in N/m^2 : ');"
+ ]
+ }
+],
+"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/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/5-Fundamentals_of_Flow.ipynb b/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/5-Fundamentals_of_Flow.ipynb
new file mode 100644
index 0000000..6aca107
--- /dev/null
+++ b/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/5-Fundamentals_of_Flow.ipynb
@@ -0,0 +1,952 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: Fundamentals of Flow"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.10: Determine_pressure_intensity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.10\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',8);\n",
+"//Given data :\n",
+"Q=200*10^-3;//m^3/s\n",
+"D1=250/1000;//meter\n",
+"D2=200/1000;//meter\n",
+"A1=%pi*D1^2/4;//m^2\n",
+"A2=%pi*D2^2/4;//m^2\n",
+"v1=Q/A1;//m/s\n",
+"v2=Q/A2;//m/s\n",
+"Z1=2;//meter\n",
+"Z2=8;//meter\n",
+"g=9.81;//constant\n",
+"w=1000;//kg/m^3\n",
+"p1=w*(Z1-v1^2/2/g);//kg/m^2\n",
+"p2=v1^2/2/g*w+p1+Z2*w-v2^2/2/g*w-4*w;//kg/m^2(by Bernolli's theorem)\n",
+"p1=p1*g;//N/m^2\n",
+"p2=p2*g;//N/m^2\n",
+"disp(p1,'Pressure intensity at point P in N/m^2 : ');\n",
+"disp(p2,'Pressure intensity at point Q in N/m^2 : '); \n",
+"//Answer in the book is not accurate."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.11: Intensity_of_pressure_and_discharge.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.11\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',8);\n",
+"//Given data :\n",
+"slope=1/10;\n",
+"Z1=0;//meter\n",
+"Z2=40*slope;//meter\n",
+"p1=1.5/10^-4;//kg/cm^2\n",
+"v2=4.1;//m/s\n",
+"D1=600/1000;//meter\n",
+"D2=300/1000;//meter\n",
+"A1=%pi*D1^2/4;//m^2\n",
+"A2=%pi*D2^2/4;//m^2\n",
+"v1=A2*v2/A1;//m/s\n",
+"g=9.81;//constant\n",
+"w=1000;//kg/m^3\n",
+"p2=(p1/w+v1^2/2/g+Z1-v2^2/2/g-Z2)*w;//kg/m^2(by Bernolli's theorem)\n",
+"p2=p2*10^-4;//kg/cm^2\n",
+"Q1=A1*v1;//m^3/sec\n",
+"Q1=Q1*1000;//litre/sec\n",
+"disp(p2,'Pressure intensity at point Q in kg/cm^2 : '); \n",
+"disp(Q1,'Discharge of pipe in litres/sec : ');\n",
+"//Answer in the book is not accurate. calculation for A1 & A2 is wrong."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.12: Find_discharge_of_oil.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.12\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"D1=180/1000;//meter\n",
+"D2=90/1000;//meter\n",
+"g=9.81;//gravity constant\n",
+"S=0.8;//sp. gravity of oil\n",
+"Sm=13.6;//sp. gravity of mercury\n",
+"x=300/1000;//meter\n",
+"K=0.97;//coeff. of meter\n",
+"A1=%pi*D1^2/4;//m^2\n",
+"A2=%pi*D2^2/4;//m^2\n",
+"C=A1*A2*sqrt(2*g)/sqrt(A1^2-A2^2)\n",
+"h=x*(Sm/S-1);//meter of oil\n",
+"Q=K*C*sqrt(h);//m^3/sec\n",
+"Q=Q*1000;//litre/sec\n",
+"disp(Q,'Discharge of oil in litres/sec : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.13: Coefficient_of_meter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.13\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',8);\n",
+"//Given data :\n",
+"D1byD2=1/0.7;\n",
+"D1=320/1000;//meter\n",
+"D2=320*0.7/1000;//meter\n",
+"g=9.81;//gravity constant\n",
+"Q=30.6/60;//m^3/sec\n",
+"A1=%pi*D1^2/4;//m^2\n",
+"A2=%pi*D2^2/4;//m^2\n",
+"C=A1*sqrt(2*g)/sqrt((D1byD2)^4-1);\n",
+"h=1.2;//meter of water\n",
+"K=Q/C/sqrt(h);//Coeff. of meter\n",
+"disp(K,'Coefficient of meter : ');\n",
+"//Answer in the book is wrong."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.14: Deflection_in_manometer.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.14\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',5);\n",
+"//Given data :\n",
+"D1=320/1000;//meter\n",
+"D2=224/1000;//meter\n",
+"g=9.81;//gravity constant\n",
+"Q=25000/1000/60;//m^3/sec\n",
+"A1=%pi*D1^2/4;//m^2\n",
+"A2=%pi*D2^2/4;//m^2\n",
+"C=0.4984;//venturi constant\n",
+"K=0.92;//Coeff. of meter\n",
+"h=(Q/K/C)^2\n",
+"S=1;//sp. gravity\n",
+"Sm=13.6;//sp. gravity\n",
+"x=h/(Sm/S-1);//meter of water\n",
+"disp(x*1000,'Deflection in manometer(mm) : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.15: Find_pressure_difference.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.15\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"D1=120/1000;//meter\n",
+"D2=120*0.55/1000;//meter\n",
+"g=9.81;//gravity constant\n",
+"A1=%pi*D1^2/4;//m^2\n",
+"A2=%pi*D2^2/4;//m^2\n",
+"Q=30/1000;//m^3/sec\n",
+"C=A1*sqrt(2*g)/sqrt((D1/D2)^4-1);//venturi constant\n",
+"K=0.94;//Coeff. of meter\n",
+"h=(Q/K/C)^2;//meter\n",
+"Z1=0;//meter\n",
+"Z2=0.3;//meter\n",
+"S=0.79;//sp. gravity\n",
+"w=1000*S;//kg/m^3\n",
+"delta_p=(h+Z1-Z2)*w;//kg/m^2\n",
+"delta_p=delta_p*g;//N/m^2\n",
+"disp(delta_p,'Pressure difference in N/m^2 : ');\n",
+"//answer is wrong in the book."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.16: Deflection_of_oil_mercury_gauge.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.16\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"D1=160/1000;//meter\n",
+"D2=60/1000;//meter\n",
+"g=9.81;//gravity constant\n",
+"S=0.8;//sp. gravity\n",
+"Sm=13.6;//sp. gravity of mercury\n",
+"Q=0.05;//m^3/sec\n",
+"K=0.98;//Coeff. of meter\n",
+"A1=%pi*D1^2/4;//m^2\n",
+"A2=%pi*D2^2/4;//m^2\n",
+"C=A1*sqrt(2*g)/sqrt((A1/A2)^2-1);//venturi constant\n",
+"h=(Q/K/C)^2;//meter\n",
+"x=h/(Sm/S-1);//meter\n",
+"disp(x,'Deflection in meter : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.17: Rate_of_flow.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.17\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',4);\n",
+"//Given data :\n",
+"D1=200/1000;//meter\n",
+"D2=100/1000;//meter\n",
+"x=220/1000;//meter\n",
+"g=9.81;//gravity constant\n",
+"K=0.98;//Coeff. of meter\n",
+"S=1;//sp. gravity\n",
+"Sm=13.6;//sp. gravity of mercury\n",
+"A1=%pi*D1^2/4;//m^2\n",
+"A2=%pi*D2^2/4;//m^2\n",
+"C=A1*sqrt(2*g)/sqrt((A1/A2)^2-1);//venturi constant\n",
+"h=x*(Sm/S-1);//meter\n",
+"Q=K*C*sqrt(h);//m^3/sec\n",
+"Q=Q*1000;//litres/sec\n",
+"disp(Q,'Rate of flow in litres/sec : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.18: Calculate_flow_water.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.18\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',8);\n",
+"//Given data :\n",
+"D1=40/100;//meter\n",
+"D2=15/100;//meter\n",
+"x=25/100;//meter\n",
+"g=9.81;//gravity constant\n",
+"K=0.98;//Coeff. of meter\n",
+"S=1;//sp. gravity\n",
+"Sm=13.6;//sp. gravity of mercury\n",
+"A1=%pi*D1^2/4;//m^2\n",
+"A2=%pi*D2^2/4;//m^2\n",
+"C=A1*A2*sqrt(2*g)/sqrt(A1^2-A2^2);//venturi constant\n",
+"h=x*(Sm/S-1);//meter\n",
+"Q=K*C*sqrt(h);//m^3/sec\n",
+"Q=Q*1000*3600;//litres/hour\n",
+"disp(Q,'Flow of water in litres/hour : ');\n",
+"//Answer in the book is wrong."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.19: Flow_rate_of_water.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.19\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',4);\n",
+"//Given data :\n",
+"D1=15/100;//meter\n",
+"D2=7.5/100;//meter\n",
+"g=9.81;//gravity constant\n",
+"p1=4*g*10^4;//N/m^2\n",
+"p2=1.5*g*10^4;//kg/cm^2\n",
+"w=9.81;//kg/m^2\n",
+"A1=%pi*D1^2/4;//m^2\n",
+"A2=%pi*D2^2/4;//m^2\n",
+"v1BYv2=A2/A1;\n",
+"//v1^2/2/g+p1/w=v2^2/2/g+p2/w\n",
+"//v1^2=v2^2-50*g\n",
+"v2=sqrt(50*g/(1-v1BYv2^2));//m/s\n",
+"Q=A2*v2;//m^3/sec\n",
+"Q=Q*1000;//litres/sec\n",
+"disp(Q,'Flow of water in litres/sec : ');\n",
+"//Answer is wrong in the book."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.1: Find_Power_required.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.1\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9);\n",
+"//Given data :\n",
+"m=2000;//litre or kg(1litre water =1kg)\n",
+"M=m/60;//kg/s\n",
+"p=4.5;//bar\n",
+"p=p*10^5;//N/m^2\n",
+"g=9.81;//constant\n",
+"w=g*1000;//N/m^3\n",
+"H=p/w;//m\n",
+"Power=M*g*H/1000;//kW\n",
+"disp(Power,'Power required in kW : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.20: Velocity_and_flow_rate.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.20\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"D1=20/100;//meter\n",
+"D2=15/100;//meter\n",
+"A1=%pi/4*D1^2;//m^2\n",
+"A2=%pi/4*D2^2;//m^2\n",
+"v1=2;//m/s\n",
+"v2=A1*v1/A2;//m/s\n",
+"disp(v2,'Velocity at another section in m/s : ');\n",
+"FlowRate=A1*v1;//m^3/s\n",
+"FlowRate=FlowRate*1000;//litres/s\n",
+"disp(FlowRate,'Flow Rate in litres/sec : ');\n",
+"//Answer of velocity in the book is not accurate."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.21: Flow_rate_of_oil.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.21\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',4);\n",
+"//Given data :\n",
+"rd=0.75;//relative density\n",
+"D=12.5/100;//meter\n",
+"p=1;//bar\n",
+"p=p*1.02;//kg/cm^2\n",
+"p=p*9.81*10^4/1000;//kPa\n",
+"g=9.81;//gravity constant\n",
+"w=g*rd;//N/m^3\n",
+"pH=p/w;//meter\n",
+"Z=2.5;//meter\n",
+"Et=20;//Nm\n",
+"v=sqrt((Et-p/w-Z)*2*g);//m/s\n",
+"A=%pi/4*D^2;//m^2\n",
+"Q=A*v;//m^3/sec\n",
+"Q=A*v*1000;//litres/sec\n",
+"disp(Q,'Flow Rate of oil in litres/sec : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.22: Find_Z.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.22\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',5);\n",
+"//Given data :\n",
+"rd=0.75;//relative density\n",
+"d1=0.3;//meter\n",
+"d2=0.1;//meter\n",
+"Q=50/1000;//m^3/sec\n",
+"A1=%pi/4*d1^2;//m^2\n",
+"A2=%pi/4*d2^2;//m^2\n",
+"v1=Q/A1;//m/s\n",
+"v2=A1*v1/A2;//m/s\n",
+"p1=200;//kN/m^2\n",
+"p2=100;//kN/m^2\n",
+"w=9.81;//kN/m^3\n",
+"g=9.81;//gravity constant\n",
+"Z1=0;//meter\n",
+"Z2=Z1+p1/w+v1^2/2/g-p2/w-v2^2/2/g;//meter\n",
+"disp(Z2,'Z in meter : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.23: Discharge_in_the_pipe.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.23\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"D1=300/1000;//meter\n",
+"D2=150/1000;//meter\n",
+"Q=50/1000;//m^3/sec\n",
+"A1=%pi/4*D1^2;//m^2\n",
+"A2=%pi/4*D2^2;//m^2\n",
+"delpBYw=3;//p1/w-p2/w=3;//m\n",
+"v1BYv2=A2/A1;\n",
+"Z1=0;//meter\n",
+"Z2=0;//meter\n",
+"g=9.81;//gravity constant\n",
+"//HeadLoss=1/8*v^2/2/g\n",
+"//Z1+p1/w+v1^2/2/g=Z2+p2/w+v2^2/2/g+HeadLoss\n",
+"v2=sqrt((Z1-Z2+delpBYw)/(1/2/g-v1BYv2^2/2/g+1/8/2/g));//m/s\n",
+"Q=A2*v2;//m^3/s\n",
+"Q=Q*1000;//litres/sec\n",
+"disp(Q,'Discharge in pipe in litres/sec : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2: Discharge_and_velocity_of_flow.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.2\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9);\n",
+"//Given data :\n",
+"v1=400*10^-3;//m/s\n",
+"d1=300/1000;//meter\n",
+"d2=450/1000;//meter\n",
+"A1=%pi*d1^2/4;//m^2\n",
+"A2=%pi*d2^2/4;//m^2\n",
+"Q1=A1*v1*1000;//litres/sec(1m^3=1000litres)\n",
+"disp(Q1,'Discharge of pipe in litres/sec : ');\n",
+"v2=(Q1/1000)/A2;//m/s(Q1=Q2)\n",
+"disp(v2,'Mean velocity of flow in m/s : ');\n",
+"//Answer of discharge is wrong in the book."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.3: Datum_Velocity_Head_Pressure_head.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.3\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"PotentialHead=2;//meter of fluid\n",
+"disp('Potential Head is '+string(PotentialHead)+' meter of fluid.');\n",
+"v=5;//m/s\n",
+"g=9.81;//constant\n",
+"VelocityHead=v^2/2/g;//m\n",
+"disp('Velocity Head is '+string(VelocityHead)+' meter of fluid.');\n",
+"w=g*1000;//N/m^3\n",
+"S=0.8;//sp. gravity of fluid\n",
+"p=200;//kPa\n",
+"PressureHead=p*10^3/w/S;//meter of fluid\n",
+"disp('Pressure Head is '+string(PressureHead)+' meter of fluid.');\n",
+"TotalHead=PotentialHead+VelocityHead+PressureHead;//meter of fluid\n",
+"disp('Total Head is '+string(TotalHead)+' meter of fluid.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.4: Calculate_total_energy.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.4\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',8);\n",
+"//Given data :\n",
+"p=0.8/10^-4;//kg/m^2\n",
+"datumH=4;//meter\n",
+"v=0.8;//m/s\n",
+"g=9.81;//constant\n",
+"VelocityH=v^2/2/g;//m\n",
+"w=1000;//kg/m^3\n",
+"PressureH=p/w;//meter of fluid\n",
+"TotalH=datumH+VelocityH+PressureH;//meter of fluid\n",
+"disp('Total Energy is '+string(TotalH)+' meter.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.5: Direction_of_flow.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.5\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"D1=800/1000;//m^2\n",
+"D2=600/1000;//m^2\n",
+"p1=100;//kPa\n",
+"p2=40;//kPa\n",
+"v1=4000*10^-3;//m/s\n",
+"A1=%pi*D1^2/4;//m^2\n",
+"A2=%pi*D2^2/4;//m^2\n",
+"Z1=4;//meter\n",
+"Z2=7;//meter\n",
+"rho=1;//sp. gravity\n",
+"g=9.81;//constant\n",
+"PHeadA=p1/rho/g;//meter of fluid\n",
+"PHeadB=p2/rho/g;//meter of fluid\n",
+"v2=A1*v1/A2;//m/s\n",
+"VHeadA=v1^2/2/g;//meter\n",
+"VHeadB=v2^2/2/g;//meter\n",
+"E1=Z1+PHeadA+VHeadA;//meter\n",
+"E2=Z2+PHeadB+VHeadB;//meter\n",
+"if E1>E2 then\n",
+" disp('Total Energy at A('+string(E1)+' meter) is greater than total energy at B('+string(E2)+' meter). Flow of water is from A to B.');\n",
+"else\n",
+" disp('Total Energy at B('+string(E2)+' meter) is greater than total energy at A('+string(E1)+' meter). Flow of water is from B to A.');\n",
+"end"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.6: Pressure_at_the_low_end.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.6\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',8);\n",
+"//Given data :\n",
+"D1=1.25;//meter\n",
+"D2=0.625;//meter\n",
+"slope=100;\n",
+"L=300;///meter\n",
+"g=9.81;//constant\n",
+"Z12=L/slope;//meter\n",
+"Q=100;//litres/sec\n",
+"Q=Q*10^-3;//m^3/sec\n",
+"A1=%pi*D1^2/4;//m^2\n",
+"A2=%pi*D2^2/4;//m^2\n",
+"v1=Q/A1;//m/s\n",
+"v2=Q/A2;//m/s\n",
+"p1=100;//kN/m^2\n",
+"//Higher End : \n",
+"w=9.81;//kN/m^3\n",
+"Phead=p1/w;//meter\n",
+"Vhead=v1^2/2/g;//meter\n",
+"//Lower End : \n",
+"w=9.81;//kN/m^3\n",
+"//Phead=p1/w;//meter\n",
+"Vhead=v2^2/2/g;//meter\n",
+"p2=(Z12+v1^2/2/g+p1/w-v2^2/2/g)*w;//kN/m^2(By Bernoulli's theorem)\n",
+"disp(p2,'Pressure at the lower end in kN per m^2 : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.7: Loss_of_head_and_direction_of_flow.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.7\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',8);\n",
+"//Given data :\n",
+"Z1=0;//meter\n",
+"Z2=5;//meter\n",
+"Q=300*10^-3;//m/s\n",
+"D1=0.3;//meter\n",
+"D2=0.6;//meter\n",
+"A1=%pi*D1^2/4;//m^2\n",
+"A2=%pi*D2^2/4;//m^2\n",
+"v1=Q/A1;//m/s\n",
+"v2=Q/A2;//m/s\n",
+"p1=100;//kN/m^2\n",
+"p2=600;//kN/m^2\n",
+"g=9.81;//constant\n",
+"Vhead11=v1^2/2/g;//meter\n",
+"Vhead22=v2^2/2/g;//meter\n",
+"Phead11=p1/g;//meter\n",
+"Phead22=p2/g;//meter\n",
+"E1_11=Z1+Vhead11+Phead11;//meter\n",
+"E2_22=Z2+Vhead22+Phead22;//meter\n",
+"if E1_11>E2_22 then\n",
+" disp('Energy at section 1-1('+string(E1_11)+' meter) is greater than energy at section 2-2('+string(E2_22)+' meter). Flow of water is from section 1-1 to 2-2.');\n",
+" HeadLoss=E1_11-E2_22;//meter\n",
+" disp(HeadLoss,'Head Loss in meter : ');\n",
+"else\n",
+" disp('Energy at section 2-2('+string(E2_22)+' meter) is greater than energy at section 1-1('+string(E1_11)+' meter). Flow of water is from section 2-2 to 1-1.'); \n",
+" HeadLoss=E2_22-E1_11;//meter\n",
+" disp(HeadLoss,'Head Loss in meter : ');\n",
+"end\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.8: Find_Loss_of_head.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.8\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',8);\n",
+"//Given data :\n",
+"D=400/1000;//meter\n",
+"v1=20;//m/s\n",
+"Z1=28;//meter\n",
+"Z2=31;//meter\n",
+"p1=4/10^-4;//kg/m^2\n",
+"p2=3/10^-4;//kg/m^2\n",
+"g=9.81;//constant\n",
+"w=1000;//kg/m^3\n",
+"Vhead1=v1^2/2/g;//meter\n",
+"Phead1=p1/w;//meter\n",
+"Vhead2=Vhead1;//meter\n",
+"Phead2=p2/w;//meter\n",
+"E1=Z1+Vhead1+Phead1;//meter\n",
+"E2=Z2+Vhead2+Phead2;//meter\n",
+"HL=E1-E2;//meter\n",
+"disp(HL,'Loss of head between P & Q in meter : ');\n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9: Head_Loss_and_direction_of_flow.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 5.9\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',8);\n",
+"//Given data :\n",
+"Z1=0;//meter\n",
+"Z2=4;//meter\n",
+"rho=0.8;//sp. gravity\n",
+"\n",
+"Q=250*10^-3;//m/s or cumec\n",
+"D1=250/1000;//meter\n",
+"D2=500/1000;//meter\n",
+"A1=%pi*D1^2/4;//m^2\n",
+"A2=%pi*D2^2/4;//m^2\n",
+"v1=Q/A1;//m/s\n",
+"v2=Q/A2;//m/s\n",
+"p1=0.1*10^3;//N/m^2\n",
+"p2=0.06*10^3;//N/m^2\n",
+"g=9.81;//constant\n",
+"Vhead1=v1^2/2/g;//meter\n",
+"Phead1=p1/rho/g;//meter\n",
+"Vhead2=v2^2/2/g;//meter\n",
+"Phead2=p2/rho/g;//meter\n",
+"H1=Z1+Vhead1+Phead1;//meter\n",
+"H2=Z2+Vhead2+Phead2;//meter\n",
+"if H1>H2 then\n",
+" disp('Total head at A('+string(H1)+' meter) is greater than total head at B('+string(H2)+' meter). Flow will take place from A-B.');\n",
+" HeadLoss=H1-H2;//meter\n",
+" disp(HeadLoss,'Head Loss in meter : ');\n",
+"else\n",
+" disp('Total head at B('+string(H2)+' meter) is greater than total head at A('+string(H1)+' meter). Flow will take place from B-A.');\n",
+" HeadLoss=H2-H1;//meter\n",
+" disp(HeadLoss,'Head Loss in meter : ');end\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/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/6-Orifices.ipynb b/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/6-Orifices.ipynb
new file mode 100644
index 0000000..1eb9f85
--- /dev/null
+++ b/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/6-Orifices.ipynb
@@ -0,0 +1,716 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6: Orifices"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.10: Meeting_point_of_two_jets.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 6.10\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',5);\n",
+"//Given data :\n",
+"g=9.81;//constant\n",
+"H1=4-1;//meter\n",
+"H2=4;//meter\n",
+"Cv1=0.9;//Coefficient of velocity\n",
+"Cv2=0.9;//Coefficient of velocity\n",
+"//Cv1=Cv2 & x1=x2 at meeting point\n",
+"//x1/sqrt(4*H1*y1)=x2/sqrt(4*H2*y2)\n",
+"y1BYy2=H2/H1;\n",
+"//y1=1+y2;\n",
+"y2=1/(y1BYy2-1);//meter\n",
+"y1=y1BYy2*y2;//meter\n",
+"x1=Cv1*sqrt(4*H1*y1);//meter\n",
+"disp(y1,x1,'Meeting point horizontal & vertical co-ordinates are(x1 & y1 in meter) : ');\n",
+"//Answer in the book are not accurate."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.11: Discharge_through_the_orifice.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 6.11\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',8);\n",
+"//Given data :\n",
+"g=9.81;//constant\n",
+"Cd=0.6;//Coefficient of discharge\n",
+"B=1.3;//meter\n",
+"H1=6-(1.8+1.5);//meter\n",
+"H2=6-1.5;//meter\n",
+"Q=2/3*Cd*B*sqrt(2*g)*(H2^(3/2)-H1^(3/2));//m^3/sec\n",
+"disp(Q,'Discharge through the orifice in m^3/sec : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.12: Discharge_through_orifice.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 6.12\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"g=9.81;//constant\n",
+"Cd=0.62;//Coefficient of discharge\n",
+"B=2;//meter\n",
+"H1=3;//meter\n",
+"H2=3+1.5;//meter\n",
+"Q=2/3*Cd*B*sqrt(2*g)*(H2^(3/2)-H1^(3/2));//m^3/sec or cumec\n",
+"disp(Q,'Discharge through the orifice in cumec : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.13: Calculate_percentage_error.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 6.13\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"g=9.81;//constant\n",
+"Cd=0.6;//Coefficient of discharge\n",
+"B=1.6;//meter\n",
+"H1=1500/1000;//meter\n",
+"H2=(1500+1250)/1000;//meter\n",
+"Q=2/3*Cd*B*sqrt(2*g)*(H2^(3/2)-H1^(3/2));//m^3/sec or cumec\n",
+"disp(Q,'Discharge through the opening in cumec : ');\n",
+"//For small opening\n",
+"H=1.5+1.25/2;//meter\n",
+"D=1.25;//meter\n",
+"Qdash=Cd*(B*D)*sqrt(2*g*H);//cumec\n",
+"Error=(Qdash-Q)/Q*100;//%\n",
+"disp(Error,'% of error : ');\n",
+"//Answer is wrong in the book."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.14: Discharge_through_orifice.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 6.14\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"g=9.81;//constant\n",
+"Cd=0.6;//Coefficient of discharge\n",
+"B=1600/1000;//meter\n",
+"D=1250/1000;//meter\n",
+"ao=1.6*1.25;//m^2\n",
+"H1=2+1.25/2;//meter\n",
+"H2=0.8+1.25/2;//meter\n",
+"H=H1-H2;//meter\n",
+"Q=Cd*ao*sqrt(2*g*H);//m^3/sec or Cumec\n",
+"disp(Q,'Discharge in Cumec : ');\n",
+"//Answer is wrong in the book."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.15: Discharge_through_orifice.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 6.15\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',5);\n",
+"//Given data :\n",
+"g=9.81;//constant\n",
+"Cd=0.6;//Coefficient of discharge\n",
+"B=1600/1000;//meter\n",
+"D=1250/1000;//meter\n",
+"ao=1.6*1.25;//m^2\n",
+"H1=2+1.25;//meter\n",
+"H2=2;//meter\n",
+"H=H1-0.8;//meter\n",
+"Q=2/3*Cd*B*sqrt(2*g)*(H^(3/2)-H2^(3/2))+Cd*B*(H1-H)*sqrt(2*g*H);//m^3/sec or Cumec\n",
+"disp(Q,'Discharge through the orifice in Cumec : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.16: Find_time_taken.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 6.16\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"g=9.81;//constant\n",
+"d=4;//meter\n",
+"d0=0.5;//meter\n",
+"H1=5;//meter\n",
+"H2=2;//meter\n",
+"Cd=0.6;//Coefficient of discharge\n",
+"ao=%pi/4*d0^2;//m^2\n",
+"A=%pi/4*d^2;//m^2\n",
+"t=2*A/Cd/ao/sqrt(2*g)*(sqrt(H1)-sqrt(H2))\n",
+"disp(t,'Time taken to fall from 5m to 2m(in seconds) : ');\n",
+"//For emptying H2=0;\n",
+"H2=0;//meter\n",
+"t=2*A/Cd/ao/sqrt(2*g)*(sqrt(H1)-sqrt(H2))\n",
+"disp(t,'Time taken for completely emptying(in seconds) : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.17: Time_of_emptying_the_tank.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 6.17\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',5);\n",
+"//Given data :\n",
+"g=9.81;//constant\n",
+"d=1.2;//meter\n",
+"do=50/1000;//meter\n",
+"H=3;//meter\n",
+"Cd=0.6;//Coefficient of discharge\n",
+"ao=%pi/4*do^2;//m^2\n",
+"A=%pi/4*d^2;//m^2\n",
+"t=2*A*sqrt(H)/Cd/ao/sqrt(2*g);//sec\n",
+"disp('Time taken for emptying the tank is '+string(floor(t/60))+' minute '+string((t/60-floor(t/60))*60)+' seconds.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.18: Time_required_to_bring_down_the_level.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 6.18\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',4);\n",
+"//Given data :\n",
+"g=9.81;//constant\n",
+"A=3.2;//m^2\n",
+"a=10*10^-4;//m^2\n",
+"H1=5;//meter\n",
+"H2=2.5;//meter\n",
+"Cd=0.6;//Coefficient of discharge\n",
+"t=2*A*(sqrt(H1)-sqrt(H2))/Cd/a/sqrt(2*g);//sec\n",
+"disp('Time taken is '+string(floor(t/60))+' minute '+string((t/60-floor(t/60))*60)+' seconds.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.19: Time_required_to_empty_the_tank.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 6.19\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',4);\n",
+"//Given data :\n",
+"g=9.81;//constant\n",
+"A=3.2;//m^2\n",
+"a=10*10^-4;//m^2\n",
+"H=5;//meter\n",
+"Cd=0.6;//Coefficient of discharge\n",
+"t=2*A*sqrt(H)/Cd/a/sqrt(2*g);//sec\n",
+"disp('Time taken is '+string(floor(t/3600))+' hour '+string(floor((t/3600-floor(t/3600))*60))+' minute '+string(((t/3600-floor(t/3600))*60-floor((t/3600-floor(t/3600))*60))*60)+' seconds.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.1: Calculate_Coefficients.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 6.1\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',5);\n",
+"//Given data :\n",
+"Do=25;//mm\n",
+"Dc=20;//mm\n",
+"H=85;//mm\n",
+"x=335;//mm\n",
+"y=350;//mm\n",
+"a=%pi/4*Do^2;//m^2\n",
+"ac=%pi/4*Dc^2;//m^2\n",
+"Cc=ac/a;\n",
+"disp(Cc,'Coefficient of contraction : ');\n",
+"Cv=sqrt(x^2/4/H/y);\n",
+"disp(Cv,'Coefficient of velocity : ');\n",
+"Cd=Cc*Cv;\n",
+"disp(Cd,'Coefficient of discharge : ');\n",
+"Cr=(1/Cv^2-1);\n",
+"disp(Cr,'Coefficient of resistance : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.2: Calculate_various_Coefficients.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 6.2\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',5);\n",
+"//Given data :\n",
+"Do=0.125;//m\n",
+"H=10.5;//mm\n",
+"Q=6500;//litres/minute\n",
+"Q=Q/60/1000;//cumec\n",
+"x=6;//m\n",
+"y=1;//m\n",
+"g=9.81;//gravity constant\n",
+"a=%pi/4*Do^2;//m^2\n",
+"Qth=a*sqrt(2*g*H);//cumec\n",
+"Cd=Q/Qth;//\n",
+"disp(Cd,'Coefficient of discharge : ');\n",
+"Cv=sqrt(x^2/4/H/y);\n",
+"format('v',6);\n",
+"disp(Cv,'Coefficient of velocity : ');\n",
+"Cc=Cd/Cv;\n",
+"format('v',5);\n",
+"disp(Cc,'Coefficient of contraction : ');\n",
+"Cr=(1/Cv^2-1);\n",
+"format('v',6);\n",
+"disp(Cr,'Coefficient of resistance : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.3: Coefficient_of_velocity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 6.3\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',5);\n",
+"//Given data :\n",
+"g=9.81;//constant\n",
+"h=102;//mm\n",
+"H=105;//mm\n",
+"Cv=sqrt(2*g*h)/sqrt(2*g*H);\n",
+"disp(Cv,'Coefficient of velocity : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.4: Coefficient_of_velocity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 6.4\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',5);\n",
+"//Given data :\n",
+"Q=180/62;//litres/sec\n",
+"Q=Q/1000;//cumec\n",
+"Dc=25/1000;//m\n",
+"H=1.9;//m\n",
+"ac=%pi/4*Dc^2;//m^2\n",
+"g=9.81;//constant\n",
+"Cv=Q/sqrt(2*g*H)/ac;\n",
+"disp(Cv,'Coefficient of velocity : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.5: Various_hydraulic_coefficients.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 6.5\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"g=9.81;//constant\n",
+"d=30/1000;//meter\n",
+"wl=2;//kgm\n",
+"w1=148.6/60;//kg/sec\n",
+"y=1.65;//meter\n",
+"H=1.3;//meter\n",
+"Cv=wl/w1/y*sqrt(g)/sqrt(2*H);\n",
+"disp(Cv,'Coefficient of velocity : ');\n",
+"Q=w1/1000;//Cumec\n",
+"a=%pi/4*d^2;//meter^2\n",
+"Qth=a*sqrt(2*g*H);//Cumec\n",
+"Cd=Q/Qth;//coeff. of discharge\n",
+"disp(Cd,'Coefficient of discharge : ');\n",
+"Cc=Cd/Cv;//coeff. of contraction\n",
+"format('v',5);\n",
+"disp(Cc,'Coefficient of contraction : ');\n",
+"//Answer in the book are not accurate."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.6: Various_hydraulic_coefficients.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 6.6\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"g=9.81;//constant\n",
+"a=9*10^-4;//m^2\n",
+"H=3;//meter\n",
+"x=2.5;//meter\n",
+"y=54/100;//meter\n",
+"Qactual=250*10^-3/60;//Cumec\n",
+"Qth=a*sqrt(2*g*H);//Cumec\n",
+"Cd=Qactual/Qth;//coeff. of discharge\n",
+"disp(Cd,'Coefficient of discharge : ');\n",
+"Cv=sqrt(x^2)/sqrt(4*H*y);//velocity\n",
+"disp(Cv,'Coefficient of velocity : ');\n",
+"Cc=Cd/Cv;//coeff. of contraction\n",
+"disp(Cc,'Coefficient of contraction : ');\n",
+"//Answer in the book are not accurate."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.7: Coefficient_of_discharge.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 6.7\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',5);\n",
+"//Given data :\n",
+"g=9.81;//constant\n",
+"d=20/1000;//meter\n",
+"a=%pi/4*d^2;//m^2\n",
+"H=1;//meter\n",
+"Qactual=0.85*10^-3;//m^3/sec\n",
+"v=sqrt(2*g*H);//m/sec\n",
+"Qth=a*v;//Cumec\n",
+"Cd=Qactual/Qth;//coeff. of discharge\n",
+"disp(Cd,'Coefficient of discharge : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.8: Coefficients_of_orifice.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 6.8\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"g=9.81;//constant\n",
+"d=1.5;//meter\n",
+"h=1;//meter\n",
+"Volume=%pi/4*d^2*h;//m^3\n",
+"time=25;//sec\n",
+"Qactual=Volume/time;//Cumec\n",
+"H=10;//meter\n",
+"do=10/100;//meter\n",
+"x=4.3;//meter\n",
+"y=0.5;//meter\n",
+"ao=%pi/4*do^2;//m^2\n",
+"Qth=ao*sqrt(2*g*H);//cumec\n",
+"Cd=Qactual/Qth;//Coeff. ofdischarge\n",
+"disp(Cd,'Coefficient of discharge : ');\n",
+"format('v',5);\n",
+"Cv=sqrt(x^2)/sqrt(4*H*y);//Coefficient of velocity\n",
+"disp(Cv,'Coefficient of velocity : ');\n",
+"Cc=Cd/Cv;//coeff. of contraction\n",
+"disp(Cc,'Coefficient of contraction : ');\n",
+"Cr_dash=(1/Cv^2-1);//coeff. of resistance\n",
+"disp(Cr_dash,'Coefficient. of Resistance');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.9: Various_hydraulic_coefficients.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 6.9\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',5);\n",
+"//Given data :\n",
+"g=9.81;//constant\n",
+"do=2.5/100;//meter\n",
+"H=75/100;//meter\n",
+"x=30/100;//meter\n",
+"y=3.2/100;//meter\n",
+"Qactual=1.186*10^-3;//Cumec\n",
+"ao=%pi/4*do^2;//m^2\n",
+"Qth=ao*sqrt(2*g*H);//cumec\n",
+"Cd=Qactual/Qth;//Coeff. ofdischarge\n",
+"disp(Cd,'Coefficient of discharge : ');\n",
+"Cv=sqrt(x^2)/sqrt(4*H*y);//Coefficient of velocity\n",
+"format('v',7);\n",
+"disp(Cv,'Coefficient of velocity : ');\n",
+"format('v',6);\n",
+"Cc=Cd/Cv;//coeff. of contraction\n",
+"disp(Cc,'Coefficient of contraction : ');\n",
+"Cr_dash=(1/Cv^2-1);//coeff. of resistance\n",
+"disp(Cr_dash,'Coefficient. of Resistance');\n",
+"//Answers in the book are not accurate."
+ ]
+ }
+],
+"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/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/7-Flow_through_pipes.ipynb b/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/7-Flow_through_pipes.ipynb
new file mode 100644
index 0000000..0289986
--- /dev/null
+++ b/Fluid_Mechanics_by_A_K_Choudhary_and_Om_Prakash/7-Flow_through_pipes.ipynb
@@ -0,0 +1,923 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7: Flow through pipes"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.10: Diameter_of_pipe.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"////Example 7.10\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',5);\n",
+"//Given data :\n",
+"g=9.81;//gravity constanty\n",
+"L=3*1000;//meter\n",
+"hf=20;//meter\n",
+"Q=1;//m^3/sec\n",
+"f=0.02;//coeff. of friction\n",
+"//v=sqrt(hf*2*g/4/f/L/D);//it is v^2*D\n",
+"D2v=Q/(%pi/4);//it is D^2*v\n",
+"D=(Q/(%pi/4)/sqrt(hf*2*g/4/f/L))^(2/5);//meter\n",
+"D=D*1000;//mm\n",
+"disp(D,'Diameter of pipe in mm : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.11_a: Discharge_and_velocity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"////Example 7.11 at page 246\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"g=9.81;//gravity constanty\n",
+"D1=400/1000;//meter\n",
+"D2=300/1000;//meter\n",
+"D3=200/1000;//meter\n",
+"v1=3;//m/s\n",
+"v2=2;//m/s\n",
+"A1=%pi/4*D1^2;//m^2\n",
+"A2=%pi/4*D2^2;//m^2\n",
+"A3=%pi/4*D3^2;//m^2\n",
+"Q1=A1*v1;//cumec\n",
+"disp(Q1,'Discharge in pipe 1 in cumec : ');\n",
+"Q2=A2*v2;//cumec\n",
+"Q3=Q1-Q2;//cumec\n",
+"v3=Q3/A3;//m/s\n",
+"disp(v3,'Velocity of water in 200mm pipe in m/s : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.11: Calculate_the_pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"////Example 7.11\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"g=9.81;//gravity constanty\n",
+"D1=100/1000;//meter\n",
+"D2=200/1000;//meter\n",
+"PQ=100;//meter\n",
+"QR=100;//meter\n",
+"slope=1/100;//upward slope\n",
+"Q=0.02;//cumec\n",
+"p1=2;//kg/cm^2(Pressure in 100 mm dia pipe)\n",
+"f=0.02;//unitless\n",
+"Q_P=100/100;//meter(Point Q hight respect to point P)\n",
+"Q_R=200/100;//meter(Point Q hight respect to point R)\n",
+"v1=Q/(%pi/4*D1^2);//m/sec\n",
+"v2=Q/(%pi/4*D2^2);//m/sec\n",
+"hf1=4*f*PQ*v1^2/(2*g*D1);//meter\n",
+"hf2=4*f*QR*v2^2/(2*g*D2);//meter\n",
+"hse=(v1-v2)^2/2/g;//meter(loss due to sudden enlargement)\n",
+"//Section PQ\n",
+"Z1P=0;//meter(Datum Head)\n",
+"H1P=v1^2/2/g;//meter(velocity Head)\n",
+"p1BYw=p1*10^4/1000;//meter(Pressure Head at P)\n",
+"Z1Q=1;//meter(Datum Head)\n",
+"H1Q=v2^2/2/g;//meter(velocity Head)\n",
+"//Applying bernaullis theorem\n",
+"p2BYw=Z1P+p1BYw+H1P-Z1Q-H1Q-hf1;//meter(Pressure Head at Q)\n",
+"disp(p1BYw,'Pressure Head at point P(m)')\n",
+"disp(H1P,'Velocity Head at point P(m)')\n",
+"disp(p2BYw,'Pressure Head at point Q(m)')\n",
+"//Section QR\n",
+"//Applying bernaullis theorem\n",
+"p2dashBYw=p2BYw+H1P-H1Q-hse;//meter(Pressure Head at Q)\n",
+"Z2=1;//meter(Datum Head)\n",
+"H1Q=v2^2/2/g;//meter(velocity Head)\n",
+"Z3=2;//meter(Datum Head at R)\n",
+"H1R=v2^2/2/g;//meter(velocity Head at R)\n",
+"//Applying bernaullis theorem\n",
+"p3BYw=Z2+p2dashBYw+H1Q-Z3-H1R-hf2;//meter(Pressure Head at R)\n",
+"disp(H1Q,'Velocity Head at point Q after enlargemant(m)')\n",
+"disp(p2dashBYw,'Pressure Head at point Q after enlargemant(m)')\n",
+"disp(p3BYw,'Pressure Head at point R(m)')\n",
+"disp(H1R,'Velocity Head at point R(m)')\n",
+"//Answer in the book is wrong for some calculations."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.12: Discharge_through_300mm_pipe.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"////Example 7.12\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"g=9.81;//gravity constanty\n",
+"D1=100/1000;//meter\n",
+"D2=300/1000;//meter\n",
+"Q1=0.01;//m^3/sec\n",
+"A1=%pi/4*D1^2;//m^2\n",
+"A2=%pi/4*D2^2;//m^2\n",
+"//hf1=hf2\n",
+"Q2=sqrt(D2/(D1)*(Q1/A1)^2*A2^2);//cumec\n",
+"disp(Q2,'Discharge throough 300mm pipe in cumec : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.13: Discharge_in_pipe_line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"////Example 7.13\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"g=9.81;//gravity constanty\n",
+"f=0.02;//coeff. of friction\n",
+"PQ=500;//meter\n",
+"QR=1000;//meter\n",
+"RS=500;//meter\n",
+"hf=10+PQ/62.5+QR/125-RS/100-2;//meter\n",
+"l=500+1000+500;///meter\n",
+"D=250/1000;//meter\n",
+"v=sqrt(hf*2*g*D/4/f/l);//m/s\n",
+"Q=%pi/4*D^2*v;//m^3/sec\n",
+"Q=Q*1000;//litres/sec\n",
+"disp(Q,'Discharge in pipe line in litres/sec : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.14_a: Diameter_of_pipe_line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"////Example 7.14 at page no. 250\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"g=9.81;//gravity constant\n",
+"l=4;//km\n",
+"n=5000;//habitants\n",
+"Ch=200;//litres/day(habitant capacity)\n",
+"t=10;//hour(daiy supply time)\n",
+"hf=20;//meter(Head loss)\n",
+"f=0.008;//coeff. of friction\n",
+"Qty=n*Ch/2;//litres(Water supplied in 10 hours)\n",
+"Q=Qty/(t*60*60);//litres/sec\n",
+"Q=Q/1000;//m^3/sec\n",
+"d=(f*l*1000*Q^2/3.0257/hf)^(1/5);//meter\n",
+"disp(d*1000,'Diameter of pipe(mm) : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.14: Discharge_in_pipe_line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"////Example 7.14\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"g=9.81;//gravity constant\n",
+"slope=1/125;//slope\n",
+"hA=12;//meter(level of water in reservoir A)\n",
+"hB=1.5;//meter(level of water in reservoir B)\n",
+"L1=500;//meter\n",
+"D1=250/1000;//meter\n",
+"L2=1000;//meter\n",
+"D2=200/1000;//meter\n",
+"L3=500;//meter\n",
+"D3=150/1000;//meter\n",
+"f=0.02;//coeff. of friction\n",
+"fall_level=(L1+L2+L3)*slope;//meter\n",
+"H=hA+fall_level-hB;//meter(Head available for flow)\n",
+"v2BYv1=(D1/D2)^2;\n",
+"v3BYv1=(D1/D3)^2;\n",
+"//H=hf=hf1+hf2+hf3\n",
+"//H=(4*f*L1*v1^2/(2*g*D1)+4*f*L2*v2^2/(2*g*D2)+4*f*L3*v3^2/(2*g*D3))\n",
+"v1=sqrt(H/(4*f*L1/(2*g*D1)+4*f*L2*v2BYv1^2/(2*g*D2)+4*f*L3*v3BYv1^2/(2*g*D3)));//m/s\n",
+"Q=%pi*D1^2/4*v1;//m^3/sec\n",
+"Q=Q*1000;//litres/sec\n",
+"disp(Q,'Discharge in pipe line in litres/sec : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.15_a: Difference_in_water_level.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"////Example 7.15 at page no. 252\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"g=9.81;//gravity constant\n",
+"D=30/100;//meter\n",
+"l=400;//meter\n",
+"Q=300;//litres/sec\n",
+"f=0.008;//coeff. of friction\n",
+"Q=Q*10^-3;//m^3/sec\n",
+"A=%pi*D^2/4;//m^2\n",
+"v=Q/A;//m/s(velocity of flow)\n",
+"h1=0.5*v^2/2/g;//meter(Head loss at entrance to a pipe)\n",
+"h2=4*f*l*v^2/(2*g*D);//meter(Head loss due to friction)\n",
+"h3=v^2/2/g;//meter(Head loss at entrance of reservoir)\n",
+"H=h1+h2+h3;//meter(Difference of water level)\n",
+"disp(H,'Difference of water level between two reservoir(meter)');\n",
+"//Answer in the book is not accurate as h2 is calculated wrong."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.15: Rate_of_flow_and_diameter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"////Example 7.15\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"g=9.81;//gravity constant\n",
+"D1=50/1000;//meter\n",
+"D2=100/1000;//meter\n",
+"l1=100;l2=100;//meter\n",
+"hf1=10;//meter(level difference)\n",
+"f=0.008;//coeff. of friction\n",
+"Q2BYQ1=sqrt((l1/l2)*(D2/D1)^5);//as hf1=hf2\n",
+"Q1=sqrt(hf1/f/l1*(3.0257*D1^5));//m^3/sec\n",
+"Q2=Q2BYQ1*Q1;//m^3/sec or cumec\n",
+"disp(Q1,'Rate of flow of pipe 1(m^3/sec)');\n",
+"disp(Q2,'Rate of flow of pipe 2(m^3/sec)');\n",
+"Q=Q1+Q2;//m^3/sec(Total Discharge)\n",
+"d=(f*l1*Q^2/3.0257/hf1)^(1/5);//meter\n",
+"disp(d*1000,'Diameter of single pipe(mm) : ');\n",
+"//Answer in the book is not accurate."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.16: Discharge_through_pipe.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"////Example 7.16\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"g=9.81;//gravity constant\n",
+"D=150/1000;//meter\n",
+"l=70;//meter\n",
+"H=2.6;//meter(head of water)\n",
+"f=0.01;//coeff. of friction\n",
+"//Applyong Bernoullis theorem\n",
+"v=sqrt(H*(2/g*(1+0.5+4*f*l/D))/4);//m/s\n",
+"Q=%pi*D^2/4*v;//m^3/sec\n",
+"Q=Q*1000;//litres/sec\n",
+"disp(Q,'Discharge through the pipe(litres/sec)');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.17: Velocity_discharge_rate_and_energy.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"////Example 7.17\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9);\n",
+"//Given data :\n",
+"g=9.81;//gravity constant\n",
+"Cv=0.97;//coeffiecient of velocity\n",
+"Cc=0.95;//coeffiecient\n",
+"Dn=50/1000;//meter(Nozzle diameter)\n",
+"D=100/1000;//meter(Pipe diameter)\n",
+"p=6.867;//N/cm^2(Pressure at the base of nozzle)\n",
+"Hb=p*10^4/(g*1000)//meter(Head at the base of nozzle)\n",
+"v=Cv*sqrt(2*g*Hb);//m/s(velocty of jet)\n",
+"disp(v,'Velocity in the jet(m/s)');\n",
+"A=%pi/4*Dn^2;//m^2(Cross sction of jet)\n",
+"Q=Cc*A*v;//m^3/sec(Discharge)\n",
+"Q=Q*1000;//litres/sec\n",
+"disp(Q,'Rate of discharge(litres/second)');\n",
+"E=g*1000*Q/1000*Hb/1000;//kW(Energy transmitted)\n",
+"disp(E,'Energy per second n the jet(kW)');\n",
+"//Answer in the book is not accurate."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.18: Discharge_in_pipe_and_pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"////Example 7.18\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9);\n",
+"//Given data :\n",
+"g=9.81;//gravity constant\n",
+"D=100/1000;//meter(Pipe diameter)\n",
+"L=700;//meter(Total length)\n",
+"Lin=300;//meter(inlet length)\n",
+"hf=10;//meter(Available head)\n",
+"h=1.4;//meter(height)\n",
+"f=0.02;//coefficient of friction\n",
+"v=sqrt(hf*2*g*D/4/f/L);//m/s\n",
+"Q=%pi*D^2/4*v*1000;//litres/sec\n",
+"disp(Q,'Discharge in pipe(litres/second)');\n",
+"//Applying Brnaullis theorem\n",
+"p1=0;v1=0;Z1=0;//(Neglecting minor losses)\n",
+"v2=v;//m/s\n",
+"Z2=h;//meter\n",
+"hf=4*f*Lin*v^2/(2*g*D);//meter\n",
+"p2BYw=-v2^2/2/g-Z2-hf;//meter of water\n",
+"hatm=10.3;//meter(Atmospheric pressure head)\n",
+"habs=p2BYw+hatm;//meter(Absolute pressure head)\n",
+"disp(habs,'Pressure at the summit of siphon(meter)');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.19_a: Maximum_Power.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"////Example 7.19 at page no. 265\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9);\n",
+"//Given data :\n",
+"g=9.81;//gravity constant\n",
+"l=10000;//meter(length of pipe line)\n",
+"D=0.2;//meter(Diameter of pipe)\n",
+"p=60*10^5;//N/m^2\n",
+"f=0.007;//coefficient of friction\n",
+"w=g*1000;//N/m^3\n",
+"H=p/w;//meter\n",
+"hf=H/3;//meter(friction head loss is 1/3rd)\n",
+"v=sqrt(hf*2*g*D/4/f/l);//m/s\n",
+"P=w*%pi*D^2/4*v*(H-hf)/1000;//kW\n",
+"disp(P,'Maximum power(kW)');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.19: Increase_in_pressure_Intensity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"////Example 7.19\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9);\n",
+"//Given data :\n",
+"g=9.81;//gravity constant\n",
+"D=150/1000;//meter(Pipe diameter)\n",
+"Q=40;//litres/sec(rate of discharge)\n",
+"l=500;//meter(valve distance)\n",
+"T=0.5;//second\n",
+"v=Q/1000/(%pi/4*D^2);//m/s(velocity of flow)\n",
+"pi=1000/g*(l*v/T);//kg/m^2\n",
+"disp(pi,'Increase in pressure intensity(kg/m^2)');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.1: Relation_between_CGS_and_MKS_unit.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 7.1\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',9);\n",
+"disp('Part(i)');\n",
+"disp('Absolute unit of viscosity(in C.G.S) is Poise.');\n",
+"disp('Poise=1 dyne-sec/cm^2');\n",
+"disp('Gravitational unit of viscosity is 1 gm-sec/cm^2.');\n",
+"disp('On equating we get, 1 gm = 981 dyne');\n",
+"//Let x=1kg-sec/m^2\n",
+"x=1*10^3/10^4;//g-sec/cm^2\n",
+"x=x*981;//dyne-sec/cm^2 or Poise(Putting 1gm=981 dyne)\n",
+"disp('1 kg-sec/m^2 = '+string(x)+' Poise');\n",
+"one_Poise=1/x;//kg-sec/m^2\n",
+"one_Poise=1/x*9.81;//N-sec/m^2 or Pa-sec(as 1Pa=1N/m^2)\n",
+"disp('1 Poise = '+string(one_Poise)+' N-sec/m^2 or Pa-sec');\n",
+"disp('Part(ii)');\n",
+"disp('Kinematic viscosity = viscosity/specific_gravity');\n",
+"disp('Kinematic viscosity C.G.S unit is cm^2/sec. 1cm^2/sec=1stoke');\n",
+"disp('Kinematic viscosity M.K.S unit is m^2/sec');\n",
+"//let x=1;//m^2/sec\n",
+"x=1;//m^2/sec\n",
+"x=x*10^4;//cm^2/sec or stokes\n",
+"disp('1 m^2/sec = '+string(x)+' cm^2/sec or stoke');\n",
+"one_stoke=1/x;//m^2/sec\n",
+"disp('1 stoke = '+string(one_stoke)+' m^2/sec');\n",
+"disp('1 stoke = 100 centi-stokes');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.2: Kinematic_viscosity_and_Reynolds_number.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 7.2\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"mu=0.009;//kg-sec/m^2\n",
+"rho=0.89;//sp. gravity\n",
+"Q=4*10^-3;//m^3/sec\n",
+"d=30/1000;//meter\n",
+"v=mu/rho;//m^2/s\n",
+"disp(v,'Kinematic viscosity in m^2/sec : ');\n",
+"A=%pi*d^2/4;//m^2\n",
+"vm=Q/A;//m/s\n",
+"Rn=vm*d/v;//Reynolds no.\n",
+"disp(Rn,'Reynolds number for flow : ');\n",
+"disp('This is laminar flow because Rn no. is less than 2000.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.3: Calculate_reynolds_number.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 7.3\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"d=200/1000;//meter\n",
+"Q=40*10^-3;//m^3/sec\n",
+"A=%pi*d^2/4;//m^2\n",
+"vm=Q/A;//m/s\n",
+"v=0.25*10^-4;//m^2/s\n",
+"Rn=vm*d/v;//Reynolds no.\n",
+"disp(Rn,'Reynolds number for flow : ');\n",
+"disp('This is turbulent flow because Rn no. is greater than 4000.');\n",
+"disp(Rn/8,'New Reynolds number for flow : ');\n",
+"disp('This is laminar flow because Rn no. is less than 2000.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.4: Head_Lost_due_to_frictio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example 7.4\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"D=30/100;//meter\n",
+"L=100;//meter\n",
+"v=0.01*10^-4;//m^2/s\n",
+"a=3;//m/s\n",
+"g=9.81;//gravity constanty\n",
+"Rn=a*D/v;//Reynolds no.\n",
+"f=0.079/Rn^(1/4);//using blasius formula \n",
+"hf=4*f*L/D*a^2/2/g;//meter\n",
+"disp(hf,'Head lost in meter : ');\n",
+"//Answer in the book is wrong."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.5: Difference_in_elevations.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"////Example 7.5\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"D=30/100;//meter\n",
+"L=500;//meter\n",
+"Q=300*10^-3;//m^2/sec\n",
+"f=0.0008;//coeff. of friction\n",
+"v=Q/(%pi/4*D^2);//m/s\n",
+"g=9.81;//gravity constanty\n",
+"hf=4*f*L*v^2/D/2/g;//meter\n",
+"disp(hf,'Difference in elevation in meter : ');\n",
+"//Answer in the book is wrong."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.6: Head_Lost_due_to_frictio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"////Example 7.6\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"D=20/100;//meter\n",
+"v=3;//m/s\n",
+"v1=0.01*10^-3;//m^2/sec\n",
+"Re=D*v/v1;//Reynolds number\n",
+"f=0.002+0.09/Re^0.3;//coeff. of friction\n",
+"L=5;//meter\n",
+"g=9.81;//gravity constanty\n",
+"hf=4*f*L*v^2/D/2/g;//meter\n",
+"disp(hf,'Head lost due to friction in meter : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.7: Loss_of_head_due_to_frictio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"////Example 7.7\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"D=80/1000;//meter\n",
+"Q=600*10^-3/60;//m^3/sec\n",
+"L=1*10^3;//meter\n",
+"f=0.02;//coefficient of friction\n",
+"v=Q/(%pi/4*D^2);//m/s\n",
+"g=9.81;//gravity constanty\n",
+"hf=4*f*L*v^2/D/2/g;//meter\n",
+"disp(hf,'Head lost due to friction in meter : ');\n",
+"//Answer is wrong in the book."
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.8: Various_losses.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"////Example 7.8\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',6);\n",
+"//Given data :\n",
+"g=9.81;//gravity constanty\n",
+"f=0.02;//coefficient of friction\n",
+"Cc=0.62;//coefficient of contraction\n",
+"//Portion AB\n",
+"Q1=50*10^-3;//m^3/sec\n",
+"D1=150/1000;//meter\n",
+"v1=Q1/(%pi/4*D1^2);//m/s\n",
+"hr=0.5*v1^2/2/g;//meter\n",
+"L1=200;//meter\n",
+"hf1=4*f*L1*v1^2/2/g/D1;//meter\n",
+"D2=200/1000;//meter\n",
+"v2=Q1/(%pi/4*D2^2);//m/s\n",
+"hc1=(v1-v2)^2/2/g;//meter\n",
+"L2=500;//meter\n",
+"hf2=4*f*L2*v2^2/2/g/D2;//meter\n",
+"d=75/1000;//meter\n",
+"ho=[(%pi/4*D2^2)/Cc/((%pi/4*D2^2)-(%pi/4*d^2))-1]^2*v2^2/2/g;//meter\n",
+"D3=120/1000;//meter\n",
+"v3=Q1/(%pi/4*D3^2);//m/s\n",
+"hc2=v3^2/2/g*(1/Cc-1)^2;//meter\n",
+"L3=500;//meter\n",
+"hf3=4*f*L3*v3^2/2/g/D3;//meter\n",
+"Kb=0.25;//assumed\n",
+"hb1=Kb*v3^2/2/g;//meter\n",
+"D4=120/1000;//meter\n",
+"v4=Q1/(%pi/4*D4^2);//m/s\n",
+"L4=500;//meter\n",
+"hf4=4*f*L4*v4^2/2/g/D4;//meter\n",
+"hb2=Kb*v3^2/2/g;//meter\n",
+"L5=500;//meter\n",
+"hf5=4*f*L5*v4^2/2/g/D4;//meter\n",
+"h_outlet=v3^2/2/g;//meter\n",
+"h_total=hr+hf1+hc1+hf2+ho+hc2+hf3+hb1+hf4+hb2+hf5+h_outlet;//meter\n",
+"disp(h_total,'Total loss of head in meter : ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.9: Intensity_of_pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"////Example 7.9\n",
+"clc;\n",
+"clear;\n",
+"close;\n",
+"format('v',7);\n",
+"//Given data :\n",
+"g=9.81;//gravity constanty\n",
+"Cc=0.62;//coefficient of contraction\n",
+"D1=150/1000;//meter\n",
+"D2=100/1000;//meter\n",
+"Q=2.7/60;//m^3/sec\n",
+"p1=0.8*10^4;//kg/m^2\n",
+"v1=Q/(%pi/4*D1^2);//m/s\n",
+"v2=Q/(%pi/4*D2^2);//m/s\n",
+"hc=v2^2/2/g*(1/Cc-1)^2;//meter\n",
+"w=1000;//kg/m^3\n",
+"p2=(v1^2/2/g+p1/w-v2^2/2/g-hc)*w;//kg/m^2(Z1=Z2)\n",
+"p2=p2*10^-4;//kg/cm^2\n",
+"disp(p2,'Intensity of pressure in kg/cm^2 : ');"
+ ]
+ }
+],
+"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
+}