Application | PLAXIS 3D |
Version | PLAXIS 3D 2016 and later |
Date created | 13 December 2016 |
Date modified | 23 September 2024 |
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:
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 phases.
The command to advance the tunnel one step in its sequence in a phase is:
advance Tunnel_1 Phase_1
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.
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.
To use this file:
When you do not have access rights to add the script in this folder, alternatively, you can choose to use the Expert menu > Python > Run script > Open... to manually open and run the file.