|
[Sponsors] |
Implementation of the drag coefficient Formula |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 23, 2013, 07:00 |
Implementation of the drag coefficient Formula
|
#1 |
Member
Amin
Join Date: May 2013
Posts: 76
Rep Power: 13 |
Hello Foamers
I am trying to simulate a flow around a half-cylinder.In order to evaluate my result and i need calculate some coefficients non-dimensional numbers , like Nussel-number and the drag coefficient: For the calculation of the drag coefficient of the geometry i should use this Formula : with I am using ParaView and Ensight as a Post-Processing Tool. Can anybody explain to me, how and where should implement this Formula, in order to calculate the drag coefficient for every time step ? Thx for the support PS: I am using OpenFOAM 2.2.0 |
|
July 23, 2013, 08:57 |
solved :)
|
#2 |
Member
Amin
Join Date: May 2013
Posts: 76
Rep Power: 13 |
So...
Just write this Code in your controlDict-File Code:
functions ( forces { type forces; functionObjectLibs ("libforces.so"); //Lib to load -> dylib on Mac and so on Linux rhoInf 1.0; //Reference density for fluid - can be changed later ... patches (fixedWalls); //Name of patche to integrate forces CofR (0 0 0); //Origin for moment calculations outputControl timeStep; outputInterval 1; } forceCoeffs { // rhoInf - reference density // CofR - Centre of rotation // dragDir - Direction of drag coefficient // liftDir - Direction of lift coefficient // pitchAxis - Pitching moment axis // magUinf - free stream velocity magnitude // lRef - reference length // Aref - reference area type forceCoeffs; functionObjectLibs ("libforces.so"); patches (fixedWalls); rhoName rhoInf; rhoInf 1000; CofR (2 0 0); liftDir (0 1 0); dragDir (1 0 0); pitchAxis (0 0 1); magUInf 1e-7; lRef 0.06; // sphere diameter Aref 0.0014137; //1/2 * projected area = pi*rē/2 outputControl timeStep; outputInterval 1; } ); The Folder postProcessing will be created, there you will find the values of Lift, Drag for every time step saved in the forceCoeffs.dat file For more information : http://www.cfd-online.com/Forums/ope...efficient.html http://ww3.cad.de/foren/ubb/Forum527...000069-2.shtml |
|
July 24, 2013, 02:06 |
|
#3 |
Member
Amin
Join Date: May 2013
Posts: 76
Rep Power: 13 |
Hello
i did a little mistake The simulation was running and the OpenFOAM calculated the drag , lift....and that is why i thought every is perfect .... but i did not calculate the forces properly : Code:
--> FOAM Warning : From function void forces::read(const dictionary&) in file forces/forces.C at line 449 Could not find U, p or rho in database. De-activating forces. Thx |
|
July 26, 2013, 05:56 |
|
#4 |
Senior Member
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 372
Rep Power: 20 |
You didn't mention what solver you were using but I think the problem might be that you didn't specify the field names in your controlDict file. Here's how I do it with interFoam and pimpleDyMFoam and it works:
Code:
forces { type forces; functionObjectLibs ( "libforces.so" ); outputControl timeStep; outputInterval 1; patches ( "hull.*" ); rhoName rho; pName p; UName U; log true rhoInf 1; CofR (-5.95 -0.518 -0.5705); } |
|
August 5, 2013, 02:11 |
|
#5 |
Member
Amin
Join Date: May 2013
Posts: 76
Rep Power: 13 |
thanks !!
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Drag Coefficient Convergence Problem | John | FLUENT | 18 | June 24, 2023 10:22 |
problem with saving drag coefficient | colopolo | FLUENT | 5 | April 12, 2013 11:59 |
Calculation of Drag Coefficient, Help Please | teek22 | CFX | 1 | April 26, 2012 19:41 |
Drag coefficient for parcels in dieselFoam | sebastian_vogl | OpenFOAM Running, Solving & CFD | 5 | December 31, 2008 13:19 |
Automotive test case | vinz | OpenFOAM Running, Solving & CFD | 98 | October 27, 2008 09:43 |