Problem
pycba currently solves mechanism structures without raising an error. The stiffness matrix is near-singular, so the solve "succeeds" but produces enormous displacements (~10^17) that are numerically meaningless.
For example, P10F (pin at one end, free at the other) with a point load at the free end is a mechanism — it rotates about the pin. But BeamAnalysis solves it and returns reactions = [1.0] (correct from ΣFy=0) with displacements of order 10^17.
Suggested fix
Add an eigenvalue check on the assembled stiffness matrix before solving, similar to what anaStruct does. anaStruct raises a StabilityError when eigenvalues indicate instability:
FEMException: ('StabilityError', 'The eigenvalues of the stiffness matrix are non zero, which indicates a instable structure. Check your support conditions')
Alternatively, check cond(K) or min(eig(K)) after assembly and before solve, and raise a clear error.
Problem
pycba currently solves mechanism structures without raising an error. The stiffness matrix is near-singular, so the solve "succeeds" but produces enormous displacements (~10^17) that are numerically meaningless.
For example,
P10F(pin at one end, free at the other) with a point load at the free end is a mechanism — it rotates about the pin. ButBeamAnalysissolves it and returnsreactions = [1.0](correct from ΣFy=0) with displacements of order 10^17.Suggested fix
Add an eigenvalue check on the assembled stiffness matrix before solving, similar to what anaStruct does. anaStruct raises a
StabilityErrorwhen eigenvalues indicate instability:Alternatively, check
cond(K)ormin(eig(K))after assembly and before solve, and raise a clear error.