Export data plots from PLAXIS Output using Python

Hello, I would like to know how to obtain all the data of all the phases at a specific point, in order to be able to later extract this data in a ".txt" file and be able to generate this type of graph:

This is part of the code that I generated, but I have not been able to obtain what I wanted:

  x_i= 0
y_i= medio

punto = g_o.addcurvepoint("stress point", (x_i, y_i))
punto.Identification = "Central"
g_o.update()

g_i.calculate()
g_i.view(shear_phase)

curvepoints_central = g_o.CurvePoints.StressPoints
print(g_o.tabulate(curvepoints_central, "x y"))

Epsyyx_o = g_o.getresults(g_o.ResultTypes.Soil.Epsyy, 'stress point')
SigyyE_o = g_o.getresults(g_o.ResultTypes.Soil.SigyyE, 'stress point')

with open("ey - Sy'" + ".txt", "w") as file:
        file.writelines(["{}\t{}\n".format("Epsyy", "SigyyE_kPa")])
        file.writelines(["{}\t{}\n".format(Epsyy, SigyyE)
                   for Epsyy, SigyyE in zip(Epsyyx_o, SigyyE_o)])

Parents Reply
  • Dear Stefanos Papavasileiou, 

    Thanks for helping me, this link helped me a lot, but the results are only at the end in the phase, I want results about each step in the phase.

    Again, I share part of my code (corrected):

    x_i= 0
    y_i= medio

    punto = g_o.addcurvepoint("stress point", (x_i, y_i))
    punto.Identification = "Central"
    g_o.update()

    g_i.calculate()
    g_i.view(shear_phase)

    curvepoints_central = g_o.CurvePoints.StressPoints
    print(g_o.tabulate(curvepoints_central, "x y"))

    Epsyy_o = []
    SigyyE_o = []

    for phase in phaseorder:
                  Epsyy_o.append(g_o.getcurveresults(punto, phase, g_o.ResultTypes.Soil.Epsyy))
                  SigyyE_o.append(g_o.getcurveresults(punto, phase, g_o.ResultTypes.Soil.SigyyE))

    with open("ey - Sy'" + ".txt", "w") as file:
                  file.writelines(["{}\t{}\n".format("Epsyy", "SigyyE_kPa")])
                  file.writelines(["{:.5f}\t{:.2f}\n".format(Epsyy, SigyyE)
                                for Epsyy, SigyyE in zip(Epsyy_o, SigyyE_o)])

Children