x

ADONIS:
Version 3.90.9 (Released at 10/19/2024)
- Minor bugs in mesh generation module has been fixed.
- Gmsh is upgraded to version 4.13.1.

HYRCAN:
Version 2.0.18 (Released at 10/26/2024)
- Minor bug in translation has been fixed.
- Minor bug in geometry creation is fixed.


Script (Read 12907 times)
Script on: October 21, 2018, 10:16:35 pm
Hello,

I want to perform an iteration of a model, analyzing how the safety factor of a slope varies, depending on the cohesion of the material. To do this, I created the following loop to change the properties of the material and calculate its safety factor:

for (i = 1; i < 10; i++){
material("create","Mohr-Coulomb","matid",1,"matname","Material1","density",2344.55,"shear",7.26667e+7,"bulk",2.18e+8,"coh",i*1000,"fric",40,"dil",0,"tens",98100)
material("assign","matid",1)
solve("fos")}

However, the loop only executes the first material, since after performing the solve function, the loop stops.

I remain attentive to your comments, I hope you can help me.

Best Regards




Re: Script Reply #1 on: October 22, 2018, 08:40:49 am
solve("fos") command will modify all the stress and properties in the soil by FS factor in order to achieve border line stability in the model. so you can not pick up from the last model and perform another fos. I suggest you to put the whole model (from scratch with newmodel()) inside the loop and rerun. this way you can make sure that in every cycle new model will be generated for new fos calculation.



Re: Script Reply #2 on: October 22, 2018, 09:55:43 am
Hello,

Thanks for your soon answer! I put the commands "solve" and "newmodel()" inside the loop like you suggest me, but  the loop breaks after run the command solve.

If i don't put the command solve, the loop finish correctly all the actions and save correctly the ten archives.

I attach my script for more details.



Re: Script Reply #3 on: October 23, 2018, 06:51:00 pm
I'll try to figure this out myself sometimes in the future. thanks for bring it up.