NEMoSys  0.63.0
A modular, extensible resource with robust automated mesh generation, mesh quality analysis, adaptive mesh refinement, and data transfer between arbitrary meshes.
Mesh Conversion

Promesh provides conversion between mesh formats.

A conversion JSON file contains two sections: "Mesh File Options", where the names of the input and output meshes are provided, and "Conversion Options" where the conversion method is specified. Most conversion methods also have their own additional requirements.

{
    "Program Type": "Conversion",
    "Mesh File Options": {
        "Input Mesh File": "input.msh",
        "Output Mesh File": "output.vtu",
    },
    "Conversion Options": {
        "Method": "GMSH->VTK"
    }
}

Mesh conversion options include:

If CFMesh is available, further options are:

Within the "Conversion Options", requires:

  • Number of Mesh: the number of meshes (must be at least one)
  • Mesh Data: block which contains:
    • File: the mesh's file name (Required)
    • Name: the mesh's name (Optional, default "default")
    • Use Physical Groups: can be true or false (Optional, default false)
    • Node Sets: gives an array listing the node sets, if any
    • Element Blocks: gives an array listing the element blocks, if any
    • Free Surface Side Set: can be true or false (Optional, default false)
    • Split Top and Bottom: can be true or false (Optional, default false)
    • Side Set Names: (Optional)
    • Element Block Names: (Optional)
    • Add Global Node Set: (Optional)
  • Post Processing: requires a post processing file in JSON format to be specified
  • Number of Tasks: (default 0)
  • Tasks: blocks should correspond with the number of tasks input above
    • File:gives the name of the task file.

An example "GMSH->EXO" JSON file named gmsh2exo.json can be found in the testing/test_data/ep16pre directory.

Requires no additional keywords or specifications.

Within the "Mesh File Options", requires:

  • Output Patch Map File: which is a .cgi file.

Within the "Conversion Options", requires:

  • BC Info:
    • Patch Number: corresponds to numbers assigned to patched within the VTK file
    • BC Type: can be either: "Face" or "Node", which changes the following options as described:
    • RocFrac FSI Type: can be 0, 1, or 2 (for "BC Type": "Face")
    • Structural: can be true or false (for "BC Type": "Node")
    • Mesh Motion: can be true or false (for "BC Type": "Node")
    • Thermal: can be true or false (for "BC Type": "Node")
    • RocfracControl Type: can be 1, 2, or 3 (for "BC Type": "Node")
  • Node Patch Preference: lists the preferred order for the node patches

An example "VTK->PATRAN" JSON file named vtk2patran.json can be found in the testing/test_data/PatranGenTest directory.

Within the "Conversion Options", requires:

  • Check Conversion Quality: can be either true or false
  • Dimension: can be either 1, 2, or 3
  • Block Data: a JSON file may have one or more of these sections, depending on the number of blocks present in the mesh
    • Element Order: can be 1 or 2
    • Equation Order: can be 1 or 2
    • Element Type: can be "BAR" for 1D, "TRIANGLE", "QUADRILATERAL", or "HEXAGON" for 2D, or "SPHERICAL", "CYLINDRICAL", "BRICK", "LAGRANGE_BRICK", "TETRAHEDRON", "HEXPRISM", or "PRISMATIC" for 3D. "OTHER" is also an option.
    • BC Tag: can be "VOID" "REFLECTIVE"
    • Name: is the name of the region
    • Element ID Range: can be two integers enclosed in square brackets, ie [0, 5], representing all integers from 0 to 5
    • Element ID: can be an array of integers enclosed in square brackets, ie [0, 1, 2]

Note that either "Element ID Range" or "Element ID" should be specified for each block.

Example "VTK->PNT" JSON files named bench1.json, bench5.json, and bench6.json can be found in the testing/test_data/PNTGenTest directory.

Requires no additional keywords or specifications.

Requires no additional keywords or specifications.

Requires no additional keywords or specifications.

Requires no additional keywords or specifications.