fbpx

Beam & Frame Analysis using the Direct Stiffness Method in Python

Build a sophisticated structural analysis software tool that models beams and frames using Python.

5.00
5/5
20 students enrolled
Play Video


What you'll learn

You’ll understand how to model beam elements that resist axial force, shear forces and bending moments within the Direct Stiffness Method.
You’ll learn how to build analysis software that can generate shear force diagrams, bending moment diagrams, deflected shapes and more.
You’ll understand how to model rotational pins within your structures, inter-nodal distributed loading and realistic flexible supports.
You’ll have the tools, knowledge and confidence to expand your code even further beyond what we cover in the course.


Description

In this course we’ll be focusing on building a beam and frame analysis programme in Python using the Direct Stiffness Method. Once you’ve completed this course you’ll have developed from scratch, your own structural analysis software tool that can generate bending moment diagrams, shear force diagrams, and defections for beam and frame structures.

Beam-Frame-Solver-Output | DegreeTutors.com

If you’ve ever wanted to understand how structural analysis software works, what better way than to build your own!

Engineers today typically rely pretty heavily on structural analysis software. While understanding hand analysis techniques forms the foundation of our understanding of structural behaviour, once things scale up on real world engineering projects, finite element analysis software becomes incredibly useful. If you’re wielding these sophisticated tools, as a student or practicing engineer, it makes sense to have a good understanding of what’s going on behind the scenes.

This course follows on from our course on truss analysis using the direct stiffness method with Python. If you’ve completed that course, then this course is the natural next step. We’ll take our fundamental understanding of the direct stiffness method and supercharge it by expanding to consider beam elements resisting bending and shear. The code we develop in this course, will be able to handle, pinned members, inter-nodal loading and even flexible supports.

Our pathway through this course is broken into 8 sections.

Section 1: Welcome and Setup

In this brief introductory section we’ll take care of some housekeeping before getting into the course proper. The main goal of this section is to get your coding environment set up and to give you an idea of how we approach using and learning Python in this course. Now, most of you should already have completing this but I’ve included these setup lectures again for anyone who finds themselves here and hasn’t or doesn’t need to complete the prerequisite truss analysis course.

Section 2: The Beam Element Stiffness Matrix

In section 2, we’ll use the finite element equations to derive the stiffness matrix for a beam element. This is the basic building block of the direct stiffness method and so it’s worth spending some time to completely understand its origins. We’ll also formalise a transformation matrix that we can use with our new 6×6 stiffness matrix. The style of delivery in this initial theory section will be handwritten notes. You’re encouraged to build your own notes in parallel as we move through this section.

Section 3: Beam & Frame Analysis Step-by-Step

In section 3, we’re going to manually work our way through the actual analysis procedure by focusing on a simple structure. This will allow you to familiarise yourself with the discrete steps in the procedure and also give us the opportunity to highlight where the procedure differs for beam and axially loaded bar elements. In this section we’ll lean on Powerpoint slides. As veterans of DegreeTutors courses will know, not my favourite medium, but it makes sense when we dealing with larger matrices.

Section 4: Implementing Beam & Frame Analysis in Python

In section 4 we finally get our feet wet with some coding. We fire up a Jupyter notebook and build a basic implementation of the direct stiffness method that directly implements our solution from section 3. The aim here is just to make the jump to code and get a working solution running.

Section 5: Generalising our Code

In section 5, we’re going to generalise our code and make it suitable for analysing different structures. This section is where we turn our bespoke structure solver from the previous section into a generalised code that can be easily deployed to other structures. After completing this section we’ll have a solver that takes inputs, does the hard work on its own and then gives us the outputs.

Section 6: Building Better Visualisations

In section 6 we spice up our code by building in some helpful data visualisations. What good is a structural analysis programme without the ability to output shear and moment diagrams. In this section we build these and other data visualisations into our code. We also add a couple of other nice features, in particular user interface widgets to control how our plots look.

Section 7: Pins, Inter-Nodal Loading & Flexible Supports

In section 7 we further expand our solver to include more functionality that will massively enhance the usefulness of our solver. We’ll build in the ability to handle pinned members within our structures, inter-nodal distributed loads and flexible spring supports. With these additions our solver takes a massive step forward in usability and sophistication.

Section 8: Test Questions

Finally in section 8 we can play around with our new code by using it to analyse some example structures. We don’t do any new code development in section 8, this section is just about getting some practice in actually using our solver.

