fbpx

Finite Element Analysis of Continuum Structures in Python

Use the Isoparametric Finite Element Method to build an analysis tool for 2D structures in Python.

$97
Play Video


What you'll learn

You’ll build Python software tools to analyse continuum structures using the Isoparameteric Finite Element method.
You’ll understand how the assumptions of plane stress and plane strain allow us to analyse 3D structures with 2D models.
You’ll use open source tools to generate structural models and mesh data that can be analysed with your Finite Element code.
You’ll learn about von Mises Failure Criterion and Principal Stresses and visualise these across your structures.


Description

Engineers typically start out learning how to analyse rectilinear or cuboid structures. This means we focus on structures that have square or rectangular cross-sections and are prismatic, meaning the cross-section maintains a constant size and shape. This is a great starting point because we can easily build analytical models of the structure’s behaviour. While this serves us well in many cases, in reality we’re often faced with more organic or ‘irregular’ structural forms. This is where finite element analysis can help. In this course we’re going to build a full Isoparametric Finite Element solver. This unlocks our ability to model and analyse any 2D structural form.
Plane Strain Finite Element Analysis | DegreeTutors.com
When we combine our finite element analysis solver with knowledge of the theory of plane stress and plane strain, this course will equip you with the ability to model 3D structures using 2D finite element models. When you complete this course you will have built your own 2D Finite Element solver, but more importantly, you’ll understand exactly how it works and what every single line of code does!  Once complete, you can use your solver to show:
  • deflected shapes
  • normal stress and strain fields
  • shear stresses and strains fields
  • principal stress magnitudes fields
  • principal plane orientations
  • von Mises stress fields
We’ll build in the ability to simulate the influence of point load forces, distributed forces and body or self-weight forces. Once you complete this course you’ll have the knowledge, experience and confidence to extend your solver and add the new features that matter to you.


Analyse non-prismatic, realistic structural forms

Finite Element Analysis of Cantilever | DegreeTutors.com

One of the barriers you quickly run into when trying to write your own finite element analysis tools is mesh generation. To do a finite element analysis we need mesh to analyse. For this task we’re going to use Blender. Blender is a powerful open-source 3D modelling tool. With only a handful of Blender’s modelling tools, we open the door to analysing the behaviour of any structure. We are limited only by our imagination!

With its intuitive modelling workflow and Python API, Blender is an excellent compliment to our structural analysis solver. To generate more complex meshes we’re going to leverage the power of the Blender plugin ecosystem and use a third party tool to generate FE meshes in just a few clicks.

Finite Element Mesh - Blender | DegreeTutors.com

We’ll develop our Python code using the versatile Jupyter development environment. When you complete this course you will have a standalone analysis Jupyter Notebook to deploy on your own projects. The code developed within each section of the course is also provided for download as a reference.

You DO NOT need to be a Python programming guru to take this course. If you’ve taken the suggested prerequisite course – or even if you’re just familiar with basic programming ideas like functions, loops and variables that will be plenty to get you started. Programming should not be a barrier to taking this course!

I suggest that you take my 2D truss analysis course before this one if you’re not familiar with the basic concept of stiffness method analysis or matrix based analysis methods. Take a look at the ‘What you should cover before this course’ lecture in the course content list below for a brief discussion of assumed prerequisite knowledge.

I’ve also included an optional appendix to this course on the Fundamentals of 2D Stress Analysis. You can see the appendix lecture list below. This will provide all of the background knowledge required on the topic of 2D stress analysis for anyone not familiar with the basics of stress transformation equations, principal stresses, and principal planes.


Course Breakdown

Section 1: Welcome and Preliminaries

In this short introduction section I’ll set out a roadmap for the course and give you a sense of what to expect. This will give you a good idea of what we’re going to cover during this course. I’ll also briefly comment on assumed prerequisite knowledge – in other words what you should have covered before taking this course, and also what you don’t necessarily need to know. Both of the short lectures in this section can be watched below before enrolling – take a look.

Section 2: The Isoparametric Finite Element Method

In this section we’re going to cover the fundamental theory that the course is built on. We’ll start by introducing some fundamental concepts like shape functions and see how we can apply them when deriving the stiffness matrix for a simple bar element. Then we’ll build on this and introduce the 4 node quadrilateral (quad) element. The middle of this section focuses on the strain-displacement matrix which is a key part of determining the element stiffness matrix. We’ll finish up by explaining how to determine the equivalent nodal forces for self-weight and surface forces. We’ll nail down the basic approach and implement a simple example in this section.

