# Forces calulated through pressure

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

 February 5, 2010, 05:50 Forces calulated through pressure #1 Member   Andre Z Join Date: Dec 2009 Posts: 32 Rep Power: 7 Hello my fellow Foamers, I have to address something I find confusing: I have found two ways to calculate forces. The first one is with the help out of this forum. Someone suggested to hang this piece of code to the controlDict Code: ```functions { forces { type forces; functionObjectLibs ("libforces.so"); //Lib to load patches (wall); // change to your patch name rhoName rhoInf; rhoInf 1.205; //Reference density for fluid CofR (4.5 1.5 2.125); //Origin for moment calculations outputControl timeStep; outputInterval 50; } 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 (wall); rhoName rhoInf; rhoInf 1.205; CofR (2 0 0); liftDir (0 1 0); dragDir (1 0 0); pitchAxis (0 0 1); magUInf 50; lRef 4.245; // sphere diameter Aref 2.2555; //1/2 * projected area = pi*r²/2 outputControl timeStep; outputInterval 50; } }``` This does seem to work. I do get a folder containing the forces. My second way of calculating the forces is by using the command patchIntegrate. If I use this command with the p field and the wall it should (thats what I thought) give me the forces resulting through pressuredifferences. My problem is that the two methodes come to different solutions. If I run the simpleFoam/airfoil tutorial in timestep 500 I get these two solutions: controlDict: (-97.6164 755.598 -6.01592e-14) patchIntegrate: (-81.0095 627.052 -4.99247e-14) The two solutions are not completly different, but still the question remains: Why are they different?

 February 25, 2010, 07:27 #2 New Member   Sebastian W Join Date: Nov 2009 Location: Germany Posts: 16 Rep Power: 7 Hi Andre, Your forces differ all by the factor 1.205 - which is exactly the value of your reference density rhoInf. If you check out the 2D-Airfoil tutorial you will notice, that the pressure dimension is set to m²/s², which means you actually deal with p/rho (that's at least my assumption). And so does of course patchIntegrate. Cheers, naval edit: In the transportProperties dictionary rho is set to 1 kg/m³. Changing that to your reference density will also produce matching results.

 February 26, 2010, 04:15 #3 Member   Andre Z Join Date: Dec 2009 Posts: 32 Rep Power: 7 You are right. 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 Mihail CFX 7 September 7, 2014 06:27 Mattia FLUENT 0 October 22, 2007 08:52 Antech Main CFD Forum 0 April 25, 2006 02:15 Ben FLUENT 0 November 21, 2004 02:47 DS & HB Main CFD Forum 0 January 8, 2000 16:00

All times are GMT -4. The time now is 04:36.