Skip to content

FixZConstraint

FixZConstraint

FixZConstraint(zCoordinate: float, dofs: List[int], tol: float = 1e-10)

Bases: SPConstraint

Coordinate-based boundary constraint along a constant Z plane.

FixZConstraint constrains selected degrees of freedom for all nodes sharing a specific Z coordinate within a given tolerance. It applies boundary conditions to planar boundaries in 3D models without requiring manual node tag lookup.

Tcl form

fixZ <zCoordinate> <dof1> <dof2> ... -tol <tol>

Example
from femora.core.model import Model

model = Model()
# Fix Z DOF of all nodes on the Z=0.0 plane
constraint = model.constraint.sp.fix_z(
    zCoordinate=0.0,
    dofs=[0, 0, 1],
    tol=1e-5,
)

Create a Z-coordinate plane constraint.

Parameters:

Name Type Description Default
zCoordinate float

Z-coordinate of nodes to be constrained.

required
dofs List[int]

List of DOF constraint states. 0 indicates unconstrained (free). 1 indicates constrained (fixed).

required
tol float

Tolerance for coordinate comparison.

1e-10