> For the complete documentation index, see [llms.txt](https://tlcfem.gitbook.io/suanpan-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tlcfem.gitbook.io/suanpan-manual/example/geotechnical/slope-analysis.md).

# slope analysis

In this example, we demonstrate the use of the [`DruckerPrager`](/suanpan-manual/material/material3d/druckerprager/nonlineardruckerprager.md) model by performing a slope stability analysis on a homogeneous soil slope with no foundation layer. This example is taken from [the paper](https://www.icevirtuallibrary.com/doi/abs/10.1680/geot.1999.49.3.387). Slope stability analysis is one of the most fundamental type of analyses in geotechnical engineering. While limit equilibrium method is most commonly used for this, finite element method is an important alternative as it does not make any assumptions about the failure surface. For more information about this, refer to the above the paper.

The model scripts can be [downloaded](https://github.com/TLCFEM/suanPan-manual/tree/dev/docs/Example/Geotechnical/slope-analysis.zip).

## The Model

The geometry is defined as a slope of vertical height of $$h=10\~\mathrm{m}$$ and the slope angle is $$26.57$$ degrees. The factor of safety of the slope is taken to be $$1.432$$ and unit weight of soils is taken as $$w=20\~\mathrm{kN/m^3}$$. The (initial) cohesion of the soil is computed using the formula

$$
c\_0=\dfrac{0.05wh}{\text{FoS}}=\dfrac{0.05\times20\~\mathrm{kN/m^3}\times10\~\mathrm{m}}{1.432}=6.983\~\mathrm{kPa}
$$

and the effective internal angle of friction was computed as

$$
\phi=\arctan\dfrac{\tan\phi'}{\text{FoS}},
$$

where $$\phi'=20^\circ$$ is the internal angle of friction.

The mesh is defined in the files `nodes.supan` and `elements.supan` presented in the zip file.

The elements are defined to be of [`CP4`](/suanpan-manual/element/membrane/plane/cp4.md) type.

Since it is a plain strain problem, the material model shall be wrapped into a [`PlainStrain`](/suanpan-manual/material/wrapper/planestrain.md) one. Unlike other platforms such as `ABAQUS`, in which there are `CPS4` and `CPE4` elements, whether it is plane stress or plane strain is **not** controlled by the element in `suanPan`. That is why one can only find one unified element type [`CP4`](/suanpan-manual/element/membrane/plane/cp4.md). Here, we use the bilinear hardening [`DruckerPrager`](/suanpan-manual/material/material3d/druckerprager/bilineardp.md) model with a small hardening modulus.

```
material BilinearDP 1 1E5 0.3 0.31 0.31 1.219 6.983 0.001
material PlaneStrain 2 1
```

For more information on how to compute the parameters, please check [this](/suanpan-manual/material/material3d/druckerprager/nonlineardruckerprager.md) page. In this problem, the Drucker-Prager yield surface circumscribes the Mohr-Coulomb yield surface.

## BCs and Loading

The horizontal displacement of left and bottom boundaries is constrained. The vertical displacement of the bottom boundary is constrained. To apply those constraints, we select two boundaries by generating two node groups.

```
# left vertical boundary
generatebyrule nodegroup 2 1 1. 0.
# bottom horizontal boundary
generatebyrule nodegroup 3 2 1. 0.

grouppenaltybc 1 1 2 3
grouppenaltybc 2 2 3
```

The loading applied was of gravity type, where the load factor is increased from zero to unity. We use [`bodyforce`](/suanpan-manual/command-collection/define/load.md#body-force) to apply this load.

```
# all elements
generate elementgroup 1 1 2880
load groupbodyforce 1 0 -20 2 1
```

In this case, the force applied is equal to the specific weight of the soil applied in the negative $$y$$-direction. We also generate an element group that contains all elements.

## Result

The following shows the development of horizontal displacement.

![horizontal displacement](/files/J8ZQ7CVi628rUp52gZFe)

## Performance

See a typical [profiling](https://github.com/TLCFEM/suanPan-manual/tree/dev/docs/Example/Geotechnical/slope-analysis.html).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://tlcfem.gitbook.io/suanpan-manual/example/geotechnical/slope-analysis.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