Who this course is for

  • Students and engineers who’ve studied matrix analysis methods but never implemented what they learned in code to realise the full potential of these techniques.
  • Students and engineers who’ve taken our truss analysis course and want to continue learning and expanding their abilities.
  • Anyone who wants to leverage programming as a tool for structural analysis or within their day-to-day study or work.

Although not absolutely essential, it is highly recommended that you complete the prerequisite course before starting this course.

The codes developed in this course are for educational purposes only and are not tested or certified for use beyond the educational scope of this course. Always employ your own engineering judgement first and foremost, regardless of what the computer says!


Course preview

Lecture 10: Beam & Frame Analysis Procedure Overview

Lecture 54: Our Final Test Question

Play Video
Play Video


Course content

Welcome and Setup

Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN1
Introduction and course overview (Preview)
(05:53)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN2
Our approach to Python (Preview)
(02:02)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN3
Getting started with Jupyter Notebooks (Preview)

(12:03)

The Beam Element Stiffness Matrix

Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN4
Section overview (Preview)
(01:12)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN5
 Finite element equations – quick review (Preview)
(09:59)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN6
Stiffness matrix for a beam element – part 1
(20:27)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN7
Stiffness matrix for a beam element – part 2
(20:52)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN8
Transforming from local to global coordinates
(11:13)

Beam & Frame Analysis Step-by-Step

Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN9
Section overview (Preview)
(00:47)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN10
Analysis procedure overview (Preview)
(05:50)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN11
Calculating element stiffness matrices
(03:32)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN12
Building the primary stiffness matrix
(03:35)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN13
Reducing to the structure stiffness matrix
(02:30)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN14
Solving for unknown displacements
(01:46)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN15
Solving for reactions
(01:54)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN16
Finding axial forces, shears and moments
(05:17)

Implementing Beam & Frame Analysis in Python

Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN17
Section overview (Preview)
(01:01)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN18
Element stiffness matrices (Preview)
(18:08)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN19
Whole structure stiffness matrix
(13:34)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN20
Solving for displacements and reactions
(10:30)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN21
Evaluating bending moments and shear forces
(12:50)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN22
Visualising displacements
(09:52)

Generalising our Code

Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN23
Section overview (Preview)
(01:07)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN24
Element stiffness matrices
(09:05)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN25
The structure stiffness matrix
(05:42)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN26
Solving for displacements and reactions
(09:13)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN26
Solving for axial forces moments and shears
(06:44)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN28
Graphical and text output
(21:06)

Building Better Visualisations

Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN29
Section overview (Preview)
(01:01)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN30
Adding nodal annotations to deflections
(14:16)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN31
Plotting an axial force diagram
(08:00)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN32
Planning the bending moment diagram
(12:44)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN33
Building the bending moment diagram
(25:45)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN34
Building the shear force diagram
(08:34)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN35
Adding UI widgets for plot adjustments
(13:30)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN36
Label and widget refactor
(22:27)

Pins, Inter-Nodal Loading and Flexible Supports

Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN37
Section overview (Preview)
(01:50)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN38
Beam elements pinned at one end
(08:06)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN39
Capturing pin locations
(12:10)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN40
Pinned stiffness matrices
(18:54)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN41
Pinned structure stiffness matrix
(12:33)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN42
Solving for pinned member actions
(17:33)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN43
Dealing with inter-nodal loading
(17:16)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN44
Recording inter-nodal loading
(19:46)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN45
Removing Equivalent Nodal Actions
(13:37)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN46
Inter-nodal loading with pins
(06:45)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN47
Flexible supports
(11:52)

Test Questions and Wrap Up

Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN48
Section overview (Preview)
(00:33)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN49
Installing Nbextensions (optional)
(05:05)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN50
Test Question #1
(13:19)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN51
Test Question #2
(11:31)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN52
Test Question #3
(02:16)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN53
Test Question #4
(06:42)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN54
Test Question #5 (Preview)
(09:21)
Beams & Frame Analysis using the Direct Stiffness Method in Python | DegreeTutors.com_TN55
Course wrap up and debrief
(01:15)


Frequently Asked Questions

You’re buying lifetime access. You’ll also get all the course updates and new lessons for FREE forever. Come back to this course for reference any time in the future.

Absolutely. Even if you watched the full course, if you’re not satisfied, contact me in the first 30 days and I will give you a full refund, no questions asked. It would be helpful if you could tell me how I can improve the course for other students.

This is a video course hosted by Podia that requires you to log in and stream the videos. The course may also include downloadable PDFs, and Jupyter Notebooks.
Yes! I’ve partnered with Podia and Stripe to handle billing and provide a secure payment facility. DegreeTutors (me) never directly handle or store your credit card information.