|
[Sponsors] |
![]() |
![]() |
#1 |
Senior Member
Join Date: Apr 2010
Posts: 151
Rep Power: 15 ![]() |
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? |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 16 ![]() |
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.
__________________
David A. Boger |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Join Date: Apr 2010
Posts: 151
Rep Power: 15 ![]() |
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! |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Join Date: Apr 2010
Posts: 151
Rep Power: 15 ![]() |
Do you know more about objectRegistry? I am trying to instantiate a forces object, as you suggested:
Code:
dictionary forcesDict; forcesDict.add("patches", "block"); forcesDict.add("rhoName", "rhoInf"); forcesDict.add("rhoInf", 1000); vector centreOfMass_(0.0,0.0,0.0); forcesDict.add("CofR", centreOfMass_); forces f("forces", db(), forcesDict); |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
Join Date: Apr 2010
Posts: 151
Rep Power: 15 ![]() |
Can anybody tell me how to instantiate a forces object in a new class, or give an example where it is done?
|
|
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
Join Date: Apr 2010
Posts: 151
Rep Power: 15 ![]() |
Simply writing
Code:
forces f("forces", db(), forcesDict); Code:
hppGgiFvMesh.C: In member function ‘void Foam::hppGgiFvMesh::getMoment()’: hppGgiFvMesh.C:358: error: reference to ‘db’ is ambiguous /home/jmatthei/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/IOobject.H:236: error: candidates are: const Foam::objectRegistry& Foam::IOobject::db() const /home/jmatthei/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/IOobject.H:236: error: const Foam::objectRegistry& Foam::IOobject::db() const /home/jmatthei/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/IOobject.H:236: error: const Foam::objectRegistry& Foam::IOobject::db() const hppGgiFvMesh.C:358: error: reference to ‘db’ is ambiguous /home/jmatthei/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/IOobject.H:236: error: candidates are: const Foam::objectRegistry& Foam::IOobject::db() const /home/jmatthei/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/IOobject.H:236: error: const Foam::objectRegistry& Foam::IOobject::db() const |
|
![]() |
![]() |
![]() |
![]() |
#7 |
New Member
Brecht Devolder
Join Date: Oct 2014
Posts: 2
Rep Power: 0 ![]() |
Have you found a solution for this problem?
|
|
![]() |
![]() |
![]() |
![]() |
#8 |
New Member
Giovanni Stabile
Join Date: Sep 2014
Location: Trieste (Italy) - Florence (Italy)
Posts: 14
Rep Power: 10 ![]() |
I have also the same problem
|
|
![]() |
![]() |
![]() |
![]() |
#9 |
Senior Member
|
||
![]() |
![]() |
![]() |
Tags |
forces, rigid body motions |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Reading forces from previous time step within solver | SD@TUB | OpenFOAM Programming & Development | 5 | April 24, 2023 11:51 |
how to get forces on Iso-Clip Surfaces and How to get forces in cylindrical coordinat | CFD XUE | FLUENT | 3 | March 18, 2015 03:28 |
forces in interFoam | Svensson | OpenFOAM Post-Processing | 2 | May 9, 2012 13:31 |
FORCES don't run! | C12Carbon | OpenFOAM | 0 | September 10, 2011 07:34 |
Valve Forces in CFdesign | Mike Clapp | Main CFD Forum | 3 | March 8, 2001 14:09 |