diff options
author | Thomas Stephen Lee | 2015-08-28 16:53:23 +0530 |
---|---|---|
committer | Thomas Stephen Lee | 2015-08-28 16:53:23 +0530 |
commit | db0855dbeb41ecb8a51dde8587d43e5d7e83620f (patch) | |
tree | b95975d958cba9af36cb1680e3f77205354f6512 /sample_notebooks/HirenShah/ch3.ipynb | |
parent | 5a86a20b9de487553d4ef88719fb0fd76a5dd6a7 (diff) | |
download | Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.tar.gz Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.tar.bz2 Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.zip |
add books
Diffstat (limited to 'sample_notebooks/HirenShah/ch3.ipynb')
-rwxr-xr-x | sample_notebooks/HirenShah/ch3.ipynb | 160 |
1 files changed, 160 insertions, 0 deletions
diff --git a/sample_notebooks/HirenShah/ch3.ipynb b/sample_notebooks/HirenShah/ch3.ipynb new file mode 100755 index 00000000..cd8562e6 --- /dev/null +++ b/sample_notebooks/HirenShah/ch3.ipynb @@ -0,0 +1,160 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:be8f61b53e434158045726efedae14168d3ad7c750cfe29d070385bb73f71e47" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Dimensional Analysis" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "t= 1. \t#hr\n", + "g1= 32.2 \t#ft/sec**2\n", + "g2= 32.2 \t#lbm ft/lbf\n", + "u= 2.4*10**-5 \t#lbf sec/ft**2\n", + "\t\n", + "#CALCULATIONS\n", + "q2= g*(t*60*60)**2\n", + "go= g*(t*60*60)**2\n", + "q3= g/g2\n", + "u1= u/(t*60*60)\n", + "\t\n", + "#RESULTS\n", + "print ' q2 = %.2e lbm ft/lbf hr**2'%(q2)\n", + "print ' go = %.2e lbm ft/lbf hr**2'%(go)\n", + "print ' go = %.f slug ft/lbf sec**2'%(q3)\n", + "print ' viscosity = %.2e lbf hr/ft**2'%(u1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " q2 = 4.17e+08 lbm ft/lbf hr**2\n", + " go = 4.17e+08 lbm ft/lbf hr**2\n", + " go = 1 slug ft/lbf sec**2\n", + " viscosity = 6.67e-09 lbf hr/ft**2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "m= 1 \t#lb\n", + "\t\n", + "#CALCULATIONS\n", + "m1= g/m\n", + "\t\n", + "#RESULTS\n", + "print '1 lbf/sec ft**2 = %.1f lbm/ft sec'%(m1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 lbf/sec ft**2 = 32.2 lbm/ft sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 Page No : 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "n1=1.\n", + "n2= 3.\n", + "n3=2.\n", + "\t\n", + "#CALCULATIONS\n", + "a1= -n1\n", + "a2= -n3\n", + "a3= -n1-a2+3*a1\n", + "b1= -n1\n", + "b2= -n1\n", + "b3= n1+3*b1-b2\n", + "\t\n", + "#RESULTS\n", + "print ' a1 = %.f '%(a1)\n", + "print ' a2 = %.f '%(a2)\n", + "print ' a3 = %.f '%(a3)\n", + "print ' b1 = %.f '%(b1)\n", + "print ' b2 = %.f '%(b2)\n", + "print ' b3 = %.f '%(b3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a1 = -1 \n", + " a2 = -2 \n", + " a3 = -2 \n", + " b1 = -1 \n", + " b2 = -1 \n", + " b3 = -1 \n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |