summaryrefslogtreecommitdiff
path: root/sample_notebooks/Vishnu Tej/CHAPTER12.ipynb
diff options
context:
space:
mode:
authorTrupti Kini2016-02-15 23:30:10 +0600
committerTrupti Kini2016-02-15 23:30:10 +0600
commit3be1fa4f810e493609eb62bd7bf017fe143e1f78 (patch)
tree7c12d79e23d8433549ca6192652bb456aab53524 /sample_notebooks/Vishnu Tej/CHAPTER12.ipynb
parent01eccafd5e05ee10df8447dbd1e2bc3e27af8d04 (diff)
downloadPython-Textbook-Companions-3be1fa4f810e493609eb62bd7bf017fe143e1f78.tar.gz
Python-Textbook-Companions-3be1fa4f810e493609eb62bd7bf017fe143e1f78.tar.bz2
Python-Textbook-Companions-3be1fa4f810e493609eb62bd7bf017fe143e1f78.zip
Added(A)/Deleted(D) following books
A "sample_notebooks/Vishnu Tej/CHAPTER12.ipynb"
Diffstat (limited to 'sample_notebooks/Vishnu Tej/CHAPTER12.ipynb')
-rw-r--r--sample_notebooks/Vishnu Tej/CHAPTER12.ipynb180
1 files changed, 180 insertions, 0 deletions
diff --git a/sample_notebooks/Vishnu Tej/CHAPTER12.ipynb b/sample_notebooks/Vishnu Tej/CHAPTER12.ipynb
new file mode 100644
index 00000000..cc64c399
--- /dev/null
+++ b/sample_notebooks/Vishnu Tej/CHAPTER12.ipynb
@@ -0,0 +1,180 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:9f892b4a818165ad52b348800d0ffa60b6a3224f73f3dcda15a72be66b12ba9f"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "CHAPTER12:LINEARIZED SUPERSONIC FLOW"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E01 : Pg 395"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# All the quantities are expressed in SI units\n",
+ "import math \n",
+ "from math import pi,sqrt\n",
+ "alpha = 5*pi/180; # angle of attack\n",
+ "M_inf = 3; # freestream mach number\n",
+ "\n",
+ "# from eq.(12.23)\n",
+ "c_l = 4*alpha/sqrt(M_inf**2 - 1);\n",
+ "\n",
+ "# from eq.(12.24)\n",
+ "c_d = 4*alpha**2/sqrt(M_inf**2 - 1);\n",
+ "\n",
+ "print\"The cl and cd according to the linearized theory are:cl =\", round(c_l,2)\n",
+ "print\"The cl and cd according to the linearized theory are:cd =\",round(c_d,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The cl and cd according to the linearized theory are:cl = 0.12\n",
+ "The cl and cd according to the linearized theory are:cd = 0.01\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E02 : Pg 395"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# All the quantities are expressed in SI units\n",
+ "import math \n",
+ "from math import sqrt,pi\n",
+ "M_inf = 2.; # freestream mach number\n",
+ "rho_inf = 0.3648; # freestream density at 11 km altitude\n",
+ "T_inf = 216.78; # freestream temperature at 11 km altitude\n",
+ "gam = 1.4; # ratio of specific heats\n",
+ "R = 287.; # specific gas constant\n",
+ "m = 9400.; # mass of the aircraft\n",
+ "g = 9.8; # acceleratio due to gravity\n",
+ "W = m*g; # weight of the aircraft\n",
+ "S = 18.21; # wing planform area\n",
+ "# thus\n",
+ "a_inf = sqrt(gam*R*T_inf);\n",
+ "V_inf = M_inf*a_inf;\n",
+ "q_inf = 1./2.*rho_inf*V_inf**2.;\n",
+ "\n",
+ "# thus the aircraft lift coefficient is given as\n",
+ "C_l = W/q_inf/S;\n",
+ "\n",
+ "alpha = 180./pi*C_l/4.*sqrt(M_inf**2. - 1.);\n",
+ "\n",
+ "print\"The angle of attack of the wing is:\",alpha,\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The angle of attack of the wing is: 1.97493716351 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E03 : Pg 400"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# All the quantities are expressed in SI units\n",
+ "# All the quantities are expressed in SI units\n",
+ "import math \n",
+ "from math import sqrt,pi\n",
+ "# (a)\n",
+ "M_inf = 2.; # freestream mach number\n",
+ "rho_inf = 0.3648; # freestream density at 11 km altitude\n",
+ "T_inf = 216.78; # freestream temperature at 11 km altitude\n",
+ "gam = 1.4; # ratio of specific heats\n",
+ "R = 287.; # specific gas constant\n",
+ "m = 9400.; # mass of the aircraft\n",
+ "g = 9.8; # acceleratio due to gravity\n",
+ "W = m*g; # weight of the aircraft\n",
+ "S = 18.21; # wing planform area\n",
+ "c = 2.2; # chord length of the airfoil\n",
+ "alpha = 0.035; # angle of attack as calculated in ex. 12.2\n",
+ "T0 = 288.16; # ambient temperature at sea level\n",
+ "mue0 = 1.7894e-5; # reference viscosity at sea level\n",
+ "\n",
+ "# thus\n",
+ "a_inf = sqrt(gam*R*T_inf);\n",
+ "V_inf = M_inf*a_inf;\n",
+ "\n",
+ "# according to eq.(15.3), the viscosity at the given temperature is\n",
+ "mue_inf = mue0*(T_inf/T0)**1.5*(T0+110.)/(T_inf+110.);\n",
+ "\n",
+ "# thus the Reynolds number can be given by\n",
+ "Re = rho_inf*V_inf*c/mue_inf;\n",
+ "\n",
+ "# from fig.(19.1), for these values of Re and M, the skin friction coefficient is\n",
+ "Cf = 2.15*10**-3;\n",
+ "\n",
+ "# thus, considering both sides of the flat plate\n",
+ "net_Cf = 2.*Cf;\n",
+ "\n",
+ "# (b)\n",
+ "c_d = 4.*alpha**2./sqrt(M_inf**2. - 1.);\n",
+ "\n",
+ "print\"(a) Net Cf = \",net_Cf*1e3\n",
+ "print\"(b) cd =\",c_d*1e3"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) Net Cf = 4.3\n",
+ "(b) cd = 2.82901631903\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file