I’ve been using STKO for slope stability analyses, but I could use some help automating some of the tasks. In slope stability analyses with finite elements, the factor of safety is typically computed via the strength reduction method (e.g. Griffith and Fenton, 2004). I’ve been doing the strength reduction manually by setting material properties, running the analyses, and then checking the convergence. I then adjust the material properties and rerun the analyses. See the attached file for an example. The factor of safety should be between 1.2 and 1.3. By reducing the cohesion and friction angles of the PIMY materials, eventually the model does not converge.

Is there a way to programmatically modify the material properties during the analyses? Updating the properties after the elastic gravity stage would be ideal, potentially using something like updateParameter. Looping over the entire model building and analysis stages would be acceptable too, since each set of analyses runs pretty quickly.

## Slope stability iterative factor of safety calculation

### Re: Slope stability iterative factor of safety calculation

Michael Scott talks a little bit about updated OpenSees parameters within the analyses loop in his blog: https://portwooddigital.com/2021/08/15/ ... -the-loop/

All of the examples seem to be related to updating elastic material stiffness or UP element permeability. What about nonlinear material properties like cohesion and friction angle? Or other element properties like horizontal acceleration for pseudostatic analyses? Can these be updated using a similar method?

All of the examples seem to be related to updating elastic material stiffness or UP element permeability. What about nonlinear material properties like cohesion and friction angle? Or other element properties like horizontal acceleration for pseudostatic analyses? Can these be updated using a similar method?

### Re: Slope stability iterative factor of safety calculation

Yes, but it depends on what you want to achieve.Is there a way to programmatically modify the material properties during the analyses?

You can use the parameter command if the material supports that parameter.

Otherwise you can use the PythonAPI in stko to programmatically change a material parameter and run a new analysis.

But first you should explain what you want to achieve. Updating a parameter during an analysis? or running a new analysis with the updated parameter?

### Re: Slope stability iterative factor of safety calculation

I would like to update the cohesion ($cohesi) and friction angle ($frictionAng) of the PressureIndependMultiYield nDmaterial. Ideally, I would like to update the parameter during the analysis. As far as I can tell, the "parameter" command doesn't support updates of those parameters. So, we will have to programmatically change the parameters and then rerun the analysis. How do I do that with the PythonAPI? I use Python extensively, but I haven't used it in conjunction with STKO PythonAPI.

### Re: Slope stability iterative factor of safety calculation

Please provide a small example with the element/materials you want, and a list of parameters you would like to change.

We'll show you how to setup a python script that runs those parametric analyses

We'll show you how to setup a python script that runs those parametric analyses