Catalogue
/
Software Development and Programming
/
Fundamentals of Finite Element Programming with Python

Fundamentals of Finite Element Programming with Python

Learn how finite element methods can be translated into structured, maintainable and extensible Python software.

What will you learn?

This practical follow-up course introduces the fundamental numerical and software concepts behind finite element programs. Rather than treating FEM software purely as a black box, participants implement the essential components of a simple finite element solver themselves.

The course focuses on concepts that are common across different engineering disciplines and provides a foundation for developing specialised simulation software in areas such as structural mechanics, mechanical engineering, heat transfer and other field problems.

By the end of the course, participants will be able to:

  • understand the fundamental structure of a finite element program,
  • translate a physical or engineering problem into a discrete numerical model,
  • represent nodes, elements, degrees of freedom, physical parameters and boundary conditions in software,
  • understand the role of shape functions and numerical integration,
  • formulate and implement element-level matrices and vectors,
  • assemble element contributions into a global system,
  • apply boundary conditions and external loads or source terms,
  • solve the resulting system of equations,
  • work with sparse matrices and sparse solvers,
  • evaluate and visualise numerical results,
  • verify FEM implementations using analytical solutions, consistency checks and automated tests,
  • structure FEM software so that additional element types, physical models and solution methods can be added later,
  • understand how a custom FEM implementation relates to established FEM frameworks.

Requirements:

  • basic Python programming knowledge,
  • experience with functions, modules and basic classes,
  • basic knowledge of NumPy,
  • an understanding of vectors and matrices,
  • basic knowledge of engineering mathematics.

Completion of the course “Software Development with Python for Engineers” or equivalent knowledge is recommended.

Course Outline*:

*We customize the course outline and content to your specific needs and relevant use cases.

Day 1 – From Physical Problem to Finite Element Model

Introduction to the Finite Element Method

  • What does an FEM program do internally?
  • From a continuous physical problem to a discrete numerical model
  • Discretisation and meshes
  • Nodes and elements
  • Degrees of freedom
  • Physical and material parameters
  • Loads, source terms and boundary conditions
  • Local and global quantities

Mathematical Foundations

  • Review of relevant linear algebra
  • Vectors and matrices
  • Linear systems of equations
  • Local and global systems
  • The general FEM system

K u = f

  • Interpretation of the system matrix, solution vector and right-hand side
  • Different physical interpretations of the same numerical structure

Depending on the application, K may represent, for example, stiffness, conductivity or another discretised physical operator.

Shape Functions and Element Approximation

  • Why interpolation is required in FEM
  • Introduction to shape functions
  • Interpolation within an element
  • Element coordinates
  • Local and global coordinates
  • Derivatives of shape functions
  • Connection between element interpolation and physical quantities

Element-Level Calculations

  • Element geometry
  • Local degrees of freedom
  • Element matrices
  • Element vectors
  • Physical parameters at element level
  • Introduction to numerical integration
  • Integration points and weights
  • Coordinate transformations where required

Software Representation of the FEM Model

Development of suitable Python components such as:

  • Node
  • Element
  • Material or PhysicalProperties
  • BoundaryCondition
  • Load or Source
  • Mesh
  • Model

Software design topics include:

  • separating physical data from numerical algorithms,
  • reusable element implementations,
  • clear responsibilities between model, element and solver components,
  • keeping model definition independent from the numerical solver.

Practical Exercise

Participants implement the first components of a small FEM application, including:

  • creation of nodes and elements,
  • definition of physical parameters,
  • degree-of-freedom assignment,
  • element-level calculations,
  • basic automated tests.

Day 2 – Assembly and Solution of the Global System

Degree-of-Freedom Management

  • Local and global degrees of freedom
  • Degree-of-freedom numbering
  • Mapping element quantities to global indices
  • Handling constrained and unconstrained degrees of freedom
  • Strategies for larger models

Global Assembly

Step-by-step implementation of the finite element system:

  1. calculate element matrices and vectors,
  2. determine the associated global degrees of freedom,
  3. transform element quantities where necessary,
  4. assemble the global system matrix,
  5. assemble the global right-hand-side vector.

Boundary Conditions and External Influences

  • Essential and natural boundary conditions
  • Prescribed values
  • Loads and source terms
  • Different implementation strategies
  • Modification of the equation system
  • Validation of boundary conditions

Solving the Global System

  • Solution of K u = f
  • Dense linear solvers with NumPy
  • Introduction to sparse matrices with SciPy
  • Why FEM matrices are typically sparse
  • Common sparse matrix formats
  • Sparse matrix assembly
  • Sparse linear solvers
  • Numerical accuracy
  • Conditioning and numerical stability

Result Evaluation

Depending on the selected application:

  • nodal solution values,
  • gradients,
  • fluxes,
  • deformations,
  • strains,
  • stresses,
  • internal forces,
  • other derived engineering quantities.

