CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   sixDoFRigidBodyMotion new Restrain (https://www.cfd-online.com/Forums/openfoam-programming-development/209903-sixdofrigidbodymotion-new-restrain.html)

thanosniotis October 24, 2018 08:04

sixDoFRigidBodyMotion new Restrain
 
Hello, fellow Foamers,

It is my first post in CFDonline community and I ask for a piece of advice for the following issue.

I want to create my own sixDoFRigidBodyMotion Restraint. My question is the following:

Have i to compile only the myRestraint.C or the entire sixDoFRigidBodyMotion library?
What I have thought is to copy and compile the sixDofRigidBodyMotion as
mySixDofRidi.... where I would have included in the folder restraints the new code

Thank you for your time and your consideration.

kiski January 30, 2020 06:23

For future references and starters. I had the same problem: I could not make my own restraint (mylinearSpring) to be included in the selection options. Using banana trick gives

Code:

Valid sixDoFRigidBodyMotionRestraint types are :

6
(
linearAxialAngularSpring
linearDamper
linearSpring
sphericalAngularDamper
sphericalAngularSpring
tabulatedAxialAngularSpring
)

although I had no compilation errors (despite I also added the directory to the compiler requested header files using -I in Make/options).

Thanks to this post I tried

1. copy the whole sixDoFRigidBodyMotion structure
2. Add restraint mylinearSpring
3. modifying copied Make/files
4. building to new library i.e.libmysixDoFRigidBodyMotion.so.
5. add 'libs ("libmysixDoFRigidBodyMotion.so");' into system/controlDict


This worked correctly. Banana trick shows mylinearSpring as an option.

allenfieldin October 11, 2021 05:33

Have you solved this problem yet? I have met the same problem, can you give me some help?


All times are GMT -4. The time now is 12:03.