truss problems warning RCOND

a=cos(pi/6);
b=cos(pi/3);
% Fab Fag Fbc Fbg Fcd Fcf Fcg Fde Fdf Ffe Fgf Ax Ay Ey
T=[ b 1 0 0 0 0 0 0 0 0 0 1 0 0 ;% Ax
a 0 0 0 0 0 0 0 0 0 0 0 1 0 ;% Ay
-b 0 1 b 0 0 0 0 0 0 0 0 0 0 ;% Bx
-a 0 0 a 0 0 0 0 0 0 0 0 0 0 ;% By
0 0 -1 0 1 b b 0 0 0 0 0 0 0 ;% Cx
0 0 0 0 0 a a 0 0 0 0 0 0 0 ;% Cy
0 0 0 0 -1 0 0 b b 0 0 0 0 0 ;% Dx
0 0 0 0 0 0 0 a a 0 0 0 0 0 ;% Dy
0 0 0 0 0 0 0 -b 0 -1 0 0 0 0 ;% Ex
0 0 0 0 0 0 0 -a 0 0 0 0 0 1 ;% Ey
0 0 0 0 0 -b 0 0 -b 1 -1 0 0 0 ;% Fx
0 0 0 0 0 -a 0 0 -a 0 0 0 0 0 ;% Fy
0 -1 0 -b 0 0 -b 0 0 0 1 0 0 0 ;% Gx
0 0 0 -a 0 0 -a 0 0 0 0 0 0 0 ];% Gy
F=[ 0; 0;0;0;0; 0;0; 0;0; 0;0;-8;0;-6 ]; % Applied forces, as shown on the truss
M=inv(T)*(-F)
Warning: Matrix is close to singular or badly scaled. Results
may be inaccurate. RCOND = 3.454464e-19. ???
what should I do

3 个评论

Hello,
It seems that 'T' represents in your case the global stiffness matrix of your problem. From the description it sounds that you are dealing with a truss system in 2D.
There are various reasons that may render matrix 'T' singular, out of which the following two are the most prominent ones to my opinion:
1.) Your matrix is incorrectly computed. Please check the diagonal entries of 'T' in your case, namely,
diag(T)
ans =
0.5000
0
1.0000
0.8660
1.0000
0.8660
0
0.8660
0
0
-1.0000
0
0
0
and note that there is a negative diagonal entry, which does not seem right.
2.) you have not applied sufficient Dirichlet boundary conditions. Say for instance, that you would like to constraint Degrees of Freedom (DOFs) with numbering '[1 2 7 8]'. Then, you would need to eliminate the corresponding rows and columns before trying to compute your solution. My suggestion would be doing that in MATLAB in the following way,
homDOFs = [1 2 7 8];
freeDOFs = 1:length(T);
freeDOFs(homDOFs) = [];
u = zeros(length(T), 1);
u(homDOFs) = 0;
u(freeDOFs) = T(freeDOFs, freeDOFs)\F(freeDOFs);
please note that I herein used the backslash operator '\' for solving the linear equation system rather than explicitly inverting matrix 'T', which can be costly for large matrices.
My anticipation is that the computation of your stiffness matrix is incorrect, please review that first.
I hope this information helps.
Kind Regards,
Andreas
I will argue that Andreas is correct. We really don't know the true nature of the problem, but I think his assessment is correct. Why?
>> size(T)
ans =
14 14
>> rank(T)
ans =
13
>> svd(T)
ans =
2.0888
2.0552
1.9363
1.8506
1.6426
1.2695
1.2043
1.0206
0.96841
0.91152
0.64181
0.39683
0.31573
1.6792e-16
That one essentially dead on zero singular value is often an indication that the truss is insufficiently constrained. Some degree of freedom is present that allows the truss to move in some way with no penalty to the energy of the system so defined. It may be a translation in the x OR y directions (but not both.) It may be a rotation that has been left unconstrained.
There is only ONE missing constraint on the flexibility. I might say this because there is only one zero singular value. If, for example, the truss were allowed to translate freely in either the x OR y direction, then we would see a pair of zero singluar values.
Since I do not know the actual truss configuration (without a bit of effort based on reverse engineering the matrix T) it is difficult to know what has been left out.
But then we need to consider the negative diagonal element that Andreas saw. That makes me wonder if you merely constructed T incorrectly, thus stuffing an element of T in the wrong row or column.
So I would first verify the matrix T has those elements properly defined, especially the elements in row 11 of that matrix. Then I would make sure the problem is fully constrained to prevent energy free motion of the truss.
This is the question I want to solve
When I applied the same operation on a different question, it found the correct values. but I did not understand how to apply the method you showed above

