plaxis phase identification

Dear support,

I'm using the command to control the phase values, as I'm creating a big number of phases and the command helps me to save time and reduce error.

for this, I want to set a condition in specific phases to modify the values again.

:

if (phase_new == phase_35):

g_i.pointload_1_1.Fy[phase_new]=95

question is as follow:

I want to check phases and once I reach phase 35 I want to make the change.

the comparison into "if" is not working well.

how can I make a specific condition for phase identification (35)????

Parents Reply
  • Hello Bahia,

    Yes, you are right. Thank you for clarifying what is the exact purpose for this.

    I understand now that you want the point load to be set to a specific value every 35 phases. I assume that you create your phases consecutively so I would expect a pure Python way of doing this.

    By a quick online search, you can find similar questions in the Python community about how to "execute statement every N iterations in Python".

    The solution usually tends to be a counter you set in your code for which the if-statement gets satisfied when it reaches a specific number and gets reset to zero afterwards.

    Note that the great thing about Python and PLAXIS is that there is more than one way to achieve the same result. Depending on how your code is structured you can find multiple solutions.

Children
No Data