Section 3: Gauss-Legendre Numerical Integration

In this section we’re going to introduce the Gauss-Legendre numerical integration scheme. This is a hugely valuable tool for complex integration and reduced the process down to a simple summation of terms. Like any numerical method, we’ll need to be mindful of how the accuracy of the technique is affected. So as well as demonstrating how to implement the scheme, we’re going spend some time understanding convergence and how to ensure accurate results. Once this section is complete – we’ve covered the bulk of the theory necessary to build our solver.

Section 4: Generating Structure and Mesh Data

To really leverage the power of the finite element analysis technique, we need an efficient way of building a structural mesh to analyse. For this task we’re going to use Blender which can be downloaded for free from Blender.org. There are a number of ways we could go about this, but very few options provide us with the convenience and flexibility of Blender. After modelling a simply supported beam we’ll generate a mesh across that structure and then write some code to capture the mesh definition and export it to a csv file. The final step in this section is to bring this data into our Jupyter Notebook – so we’ll write code that imports this data into our Jupyter Notebook ready for processing in the next section.

Section 5: Implementing the Isoparametric Finite Element Method

This is the section where it all comes together – all of the earlier theory and the mesh data we generated in the previous section. In this section we’re going to build the core of our solver. This means we’ll build the structure stiffness matrix and solve the system of equations that is the mathematical representation of our structure. We’ll round out the section with a validation exercise and compare the deflections from our finite element analysis with those from a simple Euler-Bernoulli deflection calculation. Completing this section is a key milestone in our development as we’ll have implemented the core solver.

Section 6: Visualising the Strain and Stress Fields

This section is about mining for the additional information embedded within our model. We’re going to focus on building stress contour maps that show us how the different stresses vary throughout the structure. Before working through this section, you might find it helpful to review the stress analysis lectures in the appendix. Particularly if you’re not familiar with the concept of normal and shear strains and stresses at a point and the purpose of stress transformation equations. We’ll finish this section with another validation exercise and compare the stress distributions from our finite element analysis with normal and shear stress distributions derived from fundamental beam theory.

Section 7: Implementing Area and Volume Forces

In this section we’re going to implement the ability for our code to simulate the influence of area and body forces. We’ve already implemented both of these calculations for a single element in section 2 – here we’ll just scale this up for our entire structure. We’ll start with body forces or self-weight. After this we’ll move on to surface forces. For surface forces we’ll start off in Blender by identifying the location and magnitude of our surface forces. Once these are defined in Blender, we’ll export this information into our notebook and set about building the functionality. Once this section is complete we’re about 75-80% complete and have a capable solver on our hands.

Section 8: Principal Stresses and von Mises stress:

This section is really about adding bells and whistles or polish to our solver in the form of Principal Stress and von Mises stress distribution plots. We’ll start off with a brief review of principal stresses. If you want to dig a little deeper on the topic before taking this section – jump down to the appendix where I cover principal stresses in more detail. After reviewing principal stress theory – we’ll calculate and then visualise the principal stresses and orientation of the principal planes. After this we’ll take a break from coding and discuss the von Mises failure theory. Once we have the concepts and key equations in hand, we’ll use our principal stress fields to calculate the von Mises stress field.

Section 9: Generating and Analysing Complex Meshes:

The power of the finite element method is its ability to accommodate non-standard or irregular structural shapes. But this requires us to mesh complex 2D geometries, so we need a more robust way of generating the finite element mesh for our structures. We’ll introduce two tools to achieve this in this section and make some amendments to our export code to work with our new more complex meshes. We’re going to base this section around an arched-viaduct structure. This will give us enough complexity to stress test our code and highlight areas that require attention before we can apply our code to more complex geometries.

Appendix: Fundamentals of 2D Stress Analysis and Mohr’s Circle:

To get the most from this course you need to have an understanding of 2D stress analysis – this way our stress contour plots will make a lot more sense. If you’re not familiar with this topic or you only have a vague recollection of the theory from dim and distant past – no problem! I’ve included an appendix, which is basically a whole second course on the topic of 2D stress analysis. In this appendix course, I’ll cover the fundamentals of normal stress, shear stress, principal stresses, principal planes and I’ll even discuss Mohr’s circle which is not strictly necessary – but still good to know!

