# How to determine global stiffness matrix is constrained or not

## Background

In solid fem, we often solve $$\mathbf{Ku}=\mathbf{p}$$ where $$\mathbf{K}$$ is global stiffness matrix, $$\mathbf{u}$$ is displacement, $$\mathbf{p}$$ is global load vector.

If displacement not be constrained, equation above can not be solved, because the system can have rigid body motion.

In 2D case, the rigid body motion is the translation along $$x$$ axis, the translation along $$y$$ axis and the rotation. In order to let problem be solved, at least 3 constrains must be applied.

In 3D case, the rigid body motion is the translation along $$x,y,z$$ axis, and rotation along $$x,y,z$$ axis. In order to let problem be solved, at least 6 constrains must be applied.

In matlab, we can constrain $$i$$ dof to zero by

K(i,:)=0;
K(:,i)=0;
K(i,i)=1;
P(i)=0;


# My problem

If now, I obtain a matrix $$\mathbf{K}$$, it may constrained, or not constrained, or not fully constrained. How can I determine which constrain I need to apply to the system to make problem solved? Or how can I dertermine which rigid body constrain I should apply to the system?

For example: In 2D case, suppose the $$\mathbf{K}$$ is constrained $$x,y$$ translation, how can I find that I should constrain the rotation?

## My understanding

• I know calculate the rank of matrix can used to determine if the problem can be solved, but it can not be used to determine which kind of constrain it lack.

• I am using C++, I am using pardiso, eigen to solve the linear system. If the method can be easy implement will be great.

Any suggestion will be great help. Thanks for your time.

### TL;DR

How can I determine which constrain I need to apply to the system to make problem solved? Or how can I determine which rigid body constrain I should apply to the system?

The constraints are given by the boundary conditions of your problem, so you should know them before you have a numerical method as the FEM. In that sense, that is more a physics problem than a mathematical one because having different boundary conditions leads to different behaviors.

I think that the placement of the constraints is more related to the modeling of your system, thus it is more related to the original boundary value problem than the finite element model. Arbitrarily constrained some degrees of freedom might lead you to have a system with a behavior completely different to what is expected, so I don't think that it is a good approach.

Let us consider an example, a block with a uniform load on top:

• In one case, it is constrained at one end (a cantilever beam). In this case the free-end is the place with maximum displacement.

• In the other case, it is constrained at both ends. In this case the maximum displacement happens in the middle.

You can see the magnitude of the displacement for these two cases in the following figure, dark purple means that it is constrained. • Sir, at first I just want to constrain rigid body motion to let the fem problem can be solved. Now after you demonstration, I know that is is not a good idea. Different constrain do leads to different result. Automatrically give a constrain to let problem solved may be leads to solution user do not want. Thanks for your clear demonstration. Jul 25, 2020 at 9:21

You already know that at least theoretically, unconstrained matrices have a null space and consequently eigenvalues that are equal to zero. But, in practice, this is a meaningless condition because it can not be checked in an efficient way for large problems.

The question you specifically ask is how you can detect whether constraints have been applied, and the previous paragraph is intended to say "you can't in practice". But that is generally also not a very interesting question: You will have gotten the matrix from some piece of code, and so there must also be a way to assess what that code does: Does it apply constraints or not? As a consequence, the solution to your conundrum is not to try and recover the information you seek by looking at the matrix, but instead by asking the code that created the matrix whether it has applied constraints or not.

• Sir, Thanks point out that we should judge that by constrain but not directly on matrix. I now can using Nachiket Gokhale's suggestions to check if alreay given constrain is enough for solving the problem. Jul 25, 2020 at 9:22

As you said,

"If displacement not be constrained, equation above can not be solved, because the system can have rigid body motion"

So you should try to apply constraints that will not allow the body to move i.e. translate or rotate. In 2D there are 2 translations (along x and y axis) and one rotation (along z axis) to be killed. In 3D there are 3 translations(along x,y,z axes) and 3 rotations (about x,y,z axes) to be killed. You should apply boundary conditions such that there translations and rotations are not possible.

Another way to check is to compute the eigenvalues and see if there are any zero eigenvalues.

• You are right sir. I know I should apply constrains, but the problem is, how can I know which constrain should I apply? Calculate eigen values can detect should we apply constrain, but it can not know which constrain should apply. Jul 24, 2020 at 9:25
• In 2D, if you want to kill translations, you must constrain the x dof at one node, and y dof at another node. This will also kill rotation, but I'm not sure. I'm rusty. If you constrain x and y dofs at the same node, you will need to constrain another node in the x or y direction to kill rotation. Jul 24, 2020 at 9:32
• yes sir, here we only have the knowledge of K, how can we do that? How can we know that may be already a node is be constrain, we need constrain one more node? Jul 24, 2020 at 10:38