Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tutorials

Locating Examples

The Rocstar source code comes with a set of examples and test problems in the main source directory under Examples.

Use Cases for Rocstar

Attitude Control Motor with Rocflu and Rocflo

This section is adapted from the ACM Rocflu and ACM Rocflo presentation.

For information on setting up and running the Attitude Control Motor example problem please see the Rocstar Quickstart Guide. Running the problem as described in the Quickstart Guide can take a while to complete. To shorten the problem to run in a more timely fashion, make the following changes after following the directions in the Guide.

Problem Description

The goal of this example is to assemble and run a moving-boundary, fluid-combustion coupled problem using Rocflo and Rocflu. The problem consists of a small (2 inch) attitude control motor, which is represented using a block-structured hexahedral mesh. A key aspect of this simulation is the regressing buring surface.

The motor is two inches long and it features fluid-combustion coupling. The fluid model has unstructured tetrahedral grid. The goal of this example is to assemble and run moving-boundary fluid-combustion coupled run with Rocflo.

ACMflo.png
Attitude Control Motor (ACM)
Preparing Rocflu Input

First, using CAD software such as Pro/Engineer you export IGES format. Then you should be able to make simple geometries in Gridgen. Particularily for Rocflu, it is set unstructured mixed meshes. Meshes can be tets, hexes, prisms, and pyramids.

Now you need to set up NDA with grids and input files. Choose a "casename"; in this case it should be set ACM. Grid and boundary condition map files. Basic input, boundary conditions, controls files.

After all this gets done, we can preprocess and partition using Rocprep on NDA.

Rocflu Boundary Conditions

For Rocflu Boundary Conditions, following requirement should be met:

  • Make sure Analysis Software is set to COBALT
    • Can't fix after setting BCs.
  • Make sure all external surfaces have a BC
  • BC labels not that important for COBALT - will map to patches through the <casename>.cgi file
  • Using all custom BC's is advisable for book keeping purpose
  • Seperate BC for each physical bc/motion constraint pair.
Export Rocflu Grid

You can export COBALT mesh and BC files for Rocflu Grid. They folloing this format.

  • Export files :
    • COBALT mesh : <casename>-COBALT.inp - example: ACM-COBALT.inp
    • BC file <casename>-COBALT.bc - example: ACM-COBALT.bc
  • If working on Windows, run dos2unix on them once on Linux
    • Fortran doesn't like cross-platform line endings.
exportrocflugrid.png
Run Rocprep on NDA

This example can be run in the same manner as the other examples discussed elsewhere. Follow the procedure from the Rocstar Quickstart Guide but using the following commands specific to this example. Rocprep is Rocstar's dataset preparation tool. It takes an initial dataset and pre-processes it accordingly for a given problem. Datasets that have not yet been preprocessed are referred to as Native Data Archives. Use the following command for rocprep:

rocprep -A -u 1 1 -b -d /IR/NDAs/ACM16 -n 16 [-p ~/build/bin/]

All directories and paths mentioned below are within the data directory generated by running the rocprep command.

  • In RocstarControl.txt change the following variables:
    • MaximumTime = 3.0e-5
    • OutputIntervalTime = 6.0e-7
  • In Rocflu/Modin/ACM.inp in the PROBE section change the following variable :
    • WRITIME 0.0000006
ACM.bc file

ACM.bc file resides at NDAs/Rocflu/Modin and "patch" defines Rocflu boundary condition. Patches correspond to Gridgen BC definitions on specific sections of the model. Following image is the example screen shot of ACM.bc file :

acmbc.png
ACM.cgi

ACM.cgi file also resides at NDAs/Rocflu/Modin and it maps Gridgen BC numbers to Rocflu .bc boundary condition definitions. It is functionally same as Rocflo <casename>.bcmp file. Following image is the example screen shot of ACM.cgi file :

acmcgi.png
Examine RocfluControl.txt

Make sure that you have casename correct in RocfluControl.txt. It is used for Rocprep and Rocflu to know what other files are called. Make sure it is used consistently throughout the files. Normally the other lines will alwayes be the same. Following figure is to help you get the sense of what it should look like :

examinerocflucon.png
Physics Module Files (Rocflu)

ACM.inp, denoted as labscale.inp in this case, also resides at NDAs/Rocflu/Modin. It controls various parameters of the physcis module. Following images are the example state of ACM.inp.

phymodfile1.png
phymodfile2.png
Examine Rocstar Control Files for ACM

RocstarControl.txt resides at the top directory of the NDA. There should be a directory called Rocman, and in there you can also find RocmanControl.txt. Following images show the important parameters to be set in order to run the example.

examroccon.png
RocburnAPN for ACM

Burn rate is one of the only places in Rocstar that is not strictly SI units (meters)

Rocburnapn.png
Run ACM problem

In order to run the problem, you will need to set up a batch-system specific job script for your system. Depends on your choice of the batch-system, the script can look different. Here we provide two examplary script for PBS and SBATCH.

runacm1.png
runacm2.png
Monitor Probe File(s)

Depending upon your setup, you can "watch" the probe files to monitor progress

cd Rocflu/Modout; tail -f ACM.prb_0001

The location of this probe is defined in ACM.inp

Head End Pressure Proble
headendpressure.png
Head End Pressure Probe
Visualize HDF Output

The output can be visualized by using Rocketeer. It can also translate to tecplot format. I need to learn to read the output file naming. Once a checkpoint has occurred, there will be one HDF file per processor per checkpoint.

  • Example :
    • fluid_06.100000_0000.hdf: processor 0, 0.10ms time
    • 06.100000 means 0.10E06 nanoseconds, or 0.10 ms, or 0.0001 seconds
  • fluid_xx.xxxxx_xxx.hdf are 3-D volume grid files
  • ifuid_Y_xx.xxxxx_xxxx.hdf are surface grid files
    • Y : ni=non-interacting, b=burning
Pre-run Visualization Files

For Rocflu ACM, pre-run visualization file are available for 0ms, 5ms, 10ms, 14ms. You can load these into Rocketeer from VizData directory

Preparing Rocflo Input

Similar to Rocflu, you export IGES format using CAD software such as Pro/Engineer/ Then you should be able to make some simple geometries in Gridgen. Particularity for Rocflo, it is set block-structured Hex meshes.

Now you should set up NDA with grids and input files. Choose a "casename"; in this case, it should be set ACM. Grid and boundary condition map files. Basic input, boundary conditions, control files.

After all this gets done, we can process and partition using Rocprep on NDA.

cutawayof.png
Cutaway of Block Model
Database

Database is made with Pro-Engineer, exported as iges. It gets imported into Gridgen. It is almost always the case that significant clean-up is necessary; Spurious surfaces, lines that don't connect. DB below has many extraneous elements.

database.png
Assemble Block System

Once DB is clean, you can assemble, connectors, domains, and blocks. Some blocking restrictions:

  • Core block with four quarters
  • Can't combine quarter "wrap" blocks
assembleblocksys.png
Rocflo Boundary Conditions

Similar to Rocflu, following requirement should be met for Rocflo boundary conditions:

  • Make sure Analysis Software is set to generic (plot3D)
    • Can't fix after setting BCs!
  • Make sure all external surfaces have a BC
  • Make sure no internal inter-block surfaces do (all Type - 1)
  • Make note of BC numbers, as they will be needed for the .bcmp file
    • Custom BC numbers are accurate
    • Pre-set BC numbers are off by one (low)
Export Rocflo Grid
  • Export files:
    • Block volumes: <casename>-PLOT3D.grd - example: ACM-PLOT3D.grd
    • BC file <casename>-PLOT3D.inp - example: ACM-PLOT3D.inp
  • If working on Windows, run dos2unix on them once on Linux
    • Fortran does not like cross-platform line endings
      exportrocflogrid.png
Boundary Condition Map
  • Must map Gridgen BC numbers to Rocflo BC numbers
    • Form text file <casename>-PLOT3D.bcmp
      boundarycondmap.png
Rocflo Boundary Condition Numbers
  • 10 - inflow
  • 20 - outflow
  • 30 - block boundary (continous grid)
  • 60 - slip wall, grid freely moved on fixed surface by Rocflo
  • 61 - slip wall, grid freely moved on fixed surface by Rocprop
  • 62 - slip wall, grid and surface fixed
  • 63 - slip wall, surface may slide or stretch in x-direction by Rocprop
  • 64 - slip wall, surface may slide or stretch in y-direction by Rocprop
  • 65 - slip wall, surface may slide or stretch in z-direction by Rocprop
  • 66 - slip wall, surface may slide in plane by Rocprop
  • 70 - noslip wall
  • 80 - far field
  • 90 - injection
  • 100 - symmetry
  • 110 - translational periodicity
  • 120 - rotational periodicty
Run Rocprep on NDA

Running the ACM example problem with Rocflo is almost identical to the method for running with Rocflu. Following the diretions for running the Rocflu problem in the Rocstar Quickstart Guide, the only adjustments that need to be made for running with Rocflo are listed below.

  • When running rocprep use 34 partitions instead of 4
    • Use -n 34 flag instead of -n 4
  • Do not make the changes to data files listed in the Quickstart Guide after running rocprep

Finally, as in the Rocflu case, the example can be shortened to obtain results in a more timely fashion. Make the following changes to reduce the run time.

  • In RocstarControl.txt change the following variables:
    • MaximumTime = 3.0e-5
    • OutputIntervalTime = 6.0e-7
  • In Rocflo/Modin/ACM.inp in the PROBE section change the following variable :
    • WRITIME 0.0000006

The simulation time can be further shortened if desired. The results for running the simulation with the above changes are shown below for comparison. This graph is generated by plotting column one versus column six from the probe file Rocflo/Modout/ACM.prb_0001.

ACM_Rocflo_HeadEndPressure_Arial.png

Super Seismic Shock

Problem Description

The goal of this example is to assemble and run a fully coupled fluid-solid interaction prblem with significant solid deformation. This problem deals with shock wave propagation causing solid deformation. Rocflo and Rocfrac are used to solve this problem, both using a block-structured, hexahedral grid.

superseis.png
Super Seismic Shock Model Showing Pressure
File Checklist

Make sure following file structure is maintained throughout the process:

  • Rocstar
    • RocstarControl.txt
  • Rocman
    • RocmanControl.txt
  • Rocfrac
    • RocfracControl.txt
    • sss.out
  • Rocflo
    • RocfloControl.txt
    • sss-PLOT3D.bcmp
    • sss-PLOT3D.grd
    • sss-PLOT3D.inp
    • sss.bc
    • sss.inp
Super Seismic Shock

Shock in a compressible fluid travels at a speed that exceeds the dilational wave speed in a solid

  • Dilational wave speed: $c_{p} = \sqrt{(\gamma + 2\mu)/\rho}$
  • Distortional wave speed: $c_{s} = \sqrt{\mu/\rho}$
  • Fluid sound speed: $c = \sqrt{\gamma P / \rho}$

Solid material properties similar to copper

  • $E = 110 \times 10^9 Pa, \rho = 8970 kg/m^3, v = 0.33 $ Fluid material properties modified to get a sound speed similar to $c_{p}$
  • $ \rho = 1000kg/m^3 $
  • Static pressure = $ 2.584 \times 10^9 Pa $ Causes deformation of the solid due to high pressures behind the shock
  • Angle between the fluid shock and solid interface
  • Directly relevant to high explosive cylinder tests Analytical similarity solution exists
SuperSeisShock.png
width=10cm
Run Rocprep on NDA

This example can be run in the same manner as the ACM example discussed above. Follow the procedure from the Rocstar Quickstart Guide but using the following commands specific to this example.

  • Use the following command for rocprep:
    rocprep -A -o 1 4 -f 4 5 -d ${ROCSTAR_EXAMPLES}/SuperSeismicShock -t ./SSS_4 -n 4

This command should generate a directory called SSS_4, which should be ready for running the example. In order to shorten the run time of the example change the following variables.

  • In RocstarControl.txt change the following variables:
    • MaximumTime = 5.0e-6
    • OutputIntervalTime = 5.0e-7
sss.bc

sss.bc is a file that controls the inflow boundary condition. It should be set like following sample image:

sss.png
Run Super Seismic Shock Problem

Similar to previous examples, you need to set up a batch-system specific job script for your system. Below is the example batch script for SSS :

sssbatch.png
Output

You can visualize the output data with Rocketeer.

  • 3-D fluid volume, fluid_*.hdf
  • 3-D solid volume, solid_*.hdf
  • plot pressure in the fluid and stress in the solid
  • Use solid displacement vector to deform the solid mesh
  • For more information about Rocketeer, see Visualization section

The results for running the simulation with the above changes are shown below for comparison. This graph is generated by plotting column one versus column six from the probe file Rocflo/Modout/sss.prb_0001.

SSS_Probe_Pressure_Arial.png

Elastic Piston

Problem Description

The goal of this example is to assemble and run a fully coupled fluid - solid interaction problem. It consists of an impulsive acceleration of a fluid - solid interface. This example uses the Rocstar packages Rocflo and Rocfrac are used to solve this problem, both using a block-structured, hexahedral grid.

There exists an impulsive acceleration of fluid-solid interface. Rocflo is a block-structured hexahedral grid, 1m cube, pressurized to 1.5*10^5 Pa. Rocfrac is a unstructured 10 node tetrahedral grid, that is 1m cube, initially stress free.

ElasProbDes.png
Elastic Piston Model with Pressure
File Checklist

Make sure following file structure is maintained throughout the process:

  • Rocstar
    • RocstarControl.txt
  • Rocman
    • RocmanControl.txt
  • Rocfrac
    • RocfracControl.txt
    • ep.out
  • Rocflo
    • RocfloControl.txt
    • ep-PLOT3D.inp
    • ep-PLOT3D.bcmp
    • ep.bc
    • ep.inp
Create Rocfrac Mesh in Patran

Just like previous examples, DB should be imported into Patron and to create volume mesh. It has both linear and qudratic tetrahedrons and hexahedrons. There is no mixing. Rocfrac mesh should look following :

CreateRocfracMeshinPat.png
Rocfrac Mesh in Patran
Rocfrac Boundary Conditions

For Rocflu boundary conditions, following requirement should be met:

  • Loads/BCs - values are identifies only
    • Translations
    • T1 - Displacement
    • T2 - Temperature
    • T3 - Velocity
  • Pressure Settings - coupling mode
    • 0 - non-burning
    • 1 - burning
    • 2 - non-interacting
  • Assign identifies to all physical boundaries
  • identifies map to "BC Cards" in Rocfrac's RocfracControl.txt
Rocfrac Boundary Conditions Priorities

Rocfrac boundary condition priorities must be set in order to determine which BC's take precedence in presence of two or more BC's on a geometrical entitiy.

  • Ensure prioirities are set to Value, not "Add".
  • Default IO :
    • <casename>.db : Patran reference file
    • <casename>.out : Patron Neutral File required for Rocfrac preprocessing
RocfracBoundaryCondPri.png
Run Rocprep on NDA

This example can be run in the same manner as the ACM example discussed above. Follow the procedure from the Rocstar Quickstart Guide but using the following commands specific to this example.

  • Use the following command for rocprep:
    rocprep -A -o 1 6 -f 3 9 -d ${ROCSTAR_EXAMPLES}/ElasticPiston -t ./EP_4 -n 4

This command should generate a directory called EP_4, which should be ready for running the example. In order to shorten the run time of the example change the following variables.

  • In RocstarControl.txt change the following variables:
    • MaximumTime = 1.0e-4
    • OutputIntervalTime = 1.0e-5
  • In Rocflo/Modin/ep.inp in the PROBE section change the following variable :
    • WRITIME 1.0e-5

The results for running the simulation with the above changes are shown below for comparison. This graph is generated by plotting column one versus column six from the probe file Rocflo/Modout/ep.prb_0001.

Run Elastic Piston Problem

Similar to previous examples, you need to set up a batch-system specific job script for your system. Below is the example batch script for elastic piston example for PBS batch system:

RunElasPis.png
Output

You can visualize the output data with Rocketeer.

  • 3-D fluid volume, fluid_*.hdf
  • 3-D solid volume, solid_*.hdf
  • plot pressure in the fluid and stress in the solid
  • Use solid displacement vector to deform the solid mesh
  • For more information about Rocketeer, see Visualization section
Pre-run Visualization Files

For elastic piston, pre-run visualization files are available for one time dump for both Rocflo and Rocfrac. In order to do that, just load one time dump for both into Rocketeer from the VizData directory.

Selected Major Simulations

This section is adapted from the SimulationExamples powerpoint.

NASA RSRM

NASA's reusuable solid rocket motor (RSRM) represents the largest solid rocket motor ever flown. Each motor provides approximately 3-million lb of thrust to lift from the launch pad where the motors burn out approximately two minutes later. The Rocstar suite provides a burnout simulation of this rocket.

rsrm_propellant.png
The image shows the red as the burning propellant and the blue as the insulated surface.

The simulation provices unique viewing options such as a propellant/flud interface as well as inhibited surfaces. In terms capabilities, there is a high rate of "time zooming", case constraints, propellant walkback, inhibitor regression and a dynamically changing topology.