summaryrefslogtreecommitdiff
path: root/Fundamentals_Of_Aerodynamics_by_J._D._Anderson_Jr./CHAPTER14.ipynb
blob: e8e98194f1fdd0ee9699b38c7ef784df9c176315 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
{
 "metadata": {
  "name": "",
  "signature": "sha256:aeaeb421097f65195c01fda070e54bf1d5fc8f2c0300f46ceb1ef585d9c062a2"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "CHAPTER14:ELEMENTS OF HYPERSONIC FLOW"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E01 : Pg 440"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# All the quantities are expressed in SI units\n",
      "import math \n",
      "from math import sqrt,pi,sin,cos\n",
      "M1 = 8.;                    # mach number\n",
      "alpha = 15.*pi/180.;        # anlge of attack\n",
      "theta= alpha;\n",
      "gam = 1.4;\n",
      "# (a)\n",
      "# for M = 8\n",
      "v1 = 95.62*pi/180.;\n",
      "v2 = v1 + theta;\n",
      "# from Appendix C\n",
      "M2 = 14.32;\n",
      "# from Appendix A, for M1 = 8 and M2 = 14.32\n",
      "p_ratio = 0.9763e4/0.4808e6;\n",
      "# from eq.(11.22)\n",
      "Cp2 = 2/gam/M1**2*(p_ratio - 1);\n",
      "# for M1 = 8 and theta = 15\n",
      "b = 21*pi/180;\n",
      "Mn_1 = M1*sin(b);\n",
      "# for this value of Mn,1, from appendix B\n",
      "p_ratio2 = 9.443;\n",
      "# thus\n",
      "Cp3 = 2./gam/M1**2.*(p_ratio2 - 1.);\n",
      "c_n = Cp3 - Cp2;\n",
      "c_l = c_n*cos(alpha);\n",
      "c_d = c_n*sin(alpha);\n",
      "L_by_D = c_l/c_d;\n",
      "print\"The exact results from the shock-expansion theory are:\"\n",
      "print\"Cp2 =\",Cp2\n",
      "print\"Cp3 = \",Cp3\n",
      "print\" cl =\",c_l\n",
      "print\"cd =\",c_d\n",
      "print\"L/D =\",L_by_D\n",
      "# (b)\n",
      "# from Newtonian theory, by eq.(14.9)\n",
      "Cp3 = 2.*sin(alpha)**2;\n",
      "Cp2 = 0;\n",
      "c_l = (Cp3 - Cp2)*cos(alpha);\n",
      "c_d = (Cp3 - Cp2)*sin(alpha);\n",
      "L_by_D = c_l/c_d;\n",
      "print\"\\n(b) The results from Newtonian theory are:\"\n",
      "print\"Cp2 =\",Cp2\n",
      "print\"Cp3 =\",Cp3\n",
      "print\"cl  =\",c_l\n",
      "print\"cd  =\",c_d\n",
      "print\"L/D =\",L_by_D"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The exact results from the shock-expansion theory are:\n",
        "Cp2 = -0.0218681754368\n",
        "Cp3 =  0.188459821429\n",
        " cl = 0.203161244164\n",
        "cd = 0.054436891307\n",
        "L/D = 3.73205080757\n",
        "\n",
        "(b) The results from Newtonian theory are:\n",
        "Cp2 = 0\n",
        "Cp3 = 0.133974596216\n",
        "cl  = 0.129409522551\n",
        "cd  = 0.0346751770605\n",
        "L/D = 3.73205080757\n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}