This tutorial will take approx. 60 minutes to complete.
In this tutorial we will go through the advanced features of Valispace and apply them to a coarse design model of a Saturn V Rocket which helped the mankind to reach the Moon 50 years ago.
Please note: Since this tutorial is not a step-by-step instruction, but rather a rough guide through the main steps, we highly recommend that you complete our beginner's Fan Tutorial Part 1 and Part 2 to learn the basic operations of Valispace, and then build your own Saturn V Rocket with the help of this tutorial.
This tutorial aims at improving your skills of:
-> usage of
-> Using the Catalog to import components
-> Component Modelling incl. alternatives
-> Mode Management to handle mass differences along the mission timeline
-> How to use requirements, verifications and implement rules
-> How to use the build in simulation module
-> And it might also teach you a thing or two about actual Rocket Science ;)
(1) Let's build the Rocket and its Stages
Saturn-V is a 3-stage rocket with the Apollo spacecraft (Command Module + Lunar Excursion Module) as the payload. The stages and the spacecraft designs are coordinated and built by different contractors.
Let's now give you an overview of all the Saturn V stages.
Overview of Stages
S-IC (S-One-C) was built by the Boeing Co.
S-IC stage is component with - a
OxidizerTankand five connected copies of
- S-II (S-two) was a high thrust cryogenic second stage built by the North American Aviation
- S-II stage design is component with - a
OxidizerTankand five connected copies of
- S-IVB (S-four-B) was a high thrust cryogenic third stage built by the Douglas Aircraft
- S-IVB stage is a component with - a
- The Apollo spacecraft, stacked at the top of the rocket was built by the Grumman Co. and you can find their latest stage design for their build [here].
- The basic design relevant for us contains the
Importing the Stages
For your convenience, the contractors who made the rocket have joined forces and made a package for you to readily import into Valispace, how nice of them!
To access the package, go to the Catalog website and log in with the following credentials:
- Username: catalog
- Password: valispace
Once you are logged in, navigate to the project
Saturn_V_package and go to the Components module.
- Here, right-click the component
To_The_Moonand click "Export JSON". This will create the package locally on your machine.
- Now, go back to your own deployment and click the user symbol in the top left corner of your screen.
- Here, click "Import" and drag and drop the JSON zip-file into the dialog box.
- This will create a new Saturn_V project "Imported_To_The_Moon" within your workspace. This can take up to 10 minutes, as you are about to import a large file. As soon as the import has been completed, you'll get a notification in the notification area on the right-hand side.
- Alternatively, you can also import the JSON file directly into your component tree by right-clicking on a component and selecting "Import JSON".
PowerUserTip: The Valispace catalog can be used for much more, for instance for importing off-the-shelf components directly into your components tree (right-click on the components and choose
Import JSON). Make sure to give the Catalog documentation a visit to learn how to do this.
Your Valispace component tree should look like this by now:
Constants component contains constants such as fuel density and Earths gravitational acceleration. The
Rocket component contains the different Saturn-V stages and of course the Apollo module!
(2) Maintain your Requirements in Valispace
In such a complex engineering project it is always important to keep track of the system's requirements. Your colleagues collected and maintained them in a separate spreadsheet. Download this spreadsheet with the requirements here: Download Saturn V Requirements Spreadsheet and go to the Requirements Module in Valispace.
- Add a new specification and name it
- Click on the 3 dots on the top right-hand side and select
- Drag-and-Drop the spreadsheet with the requirements into the pop-up window.
- Choose the following settings to automatically import every requirement from the spreadsheet and click
- Since the components are already set up in Valispace, we can now link the requirements directly to the components. To do this, click on
Assign componenton the top and select
- For the minimum required Delta V of the rocket, add a new requirement to the specification with the ID =
LV-003and Requirement text =
The total Delta V of the rocket shall exceed the minimum Delta V required.
- Now, switch to the Components module, select the
Rocketcomponent and expand the properties of the Vali
12700as minimum requirement for this Vali.
- Switch back to the Requirements module and choose the
Verificationtab. Hover over
Requirements Textcolumn on top of the column and click on
filter. Filter for
deltato display only this requirements.
- In the
Verification Rulecolumn of the
LV-003requirement, click on
+ Add Ruleand type:
$rocket.delta_v > property($rocket.delta_v,req_min). Now, Valispace will compare the actual value of the Vali
$rocket.delta_vwith the minimum requirement of this Vali.
- As a result, you will see a red expression mark, which indicates, that the rule cannot be verified. We will fix that later. Click Done.
- One more thing: requirements can be automatically verified as soon as they fulfill the rule. To implement this automatic verification, choose
(3) Mass is not a constant value for a rocket
Since your rocket will burn fuel on its way up, its mass is not a simple constant. We distinguish between dry (when all propellant is burned up) and wet (when the propellant tanks are full) masses of each stage. Additionally, after removal of each stage a new mission phase starts. We configure this using the Modes in Valispace. You should be familiar with use of Modes from the Fan Tutorial.
The Saturn V contractors already included the modes DRY, WET and STAGE_REMOVED for their respective stages and these are included into the rocket mass, they however did not yet include the Apollo module into the rocket mass modes. Let's go ahead and do this to get a full picture of the rocket mass.
- Navigate to the
- Click on the
- If you expand the "launch_phases" mode, you can see that the first 6 stages of the mission are already included
- Now, add the last one by clicking the symbol.
- Give the last stage the name "POST_SEPARATION_3". This is how it should look like:
Now, navigate to the linked modes by clicking the symbol under launch_phases. Here, you can see that the first six stages are already setup correctly. Namely, at the end of the stage burn there is no fuel leftover so there the "DRY" mode is selected. Then, after stage separation the "STAGE_REMOVED" mode is selected.
All that is left to do is selecting the "STAGE_REMOVED" mode all three rocket stages for the "POST_SEPARATION" mode we just created.
If you did this correctly, the Linked modes should look like this:
Now that all modes are correctly defined, Valispace will automatically calculate the mass of all stages. Let's check if the Rocket Mass is correct. Go to the
Rocket component and in the Properties tab, open the
Mass matrix. If everything is correct, the matrix should look like this:
What's that? The launch mass is that low? Oh yeah, now I remember, the first stage propulsion engineer could only make an estimation of the propellant mass because he did not yet know the exact properties of the Rocket Propellant RP-1. We know now, so let's define the first stage fuel mass. To do this
- Select the
- Navigate to
FuelTankand navigate to
- Change the
PropellantMassfrom 500.000kg to (please make sure to use capital letters at the right spots):
this().Propellant * this().PropellantDensity
- This will result in a
- Go back to the Rocket component and verify that all the masses of the different stages have been changed to higher values:
this() is a shortcut to define access to Valis in the same component. I.e. if you add
PropellantMass as a Vali to Component
C, then its formula will be by default translated to:
$C.PropellantMass = $C.Propellant * $C.PropellantDensity when you save the Vali.
(4) Use Alternatives
Remember that we set a minimum requirement for the total Delta V of the rocket? In the Components Module, click on the
Requirements Tab to see if we achieved this. Filter for the
LV-003 requirement Identifier and check the
Verification Status of this requirement.
Oh, no. Still "not verified"! You ended up with a value just below the minimum of 12700 m/s.
But wait - some engineers developed on another light-weight structure for the S-IC stage with some superior new materials, which would save about 20000kg of weight. Unfortunately, it is also very expensive, which is why we did not include this option in our design.
Luckily in Valispace everything is connected, and with the help of alternatives we can easily run what-if calculations for our rocket to see if the more expensive alternative would actually be worth it - and if we'd end up with the required total Delta V. Alternatives are an easy way to switch back and forwards between different setups to check what different components mean for your project.
- Go to the
- Right-click on the
- Choose "Create Alternative". Within a couple of seconds, this will create an Alternative Container Structure where you can switch between different sub-components, e.g. "Structure_1" (the original Structure component is is now called Structure_1 and can be found in this container).
- Now, select the Structure component
- Right-click on the component and choose
In the newly created
Structure_2, change the value of the mass to 37000 kg.
- Now, click on the Alternative Container
Structure. Here, you can see and compare the Valis of different alternatives.
- To add Structure_2 as an alternative, click on the "+" symbol in the bottom right-hand side corner. Choose "Add an existing component as an alternative to this container" and select
Structure_2from the drop-down menu.
Let's select Structure_2 as alternative.
Let's see if we now meet the necessary requirements for our rocket:
- Go to the
- The mass of the
Rockethas changed to 12713.461 m/s
- Click on the Requirements tab at the top to see the verification rules for this component.
- Filter for
deltain the "requirement text" column
- Check that the requirement
LV-003has automatically been verified. Did it work? Congratulations!
(5) Lets get the Rocket off the Launch Pad - in a Simulation
In getting to the Moon, our launcher will go through numerous significant events. You can find them in this Saturn-V AS-506 Flight Evaluation Report. The first set of these events are given below. In this simulation, we will focus on the phase of the mission until the the first stage separation.
The Saturn-V will lift off from the launch pad and fly through the atmosphere. The first stage will then burn fuel until it runs out. This is the stage burn-out event. During this, the rocket will execute a Center Engine Cut-off (CECO) followed by the Outboard Engine Cut-off (OECO) at significant event 27 in the Flight events log.
We would like to know that the current design of the rocket will reach a minimum altitude and velocity at burnout in order to ultimately reach the Moon.
During the launch, our rocket engines will provide thrust to propel the vehicle upwards and beyond. The thrust will be opposed by gravity pulling the vehicle mass downwards and the drag acting opposite to the vehicle's velocity.
While we can assume thrust from the engines and the gravitational forces to be constant for our preliminary analysis, fluid dynamics tells us that the Drag is governed by the speed of the vehicle, density of the flow medium and the area properties with respect to the relative flow.
So summarizing our problem of finding our burnout parameters:
Drag is dependent on speed of the Rocket. We need to account for Drag vs Velocity (Cd vs Mach) characteristics of the vehicle.
The density of the atmosphere varies as the rocket ascends through altitudes in the atmosphere. We need to account for standard atmosphere.
As density varies, the Mach number varies with it. We need to account for speed of sound change.
Ultimately, the force required to over come the forces will define the mass spent at every instance until the burnout. We need to iterate mass with progressing time instants.
As you can imagine, these calculations cannot be done in any way we have thus far used. For complex calculations like this the Simulations module in Valispace comes in handy.
We prepared a simple simulation of the above scenario using the standard atmosphere and Cd vs Mach characteristics from Saturn-V documentation. With simple Euler integration formulation of equation of motion, we ultimately iterate over the following equation until all the stage fuel is burned.
To save you the time, we have the simulation script right here. To get the simulation running, follow these steps:
- Copy the script text from the link.
- In your Valispace window, go to the
Simulationstab in the project navigation pane.
- In the function region, paste the script code for the simulation and press Save. The Octave engine constructs the function out of this script.
- Let's now configure the input and output parameters of this function an tie them to the variables in the function
- Add inputs: the dry mass
S_IC.Mass.DRY, the wet mass
S_IC.Mass.WETand the total Rocket Launch Mass
Rocket.Mass.LAUNCHthat we already have in our valispace project.
- In the
NAMEcolumn, we enter the name of the variable in the function that corresponds to the output valis. Thus, we have:
- Before we can add outputs, we need valis for those output parameters.
- Go to the
- Create two new valis :
value = 0
unit = mand
value = 0
unit = m/s
- Now that the Valis exist, we can bind them the simulation that you just saved. Go back to the
Simulationmodule from the left navigation tab and add the two parameters as outputs.
- Now your valis are linked to the simulation. The simulation is in turn linked to the overall design of the stage. Your simulation parameters should look like this:
- Add inputs: the dry mass
This means that, on any change in the design you only have to re-run the simulation with a simple click of a button and all the dependent burnout parameters are updated in Valispace.
(6) Comply with the Requirements
To make sure that we will always meet the rocket's requirements, we will use the Requirements Module once more. This time, however, we will use another approach.
- Go to the Requirements Module.
- Hover over the
Textcolumn on top of the column and filter for
S-IC. Now, only 2 requirements get displayed. When reading the description you'll notice that your colleagues put some actual values inside. But, to actually use these in Valispace, for instance instance in the Components or Analysis module, we will create a Vali for these requirements
- Click inside the requirements text of
- In the pop-up select
- Enter the following information:
Unit= kmand click
Create & Insert
- Hover over the value in the requirements text to check if everything is correct:
- Repeat the steps for
LV-001-4B- for the Vali choose
Unit= m/sand click
Create & Insert
- Now, go to the
Verificationtab in the Requirements module
- Filter for
S-ICin the requirements text.
- For each of the requirements, add a rule with the following information:
$rocket.Burnout_Altitude > LV_001_4A.min_burnout_altitude
$rocket.Burnout_Velocity > LV_001_4B.min_burnout_velocity
- Apply the automatic verification by choosing
Verification Methodcolumn for both requirements.
Amazing - both requirements have been fulfilled and verified!
I'd say: That's one small step for a man, one giant leap for mankind. Mission accomplished.