summaryrefslogtreecommitdiff
path: root/Fluid_mechanics/Chapter_3.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Fluid_mechanics/Chapter_3.ipynb')
-rwxr-xr-xFluid_mechanics/Chapter_3.ipynb105
1 files changed, 105 insertions, 0 deletions
diff --git a/Fluid_mechanics/Chapter_3.ipynb b/Fluid_mechanics/Chapter_3.ipynb
new file mode 100755
index 00000000..8d368fbf
--- /dev/null
+++ b/Fluid_mechanics/Chapter_3.ipynb
@@ -0,0 +1,105 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:dee9d655eeb9028db41fd96e05f9acf5955fd88886936fffc7d4e9aa14bb4a71"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3 - Fluid Kinematics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1 - Pg 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the mean velocity of flow at both the sections\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "gam=0.0765 #lb/ft^3\n",
+ "Q=100. #ft^3/sec\n",
+ "d1=2.5 #ft\n",
+ "d2=9. #in\n",
+ "l=12. #ft\n",
+ "#calculations\n",
+ "A1=math.pi/4. *d1*d1\n",
+ "V1=Q/A1\n",
+ "A2=math.pi*l*d2/12.\n",
+ "V2=Q/A2\n",
+ "#results\n",
+ "print '%s %.1f %s' %(\"Mean velocity of flow at section 1 =\",V1,\"ft/sec\")\n",
+ "print '%s %.2f %s' %(\"\\n Mean velocity of flow at section 2 =\",V2,\"ft/sec\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mean velocity of flow at section 1 = 20.4 ft/sec\n",
+ "\n",
+ " Mean velocity of flow at section 2 = 3.54 ft/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5 - Pg 60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the horizontal and vertical components of velocity\n",
+ "#Initialization of variables\n",
+ "x=3. \n",
+ "y=1.\n",
+ "#calculations\n",
+ "u=-3*y*y\n",
+ "v=-6*x\n",
+ "#results\n",
+ "print '%s %d' %(\"Horizontal component of velocity = \",u)\n",
+ "print '%s %d' %(\"\\n vertical component of velocity = \",v)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Horizontal component of velocity = -3\n",
+ "\n",
+ " vertical component of velocity = -18\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file