Computational Science Asked by Additional Pylons on August 13, 2021
I am making a code for an 18-node (3x3x2) 3D element FEM. However, even though I am (pretty) sure that all the shape functions are correct and whatnot, whenever I try and invert the stiffness matrix to solve for displacement, I get the warning message from Matlab telling me that my matrix is close to singular.
Is there a checklist of things I should test for to fix this problem? What kind of error commonly causes these kind of errors? Or is it just too broad to even answer meaningfully?
EDIT: Thanks for all your input. Sorry for responding so late, but here is the link to my code. I originally didn’t want to post it, it seemed a bit much for me to ask strangers to subject themselves to such annoying debugging.
My comments apply specifically to a 3D structural finite element but the principles are applicable to more general elements.
A test you will want to execute as part of element development is to calculate the eigenvalues and eigenvectors for the element stiffness matrix. For a 3D structural element, you should get exactly six eigenvalues that are zero (or very close to zero). The eigenvectors for these should be rigid body displacements in the three directions and rigid body rotations about the three axes (or linear combinations of these motions). If you get more than six, your stiffness matrix doesn't have the necessary rank and is therefore defective. It sounds like this might be your problem. (However, in general, if you get less than six zero-eigenvalues, your formulation is also defective.)
So what can cause this problem?
The most likely cause is that the shape functions are invalid in some way. A second possibility is that you are not accurately integrating the terms in the stiffness matrix. In my previous post on a similar topic (3D Solid 8 Node FEM Matlab Code), I alluded to the problems with using too few integration points. Specifically, the problem is that this can cause zero-frequency (zero eigenvalue) displacement modes, often referred to as "hourglass" modes due to the shape of the eigenvector.
The simple solution is to use enough integration points to integrate the stiffness matrix terms exactly. There are also clever numerical tricks that can be employed to remove these hourglass modes but still allow the under-integration. Also, interestingly, sometimes a mesh of defective elements with appropriate boundary conditions will stabilize each other so that a solution of the complete model is possible. But, in general, this is not something you want to rely on.
Correct answer by Bill Greene on August 13, 2021
The elemental stiffness matrix must be always singular because while deriving it we do not impose any constraints or boundary conditions. Thus inverting the stiffness matrix to solve for displacements/position-vectors/degrees-of-freedom should yield indeterminate results.
Answered by Shreyas Samudra on August 13, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP