summaryrefslogtreecommitdiff
path: root/Fluid_mechanics_by_Pao/Chapter_6.ipynb
diff options
context:
space:
mode:
authorThomas Stephen Lee2015-09-04 22:04:10 +0530
committerThomas Stephen Lee2015-09-04 22:04:10 +0530
commit41f1f72e9502f5c3de6ca16b303803dfcf1df594 (patch)
treef4bf726a3e3ce5d7d9ee3781cbacfe3116115a2c /Fluid_mechanics_by_Pao/Chapter_6.ipynb
parent9c9779ba21b9bedde88e1e8216f9e3b4f8650b0e (diff)
downloadPython-Textbook-Companions-41f1f72e9502f5c3de6ca16b303803dfcf1df594.tar.gz
Python-Textbook-Companions-41f1f72e9502f5c3de6ca16b303803dfcf1df594.tar.bz2
Python-Textbook-Companions-41f1f72e9502f5c3de6ca16b303803dfcf1df594.zip
add/remove/update books
Diffstat (limited to 'Fluid_mechanics_by_Pao/Chapter_6.ipynb')
-rwxr-xr-xFluid_mechanics_by_Pao/Chapter_6.ipynb118
1 files changed, 118 insertions, 0 deletions
diff --git a/Fluid_mechanics_by_Pao/Chapter_6.ipynb b/Fluid_mechanics_by_Pao/Chapter_6.ipynb
new file mode 100755
index 00000000..424aea7a
--- /dev/null
+++ b/Fluid_mechanics_by_Pao/Chapter_6.ipynb
@@ -0,0 +1,118 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:27148bed2cbad8357ddcdc8e0ee434be3797107d2f692797bdf3a1e36c7e8d1a"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6 - Dimensional analysis and model similitude"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3 - Pg 230"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the flow rate of water and pressure drop\n",
+ "#Initialization of variables\n",
+ "dg=0.5 #in\n",
+ "dw=12. #in\n",
+ "rhog=0.022 #slug/ft^3\n",
+ "rhow=1.94 #slug/ft^3\n",
+ "muw=2.34e-5 #lb-sec/ft^2\n",
+ "mug=3.50e-7 #lb-sec/ft^2\n",
+ "Qg=0.15 #ft^3/s\n",
+ "dpg=100. #lb/ft^2\n",
+ "#calculations\n",
+ "Vr=dg/dw *rhog/rhow *muw/mug\n",
+ "Qr=Vr*dw*dw /dg/dg\n",
+ "Qw=Qr*Qg\n",
+ "dpr=rhow/rhog *(Vr)*Vr\n",
+ "dpw=dpr*dpg\n",
+ "#results\n",
+ "print '%s %.2f %s' %(\"Flow rate of water =\",Qw,\"ft^3/s\")\n",
+ "print '%s %.1f %s' %(\"\\n Pressure drop =\",dpw,\"lb/ft^2\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Flow rate of water = 2.73 ft^3/s\n",
+ "\n",
+ " Pressure drop = 8.8 lb/ft^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4 - Pg 231"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the velocity ratio, time ratio, acceleration ratio and force ratio.\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "Lr=1./10.\n",
+ "rhom=2.\n",
+ "rhop=1.94\n",
+ "#calculations\n",
+ "Vr=math.sqrt(Lr)\n",
+ "Tr=Lr/Vr\n",
+ "ar=Vr/Tr\n",
+ "Fr=rhom/rhop *ar*Lr*Lr*Lr\n",
+ "#results\n",
+ "print '%s %.4f' %(\"Velocity ratio = \",Vr)\n",
+ "print '%s %.4f' %(\"\\n Time ratio = \",Tr)\n",
+ "print '%s %d' %(\"\\n Acceleration ratio = \",ar)\n",
+ "print '%s %.6f' %(\"\\n Force ratio = \",Fr)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity ratio = 0.3162\n",
+ "\n",
+ " Time ratio = 0.3162\n",
+ "\n",
+ " Acceleration ratio = 1\n",
+ "\n",
+ " Force ratio = 0.001031\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file