SoilTest – interactive calculation of secant and tangent


Application PLAXIS 2D
PLAXIS 3D
Version PLAXIS 2D 2024.2 and later
PLAXIS 3D 2024.2 and later
Date created 07 April 2025
Date modified 07 April 2025
Original author Stefanos Papavasileiou - 
Technical Support Group
Keywords PLAXIS, SoilTest, soil, test, lab test, virtual lab, Python, API, py, cookbook

Introduction

The SoilTest facility offers a quick and convenient method to simulate basic soil lab tests on the basis of a single-point algorithm, i.e., without the need to create a complete finite element model.

Typically in order to perform a numerical analysis you need to properly calibrate the parameters from the laboratory test and the SoilTest tool. For this, you would typically need the secant and tangent values of certain graphs to ensure a good match and be confident on the numerical analysis simulating a similar response to the real soil speciments. 

soiltest_example_sec_tan.png

Python solution

This Python script provides a solution to running SoilTest with a provided material using the Triaxial test. You can specify  the result types to allow for a calculation of a secant and tangent value for the provided results and determine if further calibration is required.

If a calibration is required, then you can adjust a material parameter and run the same workflow to re-evaluate the results.

Assumptions

Instructions

  1. Download the zipped file containing the Python script
  2. Extract the zipped file in a local directory
    Or
  3. Extract the zipped file in a local directory and copy the soiltest_triaxial_example_interactive_tan_sec_results.py file to:
    [PLAXIS 2D installation directory]\pytools\shared
    Or
    [PLAXIS 3D installation directory]\pytools\shared
  4. Make sure to adjust the boilerplate on line #303 (comment) and #304 (uncomment).
  5. In PLAXIS Input, open the project containing the geometry
  6. In the Expert menu
    go to Expert > Python > Editor..., open the soiltest_triaxial_example_interactive_tan_sec_results.py and run it (F5)
    Or
    go to Expert > Run Python script > Open... browse for soiltest_triaxial_example_interactive_tan_sec_results.py

Version

This script has been tested with PLAXIS 2D and 3D 2024.2 using Python 3.12.3.

Downloads

soiltest_triaxial_example_interactive_tan_sec_results py [Python compressed file]

See also