summaryrefslogtreecommitdiff
path: root/Principles_Of_Fluid_Mechanics/ch11.ipynb
diff options
context:
space:
mode:
authortslee2014-11-27 17:17:59 +0530
committertslee2014-11-27 17:17:59 +0530
commit6e3407ba85ae84e1cee1ae0c972fd32c5504d827 (patch)
treeb89808101c39b1db1e3793eada2c8b702f856606 /Principles_Of_Fluid_Mechanics/ch11.ipynb
parent36a03d6d76bac315dba73b2ba9555c7e3fe0234f (diff)
downloadPython-Textbook-Companions-6e3407ba85ae84e1cee1ae0c972fd32c5504d827.tar.gz
Python-Textbook-Companions-6e3407ba85ae84e1cee1ae0c972fd32c5504d827.tar.bz2
Python-Textbook-Companions-6e3407ba85ae84e1cee1ae0c972fd32c5504d827.zip
added books
Diffstat (limited to 'Principles_Of_Fluid_Mechanics/ch11.ipynb')
-rw-r--r--Principles_Of_Fluid_Mechanics/ch11.ipynb284
1 files changed, 284 insertions, 0 deletions
diff --git a/Principles_Of_Fluid_Mechanics/ch11.ipynb b/Principles_Of_Fluid_Mechanics/ch11.ipynb
new file mode 100644
index 00000000..c955d372
--- /dev/null
+++ b/Principles_Of_Fluid_Mechanics/ch11.ipynb
@@ -0,0 +1,284 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:bc810be53841861ce90eab0fd4e6714fb575581f40efe36263891984b30579a4"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11 : Forces on Immersed Bodies"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.1 Page No : 413"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\n",
+ "#Initialization of variables\n",
+ "d = 1.2 \t\t \t#diameter - m\n",
+ "w = 1. \t \t\t #m\n",
+ "U = 60.*1000/3600 \t\t\t#speed - m/s\n",
+ "nu = 1.5e-5 \t\t\t#m**2/s\n",
+ "Cd = 0.4\n",
+ "rho = 1.22 \t\t \t#kg/m**3\n",
+ "\t\t\t\n",
+ "#calculations\n",
+ "Rn = U*d/nu\n",
+ "A = d*w\n",
+ "Fd = Cd*0.5*rho*U**2 *A\n",
+ "M = 0.5*Fd\n",
+ "\t\t\t\n",
+ "#results\n",
+ "print \"Bending moment = %.2f h**2 N m\"%(M)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bending moment = 40.67 h**2 N m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.2 Page No : 415"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\n",
+ "#Initialization of variables\n",
+ "d = 0.006 \t\t\t#diameter - m\n",
+ "U = 0.01 \t\t\t#m/s\n",
+ "gaml = 8000. \t\t#specific weight - N/m**3\n",
+ "gams = 7.9*10**3 *9.81\n",
+ "mu = 13.9 \n",
+ "\t\t\t\n",
+ "#calculations\n",
+ "mu = d**2 /18 *(gams - gaml)/U\n",
+ "RN = U*d*(gaml/9.81) /mu\n",
+ "\t\t\t\n",
+ "#results\n",
+ "print \"Viscosity of oil = %.1f Ns /m**2\"%(mu)\n",
+ "print \"Reynolds number of motion is = %.3f\"%RN\n",
+ "\n",
+ "# rounding off error. please check."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Viscosity of oil = 13.9 Ns /m**2\n",
+ "Reynolds number of motion is = 0.004\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.3 Page No : 416"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\n",
+ "#Initialization of variables\n",
+ "s = 2.7\n",
+ "gamw = 9810. \t\t\t#N/m**3\n",
+ "mu = 0.001 \t\t\t#Ns/m**2\n",
+ "d = 0.15*10**-3 \t\t\t#m\n",
+ "rho = 1000. \t\t\t#kg/m**3\n",
+ "\t\t\t\n",
+ "#calculations\n",
+ "gams = s*gamw\n",
+ "U = d**2 *(gams-gamw)/(18*mu)\n",
+ "RN = U*d*rho/mu\n",
+ "Cd = (1+ 3./16 *RN)**0.5 *(24/RN)\n",
+ "U22 = 4./3 *d*(gams-gamw) /(Cd*rho)\n",
+ "U2 = math.sqrt(U22)\n",
+ "\t\t\t\n",
+ "#results\n",
+ "print \"Settling velocity of sand in case 1 = %.2f m/s\"%(U)\n",
+ "print \" Settling velocity of sand in case 2 = %.4f m/s\"%(U2)\n",
+ "#The answer is a bit different due to rounding off error."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Settling velocity of sand in case 1 = 0.02 m/s\n",
+ " Settling velocity of sand in case 2 = 0.0186 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.4 Page No : 417"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\n",
+ "#Initialization of variables\n",
+ "A = 2. \t\t\t#area - m**2\n",
+ "U = 100*1000./3600 \t\t\t#speed-m/s\n",
+ "Cd = 0.32\n",
+ "rho = 1.24\n",
+ "\t\t\t\n",
+ "#calculations\n",
+ "Fd = Cd*0.5*rho*U**2 *A\n",
+ "P = Fd*U\n",
+ "\t\t\t\n",
+ "#results\n",
+ "print \"Power required = %.1f kW\"%(P/1000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power required = 8.5 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.5 Page No : 417"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\n",
+ "#Initialization of variables\n",
+ "ratio = 0.15\n",
+ "\t\t\t\n",
+ "#calculations\n",
+ "VU = (1/(1-ratio))**(1./3)\n",
+ "percent = (VU-1)*100\n",
+ "\t\t\t\n",
+ "#results\n",
+ "print \"percent increase in speed = %.1f %%\"%(percent)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "percent increase in speed = 5.6 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.6 Page No : 419"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from sympy import Symbol,solve\n",
+ "\t\t\t\n",
+ "#Initialization of variables\n",
+ "U = 50.*1000/3600 \t\t\t#speed - m/s\n",
+ "cd1 = 0.34\n",
+ "cd2 = 1.33\n",
+ "\t\t\t\n",
+ "#calculations\n",
+ "print (\"On solving for both convex and concave surfaces,\")\n",
+ "w = Symbol(\"w\")\n",
+ "ans = solve(1.98*(13.98 - 0.25*w) - (13.88 + 0.25*w))\n",
+ "w = ans[0]\n",
+ "N = w/(2*math.pi) *60\n",
+ "\n",
+ "#results\n",
+ "print \"rotational speed = %.1f rpm\"%(N)\n",
+ "\n",
+ "# note : value of w is slightly different because of sympy inbuilt method solve. but it is very accurate."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "On solving for both convex and concave surfaces,\n",
+ "rotational speed = 176.9 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file