CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Forces on multiple bodies (https://www.cfd-online.com/Forums/openfoam/73882-forces-multiple-bodies.html)

jakaranda March 18, 2010 19:32

Forces on multiple bodies
 
Hello,
I am trying to get the forces on various bodies within a simulation.
How should I modify my controlDict file so that it spits out the forces on two different objects?

below is my current controlDict file which doesn't do what I want it to. It only gives me the force on my "tuna"

functions
(
forces
{
type forces;
functionObjectLibs ("libforces.so");
outputControl timeStep;
outputInterval 1;
patches (TUNA);
//patches (SIDEWALL);

pname p;
Uname U;
rhoName rhoInf;
log true;
rhoInf 998.0;
CofR (0 0 0);
}


);


// ************************************************** *********************** //

linnemann March 19, 2010 02:51

Hi

Should be done like so

Code:

functions
(
forces1
{
type forces;
functionObjectLibs ("libforces.so");
outputControl timeStep;
outputInterval 1;
patches (TUNA);
//patches (SIDEWALL);

pname p;
Uname U;
rhoName rhoInf;
log true;
rhoInf 998.0;
CofR (0 0 0);
}

forces2
 {
 type forces;
 functionObjectLibs ("libforces.so");
 outputControl timeStep;
 outputInterval 1;
 patches (TUNA);
 //patches (SIDEWALL);
 
 pname p;
 Uname U;
 rhoName rhoInf;
 log true;
 rhoInf 998.0;
 CofR (0 0 0);
 }

);



All times are GMT -4. The time now is 07:22.