Tunnel advancement script for PLAXIS 3D


ApplicationPLAXIS 3D
VersionPLAXIS 3D
Date created13 December 2016
Date modified13 December 2016

With the introduction of the tunnel designer with sequencing options, it is now possible to define a repetitive tunnel construction sequence to model tunnel advancement procedures for the calculation phases.
When the tunnel needs to be moved one step forward in this sequence in a phase, you need to select the Tunnel from the model explorer, right-click and select the option Advance to next tunnel step:

tunnel_advancement_script_for_PLAXIS_3D_GIF
Doing this for many phases is a lot of manual and tedious work, and chances are that in a large tunnel project one could easily miss one step by mistake.
Using the command line would give you more certainty that all the steps are performed for all the phase.

 

The command to advance the tunnel one step in its sequence in a phase is:

advance Tunnel_1 Phase_1

Commands Runner

Using the Commands runner, you could specify this easily for a few phases:

phase Phase_1
setcurrentphase Phase_2
advance Tunnel_1 Phase_2
phase Phase_2
setcurrentphase Phase_3
advance Tunnel_1 Phase_3
phase Phase_3
setcurrentphase Phase_4
advance Tunnel_1 Phase_4

When dealing with a lot more phases, this can be a lot of effort to make it work for all the phases until you reach the final tunnel construction.

Python solution

It would be nice if we could just repeat this procedure of tunnel advancement several times. Using the Plaxis Remote Scripting feature and the Python wrapper, we can do this easily by defining a for loop to repeat this tunnel advancement for a predefined number of times.

advancementsteps = 10

tunnel = g_i.Tunnel_1
lastphase = g_i.Phase_1

for i in range(advancementsteps):
    lastphase = g_i.phase(lastphase)
    g_i.setcurrentphase(lastphase)
    g_i.advance(tunnel, lastphase)

This can be further extended to also include a nice GUI window (using the easygui module) to fill in the number of steps. Below you can find this Python script file.

PLAXIS 3D CONNECT Edition V20 - Tunnel advancement script in action

Usage instructions for Python script

To use this file:

When you do not have access rights to add the script in this folder, alternatively, you can choose to use Expert menu > Python > Run script > Open... to manually open and run the file.

Downloads

See also