Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Outerra Tech Demo download. Help with graphics driver issues

Author Topic: How To Build A Rocket! (WIP tutorial)  (Read 4863 times)

Uriah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 569
  • We do these things not because they are easy. -JFK
How To Build A Rocket! (WIP tutorial)
« on: September 21, 2015, 01:45:38 pm »

I've decided to write a comprehensive tutorial on how to build rockets and spacecraft for Outerra. This is a work in progress, and will take many months to complete. As new methods are exposed in OT, relevant information will be added and revised.

I will not be covering the basics on how to import a 3d model, code in JavaScript or build a JSBSim flight, and it is expected you are familiar with these areas. I will however provide a very basic working example of a single stage rocket for you to start with, including the 3d model, package, script and flight model. This is not intended to be an introductory course in physics, astrophysics or orbital dynamics, however you may learn a great deal, and it isn't nearly as difficult as you may think.

Best regards,
Uriah

ABSTRACT

Section One will overview of the terminology, coordinate systems, methodology and development cycle for testing a launch vehicle or orbital vehicle, as well as tools and  resources to aid in the process.

Section Two will provide an overview of the basic JavaScript required to make a functional rocket, including a system to calculate the orbital elements and launch parameters.

Section Three will cover the basics of building a flight model for a rocket using JSBSim, as well as how to find information and calculate the parameters for modeling the propulsion system, including rocket engines, nozzles, propellant mixture ratios, thrust vectoring, Reaction Control Systems, as well as aerodynamics, stage separation, and guidance and controls systems.
« Last Edit: April 25, 2016, 05:23:00 pm by Uriah »
Logged

Uriah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 569
  • We do these things not because they are easy. -JFK
SECTION ONE
« Reply #1 on: September 21, 2015, 01:45:59 pm »

SECTION 1-0   INTRODUCTION

SECTION 1-1   TERMINOLOGY

SECTION 1-2   COORDINATE SYSTEMS

Model Space Coordinate System
JSBSim Coordinate System

Earth-Centered, Earth-Fixed (ECEF)
Earth-centered inertial (ECI)
North, East, Down (NED)
East, North, Up (ENU)

SECTION 1-3   DEVELOPMENT CYCLE

SECTION 1-4   TOOLS & RESOURCES

OT Rocket Example: Coming soon!

Tools:
ThrustCurve Tracer (TCtracer) is a freely available Java application that makes creation of rocket motor data files quick and easy.
Rocket Propulsion Analysis (RPA) is a multi-platform analysis tool intended for use in conceptual and preliminary design.

Books:
Rocket Propulsion Elements, 7th Edition This text offers a clear and comprehensive overview of rocket propulsion technology, covering thermodynamics, heat transfer, aerodynamics, flight performance and propellant chemistry.

Links:
Rocket and Space Technology - BASICS OF SPACE FLIGHT
NASA Glenn Research Center - Rocket Index

Videos:

« Last Edit: September 21, 2015, 08:50:44 pm by Uriah »
Logged

Uriah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 569
  • We do these things not because they are easy. -JFK
SECTION TWO
« Reply #2 on: September 21, 2015, 01:46:11 pm »

SECTION 2-0   JAVASCRIPT

System Files

There are four "system files" that need to be included in the script. These allow you to easily plug in features and keeps the main script from having too many lines. These scripts are included by using the $include method, like so:

Code: [Select]
$include("functions.js");
The first system is called functions.js and includes the Function Library, which are contain functions for converting between units and perform other basic functions which can be called many times.

The second system is called nav_params.js and includes the Navigation Parameters, which declare all of the universal constants and global variables that will be assigned later and used to make calculations in the Navigation System.

The third system is called nav_system.js and includes the Navigation System, which contains all of the functions to calculate the Classical Orbital Elements (COEs), and other equations such as the Mass Ratio, Launch Azimuth, Escape Velocity, and so forth.

These first three system files need to be included at the very top of the script, before any other statements.

The fourth system is called flight_computer.js and unlike the previous ones, is included on the first line of the function update_frame(dt). This system serves two purposes, the first is to assign and update values to the global variables declared in Navigation Parameters, and the second is to call the functions in Navigation System. Each update call the global variables are assigned and the functions are called, which calculate all of the data output by the Flight Computer.

