Palxis remote scripting - "Einc" command does not work for Mohr-Coulomb soil model

Dear Stefanos/team,

I am using Plaxis 2D V21 Ultimate. I would like to input Young's Modulus Increment (Einc) through python remote scripting. However, It does not work. My script is as the following:

------------------------------------------------

g_i.gotosoil()
mat_clay = g_i.soilmat()

mat_clay.setproperties(("MaterialName", "Clay"), ("SoilModel", 2), \
                                     ("DrainageType","Undrained (B)"), ("gammaUnsat",15), ("gammaSat",18), \
                                     ("Eref", 3.4e3), ("nu", 0.33), ("cinc", 2), ("cref", 5), \
                                     ("phi", 0), ("psi", 0), ("Einc", 4e1), ("verticalref", 3), \
                                     ("perm_primary_horizontal_axis", 1e-4), ("perm_vertical_axis", 1e-4), \
                                     ("Rinter", 1.0), ("K0Determination", "Manual"), ("K0Primary", 0.60), \
                                     ("K0PrimaryIsK0Secondary", True), ("DefaultValuesAdvanced", False))

------------------------------------------------

All of the input works except for the "Einc" command. No error message is shown either. I tried to find the correct label for Young Modulus Inc. through the "echo Clay" command, and it shows that indeed the correct label is "Einc". However, the script still does not change the actual Einc input.

(the picture shows that "Einc" is still at its default value 0 instead of the command value 40)

Is there a mistake in my method? I also turned the "DefaultValuesAdvanced" to False.

Thank you for your time and attention, I'm looking forward to your assistance.

Kind regards,

M. Rayyan

Parents
  • Hello Muhammad,

    In our old versions, the material properties had many dependencies and when using the setproperties command multiple properties were used in computing the end result. With Python, it seems that we can skip some properties and keep the only ones we want to determine the property list but that is not true. 
    That is the reason why you see such a long list of properties mentioned via the command line when you define a material via the GUI for the first time.

    This is something we have worked on and improved in our latest release (V22) which works more in the way you follow above in your post.

    To answer your question, the Einc cannot be defined without the other properties and the simplest way to define it is by controlling the key property Ginc. Using the Poisson's ratio you can compute that if Ginc = 1.5, then (with nu = 0.33) Einc = 4.0.

    In a similar way for the embedded beam you need the Area value to determine the diameter. So, if you want the Diameter = 0.5m then you can set the A = 0.19635m2 in your command instead.

    Note that GUI was implemented to expose properties that users are familiar with, rather than what was being done in the backend. The command line, however, is following the "rules" of the backend.

    However, be aware that even though this applies to the setproperties (or the soilmat, embeddebeammat, etc.) command, you can still do the first configuration of the material and for properties that did not get initialized property a follow-up set command should work:

    g_i.Clay.Einc = 4

    Again as explained above, we have simplified this in our latest version (V22).

    Answer Verified By: Muhammad Rayyan 

  • Dear Stefanos, 

    That is very clear. Looks like I need to upgrade to V22 for a better experience in remote scripting. Thank you very much, I really appreciate that.

    Kind regards,

    M. Rayyan

Reply Children
No Data