Users Forum

ADONIS Category => ADONIS Users => Topic started by: matiasquinteros on October 21, 2018, 10:16:35 pm

Title: Script
Post by: matiasquinteros 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

Title: Re: Script
Post by: Roozbeh 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.
Title: Re: Script
Post by: matiasquinteros 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.
Title: Re: Script
Post by: Roozbeh 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.