Total number of DOFs of a member is the summation of DOFs of the two nodes. Therefore, for a 3D beam, the stiffness matrix is of size 12 x 12. The elastic stiffness matrix in the local coordinate system with shear deformation is given [Ref. 8] as follows:
where: ; ; ; ;