Correct pressure distribution but wrong aerodynamics coefficients
Hello to everybody.
I have been working with OpenFOAM and I have a strange problem. I have simulated several times a 2D cylinder, with different meshes and solvers and I always obtain a correct pressure and velocity results but a too small drag coefficient. I have calculated it by hand, sampling the pressure over the cylinder, and then the drag coefficient is ok. Where could be the problem? In literature Cd for a cylinder with our Reynold is about 0.8 but forceCoeffs function calculates 0.3. This our controlDict file: ---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application simpleFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 600; deltaT 1; writeControl timeStep; writeInterval 50; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression uncompressed; timeFormat general; timePrecision 6; runTimeModifiable yes; functions ( forceCoeffs { type forceCoeffs; functionObjectLibs ("libforces.so"); //outputControl outputTime; //outputInterval 1; outputControl timeStep; outputInterval 1; patches (paredes); //change to your patch name rhoInf 1.225; CofR (0 0 0); liftDir (0 0 1); dragDir (-1 0 0); pitchAxis (0 0 0); magUInf -50; lRef 1; Aref 1; } forces { type forces; functionObjectLibs ("libforces.so"); // Lib to load //outputControl outputTime; //outputInterval 1; outputControl timeStep; outputInterval 10; patches (paredes); // change to your patch name rhoName rhoInf; rhoInf 1.225; // Reference density for fluid CofR (0 0 0); // Origin for moment calculations } ); // ************************************************** *********************** // Any suggestions. Thank you. |
Quote:
Hope this helps V. |
I'm not sure. But for me this values seem to be strange!
Check them again. liftDir (0 0 1); dragDir (-1 0 0); You defined -x as the direction for the drag and +z for the lift. Are you sure about them? |
Quote:
|
Quote:
|
|
Salam Esmaeil,
Could you let me know what kind of error you've got? regards, |
salam dear Rasoul
Tanks for your reply In fact I saw fallowing warning in log.dsmcfoam file FOAM Warning : From function void forces::read(const dictionary&) in file forces/forces.C at line 277 Could not find U, p in database. De-activating forces. best regardes |
of course I added the following lines in controlDict file
forceCoeffs1 { type forceCoeffs; functionObjectLibs ("libforces.so"); outputControl outputTime; //outputInterval 1; //outputControl timeStep; outputInterval 1; patches (obstacle); //change to your patch name pName p; UNmae U; log true; rhoName rhoInf; rhoInf 1.225; CofR (0 0 0); liftDir (0 1 0); dragDir (1 0 0); pitchAxis (0 0 0); magUInf 7600; lRef 2.5146; Aref 0.25146; } |
Hi Esmaeil,
It seems that the OpenFOAM can not find U and p files. Be sure that U and p files are available at 0 filder (initial conditions). Are you using the same name for your patch? I guess you need to change the name of the patch based on your case. By the way, you should have been added both forcecoeffs and forces at ControlDict file. Add this: functions ( forceCoeffs { type forceCoeffs; functionObjectLibs ("libforces.so"); //outputControl outputTime; //outputInterval 1; outputControl timeStep; outputInterval 1; patches (paredes); //change to your patch name rhoInf 1.225; CofR (0 0 0); liftDir (0 0 1); dragDir (-1 0 0); pitchAxis (0 0 0); magUInf -50; lRef 1; Aref 1; } forces { type forces; functionObjectLibs ("libforces.so"); // Lib to load //outputControl outputTime; //outputInterval 1; outputControl timeStep; outputInterval 10; patches (paredes); // change to your patch name rhoName rhoInf; rhoInf 1.225; // Reference density for fluid CofR (0 0 0); // Origin for moment calculations } If you have some difficulties send me your test case and I will take a look on it. regards, Rasoul |
Hi dear Rasoul
Thanks fr your suggestions There is no P and U files in 0 folder in dsmcfoam solver at all !!! What means of PatchName ? Best regards. |
Quote:
|
All times are GMT -4. The time now is 02:25. |