Save time by automating PLAXIS in the Cloud

VIKTOR

by VIKTOR

PLAXIS is a finite element program, widely spread and recognized in the Geotechnical engineering community for its ability to capture and model the detailed behaviour of the subsurface. With PLAXIS, you can run complex analysis of various structures, from pile foundations, to tunnels, embankments, and many more.
Download the white paper and get INSPIRED

Learn how collaborative parametric design models allow you to work together for better solutions.

Due to this wide range of options, setting all parameters using PLAXIS’ Graphical User Interface (GUI) can be a cumbersome task. Especially if you do not need most parameters for your specific purpose. Also, if you need to set up a model in the same fashion multiple times, this must be done manually, even though a computer could easily do this for you.

This is where VIKTOR comes into play. In this article, we will explain how you can achieve the best results with PLAXIS, while discussing the following:

  • PLAXIS in a web app
  • Automating in- and output
  • Centralizing data
  • Easy material parametrization
  • Open-source Python code for a PLAXIS web app

PLAXIS in a web app

VIKTOR offers the possibility to integrate PLAXIS’ Python API with a web-based application that engineers can easily use to:

  • Parametrically generate, update, and edit their PLAXIS models,
  • export results from PLAXIS easily to the Cloud,
  • and integrate PLAXIS models with other third-party software, such as D-Series.

Here, you can see PLAXIS integrated with such a web app on the VIKTOR platform:


In this video you can see how the materials that are used for a project are defined, as well as the layout of the soil, embankment and drains. Then, a 2D model of the embankment is generated and automatically analysed with PLAXIS.

illustration of why viktor

Low-code platform ​for engineering

Discover the benefits

Automating in- and output

As mentioned, setting up the appropriate geometry and models of a PLAXIS analysis can be a lengthy process, especially as projects continue to grow. Additionally, modifying your calculation input must be done using the wide range of options that PLAXIS’ GUI offers. By automating the generation of models and integrating the analysis and visualization of results within a single application, a significant increase in efficiency can be achieved. For example, by reducing the number of options to a few necessary input parameters that can easily be re-used in other projects as well.

In this video, you can see how a 2D embankment is analysed in a VIKTOR web app. In the app, you can adjust the necessary input parameters for the embankment (width, height, material), soil, and drains. By simply clicking the ‘update’ button in the down-right corner of the application, the results of the analysis are calculated in PLAXIS and returned to the VIKTOR app. From here on, you can see if any adjustments are needed and if so, run the analysis again at the push of a button.


The video also shows all the calculations that are happening in the background while the application is running the analysis. As you may know, the output files can have a substantial size. Therefore, only the relevant information is being taken out and sent back to the VIKTOR app. A clever tip is to store the output files on the server so they can always be inspected by a geotechnical engineer later.

illustration of platform

Build any application you can imagine

Explore the platform

Centralizing data

The advantage of integrating PLAXIS’ Python API with a VIKTOR web app does not end at the ability to automate processes and visualize results. Often, in a team of people working with PLAXIS, everyone has their own Excel sheet to define materials. Because these sheets are isolated, this can get confusing in case someone changes something in their Excel sheet and someone else does not in theirs. With a VIKTOR web app, everyone in a company can access a central database to define materials.

In the video, you can see how in the left menu underneath ‘materials’ a database application can be found in which all material parameters can be defined and edited. Whenever something is changed within the application, this change is automatically processed for everyone who works with the app.


Because VIKTOR applications are hosted in the Cloud, all data is stored centrally and can be accessed through the internet with the right credentials. VIKTOR apps automatically include user management and version control, enabling you to collaborate on projects with everyone you want. It is possible to assign roles and permissions to determine who can view and change parts of a project.

How to create successful application that ensure adoption

Build successful applications

Learn how you (developer, engineer, end-user, domain expert, project manager, etc.) can contribute to the creation of apps that provide real value to your work.

Get now

Easy material parametrization

Have you already automated your PLAXIS in- and output, but are you still looking for a way to easily define your materials? Look no further, as we have figured this out for you!

When you try to define materials yourself using the Python API, you may find that some inputs are not copied correctly. One way to copy properties is by placing the entire string from the PLAXIS command window into your Python application. However, because this string is very long and has no documented ending, it is difficult to properly parametrize your materials from within Python.

An alternative option is to instantiate the material and then select all the properties on the material. In this fashion, all the keywords will be updated correctly. However, you have to do this in a very specific order for it to work.

Defining this specific order is difficult and time-consuming. That is why we have done this for you instead!

With the following function you can now properly set your materials:

1# Add soil materials. This must be done in a specific order to ensure the materials are set correctly 2materials = {} # Make a dict to be able to refer to the materials by name 3for i, params_material in enumerate(params_materials): 4 material_zip_list = [] 5 material_flattened_dict = get_deepest_dict( 6 params_material 7 ) # Get the deepest items from the material parameters dict 8 for ( 9 material_key 10 ) in ORDERED_MATERIAL_KEYS: # Use a specific material key order such that the settings are set correctly 11 if material_key in material_flattened_dict: 12 material_zip_list.append((material_key, material_flattened_dict[material_key])) 13 material = g_i.soilmat(material_zip_list[0]) 14 for material_zip in material_zip_list[1:]: 15 material.setproperties(*material_zip) # Set all the properties of the material in an iterative fashion 16 materials.update({material_flattened_dict["MaterialName"]: material})

Throughout this article, we have shown multiple videos from a PLAXIS application on the VIKTOR platform. In our GitHub repository, you can find the entire open-source code of this app. Feel free to download the code and use it in your own Python code.

If you are still looking for a way to:

  • Easily integrate software,
  • automate and optimize processes,
  • centrally store data,
  • and quickly visualize results,

If you first want to see the PLAXIS sample application from this article in action, you can access the app (and many more) through the [demo environment] (https://www.viktor.ai/demo-environment). Continue reading for more information about the sample app.

illustration of solutions

Discover the benefits of parametric design with VIKTOR

Learn more

Open-source Python code for a PLAXIS web app

Using the functionality

If you have been looking for a way to easily automate and optimize your PLAXIS analyses, we can help you with in two ways:

  1. With VIKTOR, nearly-out-of-the-box. Here, the parametrization of materials, embankment, and drains, as well as an output of the visualization is taken care of for you. Do you want to try VIKTOR? Request a free version.
  2. Without VIKTOR, in that case you integrate with your own Python code and create a parametrization of materials, embankment, and drains yourself, as well as an output of the visualization. You can follow the instructions as described in the readme in the VIKTOR GitHub repository, under the section: “Specific script use”.

Automating PLAXIS in 3 steps

In the video below, you can see how the functionality is being used in a VIKTOR application, just as with the videos shown before.


As you can see, the process of defining a PLAXIS run and output extraction consists of 3 steps.

  1. Define your materials used

Blog_sample_app_PLAXIS_materials

Input in the material database


  1. Define the layout of the soil, embankment and the drains

soil, embankment, drains pLAXIS.png

Input (left) and corresponing output (right) of layout


  1. Click update in the PLAXIS analysis view and review your results!

results PLAXIS analysis.png

Results of the PLAXIS analysis in the application


Use the free version or apply for a demo account to try the functionality yourself!

illustration of free trial

Start building apps now

Try for free
Share

Related Blog Posts

6 Ways to improve your SAP2000 and ETABS workflows

Read more

How to use Python to automate SAP2000

Read more

Connecting Grasshopper & VIKTOR apps

Read more

Build and share web apps

Get your free account now
Start for free