Cancel
Showing results for 
Search instead for 
Did you mean: 

Prebuilt rocket simulation in STAR-CCM+ for academic rocketry teams

Siemens Valued Contributor Siemens Valued Contributor
Siemens Valued Contributor

This article shows how academic rocketry teams (ex: Spaceport America Cup) can use the attached simulation to simulate compressible external flow and nozzle flow while allowing the user to very easily make changes to the geometry through parametric CAD that is integrated into the existing simulation setup. It’s also easy to change the chamber and atmospheric pressure along with the freestream flow Mach. Note that this is a multiphase simulation since it includes both air for the external flow and exhaust gases for the nozzle flow. Including both phases helps increase the accuracy of the thrust calculation.

 

rocket.png

sim3.PNGsim2.PNGsim1.PNG

The CAD of the rocket built into STAR-CCM+ mimics the common designs seen amongst Spaceport America Cup rocketry teams. This simulation allows the user to change the:

  • Nose shape
  • Shape and number of the fins
  • Shape of the fuselage
  • Shape of the nozzle

 

GETTING STARTED

  • This simulation is built in 13.02, so you will need to open this in version 13.02 or later.
  • The simulation has been cleared of mesh and solution to reduce its file size so that it can be attached here. Once the file is download, extracted, and opened you will need to mesh this. Once it's done meshing, ctrl select all scenes, right click, apply representation, volume mesh.

 

CHANGING THE CAD

To change the CAD, first open the simulation, right click 3D-CAD Model 1, and edit. In the feature tree you can see that a sketch was used to create the fuselage and domain which was then revolved -90 degrees. The domain was only rotated 90 degrees so that the computational domain covers a quarter section of the rocket and assumes symmetric boundary conditions. After this a plane was created for the fins, the fin sketches were created from this and were then extruded. I created 2 fins, but the front fin is placed in a manner so that it is not included in the simulation since most teams do not use this. If you want to use it, simply edit the sketch for fin 1 such that the fin is positioned as you want it. Note that the plane used to create the fins sketches is rotated by 45 degrees so that it sits in the center of the domain (90 degrees/2 = 45 degrees). You can see this when clicking the fin plane and looking at the bottom left properties window – it says [45.0, 0.0, 0.0] deg. If your rocket has 3 fins, simply change the revolve from -90 degrees to -120 degrees (360 degrees/3=120 degrees) and the fin plane to 60 degrees (120 degrees/2=60 degrees) for the X axis value. If you want to change the nose, fuselage, or nozzle shape you can either change the design parameters on the bottom left of the screen and then iteratively update the CAD. However, for interactive CAD changes you can right click and edit the domain and body sketch and then change the parameters directly in the sketch itself or delete these parameters and use your mouse to move the sketch/split vertices.

 

If you have pre-existing CAD, I would recommend importing this into STAR-CCM+ and then altering the prebuilt CAD in STAR-CCM+ around so that it matches your preexisting CAD. Once you are in the 3D-CAD model you can import your CAD by right clicking to top node (in this case, it’s called 3D-CAD Model 1), import, CAD model. I would recommend importing a Parasolid file (.x_t or .x_b). Once it’s in you’ll likely need to move it around which can be done by right clicking the bodies that just came in and selecting translate or rotate.

cad1.pngcad2.PNG

Note that you don’t have to use the CAD built into STAR-CCM+, this was merely done to streamline the CAD to simulation process because having the CAD built directly into STAR-CCM+ makes simulating changes to the CAD much faster and most teams use the same geometric layout. You can import your CAD using the process mentioned above but you’ll first need to name your surfaces for the fins, nozzle, etc as it’s shown in the current simulation, next you’ll need to ensure there is a clean watertight seal on the CAD, and then finally transfer the 3D CAD to the parts level. From there you’ll need to feed this into the existing mesh setup and the corresponding boundaries.

 

 

HOW TO RUN THE SIM

This section gives an overview of how the meshing was setup, but for general use the main thing you need to use is the java macro that comes with this (added to attached zip file on 7/2/2019). Just simply play it using the blue play icon at the top. This allows you to make any change to the CAD, atmospheric pressure, chamber pressure, etc and run a new simulation to completion with an adaptive mesh. More on the adaptive meshing is shown below.

 

 

HOW THE MESHING WORKS

You can see that the CAD from STAR-CCM+ is fed automatically to the parts level where it is tessellated. That part then this is fed into an automated mesh setup where the surface is remeshed and then a volumetric mesh (trimmed with prism layer) is generated. This part is also connected to the region lower in the simulation tree, where the resulting mesh and models are applied.

 

Note that there are various controls setup for the refinement of things like the nozzle, fins, etc and coarsening of the external domain surfaces (inlet, outlet, symmetry). This is not enough to automatically capture all external shocks though since the cell size grows the further you get from the rocket. Therefore, I have setup a table-based refinement to refine cells based on a threshold of density gradient. To see how this was setup in STAR-CCM+ see the following parts of the simulation:

  • Tools, field functions, density gradient
  • Tools, field functions, cell width
  • Tools, field functions, refinement
  • Tools, tables, refine
  • Geometry, operations, automated mesh, meshers, trimmed cell mesher, and (in the properties window, bottom left) field function refinement table

 

This shows chronologically how the density gradient and cell width functions were made, how these were used in another function to return appropriate cell size values, the output of that new function populated a table, and that table was applied to the mesher.

 

I would like to clarify what the refinement function is doing:

(${WallDistance}<0.008) ? 0 : (${Density_Gradient} > 0.045) ? max(${Cell_Width}/2,0.0125) :

This states that if the wall distance is less than 0.008m return a value of 0, if not – where the density gradient is more than 0.045 return a value of the current cell width divided by 2 (cell width is the other field function mentioned above) but never go lower than 0.0125 meters. If you would like to refine the mesh even further, you could reduce the value of 0.0125 in the function above to 0.00625.

 

This is used in an automated process where the sim is run without any table refinement turned on at first so the density gradient field will develop, then the table is turned on to identify which cells to refine, it’s meshed again (the existing solution is automatically mapped over at the end of the meshing process in STAR-CCM+), and the run is continued. A java macro has been developed for this so that it automates everything and repeats the table refinement process to expand the shock refinement zone. The attached java macro does the following:

 

  1. Turn table off
  2. Clear solution
  3. Mesh
  4. Set stopping criteria for the simulation to 100 solve iterations
  5. Run
  6. Turn table on
  7. Set table to volume mesh representation (so it extracts data from the mesh, now that we have a mesh)
  8. Extract the current data and put this into the table (1st time)
  9. Adjust the stopping criteria for the simulation to 200 solve iterations
  10. Mesh
  11. Run
  12. Extract the current data and put this into the table (2nd time)
  13. Adjust the stopping criteria for the simulation to 300 solve iterations
  14. Mesh
  15. Run
  16. Extract the current data and put this into the table (3rd time)
  17. Adjust the stopping criteria for the simulation to 400 solve iterations
  18. Mesh
  19. Run
  20. Extract the current data and put this into the table (4th time)
  21. Adjust the stopping criteria for the simulation to 1500 solve iterations
  22. Mesh
  23. Run

Here is a snapshot of the mesh scene showing the refinment function and it's output for cell size refinement size:

sim4.PNG

 

 

HOW TO CHANGE BOUNDARY CONDITIONS

  • You should adjust the exhaust conditions so that the dynamic viscosity, molecular weight, and specific heat match the properties for your engine. This will affect predicted thrust and possibly drag. You can calculate these properties here: https://www.grc.nasa.gov/www/CEAWeb/. To change these properties go to physics, models, multi-component gas, gas components, exhaust gas, and material properties.
  • To simulate the rocket at a different altitude, change the reference pressure (this sets the gauge pressure) by going to physics 1, reference values, reference pressure.
  • To change the chamber conditions such as the pressure and/or temperature, go to region, boundaries, chamber, and physics values.
  • To change the freestream conditions such as the Mach number and/or temperature, go to region, boundaries, freestream, and physics values.

 

 

HOW TO REVIEW THE RESULTS

There are various plots under the plots node that cover aspects such as thrust, residuals, drag, etc vs solve iteration and plots for pressure along the nozzle wall vs position. Under scenes, the two primary scenes (mesh and results) each have multiple displayers built into them that are meant to be turned on and off as needed. For example, if I want to see what is being refined while in the mesh scene I can turn on the “refinement function” displayer by double clicking it. Then if I want to see wall y+ values, I can double click the existing displayer to turn it off and double click the new wall y+ displayer to turn it on.

