Tuesday, February 24, 2015

Electron Cont'd (4)

JSBSim is an open source flight dynamics simulator. It can simulate the flight of balloons, gliders, prop planes, jets, rocket-powered jets, and rockets. Importantly, I can program in GNC (guidance, navigation, control) logic to perform active stabilization during flight. JSBSim is a console program that takes xml files as input and outputs csv files (which can be plot in Matlab or Excel), linked to Simulink, or even stream output via telnet for remote "telemetry."

A JSBSim model requires aircraft, engine, and script definitions.
This is how I structured the Electron flight model in JSBSim:
Electron.xml: Rocket geometry, aerodynamic parameters (from RASAero), and engine config
NZ01.xml: Parameters of (imaginary) launch site in New Zealand

ElectronControlSystem.xml: GNC parameters
ElectronGuidanceExecutive.xml: Mission clock, guidance modes
ElectronFirstStageEffectors.xml: First stage engine gimbal definition
ElectronSecondStageEffectors.xml: 2nd stage engine gimbal definition


Electron.xml: Defines wind speeds, rocket staging, console output

I based the file organization and GNC structure on the Jupiter-246 concept model available in JSBSim, but otherwise everything was done nearly from scratch.

The masses of each major rocket part such as payload shroud, body tubes, engines, were specified as pointmass elements inside the mass_balance section of the aircraft definition, aircraft/Electron.xml. Only cylindrical and spherical (solid or hollow) shapes can be specified, so it ends up being an approximation of the geometry. The dimensions of each part are fairly well defined from Rocket Lab's web site, and I used masses previously estimated when trying OpenRocket.

Engines are first defined in engine files (the engine and nozzle are separately defined in JSBSim). Here are example engine and nozzle files for the Rutherford engine. The Isp was guessed from other high-performing Kerosene liquid engines, and the mass flow rate \(\dot{m}\) was calculated using the relation \(Isp=F/\dot{m}g\) where F is the thrust of the engine given on the Rocket Lab web site (146.6 kN peak, or 16.3 kN/engine) and g is the acceleration due to gravity 9.8 m/s^2. The mixture ratio 2.6 is a standard oxidizer to propellant mixture ratio for LOX/kerosene. Incidentally, LOX/Kerosene is the same proven combination used on the Saturn V moon rocket and SpaceX's Falcon 9.

<?xml version="1.0"?>
<rocket_engine name="Rutherford">
  <isp>                   350.0 </isp>
  <maxthrottle>           1.00  </maxthrottle>
  <minthrottle>           0.40  </minthrottle>
  <propflowmax unit="LBS/SEC"> 10.4625 </propflowmax>
  <mixtureratio> 2.6 </mixtureratio>

<?xml version="1.0"?>
<nozzle name="Rutherford Nozzle">
  <!-- area = Nozzle exit area, sqft. -->
  <area unit="FT2">  0.209  </area>

This NASA web site gives a nice introduction to the concept of specific impulse.

Tanks are specified in the aircraft definition file, by giving the types (FUEL/OXIDIZER), locations, capacities, and drain locations. Tanks are "hooked up" to engines by specifying the tank number as feed elements in each engine.

Continue reading...

No comments: