# 2 DoF Mass-Spring System - SPRING2 & SPRINGA Element Types

**URL:** <https://prepomax.discourse.group/t/2-dof-mass-spring-system-spring2-springa-element-types/2308>\
**Category:** Tips & Tricks\
**Tags:** results, compilation, dynamic\
**Created:** [December 24, 2024, 1:11pm UTC](https://prepomax.discourse.group/t/2-dof-mass-spring-system-spring2-springa-element-types/2308 "2024-12-24T13:11:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhayrettin](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@mhayrettin](https://prepomax.discourse.group/u/mhayrettin)\
**Post date:** [December 24, 2024, 1:11pm UTC](https://prepomax.discourse.group/t/2-dof-mass-spring-system-spring2-springa-element-types/2308/1 "2024-12-24T13:11:23Z")

</div>

### Hi,

### In the version I’m currently using _(v2.1.11)_ `SPRING2` and `SPRINGA` elements can not be added in the UI. And these are needed to connect two or more bodies/nodes/remote points not to the ground but to one another.

### @FEAnalyst explained briefly what are these spring element types in [this post.](https://prepomax.discourse.group/t/spring-between-two-nodes/116). Thanks a lot.

### I tried to make it more clear.

# [`2_DOF_MASS_SPRING`](https://github.com/mhayrettin/PrePoMax_CalculiX_OpenSource/tree/main/2_DOF_MASS_SPRING_SYSTEM) : 2 Degree of Freedom Mass-Spring System with PrePoMax & CalculiX

## What’s that?

### `\\01_2_dof_mass_spring_system.inp`

> Solver deck file is in this folder.

## ----------------------------------------------------------------------

## Model Explanation

### There are 2 cubes represent masses and 2 spring elements attached to these cubes.

 ![image](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/d/dd22bedd6d32a6399623a3e52c969b2e45d4b328.png)

## `SPRING1` element can be defined in PrePoMax UI. `SPRING2` and `SPRINGA` elements can not be defined in UI so you have to add them as `CalculiX Keyword`. Yellow spring element that named as `k1` here is `SPRING1` which is defined in PPM UI.

 ![image](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/d/dbd7508916ceccfcd0c3fefed89ffff63d66d01f.jpeg)

## Other Spring element which has `SPRING2` or `SPRINGA` element type will be added as CalculiX keywords.

## 1) `Model-->Edit CalculiX Keywords`

 ![image](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/b/ba5345874ce5f476728d13131db81fa6c3c775df.png)

## 2) You need to add 3 things here:

 ![image](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/7/78e038b85813136d0f6b42fb8a472e4a5b7ccf7d.png)

### 2.1) Define Spring Element as `Additional Element` with `elementID, node1_ID, node2_ID`:

 ![image](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/9/91a3541285f63c64a43c62188819893b8971f05b.png)  
Also adding code text:

#### `*Element,TYPE=SPRINGA,ELSET=ESPRING`

#### `999999,18525,18527`

### 2.2) Define your spring as `Additional Element Set` with `elementID`.

 ![image](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/1/109dda557d8e65adf485772d002c22ad33e72db1.png)

Also adding code text:

#### `*Elset, Elset = ESPRING`

#### `999999`

### 2.3) Define your spring as `Additional Section` with `Stiffness Value`.

 ![image](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/5/57b6227e61839b8d264d6477d19b91e061096eb2.png)  
Also adding code text:

#### `*Spring,ELSET=ESPRING`

#### `0.003`

# `IMPORTANT!`

## Let’s say your spring stiffness is 5 N/mm. When you add this `5` value as a keyword YOU HAVE TO ADD A GODDAMN POINT AT THE END OF VALUE. Like `5.` My value already has a decimal here, it’s `0.003` `N/mm` but if it was `100 N/mm` so i would write `100.` there.

## 3) That’s it. Run your model…

## ----------------------------------------------------------------------

## By the way, the inp file i add here has 2 steps.

1. NORMAL\_MODES analysis that calculates `undamped natural frequencies` of mass-spring system.
2. MODAL\_DYNAMICS analysis that uses results of NORMAL\_MODES analysis as input and calculates time domain response of cubes.
3. There is a time domain force applied to the right cube. It’s applied like a shock force in a short duration. _like ultra dummy version of hammer test force application_  
 ![image](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/1/172dee9e5b43f69980e2768ef0653aff64127ef0.png)

---

<div class="post-metadata">

**Author:** ![jbr](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@jbr](https://prepomax.discourse.group/u/jbr)\
**Post date:** [December 25, 2024, 3:24am UTC](https://prepomax.discourse.group/t/2-dof-mass-spring-system-spring2-springa-element-types/2308/2 "2024-12-25T03:24:35Z")

</div>

> [@mhayrettin](#):
>
> YOU HAVE TO ADD A GODDAMN POINT AT THE END OF VALUE

Chill, this is free software man…🤣

---

<div class="post-metadata">

**Author:** ![mhayrettin](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@mhayrettin](https://prepomax.discourse.group/u/mhayrettin)\
**Post date:** [December 27, 2024, 2:04pm UTC](https://prepomax.discourse.group/t/2-dof-mass-spring-system-spring2-springa-element-types/2308/3 "2024-12-27T14:04:53Z")

</div>

That costed me a couple of hours. 🙂

---

<div class="post-metadata">

**Author:** ![jbr](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@jbr](https://prepomax.discourse.group/u/jbr)\
**Post date:** [December 28, 2024, 3:29am UTC](https://prepomax.discourse.group/t/2-dof-mass-spring-system-spring2-springa-element-types/2308/4 "2024-12-28T03:29:01Z")

</div>

I can guarantee this won’t be the last time it happens.
