A.7.5Model Analysis Code User’s Guide1

A.7.5 User’s Guide to Running the Model Analysis Code

Compiled by Justin Rhodes

In the early stages of our launch vehicle design, rough evaluations were used to weigh different potential designs against each other. To facilitate this, codes from many different groups were assembled together and governed by a set of master codes. These master codes allowed a full design concept to be analyzed at once. This established the core set of model analysis code. An attempt was then made to automate the analysis process, allowing thousands of cases to be computed across many network resources.

Index

main_loop.m / D. Yaple / page 2
fnc_model_analysis.m / J. Rhodes / page 6
fnc_analyze.m / J. Rhodes / page 7

User’s Guide for main_loop.m

Written by Danielle E Yaple

Revision 4.1 - 22 March 2008

Description:

This code is a framework for running all optimizations and data analysis for spacecraft selection. This code is also used for giving initial starting conditions for the trajectory codes.

Assumptions:

There are a lot of simplifications used to make the original version of this code. The propulsion and structures assumptions are explain in their code descriptions. For avionics it was assumed that the only mass that was changing between the launch vehicles is the wiring mass. Since the models weren’t drastically changing the power requirements were going to be similar and the telecom requirements did not vary. It was also assumed that the best vehicle design could be captured while having an inert mass fraction step size of .03 and a ∆V per stage of .05. The max gravitation acceleration the body needs to withstand is also hard coded in as 6 g’s since this code does not iterate with trajectory. The final assumption made is that the launch cost modifiers won’t effect the ideal inert mass fraction or ∆V per stage as it is calculated after the optimizing loop is complete.

Important Notes:

This code morphed as all the other codes changed its basic structure and purpose did not change but a lot of the call statements and references to addition codes did. Be careful when using this code, this code requires a lot of other codes to be called and run. So make sure you have this code in the right directory with the most current files.

If your desire is to get a specific output for given ∆V breakups and inert mass fractions a variation of the code called main_once.m will run in a shorter time because it does not have to iterate to find the idea model makeup.

Input Section:

The call line of the function is:

[Model_Name, Trajectory_Input] = main_loop

There are not any inputs into the call line, but there are hard coded inputs in the first section of the code. These are described below:

Variable Name / Description
delta_v / This is the ∆v being evaluated for this run [m/s]
payload_mass / This shows which payload we are running it is either .2, 1, or 5 [kgs]
Stages / Number of stages for the rocket, must be between 1 and 3
propellant_type / This is a 3 value vector in which 1 stands for Cryogenic, 2 for Storable, 3 for Hybrid, 4 for Solid Propellants and 0 is used as a place holder for vehicles less than 3 stages
tank_material / This is a 3 character vector in which S stands for Steel, A for Aluminum, C for Composite and T for Titanium tank materials. X is used as a place holder for vehicles with less than 3 stages.
launch_type / This describes the launch type 1 stands for Ground, 2 for Balloon, and 3 for Aircraft launch

Output Section:

There are 2 ways this code is used by trajectory as a function called to set their initial conditions and for picking the best cases using the output to the screen.

Trajectory Outputs

Variable Name / Description
Model_Name / This is the case name we gave to each case we were running [ex LG-CA-DA-DT]
Trajectory_Input / This is a vector that contains all the structural and propulsive information the trajectory code needs to run. It contains launch type, number of stages, payload mass [kg], stage masses [kg], thrust data [N], burn time [s], mass flow rate [kg/s], diameter [m], exit pressure [Pa] and area [m2] for each stage.

Cost Analysis Outputs

Variable Name / Description
model_name / This is the case name we gave to each case we were running [ex LG-CA-DA-DT]
Winner / This tells whether the case analysis was the best cost case or the lowest GLOW case
payload_mass / This shows which payload we are running it is either .2, 1, or 5 [kgs]
launch_type / This describes the launch type 1 stands for Ground, 2 for Balloon, and 3 for Aircraft launch
stages / Number of stages for the rocket, must be between 1 and 3
GLOW / Gross Lift Off Weight [kgs]
delta_v / The ∆v being evaluated for this run [m/s]
Cost_Total / The cost for the entire vehicle using the structural, propulsive and avionics cost models. [$]
cost_stage_prop / The cost of the propellant per stage. [$]
cost_stage_tank / The cost of the tanks per stage. [$]
inert_mass_frac / The inert mass fraction for each stage.
Length_stage / The length of each stage/ [m]
propellant_type / This is a vector in which Cryogenic, Storable, Hybrid, or Solid Propellants are used.
tank_material / This is a vector in which Steel, Aluminum, Composite or Titanium tank materials is used.

