Analysing rectangular plates with perfectly regular quad meshes can only take us so far. In reality, for our analysis pipeline to be practically useful, we need to be able to analyse more complex geometries with more elaborate arrangements of restraints. This means we need to focus on meshing.
Developing suitable finite element meshes is a critical pre-processing step for a high-quality finite element analysis. So, this is our sole focus in this section.
To build meshing algorithms from scratch is no small task and would require its own course. Thankfully, there are already excellent open-source tools that we can take advantage of to do the heavy lifting for us.
In this course, we’ll use GMSH. This is a mature open-source library for 2D and 3D meshing that is commonly used in FE and CFD work. In addition to having a graphical user interface, it has a full Python API, which is how we’ll interact with it.
We’ll start by recreating the regular rectangular mesh that we’ve been working on so far. Then we’ll expand from this and use GMSH to generate a non-rectangular solid 2D mesh. With a base mesh implemented, we can start to layer on more complexity.
We’ll start by adding holes or openings in our mesh. Then, we’ll implement the ability to specify nodal locations. This will be useful for specifying pre-defined column locations in a slab model, for example.
At the end of this section, we’ll take all of the GMSH and visualisation code we’ve developed and move it over into a utility Python script so we can easily import the functionality into our future Notebooks.
When you’ve completed this section, you’ll have added another really valuable tool to your toolbox - one that you’re very likely to use beyond this course. So, with that said, let’s get stuck in.