> 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/dynamics/mass-spring-dashpot-system.md).

# mass-spring-dashpot system

This example is taken from the ABAQUS benchmark manual, see section 2.6.1. The original problem is also reported in the research paper, see [10.1002/nme.1620170902](https://doi.org/10.1002/nme.1620170902).

The model can be [downloaded](https://github.com/TLCFEM/suanPan-manual/tree/dev/docs/Example/Structural/Dynamics/mass-spring-dashpot-system.zip).

## The System

The configuration of the model is shown below.

![mass-spring-dashpot system](https://1124082496-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEquxr3H9WpPg4iPvT2mB%2Fuploads%2Fgit-blob-a4161c5fb3914d6ffea246f89cab08eab632fe98%2Fmass-spring-dashpot-system.svg?alt=media)

## Numerical Model

### Nodes

There are two DoFs in the system, two masses are connected to fixed points via nonlinear elastic springs. In order to do so, we define four nodes.

```
node 1 0 0
node 2 1 0
node 3 2 0
node 4 3 0
```

Here we use unit distance between two adjacent nodes. If the elements used are based on strain and strain rate, the unit distance is the only correct choice. If the elements used are based on displacement and velocity, the unit distance is not a must.

### Materials

The left spring uses a $$\tanh$$ function. To model it, we use [Tanh1D](/suanpan-manual/material/material1d/elastic/tanh1d.md) material.

```
material Tanh1D 1 1000
```

The right spring uses a $$\sinh$$ function. To model it, we use [Sinh1D](/suanpan-manual/material/material1d/elastic/sinh1d.md) material.

```
material Sinh1D 3 1000
```

The middle spring is a linear spring, we simply use [Elastic1D](/suanpan-manual/material/material1d/elastic/elastic1d.md) material.

```
material Elastic1D 2 100
```

The dashpot is linear. We use $$\alpha=1$$ in [Viscosity01](/suanpan-manual/material/material1d/viscosity/viscosity01.md) material. The viscosity coefficient is $$5$$.

```
material Viscosity01 4 1 5
```

### Elements

The springs can be modelled by using either [T2D2](/suanpan-manual/element/truss/t2d2.md), which uses strain and strain rate as the basic quantities, or [Spring01](/suanpan-manual/element/special/spring01.md), which uses displacement and velocity as the basic quantities.

```
element Spring01 1 1 2 1
element Spring01 2 2 3 2
element Spring01 3 3 4 3
```

For a linear dashpot, we use [Damper01](/suanpan-manual/element/special/damper01.md).

```
element Damper01 4 2 3 4
```

In addition to the above, it is necessary to define two mass elements.

```
mass 5 2 1 1
mass 6 3 1 1
```

### IBC

The vertical DoFs of all nodes shall be fixed. The horizontal DoFs of the first and last nodes shall be fixed.

```
fix2 1 1 1 4
fix2 2 2 1 2 3 4
```

The initial condition can be applied to node 2 via

```
initial velocity 100 1 2
```

### Load

To apply a step load, one shall use tabular amplitude to define the load curve. The following table can be stored in file `h`.

```
0 0
0.499999999999 0
0.5 1
0.55 1
0.550000000001 0
100 0
```

Then the load can be applied such that

```
amplitude Tabular 1 h

cload 1 1 3000 1 3
```

### Response

To record response, we define two recorders, one for displacement, one for velocity.

```
hdf5recorder 1 Node U1 2 3
hdf5recorder 2 Node V1 2 3
```

### Step and Analysis

The remaining settings are pretty standard. We use a dynamic step with a default integration scheme ([Newmark](/suanpan-manual/integrator/implicit/newmark/newmark.md)). If one wishes, other integration schemes can be used.

```
step dynamic 1 1
set ini_step_size 1E-3
set fixed_step_size 1

converger RelIncreDisp 1 1E-11 10 1

analyze

save recorder 1 2

exit
```

## Results

One could compare the results with the original results in the paper.

![displacement](https://1124082496-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEquxr3H9WpPg4iPvT2mB%2Fuploads%2Fgit-blob-713d7309766328c22acecf02bd58f1a89d33acfc%2Fmass-spring-dashpot-u.svg?alt=media)

![velocity](https://1124082496-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEquxr3H9WpPg4iPvT2mB%2Fuploads%2Fgit-blob-bcdee66d2137c1daa3104236f42c433c8154020b%2Fmass-spring-dashpot-v.svg?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/dynamics/mass-spring-dashpot-system.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.
