{ "metadata": { "name": "", "signature": "sha256:e18e57e92e39a44ba79ec431c0c8df26c667b63725e0e6645399463067a20d48" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 2 : Properties of Fluids" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.1 Page No : 9" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\t\t\t\n", "# Variables :\n", "V = 10.;\t\t\t#in m**3\n", "W = 80.;\t\t\t#in kN\n", "g = 9.81;\t\t\t#gravity accelerat\n", "w_water = 9.81;\t\t\t#specific weight of water\n", "\n", "# Calculations and Results\n", "w = W/V;\t\t\t#specific weight in kN/m**3\n", "print \"Specific weight of liquid in kN/m**3 : \",w\n", "\n", "mass_density = w*1000/g;\t\t\t#kg/m**3\n", "print \"Mass density of liquid in kg/m**3 : %.2f\"%mass_density\n", "\n", "specific_gravity = w/w_water;\t\t\t#unitless\n", "print \"Specific gravity : %.3f\"%specific_gravity\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Specific weight of liquid in kN/m**3 : 8.0\n", "Mass density of liquid in kg/m**3 : 815.49\n", "Specific gravity : 0.815\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.2 Page No : 11" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\t\t\t\n", "# Variables :\n", "p1 = 750.;\t\t\t#N/cm**2\n", "p2 = 1400.;\t\t\t#N/cm**2\n", "dvBYV = -0.150;\t\t\t#in %\n", "\n", "# Calculations\n", "dp = p2-p1;\t\t\t#in N/cm**2\n", "dp = dp*10**4;\t\t\t#in N/m**2\n", "K = -dp/(dvBYV/100);\t\t\t#N/m**2\n", "\n", "# Results\n", "print \"Bulk modulus(N/m**2) : %.2e\"%K\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Bulk modulus(N/m**2) : 4.33e+09\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.3 Page No : 11" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\t\t\t\n", "# Variables :\n", "Kwater = 2.10*10**6;\t\t\t#kN/m**2\n", "Kair = 140.;\t\t\t#kN/m**2\n", "dvBYV = -1.;\t\t\t#in %\n", "\n", "# Calculations and Results\n", "#For Water : \n", "dp = -Kwater*dvBYV/100;\t\t\t#kN/m**2\n", "print \"Increase of pressure in water in kN/m**2 : %d\"%dp\n", "\n", "#For Air : \n", "dp = -Kair*dvBYV/100;\t\t\t#kN/m**2\n", "print \"Increase of pressure in air in kN/m**2\",dp\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Increase of pressure in water in kN/m**2 : 21000\n", "Increase of pressure in air in kN/m**2 1.4\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.4 Page No : 14" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\t\t\t\n", "# Variables :\n", "A = 0.2;\t\t\t#m**2\n", "dy = 0.02/100;\t\t\t#m\n", "du = 20./100;\t\t\t#cm/s\n", "mu = 0.001;\t\t\t#Ns/m**2\n", "\n", "# Calculations and Results\n", "tau = mu*du/dy;\t\t\t#in N/m**2\n", "F = tau*A;\t\t\t#N\n", "print \"Force required in N : \",F\n", "Power = F*du;\t\t\t#Watts\n", "print \"Power required in W : \",Power\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Force required in N : 0.2\n", "Power required in W : 0.04\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.5 Page No : 16" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables :\n", "mu = 0.1;\t\t\t#Ns/m**2\n", "Sp_gravity_liquid = 2.1;\n", "mass_density_water = 1000.;\t\t\t#in kg/m**3\n", "\n", "# Calculations\n", "rho = Sp_gravity_liquid*mass_density_water;\t\t\t#kg/m**3\n", "v = mu/rho;\t\t\t#m**2/sec\n", "\n", "# Results\n", "print \"Kinematic viscosity of liquid in m**2/sec : %.3e\"%v\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Kinematic viscosity of liquid in m**2/sec : 4.762e-05\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.6 Page No : 18" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\t\t\n", "# Variables :\n", "d = 2.;\t\t\t\t\t\t\t#in mm\n", "d = d/1000;\t\t\t\t\t\t#in m\n", "sigma_water = 0.073;\t\t\t#N/m\n", "sigma_mercury = 0.510;\t\t\t#N/m\n", "\n", "# Calculations and Results\n", "#Water-glass contact\n", "w1 = 9.81;\t\t\t#kN/m**3(specific weight of water)\n", "w1 = w1*10**3;\t\t\t#N/m**3\n", "theta = 0;\t\t\t#in degree\n", "h = 4*sigma_water*math.cos(math.radians(theta))/w1/d;\t\t\t#in mm\n", "print \"capillary rise for water glass contact in mm : %.2f\"%(h*1000)\n", "\n", "#Mercury-glass contact\n", "w2 = 13.6*9.81;\t\t\t#kN/m**3(specific weight of mercury)\n", "w2 = w2*10**3;\t\t\t#N/m**3\n", "theta = 130;\t\t\t#in degree\n", "h = 4*sigma_mercury*math.cos(math.radians(theta))/w2/d;\t\t\t#in mm\n", "print \"capillary rise for mercury glass contact in mm: %.3f\"%(h*1000)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "capillary rise for water glass contact in mm : 14.88\n", "capillary rise for mercury glass contact in mm: -4.914\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.7 Page No : 20" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\t\t\t\n", "# Variables :\n", "d = 6.;\t\t\t#in mm\n", "d = d/1000;\t\t\t#in m\n", "sigma = 0.0755;\t\t\t#N/m\n", "\n", "# Calculations\n", "#At equillibrium : p*math.pi*r**2 = sigma*2*math.pi*r\n", "r = d/2;\t\t\t#in m\n", "p = 2*sigma/r;\t\t\t#N/m**2\n", "\n", "# Results\n", "print \"Intensity of pressure in N/m**2 or Pascals : %.1f\"%p\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Intensity of pressure in N/m**2 or Pascals : 50.3\n" ] } ], "prompt_number": 9 } ], "metadata": {} } ] }