Visualisation

  • Visualising the mesh
  • Displaying nodal solution values
  • Plotting scalar fields
  • Plotting deformations
  • Visualising element-based results
  • Creating engineering result diagrams

Practical Exercise

Participants complete a small FEM solver that can:

  • define a numerical model,
  • assemble a global system,
  • apply boundary conditions,
  • solve the equation system,
  • calculate selected result quantities,
  • and visualise the solution.

Day 3 – Verification, Generalisation and Maintainable FEM Software

Verification and Testing

  • Why numerical software must be verified
  • Testing element-level calculations
  • Symmetry checks
  • Consistency checks
  • Equilibrium or conservation checks
  • Comparison with analytical reference solutions
  • Numerical tolerances
  • Automated tests with pytest
  • Regression tests
  • Plausibility checks

Mesh Refinement and Convergence

  • Influence of discretisation on results
  • Mesh refinement
  • Convergence concepts
  • Comparing numerical solutions at different mesh resolutions
  • Distinguishing modelling errors from implementation errors

Generalising the FEM Implementation

  • Separating element formulation from assembly
  • Supporting different element types
  • Supporting different physical problems
  • Generic treatment of degrees of freedom
  • Extensible material and parameter models
  • Reusable solver components

Structuring a Maintainable FEM Application

A possible software architecture:

Model → Elements → Assembly → Solver → Results → Visualisation

Possible project structure:

model/
Mesh, nodes, physical parameters and boundary conditions

elements/
Finite element formulations

assembly/
Global system assembly and degree-of-freedom management

solver/
Boundary conditions and equation solvers

results/
Result evaluation and derived quantities

visualization/
Model and result visualisation

tests/
Automated verification

Topics include:

  • separation of responsibilities,
  • clear interfaces between components,
  • reusable numerical algorithms,
  • maintainability and extensibility,
  • avoiding tightly coupled implementations.

Adaptation to Different Engineering Disciplines

The mathematical and software concepts of the course remain generic. The practical exercises and physical interpretation can be adapted to the participants’ engineering background.

Possible application variants include:

  • Structural engineering: truss, beam or simple elasticity problems
  • Mechanical engineering: deformation and stress analysis
  • Heat transfer: stationary heat conduction
  • General field problems: Poisson-type equations
  • Other engineering disciplines: comparable discretised field problems according to participant requirements

For structural engineers, for example, the exercises can use a 2D truss, beam or simple continuum model. For mechanical or thermal engineers, the same FEM software architecture can instead be demonstrated using elasticity or heat-conduction examples.

Final Practical Project

Participants consolidate the course content into a small, structured FEM application that can:

  • define a discretised physical model,
  • create nodes and elements,
  • assign physical parameters,
  • define boundary conditions and external influences,
  • calculate element contributions,
  • assemble the global system,
  • solve the resulting equations,
  • evaluate derived quantities,
  • automatically verify selected calculations,
  • visualise the numerical model and results,
  • and be extended with additional element types or physical models.

Outlook

The course concludes with an overview of further development paths, including:

  • higher-dimensional problems,
  • additional element formulations,
  • higher-order elements,
  • more advanced numerical integration,
  • nonlinear problems,
  • eigenvalue problems,
  • transient and dynamic simulations,
  • complex material models,
  • mesh generation,
  • adaptive refinement,
  • performance optimisation,
  • parallelisation,
  • graphical user interfaces,
  • established FEM frameworks such as FEniCSx.

Hands-on learning with expert instructors at your location for organizations.

4,347€*
Graph Icon - Education X Webflow Template
Level:
intermediate
Clock Icon - Education X Webflow Template
Duration:
21
Hours (days:
3
)
Camera Icon - Education X Webflow Template
Training customized to your needs
Star Icon - Education X Webflow Template
Immersive hands-on experience in a dedicated setting
*Price can range depending on number of participants, change of outline, location etc.

Master new skills guided by experienced instructors from anywhere.

3,012€*
Graph Icon - Education X Webflow Template
Level:
intermediate
Clock Icon - Education X Webflow Template
Duration:
21
Hours (days:
3
)
Camera Icon - Education X Webflow Template
Training customized to your needs
Star Icon - Education X Webflow Template
Reduced training costs
*Price can range depending on number of participants, change of outline, location etc.

Upcoming Sessions

18-20 Nov 2026
Milan
1-3 Dec 2026
Stockholm
12-14 Jan 2027
Barcelona
3-5 Feb 2027
Amsterdam
2-4 Mar 2027
Paris
10-12 Mar 2027
London
23-25 Mar 2027
Milan
15-17 Apr 2027
Amsterdam

Can't find a suitable date? Get in touch and we'll arrange one that works for you.

We use cookies to improve site navigation, analyse how the site is used, and support our marketing. You can accept all cookies, reject non-essential ones, or choose individual categories. Read our Cookie Notice