Calculating Drag
Hi Foamers,
First, I am brand new to OpenFoam. In fact, its been many years since I've dipped my toes in the CFD waters (right now I feel like I'm drowning!). So, I apologize for my inevitable noobness. For reference, I'm running openFoam v1.7.1. Second, as indicated by the thread title, I'm interested in using openFoam to estimate the drag on an arbitrary body. To that end, I decided to edit the controlDict file in the cavity example by adding the following chunk of code: functions { forces { type forces; functionObjectLibs ("libforces.so"); //Lib to load outputControl timeStep; outputInterval 1; patches (fixedWalls); // change to your patch name rhoInf 1.225; //Reference density for fluid CofR (0.25 0 0); //Origin for moment calculations } forceCoeffs { type forceCoeffs; functionObjectLibs ("libforces.so"); patches (fixedWalls); //change to your patch name outputControl timeStep; outputInterval 1; rhoInf 1.225; CofR (0 0 0); liftDir (0 1 0); dragDir (1 0 0); pitchAxis (0.25 0 0); magUInf 10.0; lRef 1; Aref 1; } } However, when I run icoFoam, I don't get any force outputs anywhere. What am I doing wrong? |
Try this:
Code:
forces |
Yes it does! Thanks for the quick reply. It seems that the culprit was that I was missing the rhoName rhoInf field.
I understand that rhoInf is the free stream density, but what does the rhoName rhoInf field do? Thanks again. |
All times are GMT -4. The time now is 14:59. |