Tunnel lining design is not painful during the analysis stage – the work gets bogged down afterward. Once RS3 has finished computing, the real grind begins: manually navigating stages, extracting liner forces section by section, rebuilding plots, and cross-checking each location against the capacity envelope. On a project with complex geometry – say, twin tunnels connected by a cross passage (Figure-1)– you could be looking at 50 or more critical sections across multiple construction stages. Done by hand, that is hours of work. Done with a script, it is minutes.

In an example from the RS3 Scripting Application Series, we tackle a structurally demanding urban tunnelling scenario: two parallel tunnels excavated sequentially and connected by a cross-passage. Introducing the opening into the lining concentrates hoop forces and bending moments at and around the intersection – and those concentrations shift depending on the construction stage under review. In general, there is no single “critical section”; they can occur anywhere, depending on the geotechnical conditions and inputs.
Checking this properly in the traditional way means repeatedly querying results at different cross-sections, switching stages, extracting results in the liner's local coordinates, and finally comparing the liner results with the capacity envelope. It is exactly the kind of task that is easy to shortcut under deadline pressure – and where shortcuts carry real risk!
Using RS3 scripting, we automated the entire post-processing workflow for this model. The Python script extracts hoop forces and bending moments in the local coordinate system of the lining elements and feeds them into a custom interactive tool (Figures 2 and 3), where an engineer can:


What once required repeated manual queries – one section, one stage, one plot at a time – is now a single automated sweep of the full model. The script does not just save time; it makes comprehensive checking far more feasible.
Tunnel lining design is inherently iterative. Support thickness, concrete grade, and reinforcement layout all change in response to computed forces, and each change means another round of checking. When that checking is manual, iteration is slow and selective. When it is scripted, you can afford to be thorough every time.
The productivity gains are real. Scripting routinely compresses hours of repetitive post-processing into a single automated run. That frees engineers to focus on interpreting results and making decisions, rather than retrieving them. And because the script runs the same way every time, the results are consistent regardless of who executes it.
For tunnelling specifically, this matters beyond productivity. A script that systematically checks every section of a lining, at every stage, against the capacity envelope is not just faster than manual checking – it is more defensible. So, when a client or regulator asks how the critical section was identified, “the script scanned the full alignment” is a stronger answer than “we checked the sections we expected to be critical.”
RS3 scripting is built on Python, a language most engineers can read even if they have not written it before. And if writing code still feels like a barrier, it does not have to be: as we showed in an earlier article in this series, describing your workflow to an AI coding assistant like RSInsight in plain language is enough to generate a working Python script that you can then run directly in RS3.
The complete example, including the RS3 model and full Python script, is available for download. Open the model, run the script, and watch as RS3 automatically scans the entire tunnel alignment, extracts lining forces, evaluates capacity envelopes, and visualizes results section by section. What would traditionally require hours of manual post-processing is completed in a single automated workflow.
Explore the final output in this video.
Then download the example and adapt the same scripting approach to your own tunnel projects — whether you're verifying lining performance, identifying critical sections, or accelerating iterative design reviews.
Why Scripting Matters Geotechnical projects are more complex. Models are larger, construction sequen...
With PLAXIS 2024.1 users benefit from enhancements for designing and reinforcing underground excava...
Complex geological compositions and existing underground structures can significantly impact your t...
Tunnelling is a specialized civil engineering discipline for designing and constructing underground...
Building on the success of our first 3D RS3 Masterclass, we’re excited to bring you the next segmen...
Back analysis is where geotechnical models stop being purely predictive and start being confronted...
Tunnels are created to make it easier to navigate through challenging topographical and geological...
Estimation of the support required to stabilize a tunnel excavation, especially in the vicinity o...
Looking for more information? Fill in the form and we will contact Rocscience Inc. for you.