Implementation of the drag coefficient Formula

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 23, 2013, 06:00 Implementation of the drag coefficient Formula #1 Member   Amin Join Date: May 2013 Posts: 76 Rep Power: 5 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, 07:57 solved :) #2 Member   Amin Join Date: May 2013 Posts: 76 Rep Power: 5 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 : lift and drag coefficient http://ww3.cad.de/foren/ubb/Forum527...000069-2.shtml

 July 24, 2013, 01:06 #3 Member   Amin Join Date: May 2013 Posts: 76 Rep Power: 5 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.``` Do you know, how to fix this warning ?? Thx

 July 26, 2013, 04:56 #4 Senior Member     Artur Join Date: May 2013 Location: Southampton, UK Posts: 285 Rep Power: 7 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); }``` Mirage12 likes this.

 August 5, 2013, 01:11 #5 Member   Amin Join Date: May 2013 Posts: 76 Rep Power: 5 thanks !!

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post colopolo FLUENT 5 April 12, 2013 10:59 teek22 CFX 1 April 26, 2012 18:41 John FLUENT 16 September 4, 2009 02:44 sebastian_vogl OpenFOAM Running, Solving & CFD 5 December 31, 2008 13:19 vinz OpenFOAM Running, Solving & CFD 98 October 27, 2008 09:43

All times are GMT -4. The time now is 13:02.