JSON Objects: Units and Geometry

The scenario json format shares a lot of structure between the different physics. The common components are detailed here. All scenario json files start with a top-level object, which contains a few common attributes.

{
  "boundary_conditions": [ ... ],
  "geometry": { ... },
  "materials": { ... },
  "metadata": { ... },
  "scenario_name": "Name_for_output_files",
  "type": "<physics type>"
}

Geometry

Specifying geometry in scenario json has two pieces. First, a collection of components must be defined. Each component has a geometry type, a file to load, a material id, and a component id. The other component to specifying geometry is an assembly of components. The material id needs to match a material defined in the materials object from the scenario object. Each component needs a unique integer id.

Geometry::Mesh

There are four types of geometry that can be used with components. The most common is to use a triangle mesh to specify the surface of a volume. These triangle meshes can be loaded from both ply and stl files.

{
  "file": "block.ply",
  "geometry_type": "Mesh",
  "id": 1,
  "material": "Acrylic"
}

Geometry::VDB

Geometry can be specified with an openvdb double grid file.

{
  "file": "demo.vdb",
  "geometry_type": "VDB",
  "id": 2,
  "material": "Steel"
}

Units

There are several places in the json format where units can be specified. The possible values are listed here.

"MeterKilogramSecond"
"CentimeterGramSecond"
"MillimeterMegagramSecond"
"FootPoundSecond"
"InchPoundSecond"