mesh_generate_gmsh
Mesh polygons, 3D shapes, or CAD files with gmsh and export them as .mdpa for Kratos finite element simulations.
Instructions
Mesh arbitrary geometry with gmsh (optional extra: uv sync --extra gmsh) and write it as .mdpa. kind: 'polygon' -- vertices [[x, y], ...] (counter-clockwise) with optional holes (list of vertex loops); physical groups become sub model parts: domain, side_ (outer edge i), hole_; quads=true recombines into quadrilaterals. 'shape' -- 3D tetrahedra of shape 'box' (shape_params {size_xyz: [lx, ly, lz], origin}), 'cylinder' ({radius, height}) or 'sphere' ({radius}); parts domain, boundary. 'file' -- mesh a CAD/geometry file (cad_file: .step, .brep, .geo, .iges...) in dimension dim; its physical groups are kept, else domain/boundary are created. size is the target element size (size_min the lower bound, default size/10). element_name / condition_name set the Kratos types (defaults Element2D3N / LineCondition2D2N / Element3D4N / SurfaceCondition3D3N). gmsh runs in a subprocess, never inside the server. Returns the mesh summary and the gmsh physical groups.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dim | No | ||
| kind | Yes | ||
| size | No | ||
| holes | No | ||
| quads | No | ||
| shape | No | ||
| output | Yes | ||
| timeout | No | ||
| cad_file | No | ||
| size_min | No | ||
| vertices | No | ||
| overwrite | No | ||
| property_id | No | ||
| element_name | No | ||
| shape_params | No | ||
| condition_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||