summaryrefslogtreecommitdiff
path: root/Gas_Dynamics_and_Jet_Propulsion_by_P._Murugaperumal/ch7.ipynb
diff options
context:
space:
mode:
authorhardythe12015-06-11 17:31:11 +0530
committerhardythe12015-06-11 17:31:11 +0530
commit79c59acc7af08ede23167b8455de4b716f77601f (patch)
tree2d6ff34b6f131d2671e4c6b798f210b3cb1d4ac7 /Gas_Dynamics_and_Jet_Propulsion_by_P._Murugaperumal/ch7.ipynb
parentdf60071cf1d1c18822d34f943ab8f412a8946b69 (diff)
downloadPython-Textbook-Companions-79c59acc7af08ede23167b8455de4b716f77601f.tar.gz
Python-Textbook-Companions-79c59acc7af08ede23167b8455de4b716f77601f.tar.bz2
Python-Textbook-Companions-79c59acc7af08ede23167b8455de4b716f77601f.zip
add books
Diffstat (limited to 'Gas_Dynamics_and_Jet_Propulsion_by_P._Murugaperumal/ch7.ipynb')
-rwxr-xr-xGas_Dynamics_and_Jet_Propulsion_by_P._Murugaperumal/ch7.ipynb831
1 files changed, 831 insertions, 0 deletions
diff --git a/Gas_Dynamics_and_Jet_Propulsion_by_P._Murugaperumal/ch7.ipynb b/Gas_Dynamics_and_Jet_Propulsion_by_P._Murugaperumal/ch7.ipynb
new file mode 100755
index 00000000..bed8f135
--- /dev/null
+++ b/Gas_Dynamics_and_Jet_Propulsion_by_P._Murugaperumal/ch7.ipynb
@@ -0,0 +1,831 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:2b84da90b712d0e24452d78c735ac1dad7be546c737e70f5e892f031f5d70de9"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7 : Rocket propulsion"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.1 page : 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Input data\n",
+ "mp = 12. \t\t\t\t#flow rate in kg/s\n",
+ "Ae = 335.*10**-4 \t\t\t\t#exit area in m**2\n",
+ "Ce = 2000. \t\t\t\t#exhaust velocity in m/s\n",
+ "h = 10. \t\t\t\t#altitude in km\n",
+ "Pe = 1.*10**5 \t\t\t\t#exhaust pressure in Pa\n",
+ "P0 = 1.*10**5 \t\t\t\t#p0 = atomspheric pressure in Pa at h = 0.\n",
+ "P10 = 0.25*10**5 \t\t\t\t#atmospheric pressure in Pa umath.sing gas tables\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Calculations\n",
+ "Fs = mp*Ce*10**-3 \t\t\t\t#thrust of motor at sea level math.since pe = p0 in kN\n",
+ "F10 = ((mp*Ce) + Ae*(Pe-P10))*10**-3 \t\t\t\t#thrust of motor at altitude of 10km in kN\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Output\n",
+ "print 'A)thrust of motor at sea level is %3i kN upwards \\\n",
+ "\\nB)thrust of motor at an altitude 10km is %3.4f kN'%(Fs,F10)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A)thrust of motor at sea level is 24 kN upwards \n",
+ "B)thrust of motor at an altitude 10km is 26.5125 kN\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.2 page : 22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Input data\n",
+ "P0 = 38*10**5 \t\t\t\t#combustion chamber pressure in Pa\n",
+ "T0 = 3500 \t\t\t\t#combustion chamber temperature in K\n",
+ "ma = 41.67 \t\t\t\t#oxidizer flow rate in kg/s\n",
+ "MR = 5 \t\t\t\t#mixture ratio\n",
+ "k = 1.3 \t\t\t\t#adiabatic consmath.tant\n",
+ "R = 287 \t\t\t\t#gas consmath.tant in J/kg-K\n",
+ "Pamb = 0.0582*10**5 \t\t\t\t#ambient pressure in Pa\n",
+ "Pe = Pamb \t\t\t\t#exhaust pressure at sea level in Pa\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Calculation \n",
+ "mf = ma/MR \t\t\t\t#mass flow of fuel in kg/s \n",
+ "mp = mf+ma \t\t\t\t#propellant mass flow in kg/s\n",
+ "Cp = (k*R)/(k-1) \t\t\t\t#specific heat at consmath.tant pressure in J/kg-k\n",
+ "p = P0/Pe \t\t\t\t#ratio of pressures at combustion chamber and exhaust \n",
+ "Me = ((((p**((k-1)/k))-1)*2)/(k-1))**0.5 \t\t\t\t#Mach number\n",
+ "t = 1/(1+(((k-1)/2)*Me**2)) \t\t\t\t#ratio of exhaust temperature to combustion temperature\n",
+ "Te = t*T0 \t\t\t\t#exhaust temperature in Kelvin\n",
+ "a = (1/Me)*(((2/(k+1))+(((k-1)/(k+1))*Me**2))**((k+1)/(2*(k-1)))) \t\t\t\t#ratio of areas at exit section and throat section of the nozzle\n",
+ "Ce = (k*R*Te)**0.5*Me \t\t\t\t#exit velocity in the exhaust in m/s\n",
+ "Cj = Ce \t\t\t\t#average effective jet velocity in m/s, math.since Pe = Pamb\n",
+ "P1 = P0*(2/(k+1))**(k/(k-1)) \t\t\t\t#pressure at throat section in Pa\n",
+ "T1 = T0*(2/(k+1)) \t\t\t\t#temperature at throat section in K\n",
+ "d1 = P1/(R*T1) \t\t\t\t#density of fuel at throat section in kg/m**3\n",
+ "C1 = (k*R*T1)**0.5 \t\t\t\t#velocity at throat section in m/s\n",
+ "A1 = (mp/(d1*C1))*10**4 \t\t\t\t#nozzle throat area in cm**2\n",
+ "Ae = a*A1 \t\t\t\t#exit area in cm**2\n",
+ "F = (mp*Ce)*10**-3 \t\t\t\t#thrust in kN\n",
+ "Cmax1 = (2*Cp*T0)**0.5 \t\t\t\t#maximum possible velocity in m/s\n",
+ "Cf = (F*10**3)/(P0*A1*10**-4) \t\t\t\t#thrust coefficient, F in kN and A1 in m**2\n",
+ "Cch1 = Cj/Cf \t\t\t\t#characteristic velocity in m/s\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Output\n",
+ "print 'A)nozzle throat area is %3.2f cm**2 \\\n",
+ "\\nB)thrust is %3.1f kN \\\n",
+ "\\nC)thrust coefficient is %3.2f \\\n",
+ "\\nD)characteristic velocity is %3i m/s \\\n",
+ "\\nE)exit velocity in exhaust is %3i m/s \\\n",
+ "\\nF)maximum possible exhaust velocity is %3i m/s'%(A1,F,Cf,Cch1,Ce,Cmax1)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A)nozzle throat area is 197.65 cm**2 \n",
+ "B)thrust is 130.0 kN \n",
+ "C)thrust coefficient is 1.73 \n",
+ "D)characteristic velocity is 1502 m/s \n",
+ "E)exit velocity in exhaust is 2599 m/s \n",
+ "F)maximum possible exhaust velocity is 2950 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.3 page : 23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Input data\n",
+ "a = 3. \t\t\t\t#exit area to throat area ratio\n",
+ "T0 = 2973. \t\t\t\t#combustion chamber temperature in K\n",
+ "P0 = 20.*10**5 \t\t\t\t#combustion chamber pressure in Pa\n",
+ "k = 1.3 \t\t\t\t#adiabatic consmath.tant\n",
+ "R = 248. \t\t\t\t#gas consmath.tant in J/kg-K\n",
+ "Pamb = 1.*10**5 \t\t\t\t#ambient pressure in Pa\n",
+ "Me = 2.52 \t\t\t\t#mach number for k = 1.3 and a = 3 umath.sing gas tables \n",
+ "g = 9.81 \t\t\t\t#acceleration due to gravity in m/s**2\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Calculation\n",
+ "p = 1/((1+(((k-1)/2)*Me**2))**(k/(k-1))) \t\t\t\t#ratio of pressures at exhaust and combustion chamber \n",
+ "Pe = p*P0 \t\t\t\t#exhaust pressure in Pa\n",
+ "t = 1/(1+(((k-1)/2)*Me**2)) \t\t\t\t#ratio of exhaust temperature to combustion temperature\n",
+ "Te = t*T0 \t\t\t\t#exhaust temperature in Kelvin\n",
+ "Ce = (k*R*Te)**0.5*Me \t\t\t\t#exit velocity in the exhaust in m/s\n",
+ "M = (Pe*Ce)/(R*Te) \t\t\t\t#propellant mass flow per unit area of exit in kg/m**2-s\n",
+ "Fa = ((M*Ce)+(Pe-Pamb))*10**-3 \t\t\t\t#thrust per unit area of exit in N/m**2\n",
+ "Is = (Fa*10**3)/(M*g) \t\t\t\t#specific impulse in sec\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Output\n",
+ "print 'A)thrust per unit area of exit is %3.2f kN/m**2 \\\n",
+ "\\nB)specific impulse is %3.2f sec'%(Fa,Is)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A)thrust per unit area of exit is 918.93 kN/m**2 \n",
+ "B)specific impulse is 181.98 sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.4 page : 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Input data\n",
+ "mp = 5. \t\t\t\t#propellent flow rate in kg/s (mismath.sing data)\n",
+ "de = 0.10 \t\t\t\t#nozzle exit diameter in m\n",
+ "Pe = 1.02*10**5 \t\t\t\t#nozzle exit pressure in Pa\n",
+ "Pamb = 1.013*10**5 \t\t\t\t#ambient pressure in Pa\n",
+ "P0 = 20. \t\t\t\t#thrust chamber pressure in Pa\n",
+ "F = 7000. \t\t\t\t#thrust in N\n",
+ "u = 1000. \t\t\t\t#rocket speed in m/s\n",
+ "g = 9.81 \t\t\t\t#acceleration due to gravity in m/s**2\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Calculation\n",
+ "Cj = F/mp \t\t\t\t#effective jet velocity in m/s\n",
+ "Ca = Cj-u \t\t\t\t#absolute jet velocity in m/s\n",
+ "wp = mp*g \t\t\t\t#weight flow rate of propellent in N/s\n",
+ "Is = F/(wp) \t\t\t\t#specific impulse in sec\n",
+ "SPC = 1/Is \t\t\t\t#specific propellent consumption in sec**-1\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Output\n",
+ "print 'A)effective jet velocity is %3i m/s \\\n",
+ "\\nB)specific impulse is %3.2f sec \\\n",
+ "\\nC)specific propellent consumption is %3.3f s**-1 \\\n",
+ "\\nD)absolute jet velocity is %3i m/s'%(Cj,Is,SPC,Ca)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A)effective jet velocity is 1400 m/s \n",
+ "B)specific impulse is 142.71 sec \n",
+ "C)specific propellent consumption is 0.007 s**-1 \n",
+ "D)absolute jet velocity is 400 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.5 page: 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Input data \n",
+ "Cj = 2700. \t\t\t\t#average effective jet velocity in m/s\n",
+ "u = 1350. \t\t\t\t#forward flight velocity in m/s\n",
+ "mp = 78.6 \t\t\t\t#propellant mass flow in kg/s\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Calculation\n",
+ "s = u/Cj \t\t\t\t#effective jet speed ratio\n",
+ "np = (2*s)/(1+s**2) \t\t\t\t#propulsive efficiency\n",
+ "F = Cj*mp*10**-3 \t\t\t\t#thrust in kN\n",
+ "Pt = F*u*10**-3 \t\t\t\t#Thrust power in MW, F in N\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Output\n",
+ "print 'A)thrust is %3.2f kN \\\n",
+ "\\nB)Thrust power is %3.3f MW \\\n",
+ "\\nC)propulsive efficiency is %3.1f'%(F,Pt,np)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A)thrust is 212.22 kN \n",
+ "B)Thrust power is 286.497 MW \n",
+ "C)propulsive efficiency is 0.8\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.6 page : 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Input data\n",
+ "mi = 15000. \t\t\t\t#mass of the rocket in kg\n",
+ "mp = 125. \t\t\t\t#propellant mass flow in kg/s\n",
+ "Cj = 2000. \t\t\t\t#velocity of gases coming out in m/s\n",
+ "t = 70. \t\t\t\t#time interval in sec\n",
+ "t0 = 0. \t\t\t\t#lower limit in integration in sec\n",
+ "t1 = 70. \t\t\t\t#upper limit in integration in sec\n",
+ "g = 9.81 \t\t\t\t#acceleration due to gravity in m/s**2\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Calculation\n",
+ "u = (-Cj*(math.log(1-((mp*t)/mi))))-(g*t) \t\t\t\t#velocity attained in 70 sec in m/s\n",
+ "\n",
+ "def f0(t): \n",
+ "\t return ((-2000*(math.log(1-((125*t)/15000))))-(g*t))\n",
+ "\n",
+ "h1 = ( quad(f0,t0,t1))[0]\n",
+ "\n",
+ "h2 = (u**2/(2*g))*10**-3 \t\t\t\t#Distance reached after fuel last i.e. after 70 sec due to kinetic energy by umath.sing KE = PE in km\n",
+ "h = h1+h2 \t\t\t\t#maximum height the rocket will reach in km\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Output\n",
+ "print 'A)velocity attained in %i sec is %3.2f m/s \\\n",
+ "\\nB)maximum height the rocket will reach is %3.3f km'%(t,u,h)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A)velocity attained in 70 sec is 1064.24 m/s \n",
+ "B)maximum height the rocket will reach is 28476.353 km\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7 page : 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Input data\n",
+ "A1 = 18.*10**-4 \t\t\t\t#throat area in m**2\n",
+ "P0 = 25.*10**5 \t\t\t\t#combustion chamber pressure in Pa\n",
+ "Is = 127.42 \t\t\t\t#specific impulse in sec\n",
+ "wp = 44.145 \t\t\t\t#weight flow rate of propellent in N/s\n",
+ "g = 9.81 \t\t\t\t#acceleration due to kravity in m/s**2\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Calculation\n",
+ "F = Is*wp \t\t\t\t#thrust in N\n",
+ "mp = wp/g \t\t\t\t#propellant mass flow in kg/s\n",
+ "Cj = F/mp \t\t\t\t#average effective jet velocity in m/s\n",
+ "Cf = F/(P0*A1) \t\t\t\t#thrust coefficient\n",
+ "Cw = wp/(P0*A1)/10**-3 \t\t\t\t#propellent weight flow coefficent *10**-3\n",
+ "SPC = (wp/F)/10**-3 \t\t\t\t#specific propellent consumption in sec**-1 *10**-3\n",
+ "Cch1 = Cj/Cf \t\t\t\t#characteristic velocity in m/s\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Output\n",
+ "print 'A)thrust coefficient is %3.2f \\\n",
+ "\\nB)propellent weight flow coefficent is %3.2f*10**-3 \\\n",
+ "\\nC)specific propellent consumption is %3.2f*10**-3 s**-1 \\\n",
+ "\\nD)characteristic velocity is %3.0f m/s'%(Cf,Cw,SPC,Cch1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A)thrust coefficient is 1.25 \n",
+ "B)propellent weight flow coefficent is 9.81*10**-3 \n",
+ "C)specific propellent consumption is 7.85*10**-3 s**-1 \n",
+ "D)characteristic velocity is 1000 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.8 page : 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Input data\n",
+ "m1 = 200. \t\t\t\t#internal mass in kg\n",
+ "m2 = 130. \t\t\t\t#mass after rocket operation in kg\n",
+ "m3 = 110. \t\t\t\t#payload,non-propulsive structure, etc in kg\n",
+ "tp = 3. \t\t\t\t#rocket operation duration in sec\n",
+ "Is = 240. \t\t\t\t#specific impulse in sec\n",
+ "g = 9.81 \t\t\t\t#acceleration due to kravity in m/s**2\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Calculation\n",
+ "MR = m2/m1 \t\t\t\t#mass ratio\n",
+ "Mp = m1-m2 \t\t\t\t#mass of propellant in kg\n",
+ "mp = Mp/tp \t\t\t\t#propellent flow rate in kg/s\n",
+ "wp = mp*g \t\t\t\t#weight flow rate of propellent in N/s\n",
+ "IMF = (m2-m3)/(m1-m3) \t\t\t\t#initial mass fraction\n",
+ "PMF = 1-IMF \t\t\t\t#propellant mass fraction\n",
+ "F = Is*wp \t\t\t\t#thrust in N\n",
+ "TWRi = F/(m1*g) \t\t\t\t#initial thrust to weight ratio \n",
+ "TWRf = F/(m2*g) \t\t\t\t#final thrust to weight ratio\n",
+ "av = F/m2 \t\t\t\t#Maximum accelaration of the vechicle in m/s**2\n",
+ "Cj = Is*g \t\t\t\t#effective exhaust velocity in m/s\n",
+ "It = Is*Mp*g*10**-3 \t\t\t\t#total impulse in kN-s, units of the answer given in the book is wrong\n",
+ "IWR = (It*10**3)/((m1-m3)*g) \t\t\t\t#impulse to weighr ratio, It in N-s\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Output\n",
+ "print 'A)mass ratio is %3.2f \\\n",
+ "\\nB)propellent mass fraction is %3.3f \\\n",
+ "\\nC)propellent flow rate is %3.1f kg/s \\\n",
+ "\\nD)thrust is %3.1f N \\\n",
+ "\\nE)thrust to weight ratio is %3.2f intial) and %3.2f final) \\\n",
+ "\\nF)accelaration of the vechicle is %3.2f m/s**2 \\\n",
+ "\\nG)effective exhaust velocity is %3.1f m/s \\\n",
+ "\\nH)total impulse is %3.3f kN-s \\\n",
+ "\\nI)impulse to weighr ratio is %3.2f'%(MR,PMF,mp,F,TWRi,TWRf,av,Cj,It,IWR)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A)mass ratio is 0.65 \n",
+ "B)propellent mass fraction is 0.778 \n",
+ "C)propellent flow rate is 23.3 kg/s \n",
+ "D)thrust is 54936.0 N \n",
+ "E)thrust to weight ratio is 28.00 intial) and 43.08 final) \n",
+ "F)accelaration of the vechicle is 422.58 m/s**2 \n",
+ "G)effective exhaust velocity is 2354.4 m/s \n",
+ "H)total impulse is 164.808 kN-s \n",
+ "I)impulse to weighr ratio is 186.67\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.9 page : 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Input data\n",
+ "u = 2800. \t\t\t\t#rocket speed in m/s\n",
+ "Cj = 1400. \t\t\t\t#effective exhaust velocity in m/s\n",
+ "mp = 5. \t\t\t\t#propellent flow rate in kg/s\n",
+ "q = 6500. \t\t\t\t#heat of propellent per kg of propellant mixture in kJ/kg\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Calculation\n",
+ "s = u/Cj \t\t\t\t#effective jet speed ratio\n",
+ "np = (2*s)/(1+s**2) \t\t\t\t#propulsive efficiency\n",
+ "F = Cj*mp*10**-3 \t\t\t\t#thrust in kN\n",
+ "Pt = F*10**3*u*10**-6 \t\t\t\t#Thrust power in MW, F in N\n",
+ "Pe = Pt/np \t\t\t\t#engine outputin MW\n",
+ "nth = Pe*10**3/(mp*q) \t\t\t\t#thermal efficiency, Pe in kW\n",
+ "no = np*nth \t\t\t\t#overall efficiency\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Output\n",
+ "print 'A)propulsive efficiency is %3.1f \\\n",
+ "\\nB)propulsive power is %3.1f MW \\\n",
+ "\\nC)engine outut is %3.1f MW \\\n",
+ "\\nD)thermal efficiency is %3.4f \\\n",
+ "\\nE)overall efficiency is %3.3f'%(np,Pt,Pe,nth,no)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A)propulsive efficiency is 0.8 \n",
+ "B)propulsive power is 19.6 MW \n",
+ "C)engine outut is 24.5 MW \n",
+ "D)thermal efficiency is 0.7538 \n",
+ "E)overall efficiency is 0.603\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.10 page : 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Input data\n",
+ "Cj = 1250. \t\t\t\t#effective exhaust velocity in m/s\n",
+ "s = 0.8 \t\t\t\t#effective jet speed ratio i.e. flight to jet speed ratio\n",
+ "ma = 3.5 \t\t\t\t#oxidizer flow rate in kg/s\n",
+ "mf = 1. \t\t\t\t#fuel flow rate in kg/s\n",
+ "g = 9.81 \t\t\t\t#acceleration due to gravity in m/s**2\n",
+ "q = 2500.*10**3 \t\t\t\t#heat of propellent per kg of propellant mixture in J/kg\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Calculation\n",
+ "u = s*Cj \t\t\t\t#flight velocity in m/s\n",
+ "mp = ma+mf \t\t\t\t#propellant mass flow in kg/s\n",
+ "F = Cj*mp*10**-3 \t\t\t\t#thrust in kN\n",
+ "wp = mp*g \t\t\t\t#weight flow rate of propellent in N/s\n",
+ "Is = (F*10**3)/(wp) \t\t\t\t#specific impulse in sec,F in N\n",
+ "np = (2*s)/(1+s**2) \t\t\t\t#propulsive efficiency\n",
+ "nth = 0.5*mp*((Cj**2+u**2)/(mp*q)) \t\t\t\t#thermal efficiency\n",
+ "no = np*nth \t\t\t\t#overall efficiency\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Output\n",
+ "print 'A)thrust is %3.3f kN \\\n",
+ "\\nB)specific impulse is %3.2f sec \\\n",
+ "\\nC)propulsive efficiency is %3.4f \\\n",
+ "\\nD)thermal efficiency is %3.4f \\\n",
+ "\\nE)overall efficiency is %3.1f'%(F,Is,np,nth,no)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A)thrust is 5.625 kN \n",
+ "B)specific impulse is 127.42 sec \n",
+ "C)propulsive efficiency is 0.9756 \n",
+ "D)thermal efficiency is 0.5125 \n",
+ "E)overall efficiency is 0.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.11 page : 28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Input data\n",
+ "mp = 193. \t\t\t\t#propellent flow rate in kg/s\n",
+ "P1 = 27.*10**5 \t\t\t\t#pressure at throat section in Pa\n",
+ "T1 = 3000. \t\t\t\t#temperature at throat section in K\n",
+ "de = 0.6 \t\t\t\t#nozzle exit diameter in m\n",
+ "Pe = 1.1*10**5 \t\t\t\t#exhaust pressure in Pa\n",
+ "Pamb = 1.013*10**5 \t\t\t\t#ambient pressure in Pa\n",
+ "F = 380*10**3 \t\t\t\t#thrust of motor in N\n",
+ "u = 694.44 \t\t\t\t#flight velocity in m/s\n",
+ "g = 9.81 \t\t\t\t#acceleration due to gravity in m/s**2\n",
+ "q = 6500*10**3 \t\t\t\t#heat of propellent per kg of propellant mixture in J/kg\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Calculation\n",
+ "Ae = (math.pi*0.6**2)/4 \t\t\t\t#exit area in m**2\n",
+ "Cj = F/mp \t\t\t\t#average effective jet velocity in m/s\n",
+ "Ce = (F-((Pe-Pamb)*Ae))/mp \t\t\t\t#exhaust velocity in m/s, wrong answer in textbook\n",
+ "wp = mp*g \t\t\t\t#weight flow rate of propellent in N/s\n",
+ "Is = (F)/(wp) \t\t\t\t#specific impulse in sec\n",
+ "SPC = (wp/F)/10**-3 \t\t\t\t#specific propellent consumption in sec**-1 *10**-3\n",
+ "Pt = F*u*10**-6 \t\t\t\t#Thrust power in MW\n",
+ "Pl = (0.5*mp*((Cj-u)**2))*10**-6 \t\t\t\t#Power loss in exhaust in MW\n",
+ "Pe = Pt+Pl \t\t\t\t#engine output in MW\n",
+ "np = Pt/Pe \t\t\t\t#propulsive efficiency\n",
+ "nth = Pe*10**3/(mp*q*10**-3) \t\t\t\t#thermal efficiency and Pe,q in kW\n",
+ "no = np*nth \t\t\t\t#overall efficiency\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Output\n",
+ "print 'A)effective jet velocity is %3.4f m/s \\\n",
+ "\\nB)Actual jet velocity is %3.4f m/s \\\n",
+ "\\nC)specific impulse is %3.1f sec \\\n",
+ "\\nD)specific propellent consumption is %3.4f*10**-3 sec**-1 \\\n",
+ "\\nE)propulsive efficiency is %3.5f \\\n",
+ "\\nD)thermal efficiency is %3.3f \\\n",
+ "\\nE)overall efficiency is %3.5f'%(Cj,Ce,Is,SPC,np,nth,no)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A)effective jet velocity is 1968.9119 m/s \n",
+ "B)Actual jet velocity is 1956.1665 m/s \n",
+ "C)specific impulse is 200.7 sec \n",
+ "D)specific propellent consumption is 4.9824*10**-3 sec**-1 \n",
+ "E)propulsive efficiency is 0.62736 \n",
+ "D)thermal efficiency is 0.335 \n",
+ "E)overall efficiency is 0.21035\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.12 page : 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Input data\n",
+ "m1 = 3600. \t\t\t\t#internal mass in kg\n",
+ "Cj = 2070. \t\t\t\t#average effective jet velocity in m/s\n",
+ "tp = 80. \t\t\t\t#rocket operation duration in sec\n",
+ "g = 9.81 \t\t\t\t#acceleration due to gravity in m/s**2\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Calculation\n",
+ "up = 2*Cj \t\t\t\t#flight velocity in m/s\n",
+ "MR = 1/math.exp((up+(g*tp))/Cj) \t\t\t\t#mass ratio\n",
+ "m2 = MR*m1 \t\t\t\t#mass after rocket operation in kg\n",
+ "PMF = 1-MR \t\t\t\t#propellant mass fraction\n",
+ "Mp = m1-m2 \t\t\t\t#mass of propellant in kg\n",
+ "mp = Mp/tp \t\t\t\t#propellent flow rate in kg/s\n",
+ "F = Cj*mp*10**-3 \t\t\t\t#thrust in kN\n",
+ "Zp = (((1+((1-(1/PMF))*math.log(1/MR)))*Cj*tp)-(0.5*g*tp**2))*10**-3 \t\t\t\t#powered altitude gain in km\n",
+ "Zc = ((0.5*up**2)/g)*10**-3 \t\t\t\t#coasting altitude gain in km\n",
+ "Z = Zp+Zc \t\t\t\t#maximum altitude in km\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Output\n",
+ "print 'A)flow rate of propellent is %3.2f kg/s \\\n",
+ "\\nB)thrust developed is %3.3f kN \\\n",
+ "\\nC)altitude gains during powered and coasting flights are %3.3f km and %3.3f km respectively'%(mp,F,Zp,Zc)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A)flow rate of propellent is 40.83 kg/s \n",
+ "B)thrust developed is 84.521 kN \n",
+ "C)altitude gains during powered and coasting flights are 93.987 km and 873.578 km respectively\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.13 page : 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Input data\n",
+ "s = 0.2105 \t\t\t\t#effective jet speed ratio\n",
+ "Is = 203.88 \t\t\t\t#specific impulse in sec\n",
+ "tp = 8 \t\t\t\t#rocket operation duration i.e. burn out time in sec\n",
+ "g = 9.81 \t\t\t\t#acceleration due to kravity in m/s**2\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Calculation\n",
+ "Cj = g*Is \t\t\t\t#average effective jet velocity in m/s\n",
+ "up = s*Cj \t\t\t\t#maximum flight speed in m/s\n",
+ "MR = 1/math.exp((up+(g*tp))/Cj) \t\t\t\t#mass ratio\n",
+ "PMF = 1-MR \t\t\t\t#propellant mass fraction\n",
+ "Zp = (((1+((1-(1/PMF))*math.log(1/MR)))*Cj*tp)-(0.5*g*tp**2))*10**-3 \t\t\t\t#powered altitude gain in km\n",
+ "Zc = ((0.5*up**2)/g)*10**-3 \t\t\t\t#coasting altitude gain in km\n",
+ "Z = Zp+Zc \t\t\t\t#maximum altitude in km\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Output \n",
+ "print 'A)effective jet velocity is %3i m/s \\\n",
+ "\\nB)mass ratio and propellent mass fraction are %3.2f and %3.2f respectively \\\n",
+ "\\nC)maximum flight speed is %3.2f m/s \\\n",
+ "\\nD))altitude gains during powered and coasting flights are %3.3f km and %3.3f km respectively'%(Cj,MR,PMF,up,Zp,Zc)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A)effective jet velocity is 2000 m/s \n",
+ "B)mass ratio and propellent mass fraction are 0.78 and 0.22 respectively \n",
+ "C)maximum flight speed is 421.01 m/s \n",
+ "D))altitude gains during powered and coasting flights are 1.601 km and 9.034 km respectively\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.14 page : 30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Input data\n",
+ "R0 = 6341.6*10**3 \t\t\t\t#radius of earth at mean sea-level in m\n",
+ "g = 9.809 \t\t\t\t#acceleration due to gravity in m/s**2\n",
+ "Z1 = 0 \t\t\t\t#altitude at sea-level in m\n",
+ "Z2 = 300*10**3 \t\t\t\t#altitude above sea-level in m\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Calculation\n",
+ "uorb1 = R0*math.sqrt(g/(R0+Z1)) \t\t\t\t#orbit velocity of a rocket at mean sea level in m/s\n",
+ "uesc1 = math.sqrt(2)*uorb1 \t\t\t\t#escape velocity of a rocket at mean sea level in m/s\n",
+ "uorb2 = R0*math.sqrt(g/(R0+Z2)) \t\t\t\t#orbit velocity of a rocket at an altitude of 300 km in m/s\n",
+ "uesc2 = math.sqrt(2)*uorb2 \t\t\t\t#escape velocity of a rocket at an altitude of 300 km in m/s\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Output \n",
+ "print 'A)orbit and escape velocities of a rocket at mean sea level are %3i m/s and %3i m/s \\\n",
+ "\\nB)orbit and escape velocities of a rocket at an altitude of 300 km are %3.1f m/s and %3.2f m/s'%(uorb1,uesc1,uorb2,uesc2 )\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A)orbit and escape velocities of a rocket at mean sea level are 7886 m/s and 11153 m/s \n",
+ "B)orbit and escape velocities of a rocket at an altitude of 300 km are 7706.8 m/s and 10899.08 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file