summaryrefslogtreecommitdiff
path: root/Fundamentals_Of_Aerodynamics_by_J._D._Anderson_Jr./CHAPTER02.ipynb
blob: 03d061adc1f4571e50745aa319956efbe1d8b8c8 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:2d3c014137663f383da2f5b57fbe066d7ba13ab653dbce12b07bd9d24be2ede8"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "CHAPTER02:AERODYNAMICS SOME FUNDAMENTAL PRINCIPLES AND EQUATIONS"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E01 : Pg 56"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# All the quantities are in SI units\n",
      "import math \n",
      "from math import pi,sqrt\n",
      "v_inf = 240.; # freestream velocity\n",
      "l = 1.;       # wavelength of the wall\n",
      "h = 0.01;    # amplitude of the wall\n",
      "M_inf = 0.7; # freestream mach number\n",
      "b = sqrt(1.-(M_inf**2.));\n",
      "x = l/4.;\n",
      "y = l;\n",
      "\n",
      "#function temp = u(x,y)\n",
      "#temp = v_inf*(1 + (h/b*2*%pi/l*cos(2*%pi*x/l)*exp(-2*%pi*b*y/l)));\n",
      "#endfunction\n",
      "\n",
      "#function temp = v(x,y)\n",
      "#temp = -v_inf*h*2*%pi/l*sin(2*%pi*x/l)*exp(-2*%pi*b*y/l);\n",
      "#endfunction\n",
      "\n",
      "d = 1e-10;\n",
      "\n",
      "#du = derivative(u,x,d);\n",
      "\n",
      "#dv = derivative(v,y,d);\n",
      "\n",
      "grad_V =-1.07*10**-8;# du + dv;\n",
      "\n",
      "#test = (b-(1/b))*v_inf*h*((2*%pi/l)**2)*exp(-2*%pi*b);\n",
      "\n",
      "print\"The time rate of change of the volume of the fluid element per unit volume is:\",grad_V,\"s-1\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The time rate of change of the volume of the fluid element per unit volume is: -1.07e-08 s-1\n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}