Omni Calculator logo

Stiffness Matrix Calculator

Created by Krishna Nelaturu
Reviewed by Steven Wooding
Last updated: Jan 18, 2024


Our stiffness matrix calculator will help you determine the element stiffness matrices for the truss, beam, and frame elements. Truss, beam, and frame elements are the most basic elements used in finite element analysis in solid mechanics.

If you were wondering how to calculate the stiffness matrix for these three elements, you've come to the right place! In this article, we aim to teach you the following:

  • Truss elements and calculating the stiffness matrix for truss elements.
  • Beam elements and calculating beam stiffness matrix.
  • Frame elements and calculating frame stiffness matrix.

Familiarity with spring stiffness will be a good base for the article below. We recommend you go through our spring rate calculator before diving in!

Calculating stiffness matrix for truss elements

Trusses are bars joined end to end to form a rigid structure such that only axial forces are acting on each bar. Typically, truss structures are used in supporting roofs. You can also see them used in bridges.

The stiffness of a bar is given by:

k=AELk = \frac{A \cdot E}{L}

where:

  • kk — Stiffness of the bar;
  • AA — Cross-sectional area of the bar;
  • EE — Young's modulus of the bar; and
  • LL — Length of the bar.

If you need help with Young's modulus calculation, our Young's modulus calculator can help you.

Let us learn how to calculate the stiffness matrix of a truss element. Consider the free body diagram of a truss element tilted at an angle ϕ\phi to the global x-axis.

Truss element in the global coordinate system.
Truss element in the global coordinate system.

It is easier to analyze the element in its local coordinate system and then transform our equations into the global coordinate system.

Truss element in the local coordinate system.
Truss element in the local coordinate system.

This free-body diagram shows that:

  1. At equilibrium, the element forces P1P^{'}_1 and P3P^{'}_3 result in an equal and opposite axial reaction force NN in the truss element.
  2. Since the element displacements u2u^{'}_2 and u4u^{'}_4 are lateral, they do not result in any axial reaction forces in the element. This is valid because we assume the displacements are small. Thus, P2P^{'}_2 and P4P^{'}_4 are zero.

Similar to spring, the reaction force NN in the truss member is given by:

N=k(u3u1)N = k(u'_3 - u'_1)

