1 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5 Date started: 09/12/2000
7 ------------- Copyright (C) 2000 Jon S. Berndt (jsb@hal-pc.org) --------------
9 This program is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free Software
11 Foundation; either version 2 of the License, or (at your option) any later
14 This program is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
19 You should have received a copy of the GNU General Public License along with
20 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21 Place - Suite 330, Boston, MA 02111-1307, USA.
23 Further information about the GNU General Public License can also be found on
24 the world wide web at http://www.gnu.org.
27 --------------------------------------------------------------------------------
28 09/12/2000 JSB Created
30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
37 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
39 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
42 #include "FGConfigFile.h"
44 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
46 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
48 #define ID_ROCKET "$Id$"
50 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
52 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
56 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
57 COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
58 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
60 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
62 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
64 /** Models a generic rocket engine.
65 The rocket engine is modeled given the following parameters:
67 <li>Chamber pressure (in psf)</li>
68 <li>Specific heat ratio (usually about 1.2 for hydrocarbon fuel and LOX)</li>
69 <li>Propulsive efficiency (in percent, from 0 to 1.0)</li>
70 <li>Variance (in percent, from 0 to 1.0, nominally 0.05)</li>
72 Additionally, the following control inputs, operating characteristics, and
73 location are required, as with all other engine types:</font>
75 <li>Throttle setting (in percent, from 0 to 1.0)</font></li>
76 <li>Maximum allowable throttle setting</li>
77 <li>Minimum working throttle setting</li>
78 <li>Sea level fuel flow at maximum thrust</li>
79 <li>Sea level oxidizer flow at maximum thrust</li>
80 <li>X, Y, Z location in structural coordinate frame</li>
81 <li>Pitch and Yaw</li>
83 The nozzle exit pressure (p2) is returned via a
84 call to FGNozzle::GetPowerRequired(). This exit pressure is used,
85 along with chamber pressure and specific heat ratio, to get the
86 thrust coefficient for the throttle setting. This thrust
87 coefficient is multiplied by the chamber pressure and then passed
88 to the nozzle Calculate() routine, where the thrust force is
99 @see <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jsbsim/JSBSim/FGRocket.h?rev=HEAD&content-type=text/vnd.viewcvs-markup">
101 @see <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jsbsim/JSBSim/FGRocket.cpp?rev=HEAD&content-type=text/vnd.viewcvs-markup">
105 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
107 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
109 class FGRocket : public FGEngine
113 @param exec pointer to JSBSim parent object, the FDM Executive.
114 @param Eng_cfg pointer to the config file object. */
115 FGRocket(FGFDMExec* exec, FGConfigFile* Eng_cfg);
120 /** Determines the thrust coefficient.
121 This routine takes the nozzle exit pressure and calculates the thrust
122 coefficient times the chamber pressure.
123 @param pe nozzle exit pressure
124 @return thrust coefficient times chamber pressure */
125 double Calculate(double pe);
127 /** Gets the chamber pressure.
128 @return chamber pressure in psf. */
129 double GetChamberPressure(void) {return PC;}
138 void Debug(int from);
141 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%