Automation of geotechnical calculations using Python

An important part of infrastructure design (railways, roads, dams, tunnels) involves modelling and calculating the interaction between natural terrain and structures. Currently, due to the advanced development of numerical modelling tools, this type of analysis is conducted in most projects through complex finite element software. As these programmes expand their capabilities, data input and analysis of calculation results become more laborious, to the extent that, it is highly recommended, and even essential in the most complex problems, to approach the calculation by means of a specific code that automates these tasks. 

For this reason, in 2022, the Geotechnical Department identified the need to have sufficient capabilities to automate and script calculations with the PLAXIS software, which uses Python language. This has been achieved through a recently completed R&D project. 

As a result of the R&D project, the Geotechnical Department now has a comprehensive PLAXIS programming guide using Python, explaining, in a simple and practical way, the necessary foundations of the Python programming language applied to scientific-technical computing. It also addresses PLAXIS automation procedures in detail, with a description of the most common data input and output commands. Also covered is the use of Python´s NumPy and Matplotlib libraries for result processing and graphics. 

The project documentation also includes various programming utilities, commonly used libraries, a one-page command summary (cheat sheet), work procedures for multiple calculations (sensitivity or statistics), as well as numerous examples of real case scripts analysed by the department: TBM tunnels, C&C tunnels, dam calculation, hydrogeological calculations, etc. The examples have been grouped into a repository serving as a basis for the development of new calculations, which in turn would be incorporated into the repository once completed and verified. 

This enhancement in our numerical calculation and modelling capabilities is crucial for TYPSA to remain at the forefront of Geotechnical Engineering. 

Eduardo Salvador
Geotechnical Engineering Department

Other news


  • Data controller: TECNICA Y PROYECTOS, S.A
  • Purpose: your data will be used to process your request and provide you with our services.
  • Lawful basis for processing: the consent of the person concerned.
  • Legal rights: you have the right to know what data is stored about you, to correct it and ask for it to be deleted, as explained in the additional information available on our website.
  • Additional information: more information can be found in the ‘Privacy policy’ section of our website.