Skip to content

FixMacroX_max

FixMacroX_max

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

Bases: SPConstraint

Boundary constraint at the maximum X-coordinate macro boundary.

FixMacroX_max constrains selected degrees of freedom for all nodes sharing the maximum X coordinate of the model. The boundary coordinate is defined using the global TCL variable $X_MAX.

Tcl form

fixX $X_MAX <dof1> <dof2> ... -tol <tol>

Example
from femora.core.model import Model

model = Model()
# Fix X and Y DOFs of all nodes at the maximum X macro boundary
constraint = model.constraint.sp.fix_macro_x_max(
    dofs=[1, 1, 0],
    tol=1e-5,
)

Create a maximum X 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