I am currently doing my bsc thesis and I need to find the systems stiffness matrix of a beam structure in 3d. I have the element matrix of all the beams but I need to rotate them to the global system. They are only rotated along the z-axis and I know the angles. Everywhere I see people talking about the rotation matrix where Kg = T' * Kel * T.
I am currently using T = [R,0,0,0; 0,R,0,0; 0,0,R,0; 0,0,0,R] where R is the (3x3) 3d rotation matrix. I am only rotating about the z-axis so this R is rather straightforward. My professor told me that if I multiply the system stiffness matrix with the system's rigid modes I should get a zero matrix. I understand why however in the last 2 columns, non-zero answers appear, and they are rather large so not a numerical error. My professor gave me a hint and said that this is due to faulty rotations. But I really don't understand what I am doing wrong here. I checked the rigid modes together with him and he told me they are correct.