> 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/structural/statics/bending-of-a-cantilever-beam.md).

# bending of a cantilever beam

In this example, we show the application of 3D beam elements [`B31`](/suanpan-manual/element/beam/b31.md) and [`F31`](/suanpan-manual/element/beam/f31.md) with corotational transformation [`B3DC`](/suanpan-manual/element/beam/orientation.md).

The model can be [downloaded](https://github.com/TLCFEM/suanPan-manual/tree/dev/docs/Example/Structural/Statics/bending-of-a-cantilever-beam.supan).

## The Model

A simple cantilever beam is bent at the free end. Since the load and displacements are normalised, geometry does not affect results. Here we simply choose the following parameters: beam length $$L=20$$, section dimension $$b\times{}h=2\times2$$ and elastic modulus $$E=10$$.

Here five elements are used. Consequently, six nodes shall be defined.

```
node 1 0 0 0
node 3 4 0 0
node 4 8 0 0
node 5 12 0 0
node 6 16 0 0
node 2 20 0 0
```

The [`Rectangle3D`](/suanpan-manual/section/section3d/rectangle3d.md) section can be used.

```
material Elastic1D 1 10
# size 2x2 using material 1
section Rectangle3D 1 2 2 1
```

Assuming the beam is in the $$xy$$ plane, then strong axis aligns with global $$z$$. To define 3D beam elements, its section orientation shall be defined. The corotational formulation that supports nonlinear geometry is used.

```
# defining local strong axis pointing to global (0 0 -1)
orientation B3DC 1 0 0 -1.
```

Now define the elements. Replacing `F31` with `B31` to use displacement based elements.

```
element F31 1 1 3 1 1 5 true
element F31 2 3 4 1 1 5 true
element F31 3 4 5 1 1 5 true
element F31 4 5 6 1 1 5 true
element F31 5 6 2 1 1 5 true
```

It is known from the beam theory that a perfect circle would be formed if the free end is applied with an out-of-plane moment of magnitude $$M=\alpha{}M\_0=\alpha\dfrac{2\pi{}EI}{L}$$ with load ratio $$\alpha=1$$, which can be computed to be 4.188790205. For two circles, $$\alpha=2$$.

Next, we apply boundary condition and load, define recorders to record free end displacements.

```
# E is the shortcut for (1 2 3 4 5 6) all six DoFs
fix2 1 E 1

# apply two circles
cload 1 0 8.377580410 6 2

plainrecorder 1 Node U1 2
plainrecorder 2 Node U2 2
```

It shall be noted since nonlinear geometry is adopted, the stiffness may not be symmetric anymore, it is necessary to switch off symmetric matrix storage to ensure correct results are computed. Since not all nonlinear geometry problems are asymmetric, the program itself has no mechanism to check if it is appropriate to use symmetric/asymmetric storage.

```
step static 1
set ini_step_size 1E-2
set fixed_step_size true

set symm_mat false ! important

converger RelIncreDisp 1 1E-8 10 1

analyze
```

## Results

Normalised displacement components are shown in the following figure.

![displacement](https://1124082496-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEquxr3H9WpPg4iPvT2mB%2Fuploads%2Fgit-blob-c8c5b0fed293e83584899833bd3a7f5c2af6758c%2Fbending-of-a-cantilever-beam.svg?alt=media)

Since VTK does not have a proper cell type for beams, linear lines are used to represent beams. Here is the animation of deformation.

![animation](https://1124082496-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEquxr3H9WpPg4iPvT2mB%2Fuploads%2Fgit-blob-8137f43219d616226b392685a9263d5e6647b3d8%2Fbending-of-a-cantilever-beam.gif?alt=media)


---

# 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/structural/statics/bending-of-a-cantilever-beam.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.
