Quantcast
Channel: PLAXIS - Knowledge Base - PLAXIS 2D
Viewing all articles
Browse latest Browse all 43

Output scripting example: get heave of excavation bottom

$
0
0
Application:

In this example, we will use Tutorial Lesson 3 (Tied back excavation) [link] as an example. In this case, we want to determine the maximum heave of the excavation bottom. In the final phase, Phase_6, the bottom of the excavation is located at Y = 20.0 m, with the left retaining wall at X = 40 m and the right retaining wall at X = 60 m.

In order to retrieve the maximum heave for this excavation bottom, we will use Output’s Remote Scripting environment with the Python wrapper:

  • we will need to launch the Output scripting server, available via the Expert menu
  • and we should make sure the Plaxis results are opened in the Output program
  • next is that we will obtain all soil displacements
  • from which we will filter out the nodes that are at the excavation bottom. Because the order of the nodes is the same in each of these getresults-lists , we can use the x and y coordinates to filter out the vertical displacements at the excavation bottom: so we will only use the data from the nodes between X= 40.0 m and X = 60.0 m, with Y = 20.0 m
  • and from this we will obtain the maximum value for the vertical displacement uy.

Below is an example code how to achieve this.

localhostport_output = 10001
plaxis_path =r'C:\Program Files (x86)\Plaxis\PLAXIS 2D'#no trailing backslash!import imp
found_module = imp.find_module('plxscripting', [plaxis_path])
plxscripting = imp.load_module('plxscripting', *found_module)
from plxscripting.easy import*

s_out, g_out = new_server('localhost', localhostport_output)

#geometric limits for the bottom of the excavation:
x_left = 40.0
x_right = 60.0
y_bottom = 20.0

#initialize defaults
maxUy = 0.0
xAtMaxUy = 0.0
yAtMaxUy = 0.0

#obtain result tables from Output:
soilX = g_out.getresults(g_out.Phase_6, g_out.Soil.X, 'node')
soilY = g_out.getresults(g_out.Phase_6, g_out.Soil.Y, 'node')
soilUy = g_out.getresults(g_out.Phase_6, g_out.Soil.Uy, 'node')

#determine maximum heavefor x, y, uy inzip(soilX, soilY, soilUy):
    if x_left < x < x_right:
        if y == y_bottom:
            if uy > maxUy:
                maxUy = uy
                xAtMaxUy = x
                yAtMaxUy = y

print("Maximum heave of excavation bottom: uy={:.3f} m ""at (X,Y)=({:.2f},{:.2f})".format(maxUy, xAtMaxUy, yAtMaxUy))

The result from Python would look like this:

  Response from Python in IDLE >>>Maximum heave of excavation bottom: uy=0.050 m at (X,Y)=(50.00,20.00)>>>

Viewing all articles
Browse latest Browse all 43

Trending Articles