DegreeTutors/Finite Element Analysis of Continuum Structures in Python

  • $97

Finite Element Analysis of Continuum Structures in Python

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

Table of contents

1. Welcome and Preliminaries

Welcome to the course! By the time you finish this course you’ll have your own finite element solver for 2D solid structures and a workflow that allows you to model and analyse plane stress and plane strain structures.  

In this short introduction section I'll give you a brief roadmap for the course and give you a sense of what to expect and when. 

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. 
1. Introduction and course overview
  • 9 mins
  • 463 MB
Preview
2. What you should cover before this course
  • 5 mins
  • 255 MB
Preview
Support and Lecture Q&A (Please read!)

    2. The Isoparametric Finite Element Method

    In this section we’re going to cover the fundamentals 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. 

    We’ll build on this and introduce the 4 node quad element and discuss how shape functions relate to this 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 loads for self-weight and surface forces. We’ll nail down the basic approach and implement a simple example in this section. 

    Take your time with this section in particular - extra time spent here will pay off down the road. 
    3. Section overview
    • 2 mins
    • 96.6 MB
    Preview
    4. Bar stiffness using generalised coordinates
    • 16 mins
    • 215 MB
    5. Bar stiffness using shape functions
    • 19 mins
    • 277 MB
    6. Quad elements and shape functions
    • 13 mins
    • 167 MB
    7. The strain-displacement matrix, B
    • 15 mins
    • 213 MB
    8. The Jacobian Matrix, J
    • 10 mins
    • 128 MB
    9. Calculating the strain-displacement matrix
    • 22 mins
    • 234 MB
    9.1 Jupyter Notebook - (lecture 9)
    • 9.8 KB
    10. Accounting for plane-stress/strain
    • 18 mins
    • 232 MB
    11. The equivalent surface force vector
    • 23 mins
    • 267 MB
    12. The equivalent body force vector
    • 10 mins
    • 88.3 MB
    12.1 Jupyter Notebook - (lectures 11-12)
    • 9.55 KB

    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. 
    13. Section overview
    • 2 mins
    • 78.2 MB
    Preview
    14. Gauss numerical integration scheme
    • 21 mins
    • 293 MB
    15. Numerical integration in 2D
    • 18 mins
    • 154 MB
    15.1 Jupyter Notebook - (lecture 15)
    • 361 KB
    16. Calculating the element stiffness matrix
    • 21 mins
    • 222 MB
    17. Stiffness matrix convergence
    • 8 mins
    • 127 MB
    17.1 Jupyter Notebook - (lectures 16-17)
    • 25.6 KB

    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. We’ll also write codes that allow us to define load locations and support conditions. All of this data will be exported to csv files. 

    The next step is to bring this data into our Jupyter Notebook - so in the final lecture in this section we’ll write code that imports this data into our Notebook ready for processing in the next section. 
    18. Section overview
    • 2 mins
    • 67.4 MB
    Preview
    19. Generating a simple quad mesh in Blender
    • 8 mins
    • 88.9 MB
    20. Exporting mesh data from Blender
    • 22 mins
    • 236 MB
    21. Exporting support and point load data
    • 28 mins
    • 312 MB
    21.1 Blender File (lectures 19-21)
    • 119 KB
    22. Importing support, loading and mesh data
    • 22 mins
    • 265 MB
    22.1 Jupyter Notebook - (lecture 22)
    • 24.3 KB

    5. Implementing the Isoparametric Finite Element Method

    This is the section where it all comes together - all of 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. After this our job is to squeeze as much additional information from our model as possible….and generate those nice stress distribution plots!
    23. Section overview
    • 2 mins
    • 76.1 MB
    Preview
    24. Analysis parameters and plotting the structure
    • 16 mins
    • 184 MB
    25. Building the global force vector
    • 8 mins
    • 83.3 MB
    26. Defining the element stiffness matrix
    • 7 mins
    • 78.2 MB
    27. Assigning element stiffness coefficients
    • 15 mins
    • 222 MB
    28. Building the structure stiffness matrix
    • 11 mins
    • 139 MB
    29. Solving the structure
    • 9 mins
    • 106 MB
    30. Visualising the deformed structure
    • 7 mins
    • 98.5 MB
    31. Generating detailed text output
    • 9 mins
    • 106 MB
    32. Euler-Bernoulli deflection validation
    • 14 mins
    • 182 MB
    32.1 Jupyter Notebook - (lectures 24-32)
    • 159 KB
    Mid-course check-in

      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 FE analysis with normal and shear stress distributions from fundamental beam theory. 
      33. Section overview
      • 3 mins
      • 138 MB
      Preview
      34. Generating the stress calculation grid
      • 9 mins
      • 127 MB
      35. Visualising the stress calculation grid
      • 5 mins
      • 87.1 MB
      36. Calculating the strain and stress fields
      • 18 mins
      • 281 MB
      37. Visualising the normal stress distribution
      • 19 mins
      • 224 MB
      38. Building normal strain/stress contour plots
      • 16 mins
      • 222 MB
      39. Building shear stress/strain contour plots
      • 11 mins
      • 174 MB
      40. Building a stress/strain interpolation query function
      • 14 mins
      • 174 MB
      41. Visualising stress distributions at a vertical section
      • 12 mins
      • 157 MB
      42. Euler-Bernoulli stress comparison
      • 10 mins
      • 115 MB
      42.2 Jupyter Notebook - (lectures 34-42)
      • 214 KB

      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. 
      43. Section overview
      • 2 mins
      • 69.5 MB
      Preview
      44. Implementing self-weight in our analysis
      • 15 mins
      • 211 MB
      45. Correcting reactions for self-weight
      • 19 mins
      • 282 MB
      46. Distributed loading - Interpolation limits
      • 16 mins
      • 197 MB
      47. Distributed loading - Data export from Blender
      • 12 mins
      • 149 MB
      48. Importing distributed loading data
      • 7 mins
      • 96.6 MB
      49. Surface force vector - Setup
      • 22 mins
      • 312 MB
      50. Surface force vector - Integration
      • 14 mins
      • 267 MB
      51. Updating the global force vector and validating
      • 16 mins
      • 325 MB
      52. Orthogonal surface forces
      • 11 mins
      • 215 MB
      52.1 Jupyter Notebook - (lectures 44-52)
      • 352 KB

      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 on this section - jump down to the appendix where I cover Principal Stresses in more detail. 

      After reviewing principal stresses in theory - we’ll use our existing stress field data to calculate the principal stresses and orientation of the principal planes. We’ll then visualise both the magnitude and orientation information. 

      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. 

      This basically concludes our hard-core solver development. We’ll have some tweaks to make in the next section but once this section is complete you can congratulate yourself on building a very nice piece of analysis software. 
      53. Section overview
      • 2 mins
      • 105 MB
      Preview
      54. A recap of principal stresses
      • 17 mins
      • 224 MB
      55. Calculating principal angles and stresses
      • 9 mins
      • 111 MB
      56. Sorting principal stresses
      • 6 mins
      • 69 MB
      57. Identifying max ten/comp principal stresses
      • 12 mins
      • 146 MB
      58. Visualising the principal stress magnitude field
      • 13 mins
      • 199 MB
      59. Visualising the principal stress vector field
      • 19 mins
      • 290 MB
      60. Combining the magnitude and vector fields
      • 7 mins
      • 145 MB
      60.1 Jupyter Notebook - (lectures 55-60)
      • 159 KB
      61. The von Mises failure theory
      • 23 mins
      • 314 MB
      62. Visualising the von Mises stress field
      • 15 mins
      • 242 MB
      62.1 Jupyter Notebook - (lecture 62)
      • 159 KB
      63. Perimeter stresses and updating plot edges - Planning
      • 15 mins
      • 187 MB
      64. Perimeter stresses and updating plot edges - Coding
      • 29 mins
      • 468 MB
      64.1 Jupyter Notebook - (lecture 64)
      • 163 KB

      9. Generating and Analysing Complex Meshes

      The power of the finite element method is its ability to accommodate non-standard structural shapes. But this requires us to mesh complex 2D geometries and the methods we’ve used to generate our mesh way back in section 4 are not going to cut it for long. 

      We need a more robust way of generating the finite element mesh for our structures. We’ll discuss 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 complex geometries.
      65. Section overview
      • 2 mins
      • 91.1 MB
      Preview
      66. Generating 2D geometry in Blender
      • 16 mins
      • 198 MB
      67. Meshing complex geometries
      • 14 mins
      • 186 MB
      68. Exporting an irregular mesh
      • 23 mins
      • 308 MB
      68.1 Blender File (lectures 66-68)
      • 184 KB
      69. Generalising our solver
      • 12 mins
      • 260 MB
      70. Stress distribution masks
      • 22 mins
      • 339 MB
      70.1 Jupyter Notebook - (lecture 69-70)
      • 542 KB
      71. Course wrap up and Certificate of Completion
      • 6 mins
      • 293 MB
      72. [BONUS] Cantilever model and analysis walkthrough
      • 23 mins
      • 684 MB
      Preview
      72.1 Blender File (lecture 72)
      • 713 KB
      72.2 Jupyter Notebook - (lecture 72)
      • 345 KB

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

      This appendix is provided for anyone who feels like they would benefit from a review of the fundamentals of 2D stress analysis. This will be particularly helpful before tackling sections 6 and 8 on visualising stresses and strains and principal stresses respectively. 
      A1. The 2D stress element
      • 24 mins
      • 364 MB
      A2. The stress transformation equations
      • 24 mins
      • 308 MB
      A3. Visualising the transformation equations
      • 31 mins
      • 401 MB
      A4. Principal stresses and principal planes
      • 29 mins
      • 378 MB
      A5. Maximum shear stress
      • 26 mins
      • 348 MB
      A6. Stress analysis worked example
      • 16 mins
      • 224 MB
      A7. Stress analysis worked example - coded solution
      • 22 mins
      • 345 MB
      A8. Mohr's circle of stress
      • 17 mins
      • 195 MB
      A9. Mohr's circle example solution
      • 27 mins
      • 386 MB
      Jupyter Notebook - 2D stress analysis and Mohr's circle
      • 309 KB