Hi,
How is the stiffness calculation code implemented? Both the stiffness matrix K and the mass matrix M have equal dimensions because they are both dependent on the number of degrees of freedom (DOFs) in the system. For a system with DOFs=n, the dimensions of both the stiffness and mass matrices are n×n.
However, the outputs of the LumpedMass code and the SystemStiffnessMatrixRetrieval_scripted code are matrices with different dimensions.
Suppose the structural model is a Warren truss consisting of two hinged supports, 12 diagonal members, 5 top chord members, and 6 bottom chord members. The number of DOFs is 13. The output of the LumpedMass code consists of 13 elements, equal to dof=13. However, the output of the SystemStiffnessMatrixRetrieval_scripted code is as follows:
Row_out=103
Col_out=1892
Data_out=1892
How can the mass and stiffness matrices obtained from these two codes be made to have the same dimensions?
Hi,
the list of lumped masses contains one entry for each of the 13 nodes.
In case you use beam elements there are 6 DOFs per node x 13 = 78. When adding hinges at the ends of the diagonals that adds 2DOFs per diagonal and amounts to 12 x 2 = 24 DOFs. This sums up to 102 DOFs. The last entry in Row_out points to the first column entry beyond the end (see here).
– Clemens
Thank you for your response. The main issue is why the stiffness and mass matrices do not have the same dimensions. In the system’s state equations, where we need to multiply these two matrices, the mass and stiffness matrices must have the same dimensions. The question is, how should the dimensions be unified? Is it possible to access the details of the method used to calculate the stiffness matrix?
For the given truss:
Total number of nodes:
Based on the Warren truss model:
Number of nodes in the top chord: 6
Number of nodes in the bottom chord: 7
Total number of nodes: 6+7=13
Degrees of freedom per node:
In a 2D truss, each node has two degrees of freedom (translation in the X and Y directions):
Total DOF=13×2=26
Boundary conditions (supports):
The model has two hinged supports:
First support: 2 constrained DOFs (translation in X and Y)
Second support: 1 constrained DOF (translation in Y)
Thus, the total number of constrained DOFs is:
DOFconstrained=2+1=3
Active degrees of freedom:
The total number of active DOFs, after removing the constrained DOFs, is:
Active DOF=Total DOF−DOFconstrained=26−3=23
Dimensions of the stiffness matrix:
The stiffness matrix is a square matrix with dimensions equal to the number of active DOFs:
The dimensions of the stiffness matrix will be 23×23.
If you want to transform the list of lumped masses into a mass matrix of same dimensions as the stiffness matrix you need to insert each nodal lumped mass value at the three matrix diagonal elements that correspond to the translational nodal dofs (first to third).
– Clemens