Launch Location and ECI Velocity

When the script initializes, we need to assign three variables in Navigation Parameters, which will be used in a number of calculations, including Downrange Distance, Launch Azimuth, Delta Velocity and Escape Velocity.

Code: [Select]
//Navigations System Interface initialize(reload) assigns launch values to variables in nav_params.js
lat_launch_rad = deg2rad(this.jsbsim["position/vrp-gc-latitude_deg"]); //Launch Latitude Radians
long_launch_rad = deg2rad(this.jsbsim["position/vrp-longitude_deg"]);  //Launch Longitude Radians
launch_eci_velocity_m = ft2m(this.jsbsim['velocities/eci-velocity-mag-fps']); //Launch ECI Velocity;

Vertical Launch
Since your rocket's longitudinal axis needs to be vertical, you must initialize the launch vehicle at a ninety degree alpha (pitch) angle with the following method in the function initialize(reload).

Code: [Select]
this.set_pitch_roll(90, 0); //Initializes rockets in vertical position
SECTION 2-1   ORBITAL ELEMENTS
« Last Edit: September 21, 2015, 04:38:27 pm by Uriah »
Logged

Uriah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 569
  • We do these things not because they are easy. -JFK
SECTION THREE
« Reply #3 on: September 21, 2015, 01:46:20 pm »

SECTION 3-0   JSBSIM FLIGHT MODEL

JSBSim Reference Manual (PDF)

SECTION 3-1   PROPULSION

Start by collecting data on the rocket engine. The most important information for a liquid rocket engine is the Specific Impulse (Isp), Propellant Flow Rate, Mixture Ratio, Nozzle Exit Area and Chamber Pressure.

To model a liquid engine, you'll need the following information.

Quote
RD-180 Engine:

Thrust (Vacuum) 4,152kN (933,369 lbf)
Thrust (Sea Level) 3,827kN (860,200 lbf)
Isp Vac 338s
Isp SL  311s
Engine Length 3.56m
Engine Diameter 3.15m
Engine Dry Weight 5,480kg
Chamber Pressure  266.8bar (3,722 psi)
Nozzle Ratio  36.87
Single Nozzle Exit Diameter 56.9 in
Thrust to Weight  78.22
Mixture Ratio (O:F) 2.72
Flow Rate (lb/s) 2,756
Attitude Control  Gimbaled Engine (+/- 8 Degrees)
Throttle Capability 50-100%

For certain rocket engines it will be difficult to find all of this information. Start by gathering as much information as possible for the rocket engine, and if you are missing some data it can be calculated or estimated. For instance, if you don't know the flow rate of the propellant, but you know the total propellant weight and the burn time, simply divide the propellant weight by the burn time. If you don't know the mixture ratio or Isp, you can find them if you know the type of fuel and oxidizer. Typically this won't be accurate and you are likely to find the optimal mixture ratio or Isp, and two engines burning the same types of propellants won't have the same mixture ratio or Isp, however if know the nozzle ratio, the Isp can be calculated, although the equations are not simple. There are programs available from the NASA website that can be used for calculating rocket engine performance which might come in handy for these types of problems.

Liquid Rocket Engines

The engine file RD180.xml will look like this:

Code: [Select]
<?xml version="1.0"?>
<rocket_engine name="RD-180 Engine">
  <isp>                    338  </isp>
  <maxthrottle>           1.00  </maxthrottle>
  <minthrottle>           0.50  </minthrottle>
  <slfuelflowmax unit="LBS/SEC">  740.86  </slfuelflowmax>
  <sloxiflowmax unit="LBS/SEC">   2015.14  </sloxiflowmax>
</rocket_engine>

isp is vacuum specific impulse.
slfuelflowmax is the fuel mass flow rate at sea level.
slfuelflowmax is the oxidizer mass flow rate at sea level.

Flow rates of fuel and oxidizer is calculated from the total flow rate of 2,756 lbs per second and the mixture ratio of 2.72 (O:F).
Fuel flow rate calculations: 1/(2.72+1) = 0.2688172043010753 * 2,756 = 740.8602150537634
Oxidizer flow rate calculations: 2,756 - fuel flow rate = 2015.139784946237
Always check the solution by dividing the oxidizer flow rate by the fuel flow rate, which should equal the mixture ratio: 2015.139784946237 / 740.8602150537634 = 2.72

Rocket Nozzle

The nozzle file RD180_nozzle.xml will look like this:

Code: [Select]
<?xml version="1.0"?>
<nozzle name="RD-180 Nozzle">
  <pe unit="PSF">   535968.0  </pe>
  <area unit="FT2">  35.32  </area>
</nozzle>

pe is the nozzle exit pressure in pounds per square foot.
area is the nozzle exit area in square feet.

Since the RD-180 engine has two chambers, and therefore two nozzles, the total nozzle exit area is two times the single nozzle area.
Single nozzle area = πr^2 = 17.66 square feet * 2 = 35.32 sqft

FDM Propulsion Section

Code: [Select]
    <propulsion>

      <engine file="RD180">
        <!-- RD-180 Engine 0 (overall engine index 1) -->
        <location unit="IN">
          <x>  -105 </x>
          <y>    0 </y>
          <z>    0 </z>
        </location>
        <feed>0</feed>
        <feed>1</feed>
        <thruster file="RD180_nozzle">
          <location unit="IN">
            <x>   -30 </x>
            <y>    0 </y>
            <z>    0 </z>
          </location>
        </thruster>
      </engine>

      <tank type="OXIDIZER">
        <!-- Tank number 0 (LOX) -->
        <location unit="IN">
          <x>  -1047 </x>
          <y>    0 </y>
          <z>    0 </z>
        </location>
        <drain_location unit="IN">
          <x>  -685 </x>
          <y>    0 </y>
          <z>    0 </z>
        </drain_location>
        <capacity unit="LBS"> 457946.392 </capacity>
        <contents unit="LBS"> 457946.392 </contents>
      </tank>

      <tank type="FUEL">
        <!-- Tank number 1 (RP-1) -->
        <location unit="IN">
          <x>  -390 </x>
          <y>    0 </y>
          <z>    0 </z>
        </location>
        <drain_location unit="IN">
          <x>  -135 </x>
          <y>    0 </y>
          <z>    0 </z>
        </drain_location>
        <capacity unit="LBS"> 168362.644 </capacity>
        <contents unit="LBS"> 168362.644 </contents>
        <type> RP-1 </type>
      </tank>

    </propulsion>

The capacity/contents of the fuel and oxidizer tanks are calculated in the same manner as propellant flow rates, and the solution checked by dividing oxidizer mass by fuel mass.

Once we have configured the rocket engine, nozzle and propellant tanks, we can perform a static test at sea level to see if the thrust generated matches the expected value.

With this configuration, the RD-180 engine yields a vacuum thrust of 931,528 lbf, which is very close to the specified thrust of 933,369 lbf, with a difference of only 1,841 lbf, or about 0.2%.

Solid Propellant Rocket Engines

Links:
JSBSim FGRocket Class Reference
JSBSim FGNozzle Class Reference
JSBSim FGTank Class Reference

SECTION 3-2   PROPELLANT

SECTION 3-3   REACTION CONTROL SYSTEM

SECTION 3-4   AERODYNAMICS

SECTION 3-5   STAGE SEPARATION

SECTION 3-6   GUIDANCE & CONTROL SYSTEMS
« Last Edit: September 21, 2015, 08:43:57 pm by Uriah »
Logged

Uriah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 569
  • We do these things not because they are easy. -JFK
Re: How To Build A Rocket!
« Reply #4 on: September 21, 2015, 01:48:58 pm »

Reserved
« Last Edit: February 22, 2017, 01:55:58 pm by Uriah »
Logged

Uriah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 569
  • We do these things not because they are easy. -JFK
Re: How To Build A Rocket!
« Reply #5 on: September 21, 2015, 04:41:24 pm »

Reserved
Logged

Uriah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 569
  • We do these things not because they are easy. -JFK
Re: How To Build A Rocket! (WIP tutorial)
« Reply #6 on: September 21, 2015, 04:42:04 pm »

Reserved
Logged