In this example, we will use Tutorial Lesson 3 (Tied back excavation) [link] for the Plaxis file. In this case, we want to determine the maximum bending moment for the left retaining wall for each phase in which the plate is active. This left retaining wall is activated in Phase_1, and is located at X = 40 m.
In order to retrieve the maximum and minimum bending moment for the left retaining wall, we will use Output’s Remote Scripting environment with the Python wrapper:
# geometric limits for the left retaining wall: x_left = 40.0 # for all phases, starting from the second phase (Phase_1) for phase in g_o.Phases[1:]: #initialize defaults: maxM = 0.0 xAtMaxM = 0.0 yAtMaxM = 0.0 minM = 0.0 xAtMinM = 0.0 yAtMinM = 0.0 # obtain result tables plateX = g_o.getresults(phase, g_o.ResultTypes.Plate.X, 'node') plateY = g_o.getresults(phase, g_o.ResultTypes.Plate.Y, 'node') plateM = g_o.getresults(phase, g_o.ResultTypes.Plate.M2D, 'node') # determine minimum and maximum bending moment: for x, y, M in zip(plateX, plateY, plateM): #is it on the left wall (with small numerical tolerance)? if abs(x - x_left) < 1E-5: if M > maxM: maxM = M xAtMaxM = x yAtMaxM = y if M < minM: minM = M xAtMinM = x yAtMinM = y print( "{}: ".format( phase.Name ) + "Mmax = {:.2f} kNm/m at Y={:.2f} m; ".format(maxM, yAtMaxM) + "Mmin = {:.2f} kNm/m at Y={:.2f} m".format(minM, yAtMinM) )
The result in the Python console would look similar to this:
Response in Python console >>> Phase_1: Mmax = 3.02 kNm/m at Y=26.33 m; Mmin = -0.00 kNm/m at Y=14.00 m Phase_2: Mmax = 4.94 kNm/m at Y=20.00 m; Mmin = -39.68 kNm/m at Y=25.67 m Phase_3: Mmax = 21.25 kNm/m at Y=22.62 m; Mmin = -95.76 kNm/m at Y=27.00 m Phase_4: Mmax = 68.03 kNm/m at Y=23.67 m; Mmin = -91.24 kNm/m at Y=27.00 m Phase_5: Mmax = 26.09 kNm/m at Y=19.57 m; Mmin = -142.34 kNm/m at Y=23.00 m Phase_6: Mmax = 122.61 kNm/m at Y=20.38 m; Mmin = -140.18 kNm/m at Y=23.00 m >>>
Output scripting example: create curve data
[Python Scripts]
Output scripting example: get anchor force
Output scripting example: get heave of excavation bottom
Identify Python commands from Plaxis command line
Using PLAXIS Remote scripting with the Python wrapper
[Tips and Tricks]