diff options
author | hardythe1 | 2015-06-03 15:27:17 +0530 |
---|---|---|
committer | hardythe1 | 2015-06-03 15:27:17 +0530 |
commit | 47d7279a724246ef7aa0f5359cf417992ed04449 (patch) | |
tree | c613e5e4813d846d24d67f46507a6a69d1a42d87 /sample_notebooks/JagadeeshwarGoshika/chapter1.ipynb | |
parent | 435840cef00c596d9e608f9eb2d96f522ea8505a (diff) | |
download | Python-Textbook-Companions-47d7279a724246ef7aa0f5359cf417992ed04449.tar.gz Python-Textbook-Companions-47d7279a724246ef7aa0f5359cf417992ed04449.tar.bz2 Python-Textbook-Companions-47d7279a724246ef7aa0f5359cf417992ed04449.zip |
add books
Diffstat (limited to 'sample_notebooks/JagadeeshwarGoshika/chapter1.ipynb')
-rwxr-xr-x | sample_notebooks/JagadeeshwarGoshika/chapter1.ipynb | 292 |
1 files changed, 292 insertions, 0 deletions
diff --git a/sample_notebooks/JagadeeshwarGoshika/chapter1.ipynb b/sample_notebooks/JagadeeshwarGoshika/chapter1.ipynb new file mode 100755 index 00000000..dd94bb77 --- /dev/null +++ b/sample_notebooks/JagadeeshwarGoshika/chapter1.ipynb @@ -0,0 +1,292 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1:Fluid properties"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "## Finding Specific weight,Density,Specific Gravity\n",
+ "##Given\n",
+ "V = 0.001 ##volume in m^3\n",
+ "w = 9.6 ##weight in Newton\n",
+ "g = 9.81 ##gravitational force in m/s^2\n",
+ "\n",
+ "##calculation\n",
+ "spwt = (w/V) ##Specific weight in N/m^3\n",
+ "rho = (spwt/g) ##density in kg/m^3\n",
+ "spgr = (rho/1000) ##Specific gravity no units\n",
+ "\n",
+ "#Results\n",
+ "print \"specific weight = \",round(spwt),\"N/m^3\"\n",
+ "print \"density = \",round(rho),\"kg/m^3\"\n",
+ "print \"specific gravity = \",round(spgr,2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "specific weight = 9600.0 N/m^3\n",
+ "density = 979.0 kg/m^3\n",
+ "specific gravity = 0.98\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##Finding of Viscosity\n",
+ "##Given\n",
+ "dy=0.025E-3 ##distance in meter\n",
+ "du=0.5 ##velocity in m/s \n",
+ "tau=1.471 ##shear stress in N/m^2\n",
+ "##To Find\n",
+ "mu=tau*dy/du ##viscosity in Ns/m^2 \n",
+ "mu1=mu*10 ## Viscosity in poise\n",
+ "print \"Viscosity =\",mu,\" in Ns/m^2\"\n",
+ "print \"Viscosity =\",mu1,\" in poise\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Viscosity = 7.355e-05 in Ns/m^2\n",
+ "Viscosity = 0.0007355 in poise\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##Finding of Diameter of water droplet\n",
+ "##Given\n",
+ "st=0.716 ##Surface Tension in N/m\n",
+ "p=0.147E4 ##Pressure in N/m^2\n",
+ "##To Find \n",
+ "d=4*st/p ##Diameter in meter \n",
+ "d1=d*1E2 ##Diameter in centimeter \n",
+ "d2=d*1E3 ##Diameter in millimeter\n",
+ "print \"Diameter =\",round(d,5),\"m\"\n",
+ "print \"Diameter =\",round(d1,5),\"cm\"\n",
+ "print \"Diameter =\",round(d2,5),\"mm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diameter = 0.00195 m\n",
+ "Diameter = 0.19483 cm\n",
+ "Diameter = 1.9483 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##Finding of Shear Stress\n",
+ "##Given\n",
+ "##du/dy = vg\n",
+ "vg=0.25 ##Velocity gradient in m/sec/meter\n",
+ "nu=6.30E-4 ##Kinematic viscosity in m^2/sec\n",
+ "rho=1268.4 ##Mass density in Kg/m^3\n",
+ "mu=rho*nu ##Dynamic Viscosity\n",
+ "##To Find\n",
+ "tau=mu*vg ##Shear stress in N/m^2\n",
+ "print \"Shear Stress =\",round(tau,3),\"N/m^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Shear Stress = 0.2 N/m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##Finding of increase of Pressure\n",
+ "##Given\n",
+ "k=2.07*1E6 ## Bulk Modulus in kN/m^2\n",
+ "dv=0.01 ##Change in Volume\n",
+ "##To Find\n",
+ "p=k*(dv) ##Change in pressure\n",
+ "print \"Increase in Pressure =\",p,\"kN/m^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Increase in Pressure = 20700.0 kN/m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "##Finding of Cappilary rise\n",
+ "##Given\n",
+ "d=0.03*1E-2 ##Diameter in meter\n",
+ "st=0.0735 ##Surface Tension in N/m\n",
+ "x=0 ##contact angle in degree\n",
+ "w=1000*9.81\n",
+ "##To Find\n",
+ "h=(4*st)*np.cos(x)/(w*d)\n",
+ "h1=h*1E2\n",
+ "print \"Capillary rise =\",round(h,4),\"m\"\n",
+ "print \"Capillary rise =\",round(h1,4),\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capillary rise = 0.0999 m\n",
+ "Capillary rise = 9.9898 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##Finding of Kinematic Viscosity\n",
+ "##Given\n",
+ "tau=0.2158 ##Shear stress in N/m^2\n",
+ "vg=0.218 ##Velocity Gradient in sec^-1\n",
+ "rho=959.5 ##Density in Kg/m^3;\n",
+ "##To Find \n",
+ "mu=tau*1/vg\n",
+ "print \"Dynamic Viscosity =\",round(mu,5),\"Ns/m^2\"\n",
+ "nu=mu/rho\n",
+ "print \"Kinematic Viscosity =\",round(nu,5),\"m^2/sec\"\n",
+ "nu1=nu*1E4\n",
+ "print \"Kinematic Viscosity =\",round(nu1,5),\"cm^2/sec\"\n",
+ "nu2=nu1*1E-4\n",
+ "print \"Kinematic Viscosity =\",round(nu2,5),\"strokes\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dynamic Viscosity = 0.98991 Ns/m^2\n",
+ "Kinematic Viscosity = 0.00103 m^2/sec\n",
+ "Kinematic Viscosity = 10.31692 cm^2/sec\n",
+ "Kinematic Viscosity = 0.00103 strokes\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |