Simput

Simput is a tool for simplifying the process of writing and editing simulation input files. It can be a standalone tool but for HPCCloud we’ve integrated it to support input generation for simulations such as PyFR.

Usage

Parsed input

If you uploaded a file to the parent project or simulation, and the simulation type is supported by Simput then the input file will be parsed and displayed for editing. Otherwise the fields will be blank and ready for your input.

Manual input for PyFR - euler-vortex-2d

This example will lead you through the creation of an input file for PyFR using SimPut. You will create an input file that can be used with one of PyFR’s examples.

With the steps below you’ll create a similar input file to euler-vortex-2d.ini in Simput, a few changes have been made to reduce the simulation runtime. Unless mentioned below do not change default values. To begin, create a plain PyFR project and a simulation, for the simulation you will need to uplaod a mesh. Inside the simulation, to the input step and enter the values for each attribute:

Constants

  • Add three custom constants, the constants names are case-sensitive
    • S = 13.5
    • M = 0.4
    • R = 1.5

custom constants fields

Solver

  • Settings

    • Order = 3
    • set Viscosity Correction to the empty option
    • set Shock Capturing to the empty option
  • Time Integrator

    • Initial time = 0.0
    • Final time = 50.0
    • Time step = 0.005
  • skip over Artificial Viscosity and Solver Source Terms

  • Interfaces

    • clear LDG Beta and leave it empty.
    • clear LDG Tau and leave it empty.

Solver Interfaces

  • change Type to Linear

Solver Elements

  • Add one, change nothing

###Solution

For each of these sections add an item and change the Type to the section’s name.
Rename the property in the sidebar if desired.

  • type: Plugin NaN check

    • nsteps = 50
  • type: Plugin Writer

    • Disk write time interval = 10.0
    • Basedir = .
    • Output name pattern = euler_vortex_2d-{t:.1f}
  • type: ics

    • Initial Density = pow(1 - S*S*M*M*(gamma - 1)*exp(2*%(f)s)/(8*pi*pi), 1/(gamma - 1))
    • Initial X velocity = S*y*exp(%(f)s)/(2*pi*R)
    • Initial Y velocity = 1 - S*x*exp(%(f)s)/(2*pi*R)
    • Initial static pressure dist =
      1/(gamma*M*M)*pow(1 - S*S*M*M*(gamma - 1)*exp(2*%(f)s)/(8*pi*pi), gamma/(gamma - 1))
    • add the helper function: f and set it to ((1 - x*x - y*y)/(2*R*R))

If you’ve filled in each filed as instructed above go to the simulation step you’ll be able to run your simulation with the valid deck file generated by SimPut.

ics page of simput when complete

Adding simulation types

For instructions on adding simulation types follow these instructions on the Simput Github repository. In Simput be sure to add your type to the /dist folder and commit the changes.

In HPCCloud, you’ll want to have the latest Simput version installed and a new script command package.json which installs the new type:

scripts: {
"install:mytype": "cp ./node_modules/simput/dist/types/mytype.js ./dist/simput-mytype.js",
}

Add a script tag which includes the file in dist/index.html or else the HPCCloud will not detect your type.

<script src="simput-mytype.js" type="text/javascript"></script>

For the workflow view which contains Simput, adapt the view from src/workflows/pyfr/pyfr-simput/components/steps/Input/index.js.

Repository

Simput is fully open source and available at github.com/Kitware/simput.