请先登录,再进行评论。

 采纳的回答

Hello,
As John mentioned before, your stiffness matrix 'T' is most likely incorrectly computed.
Using the latter system that you posted, I was able to compute a stiffness matrix with the following sparsity pattern,
Visualizing the sparsity pattern of your stiffness matrix 'T', one can see that in addition to the previous remarks, this stiffness matrix it is even nonsymmetric:
adding to the accurate comment of John that its rank deficiency is way too large. Such systems are typically symmetric since the underlying weak forms are symmetric, unless you add constraints by means of Lagrange Multipliers or similar, which I do not believe is herein the case.
In any case, I was able to solve your system and obtain the following deformation with some custom values for 'E' and 'A', see the following screenshot:
Therefore, I would advise you to review your computation of matrix 'T' because it is most likely incorrect.
I hope this information helps.
Kind Regards,
Andreas

4 个评论

a=cos(pi/6);
b=cos(pi/3);
% Fab Fag Fbc Fbg Fcd Fcf Fcg Fde Fdf Ffe Fgf Ax Ay Ey
T=[ b 1 0 0 0 0 0 0 0 0 0 1 0 0 ;% Ax
a 0 0 0 0 0 0 0 0 0 0 0 1 0 ;% Ay
b 0 1 b 0 0 0 0 0 0 0 0 0 0 ;% Bx
a 0 0 -a 0 0 0 0 0 0 0 0 0 0 ;% By
0 0 1 0 1 b -b 0 0 0 0 0 0 0 ;% Cx
0 0 0 0 0 -a -a 0 0 0 0 0 0 0 ;% Cy
0 0 0 0 1 0 0 b -b 0 0 0 0 0 ;% Dx
0 0 0 0 0 0 0 -a -a 0 0 0 0 0 ;% Dy
0 0 0 0 0 0 0 b 0 1 0 0 0 0 ;% Ex
0 0 0 0 0 0 0 -a 0 0 0 0 0 1 ;% Ey
0 0 0 0 0 b 0 0 -b 1 1 0 0 0 ;% Fx
0 0 0 0 0 -a 0 0 -a 0 0 0 0 0 ;% Fy
0 1 0 b 0 0 -b 0 0 0 1 0 0 0 ;% Gx
0 0 0 -a 0 0 -a 0 0 0 0 0 0 0];% Gy
F=[ 0; 0;0;0;0; 0;0; 0;0;0;0;-8;0;-6 ]; % Applied forces, as shown on the truss
M=T\-F
I updated my matrix, but I still get wrong results, how can I visualize this matrix. Can you do this if I ask you
Hi,
You can use function 'spy' to visualize the sparsity pattern of your matrix in MATLAB, namely,
spy(T)
which for your new matrix seems to be similar as before, namely,
This matrix has many negative values on the main diagonal which does not seem right for such kind of problems,
diag(T)
ans =
0.500000000000000
0
1.000000000000000
-0.866025403784439
1.000000000000000
-0.866025403784439
0
-0.866025403784439
0
0
1.000000000000000
0
0
0
Therefore, I anticipate that your matrix is once again incorrect.
Now that you know the command, you can proceed by yourself.
Kind Regards,
Andreas
The deformation you show for the truss seems reasonable. Thank you for showing that. (It has been far too many years since I had to solve truss problems for me to want to do so.)
The non-symmetric stiffness matrix is an important clue to the problem I think. Symmetry should reflect the idea that if node A exerts a force on node B due to a member between them, then it should be balanced by a similar force on node A.
To me, it looks as if @Bilal Ates created T while forgetting about that concept.
Thank you all for your help, I ended the mission. I wish you good work and success @Andreas Apostolatos @John D'Errico

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Structural Analysis 的更多信息

产品

版本

R2019a

标签

Community Treasure Hunt

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

Start Hunting!

Translated by