Sample Output:

Trajectory

Model_Name = LG-CA-DA-DT

Trajectory_Input = 1, 3, 5, 3428.9969, 995.6116, 45.3741, 12.251, 53848.0549, 11842.3086, 570.3187, 185.3137, 238.1615, 186.9598, 12.9526, 3.6788, 0.1772, 2, 0.7795, 0.2616, 1575.619, 11453.6604, 11453.6604, 0.9097, 0.0544, 0.0026

Cost Analysis

RESULTS for [LG-CA-DA-DT]

BEST COST,LG-CA-DA-DT, 5.0, Ground, 3, 11000, 4475, 4528846.43, 4433.007510, 4380.691044, 165.615309, 1908818.126654, 1001897.134488, 168276.171533, 0.300000, 0.120000, 0.270000, 9.586731, 1.453784, 0.802037, Cryogenic, Solid, Solid, Aluminum, Aluminum, Titanium,

This output is for one case and this code was run in an automation code to run all of the cases and find the best ones.

User’s Guide forfnc_model_analysis.m

Written by Justin M. Rhodes

Revision 3.0 – 22February2008

Description:

The function fnc_model_analysis.m is a derivative of the main_loop.m code. The main body of the parent code is preserved and is wrapped in a function call to allow automated calling of the code. For detailed information on the inner workings of this code, please see the main_loop.m User’s Guide.

Call line:

The function can be called with the following line of code:

[trajectory_input, argout_count, varargout] = fnc_model_analysis(delta_v,payload_mass,stages,propellant_type,tank_material,launch_type)

Inputs:

All of the variables that are passed into the function are described below:

Variable Name / Description
delta_v / Row array of final delta V values. [m/s]
payload_mass / Payload mass [kg]
stages / Number of vehicle stages
propellant_type / Row array of propellant types associated with the stage number in the form [ type_stage(i) ]
tank_material / Row array of tank material types associated with the stage number in the form [ type_stage(i) ]
launch_type / Launch type: (G)round, (B)alloon, or (A)ircraft

Outputs:

All of the variables that returned by the function are described below:

Variable Name / Description
trajectory_input / String of trajectory input data generated by the code
argout_count / Number of output arguments in the varargout array
varargout / Variable length array of output variables.

User’s Guide forfnc_analyze.m

Written by Justin M. Rhodes

Revision 1.0 – 17February2008

Description:

The function fnc_analyze.m allows a user to input a MAT model name in the form XX-XX-XX-XX and an array of delta V values to run through the MAT analysis code. The results of each model case are stored in a comma-delimited file.

Call line:

The function can be called with the following line of code:

fnc_analyze(model_name, delta_v)

Important notes:

The model name format is in the following form:

(Payload Size)(Launch Type)-

(Stage1Propellant)(Stage1Tank)-

...-

(StageNPropellant)(StageNTank)

Payload Size can have the values of (S)mall, (M)edium, or (L)arge.

Launch type can have the values of (G)round, (B)alloon, or (A)ircraft.

StageNPropellant can have the values of (C)ryogenic, (S)torablesoli(D), or(H)ybrid.

StageNTank can have the values of (S)teel, (A)luminum or (T)itanium.

The wildcard value (X) can be substituted for any part of the model name. This will cause the code to analyze all possible options for that position.

Inputs:

All of the variables that are passed into the function are described below:

Variable Name / Description
model_name / MAT model name in the form described above.
delta_v / Row array of delta V values [m/s]

Outputs:

The function writes a comma delimited file. The filename consists of the model set run and the date and time of execution.

Example file name: ModelAnalsysis_XX-CX-XX-DX_Mar222008_202723.txt

Compiled by: Justin Rhodes