Skip to content

Farewell Monotonous Responses from PLAXIS Utilizing Python

Efficient Analysis, Hindered by Repetitive Data Transfer: PLAXIS Automation Series

Farewell Mundane PLAXIS Output Using Python
Farewell Mundane PLAXIS Output Using Python

Farewell Monotonous Responses from PLAXIS Utilizing Python

In the world of geotechnical engineering, automation plays a crucial role in streamlining complex workflows. One such tool is the PLAXIS Python API, which allows users to programmatically access model data and results in PLAXIS 2D. This article will guide you through a tutorial on automating the extraction of results from a PLAXIS 2D model.

Getting Started

The tutorial requires you to have VS Code and the PLAXIS environment installed. To begin, create an empty Python script called . In this script, write code to open the downloaded PLAXIS file.

Next, open the command prompt window and install the external modules Pandas and Xlsxwriter, which will be used for data manipulation and exporting.

Extracting Plate Results

The script defines a function called to extract results for a specific plate element. This function retrieves Y Coordinates, Shear, Bending Moment, and Axial Force. The results are stored in a dictionary.

Once the results are gathered, they are converted into a dataframe for easier analysis and manipulation.

Exporting as Excel Spreadsheet

The script creates a function called to export the dataframe to an Excel spreadsheet. The dataframe is sorted by Y coordinate in a descending order before being exported. The script uses the Xlsxwriter module to create the Excel file and the pandas command to write the dataframe to the file.

In Step 4, the results are exported to an Excel spreadsheet with columns for the extracted data. It is essential to define the exported file location and name before running the function.

Demonstration

The script demonstrates how to extract output for a single structural element from PLAXIS. In this case, the goal is to extract the results of the plate element. The tutorial is divided into four steps: opening PLAXIS output, installing external modules, extracting Plate results, and exporting as an Excel spreadsheet.

By automating the extraction of results from structural elements in PLAXIS 2D using Python, you can significantly improve your geotechnical or structural analysis workflow. For more information and examples, visit Bentley’s official PLAXIS community and documentation.

Note that the Python commands have changed significantly from PLAXIS V21 to V22, so it's important to have PLAXIS V22 or above (V22.01 and V22.02) installed.

[1] Bentley, PLAXIS Python API Reference, [Online]. Available: https://help.bentley.com/Plaxis/2D/EN/API/API-Reference/index.htm [Accessed 10 March 2023].

Data-and-cloud-computing and technology are integral to this tutorial, as they facilitate automation in the extraction and analysis of geotechnical engineering results. Leveraging Python, external modules such as Pandas and Xlsxwriter (technology) are utilized to manipulate and export the extracted data (data-and-cloud-computing), thereby streamlining the workflow and enhancing efficiency.

Read also:

    Latest