The rigidDiaphragm
command allows you to constrain the motion of multiple secondary nodes to the motion of a primary node, e.g., when simulating rigid floor diaphragms in 3D structural models.
But what if you want to enforce rigid diaphragm constraints for a 2D model, e.g., as shown below?

Prior to PR #764, you would have been out of luck with the rigidDiaphragm
command. But there was an easy work around of looping over the secondary nodes and calling the equalDOF
command.
for nd in [2,4,6]:
# primary secondary DOF
ops.equalDOF(8, nd, 1)
With PR #764, the rigidDiaphragm
command works for 2D models. Specify the DOF to constrain, followed by the primary node then the secondary nodes.
# DOF primary secondaries
ops.rigidDiaphragm(1, 8, *[2,4,6])
Similar to how the 3D rigidDiaphragm
command checks that the primary and secondary nodes lie in the same global X-Y, Y-Z, or X-Z plane, the 2D version makes sure the nodes have the same Y or X coordinate (Y for constrained DOF 1, X for DOF 2).
A single rigidDiaphragm
command is functionally no different from calling equalDOF
several times–behind the scenes, rigidDiaphragm
creates a separate MP_Constraint object for each secondary node.
The big improvement is conceptual, as many folks who use the equalDOF
command to create rigid diaphragms in 2D think they can also construct rigid diaphragms in 3D using equalDOF
constraints in two orthogonal directions–torsion be damned. Start with rigidDiaphragm
in 2D so that you don’t mistakenly over-constrain your model when you go 3D.