Who this course is for

  • Students and professional engineers who’ve studied matrix analysis methods and now want to learn how to analyse continuum structures (2D rather than linear structural elements).
  • Students and professional engineers who want to better understand what’s happening behind the scenes of their ‘black box’ commercial finite element software. 
  • Students and professional engineers who’ve taken some or all of our previous direct stiffness method courses (see bundle discount at the bottom of this page) 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.

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 Completion Certificate

Certificate of Completion 15 | DegreeTutors.com
  • Download your personalised Certificate of Completion once you’ve finished all course lectures.
  • Applying for jobs? Use your Certificate of Completion to show prospective employers what you’ve been doing to improve your capabilities.
  • Independently completing an online course is an achievement. Let people know about it by posting your Certificate of Completion on your Linkedin profile or workplace CPD portfolio.


Course preview

Lecture 1: Introduction and course overview

Lecture 72: Cantilever model and analysis walkthrough

Play Video
Play Video


Course content

Welcome and Preliminaries

Vid 1 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Introduction and course overview (Preview)
(08:11)
Vid 2 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
What you should cover before this course (Preview)
(04:58)

The Isoparametric Finite Element Method

Vid 3 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Section overview (Preview)
(01:39)
Vid 4 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Bar stiffness using generalised coordinates
(15:54)
Vid 5 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Bar stiffness using shape functions
(18:52)
Vid 6 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Quad elements and shape functions
(12:39)
Vid 7 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
The strain-displacement matrix, B
(14:32)
Vid 8 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
The Jacobian Matrix, J
(09:18)
Vid 9 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Calculating the strain-displacement matrix
(21:56)
Vid 10 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Accounting for plane-stress/strain
(17:36)
Vid 11 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
The equivalent surface force vector
(22:37)
Vid 12 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
The equivalent body force vector
(09:17)

Gauss-Legendre Numerical Integration

Vid 13 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Section overview (Preview)
(01:25)
Vid 14 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Gauss numerical integration scheme
(20:08)
Vid 15 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Numerical integration in 2D
(17:25)
Vid 16 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Calculating the element stiffness matrix
(20:43)
Stiffness matrix convergence
(07:57)

Generating Structure and Mesh Data

Vid 18 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Section overview (Preview)
(01:11)
Vid 19 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Generating a simple quad mesh in Blender
(07:09)
Vid 20 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
 Exporting mesh data from Blender
(21:02)
Vid 21 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Exporting support and point load data
(27:09)
Importing support, loading and mesh data
(21:58)

Implementing the Isoparametric Finite Element Method

Vid 23 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Section overview (Preview)
(01:18)
Vid 24 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Setting analysis parameters and plotting the structure
(15:07)
Vid 25 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Building the global force vector
(07:12)
Vid 26 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Defining the element stiffness matrix
(06:23)
Vid 27 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Assigning the element stiffness coefficients
(14:56)
Vid 28 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Building the structure stiffness matrix
(10:58)
Vid 29 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Solving the structure
(08:11)
Vid 30 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Visualising the deformed structure
(06:12)
Vid 31 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Generating detailed text output
(08:27)
Vid 32 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Euler-Bernoulli deflection validation
(09:30)

Visualising the Strain and Stress Fields

Vid 33 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Section overview (Preview)
(02:24)
Vid 34 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Generating the stress calculation grid
(08:49)
Vid 35 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Visualising the stress calculation grid
(04:32)
Vid 36 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Calculating the strain and stress fields
(17:15)
Vid 37 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Visualising the normal stress distribution
(18:46)
Vid 38 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Building normal strain/stress contour plots
(15:17)
Vid 39 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Building shear stress/strain contour plots
(10:34)
Vid 40 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Building a stress/strain interpolation query function
(13:22)
Vid 41 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Visualising stress distributions at a vertical section
(11:34)
Euler-Bernoulli stress validation
(09:30)

Implementing Area and Volume Forces

Vid 43 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Section overview (Preview)
(01:13)
Vid 44 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Implementing self-weight in our analysis
(15:23)
Vid 45 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Correcting self-weight reactions
(18:59)
Vid 46 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Distributed loading – Interpolation limits
(15:28)
Vid 47 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Distributed loading – Data export from Blender
(11:13)
Vid 48 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Importing distributed loading data
(06:34)
Vid 49 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Surface force vector – Setup
(21:18)
Vid 50 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Surface force vector – Integration
(13:12)
Vid 51 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Updating the global force vector and validating
(15:49)
Vid 52 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Orthogonal surface forces
(10:30)

