Skip to content

FixMacroZ_min

FixMacroZ_min

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

Bases: SPConstraint

Boundary constraint at the minimum Z-coordinate macro boundary.

FixMacroZ_min constrains selected degrees of freedom for all nodes sharing the minimum Z coordinate of the model. The boundary coordinate is defined using the global TCL variable $Z_MIN.

Tcl form

fixZ $Z_MIN <dof1> <dof2> ... -tol <tol>

Example
from femora.core.model import Model

model = Model()
# Fix Z DOF of all nodes at the minimum Z macro boundary
constraint = model.constraint.sp.fix_macro_z_min(
    dofs=[0, 0, 1],
    tol=1e-5,
)

Create a minimum Z macro boundary constraint.

Parameters:

Name Type Description Default
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

Raises:

Type Description
ValueError

If DOFs are not elements of [0, 1].