diff options
author | hardythe1 | 2015-04-07 15:58:05 +0530 |
---|---|---|
committer | hardythe1 | 2015-04-07 15:58:05 +0530 |
commit | c7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131 (patch) | |
tree | 725a7d43dc1687edf95bc36d39bebc3000f1de8f /mechanics_of_fluid/Chapter5-_1.ipynb | |
parent | 62aa228e2519ac7b7f1aef53001f2f2e988a6eb1 (diff) | |
download | Python-Textbook-Companions-c7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131.tar.gz Python-Textbook-Companions-c7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131.tar.bz2 Python-Textbook-Companions-c7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131.zip |
added books
Diffstat (limited to 'mechanics_of_fluid/Chapter5-_1.ipynb')
-rwxr-xr-x | mechanics_of_fluid/Chapter5-_1.ipynb | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/mechanics_of_fluid/Chapter5-_1.ipynb b/mechanics_of_fluid/Chapter5-_1.ipynb new file mode 100755 index 00000000..bc9d154f --- /dev/null +++ b/mechanics_of_fluid/Chapter5-_1.ipynb @@ -0,0 +1,119 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:cc924f0db45ef8f074cc8f1d8a1ee198ea5115e6305e3da74ea78f614afb5f88"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Chapter5- Physical Similarity and Dimensional Analysis"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg184"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The total resistance of the prototype\n",
+ "u_p=10.; ## m/s\n",
+ "scale=1/25.; ## l_m/l_p\n",
+ "L=125.; ## m\n",
+ "meu=1.235*10**(-6); ## m**2/s\n",
+ "meu_p=1.188*10**(-6); ## m**2/s\n",
+ "rho_p=1025.; ## kg/m**3\n",
+ "rho_m=1000.; ## kg/m**3\n",
+ "A=3500.; ## wetted surface in m**2\n",
+ "\n",
+ "u_m=u_p*math.sqrt(scale);\n",
+ "\n",
+ "d=L*scale;\n",
+ "Re=d*u_m/meu; ## Reynolds no.\n",
+ "C_F=0.075/(math.log10(Re)-2)**2; ## Skin friction coefficient\n",
+ "\n",
+ "res_skin=rho_m/2*u_m**2*(A*scale**2)*C_F;\n",
+ "\n",
+ "res_tot=54.2; ## N\n",
+ "\n",
+ "F_resid_m=res_tot-res_skin;\n",
+ "\n",
+ "F_resid_p=F_resid_m*rho_p/rho_m/scale**3;\n",
+ "\n",
+ "Re_p=u_p*L/meu_p;\n",
+ "\n",
+ "C_F_p=0.075/(math.log10(Re_p)-2)**2+0.0004;\n",
+ "C_F_pnew=1.45*C_F_p;\n",
+ "\n",
+ "res_friction=rho_p/2*u_p**2*A*C_F_pnew;\n",
+ "\n",
+ "Resistance=F_resid_p+res_friction;\n",
+ "print'%s %.1f %s'%(\"The total resistance of the prototype\",Resistance,\"N\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total resistance of the prototype 809273.4 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg 184"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Maximum speed of the redesigned torpedo\n",
+ "\n",
+ "A=0.88; ## ratio of A2 and A1\n",
+ "C_D=0.85; ## ratio of C_D2 to C_D1\n",
+ "P=1.20; ## ratio of P2 to P1\n",
+ "V1=11.; ## m/s\n",
+ "\n",
+ "V2=V1*(P/A/C_D)**(1/3.);\n",
+ "print'%s %.2f %s'%(\"Maximum speed of the redesigned torpedo =\",V2,\"m/s\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum speed of the redesigned torpedo = 12.88 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |