mdpa_create_geometry_mesh
Generate a mesh for parametric shapes (annulus, disc, cylinder, sphere, polygon) and write it as .mdpa without gmsh for Kratos simulations.
Instructions
Generate a mesh of a parametric shape and write it as .mdpa (no gmsh needed). Every mesh gets a 'domain' part plus named boundary parts with conditions of condition_name (default LineLoadCondition2D2N in 2D, SurfaceLoadCondition3D4N in 3D). kind and its params: 'annulus' {r_inner, r_outer, n_radial, n_theta, angle=360, triangles=false} quads (or triangles); parts inner, outer (+ start, end for angle<360) 'disc' {radius, n_radial, n_theta} triangles; part boundary 'cylinder' {radius, height, n_radial, n_theta, n_z, inner_radius=None} prisms (solid) or hexahedra (hollow); parts lateral, zmin, zmax 'sphere' {radius, divisions} hexahedra, radially mapped cube; part surface 'polygon' {vertices: [[x, y], ...], refinements=0, holes=None, target_size=None} triangles by ear clipping + midpoint subdivision; parts side_0, side_1, ... plus hole_ per hole loop; holes is a list of vertex loops strictly inside the polygon; target_size adds subdivision rounds until no edge is longer than it (at most 6 rounds total, best effort). Graded sizes without gmsh: size_field is an expression of x, y (e.g. "0.1 + 0.3sqrt(xx + y*y)") and/or size_sources a list of {"point": [x, y]} or {"segment": [[x0, y0], [x1, y1]]} with "size" (edge length at the source) and "growth" (default 0.3, length gained per unit distance); the minimum of all wins. The mesh is refined by conforming longest-edge bisection until every triangle's longest edge fits the local size (max_elements=200000 guards runaway sizes), smooth_iterations=0..100 then Laplacian-smooths interior nodes. element_name overrides the element type (default: SmallDisplacement elements of matching node count). For CAD input or quality-driven meshes use mesh_generate_gmsh.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| path | Yes | ||
| params | Yes | ||
| overwrite | No | ||
| element_name | No | ||
| condition_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||