I am writing an FEM code for a curved box girder bridge and getting an error..Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 9.359430e-32. > In Dec14 (line 579)

4 views (last 30 days)
X_matrix=inv(K_modi)*F_matrix;

Answers (3)

madhan ravi
madhan ravi on 15 Dec 2018

Walter Roberson
Walter Roberson on 16 Dec 2018
with rcond that small you can be sure that your matrix is singular and that no inverse exists . If you check with rank() it is likely to show you that it does not have full rank.
You need to recheck your mesh construction. It could be the case that your solution technique is not applicable to your situation .
You could silence the error by using pinv instead if inv but the answer is not likely to be meaningful for the situation .

John D'Errico
John D'Errico on 16 Dec 2018
The trick with FEM is to recognize there are several potential reasons for a singular matrix. The obvious one is you might have constructed it improperly.
Perhaps as likely a reason is you have not properly constrained the problem. This is an easy thing to mistake. For example, consider a very simple truss, but one where you have not anchored at least one node of the truss to a specfific location in space. The result will be you can translate the entire truss anywhere, by adding a simple offset to the entire truss, without introducing any energy penalty at all in the form of deformation of that truss. In that case, the system of equations will be singular, a singular matrix. Is that a problem? In a sense, yes, because the solution to the system is not unique.
Actually, pinv will solve the problem in that case. At least, it will effectively resolve the issue. Better however is to resolve the problem with the correct set of constraints to prevent the truss from penalty free translations, or perhaps from energy free rotations.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!