How to fed the generated random values into the PLAXIS

1. I have generated a set of random numbers in .xls/.csv/.txt format with correlation length, for eg, Lx=2m, Ly=2m.

2. I have created model in PLAXIS 2D to calculate bearing capacity of strip footing with Cu=100kPa, for eg deterministically

3. I want to transfer my random values from step 1. to PLAXIS 2D model and run. How can this be done? I also want to generate bearing capacity output using Python code.

4. I have Nm (may be 30/100) sets of random numbers. I want to repeat steps 1 to 3 for another sets of random values. How can this be done?

I would appreciate your time and effort to guide me in this issue.

Kind regards,

Santosh Khanal

  • Dear Santosh,

    I can see that you have an interesting task, which requires some Python knowledge. I will leave this open for any other geotechnical user with Python experience that may want to reply, as at support we mostly focus on things directly related to PLAXIS.

    I would advise searching on the vast information and tutorials for Python about how to read from .xls/.csv/.txt format, assign these values to a list and pass them to PLAXIS by editing directly each time the properties you want, e.g. length of the footing.

    I remind you that for instance, editing the size of the footing requires adjusting your second point of the line where the plate (and line load) is assigned. In PLAXIS command line that would be, for instance:

    set Point_2.x 4

    which in Python can be directly related to a variable that comes from that list of random numbers:

    g_i.Point_2.x = random_numbers[0] # here I set the specific point's x-coordinate to the first item of a list I named random_numbers
    # or
    g_i.Line_1.Second.x = random_numbers[0] # here I set the specific line's second point x-coordinate to the first item of a list I named random_numbers
    # or
    g_i.Lines[-1].Second.x = random_number # here I set the lastly created line (you have only one) second point x-coordinate to a variable that I named random_numbers and contain one integer.

  • Hi, Santosh. I have the same question. Have you got any idea?