Skip to content

FixYConstraint

FixYConstraint

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

Bases: SPConstraint

Coordinate-based boundary constraint along a constant Y plane.

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

Tcl form

fixY <yCoordinate> <dof1> <dof2> ... -tol <tol>

Example
from femora.core.model import Model

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

Create a Y-coordinate plane constraint.

Parameters:

Name Type Description Default
yCoordinate float

Y-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