Principal Stresses and von Mises Failure Theory

Vid 53 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Section overview (Preview)
(01:47)
Vid 54 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
A recap of principal stresses
(16:49)
Vid 55 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Calculating principal angles and stresses
(08:38)
Vid 56 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Sorting principal stresses
(05:10)
Vid 57 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Identifying max ten/comp principal stresses
(11:24)
Vid 58 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Visualising the principal stress magnitude field
(12:37)
Vid 59 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Visualising the principal stress vector field
(18:42)
Vid 60 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Combining the magnitude and vector fields
(06:22)
Vid 61 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
The von Mises failure theory
(22:34)
Vid 62 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Visualising the von Mises stress field
(14:49)
Vid 63 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Perimeter stresses and updating plot edges – Planning
(14:29)
Vid 64 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Perimeter stresses and updating plot edges – Coding
(28:02)

Generating and Analysing Complex Meshes

Vid 65 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Section overview (Preview)
(01:37)
Vid 66 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Generating 2D geometry in Blender
(15:39)
Vid 67 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Meshing complex geometries
(13:12)
Vid 68 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Exporting an irregular mesh
(22:48)
Vid 69 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Generalising our solver
(11:15)
Vid 70 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Stress distribution masks
(21:35)
Vid 71 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
Course wrap up and Certificate of Completion
(06:24)
Vid 72 - Finite-Element-Analysis-of-2D-Solid-Structures-in-Python | DegreeTutors.com
[BONUS] Cantilever model and analysis walkthrough (Preview)
(22:28)


BONUS COURSE: Fundamentals of 2D Stress Analysis and Mohr's Circle

Fundamentals-of-2D-Stress-Analysis-and-Mohr's-Circle | DegreeTutors.com


Bonus lectures

Welcome and Preliminaries

Vid-1 Fundamentals of 2D Stress Analysis | DegreeTutors.com
The 2D stress element
(23:35)
Vid-2 Fundamentals of 2D Stress Analysis | DegreeTutors.com
The stress transformation equations
(23:24)
Vid-3 Fundamentals of 2D Stress Analysis | DegreeTutors.com
Visualising the transformation equations
(30:58)
Vid-4 Fundamentals of 2D Stress Analysis | DegreeTutors.com
Principal stresses and principal planes
(28:32)
Vid-5 Fundamentals of 2D Stress Analysis | DegreeTutors.com
Maximum shear stress
(25:20)
Vid-6 Fundamentals of 2D Stress Analysis | DegreeTutors.com
Stress analysis worked example
(15:39)
Vid-7 Fundamentals of 2D Stress Analysis | DegreeTutors.com
Stress analysis worked example – coded solution
(21:34)
Vid-8 Fundamentals of 2D Stress Analysis | DegreeTutors.com
Mohr’s circle of stress
(16:50)
Vid-9 Fundamentals of 2D Stress Analysis | DegreeTutors.com
The equivalent surface force vector
(26:28)


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.


Ready to get started?



Build more tools - Save 35% Direct Stiffness Method Bundle

The Direct Stiffness Method for Truss Analysis with Python | DegreeTutors.com
Play Video

The Direct Stiffness Method for Truss Analysis with Python

Build your own finite element truss analysis software using Python and tackle large scale structures.

After completing this course…

  • You’ll understand how to use the Direct Stiffness Method to build complete structural models that can be solved using Python.
  • You’ll have your own analysis programme to identify displacements, reactions and internal member forces for any truss.
  • You’ll understand how common models of elastic behaviour such as plane stress and plane strain apply to real-world structures.
Play Video

Beam & Frame Analysis using the Direct Stiffness Method in Python

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

After completing this course…

  • You’ll understand how to model beam elements that resist axial force, shear forces and bending moments within the Direct Stiffness Method.
  • You’ll have your own 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.
Play Video

3D Space Frame Analysis using Python and Blender

Develop tools to model and analyse complex 3D space frame structures using Python.

After completing this course…

  • You’ll understand how to apply the Direct Stiffness Method to solve 3D space frame structures.
  • You’ll have your own analysis programme to identify displacements, reactions and internal member forces for any 3D space frame.
  • You’ll be able to use Blender, a powerful open source 3D modelling software to build, visualise and export your structural models.