StructuredRectangular3D
StructuredRectangular3D
StructuredRectangular3D(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)
Bases: MeshPart
Parametric structured uniform 3D rectangular mesh part.
This mesh part discretizes a 3D rectangular bounding box defined by boundaries
along the X, Y, and Z coordinate axes into a uniform grid of 3D solid elements
(such as stdBrick, SSPbrick, or PML3D).
Example
from femora.core.model import Model
model = Model()
mat = model.material.nd.elastic_isotropic(user_name="soil", e_mod=30000.0, nu=0.3, rho=2.0)
ele = model.element.brick.std(ndof=3, material=mat)
# Discretize a 10x10x10 uniform 3D grid block
block = model.meshpart.volume.uniform_rectangular_grid(
user_name="soil_block",
element=ele,
x_min=0.0, x_max=10.0,
y_min=0.0, y_max=10.0,
z_min=0.0, z_max=10.0,
nx=5, ny=5, nz=5,
)
print(block.tag)
Create a parametric structured uniform 3D rectangular mesh part.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_name
|
str
|
Unique user-defined name for this mesh part. |
required |
element
|
Element
|
Associated Element template used for discretization. |
required |
region
|
Optional[RegionBase]
|
Physical Region where this mesh part is added. |
None
|
x_min
|
float
|
Minimum X-coordinate bounding value. |
required |
x_max
|
float
|
Maximum X-coordinate bounding value. |
required |
y_min
|
float
|
Minimum Y-coordinate bounding value. |
required |
y_max
|
float
|
Maximum Y-coordinate bounding value. |
required |
z_min
|
float
|
Minimum Z-coordinate bounding value. |
required |
z_max
|
float
|
Maximum Z-coordinate bounding value. |
required |
nx
|
int
|
Number of element subdivisions along the X-axis (must be greater than 0). |
required |
ny
|
int
|
Number of element subdivisions along the Y-axis (must be greater than 0). |
required |
nz
|
int
|
Number of element subdivisions along the Z-axis (must be greater than 0). |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If min bounding coordinates are not less than max bounding coordinates, or if cell subdivision counts are less than or equal to 0. |