Skip to content

VolumeMeshNamespace

VolumeMeshNamespace

VolumeMeshNamespace(manager: 'MeshPartManager')

Bases: _MeshPartNamespace

Volume-mesh factories accessed through model.meshpart.volume.

Bounds and coordinates use model length units. Rectangular subdivision counts specify cells, not points. Returned parts are registered by name; geometry/element validation errors propagate from concrete mesh constructors.

Methods:

Name Description
uniform_rectangular_grid

Generate and register a uniform rectangular Hex8 volume mesh.

custom_rectangular_grid

Generate and register a rectangular mesh from explicit axis coordinates.

geometric_rectangular_grid

Generate a rectangular mesh with geometric axis grading.

Methods:

uniform_rectangular_grid

uniform_rectangular_grid(user_name: str, element: Element, region: Optional[RegionBase] = None, *, x_min: float, x_max: float, y_min: float, y_max: float, z_min: float, z_max: float, nx: int, ny: int, nz: int) -> StructuredRectangular3D

Generate and register a uniform rectangular Hex8 volume mesh.

Parameters:

Name Type Description Default
user_name str

Unique part name.

required
element Element

Compatible volume element definition.

required
region RegionBase | None

Region; None uses the global region.

None
x_min float

Lower global x bound.

required
x_max float

Upper global x bound.

required
y_min float

Lower global y bound.

required
y_max float

Upper global y bound.

required
z_min float

Lower global z bound.

required
z_max float

Upper global z bound.

required
nx int

Positive number of x cell subdivisions.

required
ny int

Positive number of y cell subdivisions.

required
nz int

Positive number of z cell subdivisions.

required

Returns:

Name Type Description
part MeshPart

Generated part; assembly remains a separate operation.

custom_rectangular_grid

custom_rectangular_grid(user_name: str, element: Element, region: Optional[RegionBase] = None, *, x_coords: str, y_coords: str, z_coords: str) -> CustomRectangularGrid3D

Generate and register a rectangular mesh from explicit axis coordinates.

Parameters:

Name Type Description Default
user_name str

Unique part name.

required
element Element

Compatible volume element definition.

required
region RegionBase | None

Region; None uses the global region.

None
x_coords str

Coordinate input accepted by CustomRectangularGrid3D.

required
y_coords str

Corresponding global y coordinate input.

required
z_coords str

Corresponding global z coordinate input.

required

Returns:

Name Type Description
part MeshPart

Generated, registered volume part. Consult the concrete mesh component for coordinate-string syntax and validation rules.

geometric_rectangular_grid

geometric_rectangular_grid(user_name: str, element: Element, region: Optional[RegionBase] = None, *, x_min: float, x_max: float, y_min: float, y_max: float, z_min: float, z_max: float, nx: int, ny: int, nz: int, x_ratio: float = 1.0, y_ratio: float = 1.0, z_ratio: float = 1.0) -> GeometricStructuredRectangular3D

Generate a rectangular mesh with geometric axis grading.

Parameters:

Name Type Description Default
user_name str

Unique part name.

required
element Element

Compatible volume element definition.

required
region RegionBase | None

Region; None uses the global region.

None
x_min float

Lower global x bound.

required
x_max float

Upper global x bound.

required
y_min float

Lower global y bound.

required
y_max float

Upper global y bound.

required
z_min float

Lower global z bound.

required
z_max float

Upper global z bound.

required
nx int

Positive x cell subdivision count.

required
ny int

Positive y cell subdivision count.

required
nz int

Positive z cell subdivision count.

required
x_ratio float

Adjacent x cell-width grading ratio; 1 is uniform.

1.0
y_ratio float

Adjacent y cell-width grading ratio.

1.0
z_ratio float

Adjacent z cell-width grading ratio.

1.0

Returns:

Name Type Description
part MeshPart

Generated, registered graded volume part.