OpenSees Cloud
OpenSees AMI
Handling a Doubt
Original Post - 09 Nov 2023 - Michael H. Scott
Show your support at Buy Me a Coffee.
After a post on the “constraint matrix not identity” warning message, a
couple people followed up (one by post comment and the other by direct
communication) that they didn’t realize the Plain constraint handler
works with equalDOF constraints.
The Plain constraint handler has not always been able to handle equalDOF
constraints–I vaguely recall Frank modifying the Plain handler years
ago to work with equalDOF. So, the doubts about the Plain handler and
equalDOF didn’t come out of nowhere.
Anyway, to clear any doubts about the Plain handler, I made a minimal
example with three nodes, one spring, one boundary condition, and one
equalDOF constraint.

The displacements of nodes 2 and 3 should equal 0.1.
import openseespy.opensees as ops
from math import isclose
k = 100
P = 10
ops.wipe()
ops.model('basic','-ndm',1,'-ndf',1)
ops.node(1,0); ops.fix(1,1)
ops.node(2,0)
ops.uniaxialMaterial('Elastic',1,k)
ops.element('zeroLength',1,1,2,'-mat',1,'-dir',1)
ops.node(3,0)
ops.equalDOF(3,2,1)
ops.timeSeries('Constant',1)
ops.pattern('Plain',1,1)
ops.load(3,P)
ops.constraints('Plain')
ops.analysis('Static')
ops.analyze(1)
assert isclose(P/k,ops.nodeDisp(2,1))
assert isclose(P/k,ops.nodeDisp(3,1))
Run the above script and you’ll see that the Plain handler enforced the
equalDOF constraint, i.e., the displacements of nodes 2 and 3 are both
0.1. No errors. No warnings. No doubts.