There are three workflows embedded within the Pack Mesh engine to generate 3D hex(-dominant) multi-material meshes, 3D periodic tetrahedral multi-material meshes, and 2D surface meshes using input pack geometries in the form of an stl file or a Rocpack geometry file. The basic workflow is as follows:
cellZones
.Pack Mesh JSON Template
{ "Program Type": "Pack Mesh Generation", "Mesh File Options": { "Input Rocpack File":"packs_roc", "Output Pack Mesh File": "geom_pack_mesh.vtu", "Output Surrounding Mesh File": "geom_surrounding_mesh.vtu", "Output Combined Mesh File": "packmesh.vtu" }, "Pack Mesh Options": { "Type": "hexahedral", "Engine": "packmesh", "snappyHexMesh Parameters": { ... }, "blockMesh Parameters": { ... }, "MeshManipulation mergeMeshes Parameters": { ... }, "MeshManipulation createPatch Parameters": { ... } } }
Pack Mesh uses snappyHexMesh and blockMesh to generate meshes of packs in surrounding material.
For snappyHexMesh and blockMesh, only parameters that are required or are specific to Pack Mesh are included here. For other options, check the reference manual pages for those meshing engines.
Four files are referenced in the "Mesh File Options"
section of the pack mesh generation JSON input file:
Input Rocpack File
: the Rocpack file from which the pack mesh will be generated. If using an stl file, instead specify with Input Geometry File
Output Pack Mesh File
: the mesh of the packed objects.Output Surrounding Mesh File
: the mesh of the surrounding medium.Output Combined Mesh File
: the combined pack and surrounding medium meshes.Type
: One of "surface"
or "hexahedral"
. RequiredEngine
: "packmesh"
RequiredsnappyHexMesh Parameters
: RequiredCastellated Mesh
: If true
, enables castellated mesh option. RequiredSnapping
: If true
, enables surface snapping option. RequiredLayer Addition
: If true
, enables adding layers. RequiredGeometry Definition
: Required Enable Multi Patches
: Should be enabled if the geometry file has more than one patch. Required Input Patch Name
: If specified, will be assigned to the entire surface of the provided geometry. RequiredCastellated Mesh Controls
: Required CellZones
: If true
, indicates that there will be multiple disconnected regions within the mesh. Required RegionRefine
: If true
, indicates additional refinement regions. Required SurfaceRefine
: If true
, indicates additional refinement surfaces. RequiredblockMesh Parameters
: RequiredInput Dict File
: Specifies the input file, if any. false
indicates no input dict should be used. RequiredscaleToMeters
: Scales all input lengths from the default of meters.To set to millimeters, set to 0.001NumCells
: Number of cells in each direction [x, y, z].For 40 cells in every direction, set to [40, 40, 40]Block Parameters
: Required InitialPoint
: Location of reference point, [x, y, z] Required if not setting "Auto_Generate"
Length
: Side length in each direction [Lx, Ly, Lz]. Required if not setting "Auto_Generate"
Auto_Generate
: Automatically generate the bounding box. Required if "InitialPoint"
and "Length"
are not specified Offset
: Required if "InitialPoint"
and "Length"
are not specifiedMeshManipulation mergeMeshes Parameters
: Options for combining the pack geometries to bring them under one mesh. OptionalMaster Region Path
: Specifies the input file, if any. false
indicates no input dict should be used. OptionalAdd Region Path
: Specifies the input file, if any. false
indicates no input dict should be used. Optionaloverwrite?
: Should always be set to true
for multi-material meshing. OptionalMeshManipulation createPatch Parameters
: Sets names for the patches used. OptionalSurrounding PatchName
: Specifies the name for the surrounding medium. OptionalPacks PatchName
: Specifies the name for the packed material. OptionalSurrounding PatchType
: Specifies the patch type (either patch
or wall
) for the surrounding medium. OptionalPacks PatchType
: Specifies the patch type (either patch
or wall
) for the packed material. Optionaloverwrite?
: Should always be set to true
for multi-material meshing. OptionalFour files are referenced in the "Mesh File Options"
section of the pack mesh generation JSON input file:
Input Rocpack File
: the Rocpack file from which the pack mesh will be generated. If using an stl file, instead specify with Input Geometry File
Output Pack Mesh File
: the mesh of the packed objects.Output Surrounding Mesh File
: the mesh of the surrounding medium.Output Combined Mesh File
: the combined pack and surrounding medium meshes.Type
: One of "surface"
or "hexahedral"
. RequiredEngine
: "packmesh"
RequiredPeriodic 3D Mesh
: RequiredPhysical Group Options
: One of "None"
, "Multi Physical Groups"
, "Two Physical Groups"
, or "Physical Group per Shape"
Optional; default is "None"
Create cohesive elements
: If true
, creates zero-thickness 3D elements between the pack and the surrounding region. Optional; default is false
Enable Patches
: If true
, enables writing of surface patches in the final mesh. Optional; default is false
Set Periodic Geometry
: Optional; default is false
Element Order
: Either 1 or 2 Optional; default is 1Custom Domain
: Optional Initial
: Length
:TransferMesh
: Specifies translation in the [x, y, z] directions. OptionalMesh Size
: OptionalMesh Algorithm
: Options are 1, 2, 5, 6, 7, 8, or 9 for 2D meshes and 1, 4, 7, 9, or 10 for 3D meshes; see below. Optional; default is 1Scale Value
: Sets the amount of reduction, from 0 to 1, with 1 being no scaling OptionalRemove geometries on boundary
: If true
, any geometry intersecting the boundary will be removed Optional; default is false
Enable Default Outputs
: Optional; default is false
Enable Size Preservation
: If true
, pack size is preserved instead of packing fraction. Optional; default is false
Refinement Levels
: Refinement applied to the original mesh. OptionalUpper Threshold
: Upper threshold for filtering with respect to mean. OptionalLower Threshold
Lower threshold for filtering with respect to mean. OptionalMeshing Algorithms for 2D
Meshing Algorithms for 3D