diff options
author | kinitrupti | 2017-05-12 18:53:46 +0530 |
---|---|---|
committer | kinitrupti | 2017-05-12 18:53:46 +0530 |
commit | 6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d (patch) | |
tree | 22789c9dbe468dae6697dcd12d8e97de4bcf94a2 /backup/mechanics_of_fluid_version_backup/Chapter12-.ipynb | |
parent | d36fc3b8f88cc3108ffff6151e376b619b9abb01 (diff) | |
download | Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.tar.gz Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.tar.bz2 Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.zip |
Removed duplicates
Diffstat (limited to 'backup/mechanics_of_fluid_version_backup/Chapter12-.ipynb')
-rwxr-xr-x | backup/mechanics_of_fluid_version_backup/Chapter12-.ipynb | 141 |
1 files changed, 0 insertions, 141 deletions
diff --git a/backup/mechanics_of_fluid_version_backup/Chapter12-.ipynb b/backup/mechanics_of_fluid_version_backup/Chapter12-.ipynb deleted file mode 100755 index 2905ba7e..00000000 --- a/backup/mechanics_of_fluid_version_backup/Chapter12-.ipynb +++ /dev/null @@ -1,141 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:1f6973f8c8d9996abb4c23a2c5352b16bfcd60086af954d2e49808504d3171d0"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "CHapter12-Unsteady Flow"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex1-pg557"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#calculate Time for which flow into the tank continues after the power failure \n",
- "import scipy\n",
- "from scipy import integrate\n",
- "Q=0.05; ## m^3/s\n",
- "d=0.15; ## m^2\n",
- "h=8.; ## m\n",
- "g=9.81; ## m/s^2\n",
- "l=90.; ## m\n",
- "f=0.007;\n",
- "\n",
- "u1=Q/(math.pi/4.*d**2.);\n",
- "\n",
- "def function(u):\n",
- "\tfun=(1./((h*g/l)+(2.*f/d)*u**2))\n",
- "\treturn fun\n",
- "\n",
- "t=scipy.integrate.quad(function,u1,0)\n",
- "\n",
- "\n",
- "print(\"Time for which flow into the tank continues after the power failure is\" )\n",
- "print'%s %.1f %s'%(\" \",-t[0],\"s\")\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Time for which flow into the tank continues after the power failure is\n",
- " 2.6 s\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4-pg588"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#calculate Estimate the height of tank required\n",
- "\n",
- "print(\"Estimate the height of tank required\")\n",
- "\n",
- "f=0.006;\n",
- "l=1400.; ## m\n",
- "g=9.81; ## m/s^2\n",
- "d1=0.75; ## m\n",
- "d2=3.; ## m\n",
- "Q=1.2; ## m^3/s\n",
- "a=20.; ## m\n",
- "\n",
- "K=4*f*l/(2*g*d1);\n",
- "\n",
- "## 2*K*Y = l*a/(g*A) = 8.919 s^2\n",
- "\n",
- "## Y=2*K*Y/2*K\n",
- "\n",
- "Y=8.919/(2*K);\n",
- "## When t=0\n",
- "\n",
- "u0=Q/(math.pi/4*d1**2);\n",
- "\n",
- "y0=K*u0**2;\n",
- "\n",
- "C=-Y/K/math.exp(y0/Y);\n",
- "\n",
- "## To determine the height of the surge tank, we consider the condition y = y_max when u = 0. \n",
- "\n",
- "## 0 = 1/K*(y_max+Y) + C*exp(y_max/Y)\n",
- "\n",
- "## From the above eqn we get\n",
- "\n",
- "y_max=-Y;\n",
- "\n",
- "H=a-y_max;\n",
- "print'%s %.1f %s'%(\"The minimum height of the surge tank =\",H,\"m\")\n",
- "\n",
- "\n",
- "print(\"The actual design height should exceed the minimum required, say 23 m\")"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Estimate the height of tank required\n",
- "The minimum height of the surge tank = 22.0 m\n",
- "The actual design height should exceed the minimum required, say 23 m\n"
- ]
- }
- ],
- "prompt_number": 2
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file |