CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Help! problems in calculating forces with SimpleFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 26, 2011, 17:27
Default Help! problems in calculating forces with SimpleFoam
  #1
DLC
Member
 
Davide Lupo Conti
Join Date: Nov 2009
Posts: 34
Rep Power: 16
DLC is on a distinguished road
Hello Everyone!

I'm testing simpleFoam (OF 1.7) on the classic NACA 0012. To obtain forces on the airfoil I use the following commands in the controlDict:

functions
(
forces
{
type forces;
functionObjectLibs ("libforces.so"); //Lib to load
patches (wing); // change to your patch name
rhoInf 1.225; //Reference density for fluid
CofR (0.15 0 0); //Origin for moment calculations
outputControl outputTime;
}
forceCoeffs
{
type forceCoeffs;
functionObjectLibs ("libforces.so");
patches (wing); //change to your patch name
rhoInf 1.225;
CofR (0 0 0);
liftDir (0 1 0);
dragDir (1 0 0);
pitchAxis (0 0 0);
magUInf 55.5;
lRef 0.6;
Aref 1;
outputControl outputTime;
}
);




When I launch the run, this warning message is given and no forces/forces.dat is made (the run goes without any problem)
the same commands work perfectly on interFoam..

can anyone help me?
thanks!

Starting time loop

--> FOAM Warning :
From function void forces::read(const dictionary& dict)
in file forces/forces.C at line 277
Could not find U, p or rho in database.
De-activating forces.
--> FOAM Warning :
From function void forces::read(const dictionary& dict)
in file forces/forces.C at line 277
Could not find U, p or rho in database.
De-activating forces.
Time = 1
DLC is offline   Reply With Quote

Old   January 27, 2011, 01:23
Default
  #2
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25
philippose will become famous soon enough
Hi,

A Good Morning to you :-)!

You are getting this warning, and the force calculations are subsequently disabled because you are missing one line in your forces function definition... you need to change your function definition to:

Code:
functions
(
     forces
     {
         type forces;
         functionObjectLibs ("libforces.so"); //Lib to load
         patches (wing); // change to your patch name
         rhoInf 1.225; //Reference density for fluid
           rhoName rhoInf;
         CofR (0.15 0 0); //Origin for moment calculations
         outputControl outputTime;
     }
     forceCoeffs
     {
         type forceCoeffs;
         functionObjectLibs ("libforces.so");
         patches (wing); //change to your patch name
         rhoInf 1.225;
           rhoName rhoInf;  
         CofR (0 0 0);
         liftDir (0 1 0);
         dragDir (1 0 0);
         pitchAxis (0 0 0);
         magUInf 55.5;
         lRef 0.6;
         Aref 1;
         outputControl outputTime;
     }
);

Hope this helps!

Have a great day ahead!

Philippose
philippose is offline   Reply With Quote

Old   January 27, 2011, 18:22
Default
  #3
DLC
Member
 
Davide Lupo Conti
Join Date: Nov 2009
Posts: 34
Rep Power: 16
DLC is on a distinguished road
YES!!!!!!!!!!!!!!!!!!!!!!!!!!!!
it works fine now!
thanks a lot!!!!
just wondering why the same lines worked fine on the interFoam solver...

Thanks again!

DL
DLC is offline   Reply With Quote

Old   April 25, 2022, 23:43
Default
  #4
New Member
 
Suraj Garad
Join Date: Feb 2018
Location: Kharagpur
Posts: 16
Rep Power: 8
surajk.garad101 is on a distinguished road
hi,


I have clearly mentioned and tried both but it didn't work for me. I am having openfoam 2112.

rhoName rhoInf;
rho rhoInf;
rhoInf 1.0;
surajk.garad101 is offline   Reply With Quote

Reply

Tags
forces, simplefoam


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SimpleFoam convergence problems brahim OpenFOAM Running, Solving & CFD 20 June 9, 2015 09:09
Forces calculation fusij OpenFOAM 4 October 29, 2010 11:38
Forces and drag coeffs in simpleFoam milos OpenFOAM Post-Processing 7 December 16, 2009 09:49
Strange results from interFoam solution converges but sum of all forces not equal to zero nicasch OpenFOAM Running, Solving & CFD 0 April 15, 2008 02:01
Valve Forces in CFdesign Mike Clapp Main CFD Forum 3 March 8, 2001 14:09


All times are GMT -4. The time now is 08:03.