Note that both plots and scenes automatically update while the simulation is running. Please also keep in mind that displayers within a scene cannot be turned off or on while the simulation is running – it must be stopped first. Once it’s stopped you can make the adjustment and then continue the run.

 

6 REPLIES 6

Re: Prebuilt rocket simulation in STAR-CCM+ for academic rocketry teams

Experimenter
Experimenter

Chris, 

 

For teams utilizing 3 fins, how would you suggest subdividing the domain for the best results? Is it valid to use a domain angle of 120 deg and have the two interior (tan colored in the images) both be symmetry planes? (See attached)

 

Thanks!

Re: Prebuilt rocket simulation in STAR-CCM+ for academic rocketry teams

Siemens Valued Contributor Siemens Valued Contributor
Siemens Valued Contributor

Hello,

 

It looks like you already have the domain set to a 120 degree revolve which would be correct as the 360deg/3 fins=120 deg... so that part is right. I'm trying to understand what you mean here:

    "...how would you suggest subdividing the domain for the best results?"

 

Are you referring to sudividing the volume of the computational domain in order to create a structured mesh? Or do you mean splitting surfaces to create separate boundaries? On both fronts the simulation setup as is will work great without any user input. Creating different subdomains is not needed because an unstructured trimmed and prism layer mesher is used which do not require this. Even for structured meshing in STAR-CCM+ (through our directed mesher) you do not have to make separate domains - you just specify the meshing points and areas interactively in a scene. Honestly though, I would not reccomend using the directed mesher for this application as the reduction in computation time you would see from a optimized structed mesh would not outwiegh the time invested in creating it and then adjusting for shock refinements for each run. The unstructured mesh used in this simulation combined with the java macro automates the entire mesh generation and mesh refinement process through an adaptive meshing process. Please let me know if that answers your question. 

Re: Prebuilt rocket simulation in STAR-CCM+ for academic rocketry teams

Experimenter
Experimenter

Thank you Chris, 

 

I was having trouble getting the adaptive meshing to run properly when I changed the angle of the domain and the fin, I'm not sure why I initially thought it was due to the boundary defininitions, so you more than answered my initial question. 

 

I was trying to manually run through the table updates and remeshing before you added the macro, but even with the macro running on an as-downloaded "3d_rocket_multiphase_v4_cleared", I get an error saying that there is "no valid data in the table Refine". (see image)

 

Is there any steps that need to be taken before playing the macro in order for it to work?

 

Thanks, 

 

Josef

Re: Prebuilt rocket simulation in STAR-CCM+ for academic rocketry teams

Siemens Valued Contributor Siemens Valued Contributor
Siemens Valued Contributor

Thank you for pointing this out, I just corrected a few things in the sim. Can you download the new file and re-run this? It should work now. 

Re: Prebuilt rocket simulation in STAR-CCM+ for academic rocketry teams

Experimenter
Experimenter

Chris,

 

The macro now seems to progress further, but I have not yet got as much refinement as the images show in your model. (I guess I should mention I am running 13.06.12 if that matters at all)

 

I opened v5 and ran the macro and it seemed to work, however it ran longer than I expected (around 1500 as indicated in the macro). I stopped it at around 3400 iterations at which point it threw the same "No valid data in table: Refine".

 

The mesh scene shows that the refinement level is lower than expected.

 

Do you have any other suggestions? If its helpful I can attach some of the output file as well.

 

Thanks, 

 

Josef

Highlighted

Re: Prebuilt rocket simulation in STAR-CCM+ for academic rocketry teams

Siemens Valued Contributor Siemens Valued Contributor
Siemens Valued Contributor

Thank you again, I ran the macro last night and ran into the same thing. I figured out that when I cleared the mesh that the representation of the table was setting itself to "Latest" instead of Volume mesh which resulted in it not extracting data. I added a line in the macro so that it adjusts this before it extracts data. I then tested this macro on the cleared sim file and it works. I have the updated sim file and macro attached. Thank you again for letting me know about this, if you have any further problems please let me know.