mass_matrix
- compas.numerical.mass_matrix(Ct, ks, q=0, c=1, tiled=True)[source]
Creates a network’s nodal mass matrix.
- Parameters:
- Ctsparse
Sparse transpose of the connectivity matrix (n x m).
- ksarray
Vector of member EA / L (m x 1).
- qarray
Vector of member force densities (m x 1).
- cfloat
Convergence factor.
- tiledbool
Whether to tile horizontally by 3 for x, y, z.
- Returns:
- array
Mass matrix, either (m x 1) or (m x 3).
Notes
The mass matrix is defined as the sum of the member axial stiffnesses (inline) of the elements connected to each node, plus the force density. The force density ensures a non-zero value in form-finding/pre-stress modelling where E=0.
\[\mathbf{m} = |\mathbf{C}^\mathrm{T}| (\mathbf{E} \circ \mathbf{A} \oslash \mathbf{l} + \mathbf{f} \oslash \mathbf{l})\]