Summary
In this lecture, we'll cover the following:
- Writing a function to visualise a 2D finite element mesh.
- Extracting and organising mesh data (nodes, coordinates, elements, corners).
- Plotting quadrilateral elements while filtering out points and lines.
- Adding optional features: node display, element display, and labelling.
- Handling mesh data issues (e.g. reshaping coordinate arrays).
- Demonstrating the effect of mesh density and subdivision.
In this lecture, we build a custom function to visualise a 2D finite element mesh with flexible display options. We extract key data from the mesh structure, including node tags, coordinates, and element connectivity, and create a utility mapping between node tags and indices. We then focus on plotting only quadrilateral elements, ensuring they are displayed correctly by closing their geometry, and introduce optional features such as showing or hiding nodes, elements, and their respective labels.
We also address a practical issue with data formatting, correcting the structure of the nodal coordinate array to enable proper plotting. Beyond basic visualisation, we enhance the function by adding element-centred labels, boundary outlines, and node annotations with offsets for clarity. Finally, we explore how mesh density affects the visual output and preview upcoming extensions to the meshing process, including handling openings and enforcing specific node locations, as well as ensuring correct element node ordering for compatibility with the finite element solver.
Next up
In the next lecture, we will address an important practical issue: ensuring that element node ordering is consistent and compatible with our finite element solver.
Tags
Please log in or enroll to continue
If you've already enrolled, please log in to continue.
Finite Element Analysis of Plate and Shell Structures: Part 1 - Plates
An analysis pipeline for thick and thin plate structures, a roadmap from theory to toolbox
After completing this course...
- You will understand how Reissner-Mindlin theory enables us to accurately capture both thin and thick plate behaviour.
- You will understand how to turn the fundamental mechanics of plate behaviour into a custom finite element solver written in Python.
- You will have developed meshing workflows that utilise the powerful open-source meshing engine, GMSH.
- In addition to using your own custom finite element code, you will be comfortable validating your results using OpenSeesPy and Pynite.