CAD to DAGMC#
A package that converts CAD geometry to DAGMC h5m files, unstructured mesh files (VTK), and Gmsh (msh) files ready for use in neutronics simulations.
Workflow#
CAD geometry is given a material tag per volume, meshed by one of three backends, then written out. The DAGMC h5m file is written by the h5py or pymoab writer, while the unstructured mesh vtk and GMSH msh files are written by the meshing backend itself. A GMSH mesh is already meshed, so it converts straight to a DAGMC h5m file.
export_dagmc_h5m_file() can write the DAGMC h5m file on its own, or write it
together with a conformal unstructured mesh vtk file from a single meshing call.
Pass unstructured_volumes on the gmsh backend, or tet_volumes and
target_edge_length on the cad-to-dagmc-mesher backend, and it returns both
filenames. See Conformal Meshes.
Key Features#
Multiple Input Formats |
Flexible Material Tagging |
- CadQuery objects |
- Manual tags |
Three Meshing Backends |
Multiple Output Formats |
- GMSH (full control, volume meshing) |
- DAGMC h5m (surface mesh) |
Two H5M Backends |
Advanced Options |
- h5py (default, no MOAB needed) |
- Per-volume mesh sizing |
Getting Started
Material Tagging
Meshing