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 |
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 } |
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. |
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 17:49. |