CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   how to add spring/damping effect to connect two moving body (

Teemo March 27, 2013 10:47

how to add spring/damping effect to connect two moving body
Dear FoAMers,

I would like to connect these two moving parts together by a spring , how can I achieve it in OPENFOAM?

Your suggestion will be appreciated.


Teemo March 27, 2013 10:50

ngj March 27, 2013 12:17

Hi Teemo,

I my version of OF (1.6-ext) you can find the following constraints for mesh motion here:


The linear spring seems like a good choice for the initial investigation.

I have no idea on how they are working, though I know that the are also present in the more recent releases of OF.

Good luck,


Teemo March 27, 2013 12:41

Thanks Niels,

I will give it a try.


Teemo March 27, 2013 13:23

hello again,

I have looked into the linear spring file and for its setup:
//- Anchor point, where the spring is attached to an immovable object
point anchor_;

//- Reference point of attachment to the solid body
point refAttachmentPt_;

//- Spring stiffness coefficient (N/m)
scalar stiffness_;

//- Damping coefficient (Ns/m)
scalar damping_;

//- Rest length - length of spring when no forces are applied to it
scalar restLength_;
it seems that one end of the spring should be fixed, but for my case, i need both ends move with the floaters, any idea?


tyoung November 10, 2014 11:09

Hi Teemo,

I am currently facing similar situation and would like to know whether you had any luck on it?


All times are GMT -4. The time now is 13:16.