diff options
author | hardythe1 | 2015-06-03 15:27:17 +0530 |
---|---|---|
committer | hardythe1 | 2015-06-03 15:27:17 +0530 |
commit | df60071cf1d1c18822d34f943ab8f412a8946b69 (patch) | |
tree | ab059cf19bad4a1233a464ccf5d72cf8b3fb323c /sample_notebooks/JagadeeshwarGoshika/chapter1_1.ipynb | |
parent | fba055ce5aa0955e22bac2413c33493b10ae6532 (diff) | |
download | Python-Textbook-Companions-df60071cf1d1c18822d34f943ab8f412a8946b69.tar.gz Python-Textbook-Companions-df60071cf1d1c18822d34f943ab8f412a8946b69.tar.bz2 Python-Textbook-Companions-df60071cf1d1c18822d34f943ab8f412a8946b69.zip |
add books
Diffstat (limited to 'sample_notebooks/JagadeeshwarGoshika/chapter1_1.ipynb')
-rwxr-xr-x | sample_notebooks/JagadeeshwarGoshika/chapter1_1.ipynb | 330 |
1 files changed, 330 insertions, 0 deletions
diff --git a/sample_notebooks/JagadeeshwarGoshika/chapter1_1.ipynb b/sample_notebooks/JagadeeshwarGoshika/chapter1_1.ipynb new file mode 100755 index 00000000..8cf957b1 --- /dev/null +++ b/sample_notebooks/JagadeeshwarGoshika/chapter1_1.ipynb @@ -0,0 +1,330 @@ +{
+ "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, Page No.9"
+ ]
+ },
+ {
+ "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 = \",spwt,\"N/m^3\"\n",
+ "print \"Density = \",round(rho,3),\"kg/m^3\"\n",
+ "print \"Specific gravity = \",round(spgr,6)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific weight = 9600.0 N/m^3\n",
+ "Density = 978.593 kg/m^3\n",
+ "Specific gravity = 0.978593\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3, Page No.10"
+ ]
+ },
+ {
+ "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, Page No.10"
+ ]
+ },
+ {
+ "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",
+ "\n",
+ "print \"d =\",round(d1,4),\"cm\"\n",
+ "print \"d =\",round(d2,3),\"mm\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "d = 0.1948 cm\n",
+ "d = 1.948 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.5, Page No.10"
+ ]
+ },
+ {
+ "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 =\",tau,\"N/m^2\",\"=\",round(tau,1),\"N/m^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Shear stress = 0.199773 N/m^2 = 0.2 N/m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.6, Page No.10"
+ ]
+ },
+ {
+ "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, Page No.10"
+ ]
+ },
+ {
+ "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,6),\"m\"\n",
+ "print \"Capillary rise =\",round(h1,4),\"cm\"\n",
+ "print \"Capillary rise =\",round(h1,2),\"cm\" \n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capillary rise = 0.099898 m\n",
+ "Capillary rise = 9.9898 cm\n",
+ "Capillary rise = 9.99 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.8, Page No.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##Finding of Kinematic Viscosity\n",
+ "##Given\n",
+ "tau=0.2452 ##Shear stress in N/m^2\n",
+ "vg=0.2 ##Velocity Gradient in sec^-1\n",
+ "rho=981 ##Density in Kg/m^3;\n",
+ "##To Find \n",
+ "mu=tau*1/vg\n",
+ "print \"Dynamic Viscosity =\",round(mu,3),\"Ns/m^2\"\n",
+ "nu=mu/rho\n",
+ "nu1=nu*10000\n",
+ "print \"Kinematic Viscosity =\",round(nu1,3),\"STOKE\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dynamic Viscosity = 1.226 Ns/m^2\n",
+ "Kinematic Viscosity = 12.497 STOKE\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.9, Page No.10"
+ ]
+ },
+ {
+ "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,2),\"N-s/m^2\"\n",
+ "nu=mu/rho\n",
+ "nu1=nu*10000\n",
+ "print \"Kinematic viscosity =\",round(nu1,1),\"stokes\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dynamic viscosity = 0.99 N-s/m^2\n",
+ "Kinematic viscosity = 10.3 stokes\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |