CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Forces printout for multiple patches (http://www.cfd-online.com/Forums/openfoam-pre-processing/80763-forces-printout-multiple-patches.html)

ozzythewise October 5, 2010 20:27

Forces printout for multiple patches
 
Hi all,

I'm trying to print out forces and forcesCoeffs for more than 1 patch and I'm not sure on the syntax that I use in my controlDict file. The case that I have is a simple 2D pipe flow with some bends. I am using my wall friction as a condition for convergence so I need to monitor it as I progress through my iterations. Any help would be greatly appreciated.

Thanks

NickG October 29, 2010 10:29

Hi

e.g.:

forcesA
{
interval 25;
type forces;
functionObjectLibs ("libforces.so"); //Lib to load
patches (vanA); // change to your patch name
rhoName rhoInf;
rhoInf 1.23; //Reference density for fluid
CofR (0 0 0); //Origin for moment calculations
}
forcesB
{
interval 25;
type forces;
functionObjectLibs ("libforces.so"); //Lib to load
patches (vanB); // change to your patch name
rhoName rhoInf;
rhoInf 1.23; //Reference density for fluid
CofR (0 0 0); //Origin for moment calculations
}
forcesC
{
interval 25;
type forces;
functionObjectLibs ("libforces.so"); //Lib to load
patches (vanC); // change to your patch name
rhoName rhoInf;
rhoInf 1.23; //Reference density for fluid
CofR (0 0 0); //Origin for moment calculations
}

AcfdO November 10, 2010 12:01

Hi Jeff,

I am kind of new in OpenFOAM world; could you please help me know how could I use calculated forces during run time in my solver?
I want to use the calculated forces, but I don't know what I should do.
Thank you.

protarius March 7, 2012 13:59

If you have multiple patches and if you want only the sum of the data (and not the data for each patch), you can use one "forces", e.g.

forces
{
type forces;
functionObjectLibs ("libforces.so");
outputControl timeStep;
outputInterval 1;
patches (patch1 patch2); // change to your patches name
rhoName rhoInf;
log true;
rhoInf 1.205; //Reference density for fluid
CofR (0 0 0); //Origin for moment calculations
}

The sum of the data will be written in the "forces.dat" file

Regards


All times are GMT -4. The time now is 10:42.