GeometricStructuredRectangular3D
GeometricStructuredRectangular3D
GeometricStructuredRectangular3D(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)
Bases: MeshPart
Parametric structured 3D rectangular mesh part with geometric grid expansion.
This mesh part discretizes a 3D rectangular box using geometric spacing ratios along the coordinate axes. Node coordinates along each axis are generated in a geometric progression, which is highly useful for soil-foundation interfaces requiring refinement near structural elements and coarse spacing far away.
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 3D grid with geometric expansion along the Z-axis
block = model.meshpart.volume.geometric_rectangular_grid(
user_name="soil_block_geom",
element=ele,
x_min=0.0, x_max=10.0,
y_min=0.0, y_max=10.0,
z_min=0.0, z_max=20.0,
nx=5, ny=5, nz=8,
z_ratio=1.2,
)
print(block.tag)
Create a structured geometrically-spaced 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 |
x_ratio
|
float
|
Geometric spacing ratio along the X-axis (must be greater than 0). |
1.0
|
y_ratio
|
float
|
Geometric spacing ratio along the Y-axis (must be greater than 0). |
1.0
|
z_ratio
|
float
|
Geometric spacing ratio along the Z-axis (must be greater than 0). |
1.0
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If min bounding coordinates are not less than max bounding coordinates, if cell subdivision counts are less than or equal to 0, or if geometric ratios are less than or equal to 0. |