Md_Salem
Subscriber
Hello Erik,

I need to extract the mode shape vectors of some cantilever plate to make a correlation between some of them analytically.

I used the workbench to simulate the problem and added the next APDL command to extract both mass and stiffness matrices in  MMF:

/AUX2
COMBINE, FULL
/POST1
*SMAT, MatKS, D, IMPORT, FULL, file.full, STIFF
*SMAT, MatMS, D, IMPORT, FULL, file.full, MASS
*Export, MatKS, MMF, matK_MMF.txt

*Export, MatMS, MMF, matM_MMF.txt

Then I did modal analysis , and I got the two files of mass and stiffness matrices in MMF.

I used the next Matlab code to solve the eigen problem in order to extract mode shapes.

clc;
clear all;
format shortG;
format loose;

K = zeros(462,462);
for r = 2:5515
K(matK_MMF(r,1), matK_MMF(r,2)) = matK_MMF(r,3);
end
disp (K)

M = zeros(462,462);
for r = 2:1999
M(matM_MMF(r,1), matM_MMF(r,2)) = matM_MMF(r,3);
end
disp(M)

cheq=linsolve(M,K)

[Mode,Lamda]=eig(cheq);

lamda=diag(sort(diag(Lamda),'ascend')); % make diagonal matrix out of sorted diagonal values of input 'Lamda'
[c, ind]=sort(diag(Lamda),'ascend'); % store the indices of which columns the sorted eigenvalues come from 'lamda'