From the diagram, we note that the element force P3=NP^{'}_3 = N. Hence we can write:

P3=k(u3u1)P'_3 = k(u'_3 - u'_1)

Again, from the diagram, we note that the element force P1=NP^{'}_1 = -N. Thus, we write:

P1=k(u3u1)=k(u1u3)P'_1 = -k(u'_3 - u'_1) = k(u'_1 - u'_3)

Putting the two axial element force equations in a matrix, we get:

k[1111][u1u3]=[P1P3]k\begin{bmatrix} 1 & -1 \\ -1 & 1 \end{bmatrix} \begin{bmatrix} u'_1 \\ u'_3 \end{bmatrix} = \begin{bmatrix} P'_1 \\ P'_3 \end{bmatrix}

Combining this with our understanding that the element forces P2P^{'}_2 and P4P^{'}_4 are zero, we can expand the matrix equation to include them:

k[1010000010100000]Ke[u1u2u3u4]ae=[P1P2P3P4]fe\small \underbrace{k\begin{bmatrix} 1 &0 & -1 &0 \\ 0 & 0&0 &0\\ -1 &0 & 1 &0\\ 0&0&0&0 \end{bmatrix}}_{\mathbf{K^{e'}}} \underbrace{\begin{bmatrix} u'_1 \\ u'_2\\ u'_3\\ u'_4 \end{bmatrix}}_{\mathbf{a^{e'}}} = \underbrace{\begin{bmatrix} P'_1 \\ P'_2 \\ P'_3\\ P'_4 \end{bmatrix}}_{\mathbf{f^{e'}}}\\

where:

  • Ke\mathbf{K^{e'}} — Local element stiffness matrix;
  • ae\mathbf{a^{e'}} — Local element displacement vector; and
  • fe\mathbf{f^{e'}} — Local element force vector.

To convert the equation (and our stiffness matrix) from the local to the global coordinate system, we introduce a transformation matrix L\mathbf{L}, where:

LT=[cosϕsinϕ00sinϕcosϕ0000cosϕsinϕ00sinϕcosϕ]\scriptsize \mathbf{L^T} = \begin{bmatrix} \cos{\phi} & -\sin{\phi} & 0&0 \\ \sin{\phi} & \cos{\phi}&0 &0\\ 0&0 & \cos{\phi} & -\sin{\phi}\\ 0&0&\sin{\phi} & \cos{\phi} \end{bmatrix}

Where ϕ\phi is the angle of orientation of the element with respect to the global x-axis.

This transformation matrix is an orthogonal matrix, which means that:

LTL=LLT=I\mathbf{L^T \cdot L = L \cdot L^T = I}

The formula for the element stiffness matrix Ke\mathbf{K^e} of a truss element in the global coordinate system is obtained by:

Ke=LTKeLKe=k[cos2ϕcosϕsinϕcos2ϕcosϕsinϕcosϕsinϕsin2ϕcosϕsinϕsin2ϕcos2ϕcosϕsinϕcos2ϕcosϕsinϕcosϕsinϕsin2ϕcosϕsinϕsin2ϕ]\scriptsize\! \begin{align*} \mathbf{K^e}\! &= \mathbf{L^T \cdot K^{e'} \cdot L}\\[1em] \mathbf{K^e}\! &= k\!\! \begin{bmatrix} \cos^2{\phi} & \hspace{-.7em} \cos{\phi}\sin{\phi} &\hspace{-.7em} -\!\cos^2{\phi} &\hspace{-.7em} -\!\cos{\phi}\sin{\phi} \\ \cos{\phi}\sin{\phi} & \hspace{-.7em}\sin^2{\phi}&\hspace{-.7em}-\!\cos{\phi}\sin{\phi} &\hspace{-.7em} -\!\sin^2{\phi}\\ -\!\cos^2{\phi}&\hspace{-.7em}-\!\cos{\phi}\sin{\phi} &\hspace{-.7em} \cos^2{\phi} &\hspace{-.7em} \cos{\phi}\sin{\phi}\\ -\!\cos{\phi}\sin{\phi}&\hspace{-.7em}-\!\sin^2{\phi}&\hspace{-.7em}\cos{\phi}\sin{\phi} &\hspace{-.7em} \sin^2{\phi} \end{bmatrix} \end{align*}

Units of a bar element stiffness matrix: Since the stiffness of all items in the matrix is of the form k=AELk = \frac{AE}{L}, their unit is N/m\rm N/m. You can also measure it in kN/m\rm kN/m, N/mm\rm N/mm, or kN/mm\rm kN/mm.

Calculating stiffness matrix for beam elements

We've all come across beams in our day-to-day lives as support members in various constructions. Unlike trusses, a beam is a supporting structure designed to withstand lateral forces, carrying shear forces and bending moments.

The final form in the FE (finite element) formulation of a beam is given by:

Ka=fb+fl\mathbf{Ka = f_b + f_l}

where:

  • K\mathbf{K} — Stiffness matrix;
  • a\mathbf{a} — Displacement vector;
  • fb\mathbf{f_b} — Boundary vector; and
  • fl\mathbf{f_l} — Load vector.

These matrices are defined as follows:

K=abBTEIB dx fb=[NTV]ab[dNTdxM]abfl=abNTq dx\begin{align*} \mathbf{K} &= \int_a^b \mathbf{B^T} E \cdot I \mathbf{B}\ dx\ \\ \mathbf{f_b} &= [\mathbf{N^T}V]_a^b - \left[ \frac{d\mathbf{N^T}}{dx}M\right]_a^b \\ \mathbf{f_l} &= \int_a^b \mathbf{N^T}q\ dx \end{align*}

where:

  • B\mathbf{B} — Second order derivative of the shape function vector N\mathbf{N};
  • EE — Young's modulus of the beam;
  • II — Moment of inertia of the beam;
  • N\mathbf{N} — Shape function vector of the beam;
  • VV — Shear force acting on the beam;
  • MM — Bending moment on the beam; and
  • qq — Distributed load acting on the beam.

Let's consider the simplest beam element, as shown in the figure below.

Simple beam element.
Simple beam element.

The shape function of this beam is given by:

N=[N1eN2eN3eN4e]\mathbf{N} = \begin{bmatrix} N^e_1 & N^e_2 & N^e_3 & N^e_4 \end{bmatrix}

where:

N1e=13x2L2+2x3L3N2e=x(12xL+x2L2)N3e=x2L2(32xL)N4e=x2L(xL1)\begin{align*} N^e_1 &= 1 - 3 \frac{x^2}{L^2} + 2\frac{x^3}{L^3}\\[1em] N^e_2 &= x\left(1 - 2 \frac{x}{L} + \frac{x^2}{L^2}\right)\\[1em] N^e_3 &= \frac{x^2}{L^2} \left( 3-2\frac{x}{L} \right)\\[1em] N^e_4 &= \frac{x^2}{L} \left( \frac{x}{L} -1 \right)\\ \end{align*}

where:

  • xx — A variable for the location along the beam element; and
  • LL — Length of the beam element.

We can formulate the beam element stiffness matrix as follows:

Ke=0LBeTEIBedx=EI0L[B1eB1eB1eB2eB1eB3eB1eB4eB2eB1eB2eB2eB2eB3eB2eB4eB3eB1eB3eB2eB3eB3eB3eB4eB4eB1eB4eB2eB4eB3eB4eB4e]dx\footnotesize \begin{align*} \mathbf{K^e} &= \int_0^L \mathbf{B^{eT}} E \cdot I \mathbf{B^e} dx\\ &\hspace{-2em}=E\cdot I \hspace{-.3em}\int_0^L\hspace{-.3em} \begin{bmatrix} B^e_1 B^e_1 &\hspace{-.5em} B^e_1 B^e_2 &\hspace{-.5em} B^e_1 B^e_3 &\hspace{-.5em} B^e_1 B^e_4 \\ B^e_2 B^e_1 &\hspace{-.5em} B^e_2 B^e_2 &\hspace{-.5em} B^e_2 B^e_3 &\hspace{-.5em} B^e_2 B^e_4 \\ B^e_3 B^e_1 &\hspace{-.5em} B^e_3 B^e_2 &\hspace{-.5em} B^e_3 B^e_3 & \hspace{-.5em}B^e_3 B^e_4 \\ B^e_4 B^e_1 &\hspace{-.5em} B^e_4 B^e_2 &\hspace{-.5em} B^e_4 B^e_3 &\hspace{-.5em} B^e_4 B^e_4 \\ \end{bmatrix}\!\! dx \end{align*}

Note that we have assumed that EE and II are uniform throughout the length of the beam element. The next step needs us to evaluate the second-order derivative of each shape function for each item in the matrix. For example, for K32eK^e_{32}, we get:

K32e=EI0LB3eB2edx=EI0Ld2N3edx2d2N2edx2dx=EI0L(6L212xL3)(4L+6xL2)dxK32e=6EIL2\footnotesize \begin{align*} K^e_{32} &= E \cdot I \int_0^L B^e_3 B^e_2 dx\\[1em] &= E \cdot I \int_0^L \frac{d^2N^e_3}{dx^2} \frac{d^2N^e_2}{dx^2}dx\\[1em] &\hspace{-2em}= E \cdot I\! \int_0^L\!\! \left( \frac{6}{L^2} - \frac{12x}{L^3}\right)\!\! \left( -\frac{4}{L} + \frac{6x}{L^2}\right)\!dx\\[1em] K^e_{32} &= -\frac{6 E\cdot I}{L^2} \end{align*}

Following similar differentiation and integration for all items in the matrix gives us the formula for the element stiffness matrix of a beam:

Ke=[12EIL36EIL212EIL36EIL26EIL24EIL6EIL22EIL12EIL36EIL212EIL36EIL26EIL22EIL6EIL24EIL]\footnotesize \mathbf{K^e}\!\!=\!\! \begin{bmatrix} \frac{12E\cdot I}{L^3} &\hspace{-.5em} \frac{6E\cdot I}{L^2} &\hspace{-.5em} -\frac{12E\cdot I}{L^3} &\hspace{-.5em} \frac{6E\cdot I}{L^2} \\[0.5em] \frac{6E\cdot I}{L^2} &\hspace{-.5em} \frac{4E\cdot I}{L} &\hspace{-.5em} -\frac{6E\cdot I}{L^2}&\hspace{-.5em} \frac{2E\cdot I}{L} \\[0.5em] -\frac{12E\cdot I}{L^3}&\hspace{-.5em} -\frac{6E\cdot I}{L^2} &\hspace{-.5em} \frac{12E\cdot I}{L^3} &\hspace{-.5em} -\frac{6E\cdot I}{L^2} \\[0.5em] \frac{6E\cdot I}{L^2} &\hspace{-.5em} \frac{2E\cdot I}{L} &\hspace{-.5em}-\frac{6E\cdot I}{L^2} &\hspace{-.5em} \frac{4E\cdot I}{L}\\[0.5em] \end{bmatrix}

💡 Need help calculating the beam's moment of inertia? Head to our moment of inertia calculator!

Units of beam element stiffness matrix: In the beam element stiffness matrix formula, we have three types of terms - EIL3\frac{EI}{L^3}, EIL2\frac{EI}{L^2}, and EIL\frac{EI}{L}. The units for these terms are given in the table below:

Matrix item

Term

Unit

k₁₁, k₁₃, k₃₁, k₃₃

EIL3\frac{EI}{L^3}

N/m\rm N/m

k₁₂, k₁₄, k₂₁, k₂₃, k₃₂, k₃₄, k₄₁, k₄₃

EIL2\frac{EI}{L^2}

N\rm N

k₂₂, k₂₄, k₄₂, k₄₄

EIL\frac{EI}{L}

Nm\rm N-m

Calculating stiffness matrix for frame elements

A frame member can carry both axial and lateral loads. In a way, a frame element is the combination of a bar and a beam element. In FE methods, they are commonly used to approximate various real-world structures.

Consider the frame element shown in the diagram below.

Simple frame element.
Simple frame element.

We can indeed formulate the element stiffness matrix of a frame by combining the stiffness matrices of a bar and a beam element:

Ke=[AEL00AEL00012EIL36EIL2012EIL36EIL206EIL24EIL06EIL22EILAEL00AEL00012EIL36EIL2012EIL36EIL206EIL22EIL06EIL24EIL]\scriptsize \mathbf{K^e}\!\!=\!\! \begin{bmatrix} \frac{A\cdot E}{L} &\hspace{-.7em}0 &\hspace{-.7em}0 &\hspace{-.7em}-\frac{A\cdot E}{L} &\hspace{-.7em}0 &\hspace{-.7em}0 \\[0.5em] 0 &\hspace{-.7em} \frac{12E\cdot I}{L^3} &\hspace{-.7em} \frac{6E\cdot I}{L^2} &\hspace{-.7em}0&\hspace{-.7em} -\frac{12E\cdot I}{L^3} &\hspace{-.7em} \frac{6E\cdot I}{L^2} \\[0.5em] 0&\hspace{-.7em} \frac{6E\cdot I}{L^2} &\hspace{-.7em} \frac{4E\cdot I}{L} &\hspace{-.7em}0&\hspace{-.7em} -\frac{6E\cdot I}{L^2}&\hspace{-.7em} \frac{2E\cdot I}{L} \\[0.5em] -\frac{A\cdot E}{L} &\hspace{-.7em}0 &\hspace{-.7em}0 &\hspace{-.7em}\frac{A\cdot E}{L} &\hspace{-.7em}0 &\hspace{-.7em}0 \\[0.5em] 0&\hspace{-.7em}-\frac{12E\cdot I}{L^3}&\hspace{-.7em} -\frac{6E\cdot I}{L^2} &\hspace{-.7em}0 &\hspace{-.7em} \frac{12E\cdot I}{L^3} &\hspace{-.7em} -\frac{6E\cdot I}{L^2} \\[0.5em] 0&\hspace{-.7em}\frac{6E\cdot I}{L^2} &\hspace{-.7em} \frac{2E\cdot I}{L} &\hspace{-.7em}0&\hspace{-.7em}-\frac{6E\cdot I}{L^2} & \frac{4E\cdot I}{L}\\[0.5em] \end{bmatrix}

Units of frame element stiffness matrix: In the frame element stiffness matrix formula, we have four types of terms - AEL\frac{AE}{L}, EIL3\frac{EI}{L^3}, EIL2\frac{EI}{L^2}, and EIL\frac{EI}{L}. The units for these terms are given in the table below:

Matrix item

Term

Unit

k₁₁, k₁₄, k₄₁, k₄₄

AEL\frac{AE}{L}

N/m\rm N/m

k₂₂, k₂₅, k₅₂, k₅₅

EIL3\frac{EI}{L^3}

N/m\rm N/m

k₂₃, k₂₆, k₃₂, k₃₅, k₅₃, k₅₆, k₆₂, k₆₆

EIL2\frac{EI}{L^2}

N\rm N

k₃₃, k₃₆, k₆₃, k₆₆

EIL\frac{EI}{L}

Nm\rm N-m

Using our stiffness matrix calculator

Our stiffness matrix calculator is a robust tool at your disposal for determining your element stiffness matrix:

  1. Select the type of element you wish to calculate the element stiffness matrix for. You can choose between:

    • Bar/truss element;

    • Beam element; or

    • Frame element.

  2. For a bar element, enter the following data:

    1. Young's modulus of the bar.

    2. Bar's length.

    3. Cross-sectional area of the bar.

    4. Angle of the orientation of the bar with respect to the global x-axis.

  3. For a beam element, the calculator requires the following inputs from you:

    1. Young's modulus of the beam.

    2. Moment of inertia of the beam.

    3. Beam element's length.

  4. For a frame element, enter the following data:

    1. Young's modulus of the frame.

    2. Moment of inertia of the frame.

    3. Length of the frame.

    4. Frame's cross-sectional area.

  5. Sit back and relax as our calculator automatically calculates your element stiffness matrix for you!

  6. You can also choose the units in which you wish to calculate the stiffness matrix!

Once you've determined the stiffness matrix, you'll have to deal with more matrix algebra. Our matrix addition calculator and matrix multiplication calculator will prove useful to your cause!

FAQ

What is the stiffness of a 1 m steel bar with 0.2 m² cross-section?

The stiffness of a 1-meter steel bar with 0.2 m2 cross-section is 4 × 1010 N/m or 40 GN/m. To determine this answer, follow these steps:

  1. Look up Young's modulus of steel:

    E = 200 GPa

  2. Multiply this E value with the cross-section area of the bar:

    200 × 109 × 0.2 = 40 × 109

  3. Divide this value by the length of the bar to obtain its stiffness:

    k = (40 × 109)/1 = 4 × 1010 N/m or 40 GN/m

Is the stiffness matrix singular?

Yes, the stiffness matrix is singular, meaning its determinant is zero. Because inverting a singular matrix is impossible, a system of finite element equations cannot be solved without any prescribed boundary conditions.

What is the difference between a beam element and a bar element?

A bar element can only have axial forces, whereas a typical beam element can only have shear forces and bending moments. A combination of these elements, the frame element, can carry both axial and lateral forces. Note that the beam element can also develop axial forces in some finite element programs.

What are the important properties of a stiffness matrix?

The following are important properties of a stiffness matrix:

  1. A stiffness matrix is always symmetric.
  2. The stiffness matrix is singular, meaning its determinant is zero.
  3. Introduction of boundary conditions can change the stiffness matrix into a positive definite matrix, so the finite element equation system has a unique solution.
Krishna Nelaturu
Type of element:
Beam element
Beam properties
Young's Modulus (E)
GPa
Moment of Inertia (I)
mm⁴
Length of the beam (L)
m
Stiffness matrix of beam element
Stiffness unit for EI/L³ terms
N/m
Stiffness unit for EI/L² terms
N
Stiffness unit for EI/L terms
N-m or kN-mm
Check out 38 similar materials and continuum mechanics calculators 🧱
Angle of reposeAngle of twistBend allowance… 35 more
People also viewed…

Addiction

Addiction calculator tells you how much shorter your life would be if you were addicted to alcohol, cigarettes, cocaine, methamphetamine, methadone, or heroin.

Critical damping

The critical damping calculator will help you find out the critical damping coefficient of a system.

Millionaire

This millionaire calculator will help you determine how long it will take for you to reach a 7-figure saving or any financial goal you have. You can use this calculator even if you are just starting to save or even if you already have savings.

RC filter

Use our RC filter calculator to determine the cutoff frequency for a low-pass or high-pass RC filter circuit.
Copyright by Omni Calculator sp. z o.o.
Privacy, Cookies & Terms of Service