Using forces in other classes
Hello,
I have a mesh motion class that works very well for prescribed motion. I would like to use this class to do rigid body displacements, under the influence of the fluid forces. I can also calculate the forces using the standard forces function. How can I take the results from this force calculation at each time step, and bring them into my mesh motion class for further use? |
One way would be to instantiate a forces object from within your class and use the calcForcesMoment() method to get the forces and moments acting on your object.
|
Excellent! I saw that in the sixDoFRigidBodyDisplacement class, but was not sure if this was what I was looking for. I'll try and learn to use it.
Many thanks! |
Do you know more about objectRegistry? I am trying to instantiate a forces object, as you suggested:
Code:
dictionary forcesDict; |
Can anybody tell me how to instantiate a forces object in a new class, or give an example where it is done?
|
Simply writing
Code:
forces f("forces", db(), forcesDict); Code:
hppGgiFvMesh.C: In member function ‘void Foam::hppGgiFvMesh::getMoment()’: |
Have you found a solution for this problem?
|
I have also the same problem
|
Quote:
Code:
forces f("forces", db(), forcesDict); |
All times are GMT -4. The time now is 06:39. |