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/)
-   -   Extracing forces to implement friction in SixDoFRigidBodyMotion (https://www.cfd-online.com/Forums/openfoam-programming-development/169281-extracing-forces-implement-friction-sixdofrigidbodymotion.html)

toodles April 6, 2016 22:10

Extracing forces to implement friction in SixDoFRigidBodyMotion
 
Hi everyone,

I am relatively inexperienced with the code structure of OpenFoam. I have created and ran many cases; however, I have come to the point where I need to start adding functionality to the source code.

For my case, I am examining an oscillating plate that moves when induced by wave forces. I have the case running beautifully using interDyMFoam and sixDoFRigidBodyMotion solver. In addition to having linear springs and dampers, I need to be able to add a frictional effect. Basically, I want to extract the instantaneous horizontal force on the plate and multiply it by a particular coefficient to make a vertical restraining force. I feel that the perfect place to do this is within the SixDoFRigidBodyMotion class; however I am stuck on extracting the forces. I am trying to find them in the forces.C class, but I am pretty lost on how to call the forces within 6DoF.

In post processing I am writing the forces to a text file using libforces in the controlDict and have verified that they are correct. It is just a matter of being able to use them now. If anyone could provide some insight on this, I would really appreciate it.

toodles April 13, 2016 21:14

Here is an update on this:

I feel like I am very close to getting this; however, I am absolutely stuck. I am calculating the force that I need in one class called sixDofRigidBodyMotionSolver.C and am storing this into a variable. I need to be able to read this variable in a different class, linearSpring.C, but I am having trouble knowing where to declare it so I can access it from outside the class. Is there a main code anywhere that all of the public variables are defined? I really would appreciate any help, as my mind has been going in circles for about a week.

federicabi May 17, 2016 05:29

Hi toodles!
I'm working on a similar case: I have to simulate a planning hull motion in a towing tank test with calm water so I need to extract the x-component of the total force acting on the hull to evaluate the vertical force that is experienced during the test in addition to the buoyancy and lift normally acting on the hull during its motion. This vertical force has to be added in the motion equation to obtain the correct motion of the hull, so I need to modify sixDoFRigidBodyMotion solver, but I don't know how. since your case is similar to mine, can you Explain how did you do that?

I appreciate you help.

Best regards

Federica

djamila77 May 17, 2016 05:56

Nusselt number
 
Hi,all

I tried to calculate the average Nusselt number with CFD; but I don't know how to do it. Only I draw The surface Nusselt Number with it.

can i get a help.

many thanks

federicabi May 17, 2016 07:31

Dear Djamila
if you have local Nusselt number you can use numerical integration. For the local calculation of Nusselt number look at http://www.cfd-online.com/Forums/ope...lt-number.html

Best regards

Federica

quarkz April 19, 2022 23:01

Hi, I am also trying to extract the forces. My solution is simply to read from the force.dat file as described here

https://www.cfd-online.com/Forums/op...o-program.html

Hope it helps.

ansab_sindhu April 23, 2022 05:27

Quote:

Originally Posted by djamila77 (Post 600332)
Hi,all

I tried to calculate the average Nusselt number with CFD; but I don't know how to do it. Only I draw The surface Nusselt Number with it.

can i get a help.

many thanks

You can use the gsum function to make it average over the patch.
If you share the code then I can comment better.


All times are GMT -4. The time now is 09:55.