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

Error Message Determining Forces in OpenFOAM 1.7

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By aloeven

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 22, 2010, 13:22
Default Error Message Determining Forces in OpenFOAM 1.7
  #1
Member
 
Greg Givogue
Join Date: Aug 2010
Location: Ottawa Canada
Posts: 57
Rep Power: 16
Greg Givogue is on a distinguished road
Hi,

I'm an OpenFOAM beginner trying to determine the forces on a patch from the motorBike tutorial. This tutorial closely resembles a problem I'm going to try to model and thus I thought modifying this problem one step at a time would be the safest route. I've scoured this forum and have found many helpful hints. This is what I've added to the ControlDict file;

functions //added code from http://www.cfd-online.com/Forums/ope...nts-cl-cd.html // should produce a forces.dat folder in the project folder
(
forces
{
type forces;
functionObjectLibs ("libforces.so"); //Lib to load
patches (motorBike_windshield:002%2); // change to your patch name and for multiple patches seperate patch names by a space
//pName p;// added next three lines because of sonicFoam example controlDict, however no change in error message
//UName U;
//log true;
rhoInf 1.225; //Reference density for fluid - changed to SL air from 1.204
CofR (0 0 0); //Origin for moment calculations
outputControl timeStep;
outputInterval 100;
}

forceCoeffs
{
type forceCoeffs;
functionObjectLibs ("libforces.so");
patches (motorBike_windshield:002%2); //change to your patch name
//pName p;// added next three lines because of sonicFoam example controlDict
//UName U;
//log true;
rhoInf 1.225;
CofR (0 0 0);
liftDir (0 1 0);
dragDir (1 0 0);
pitchAxis (0 0 0);
magUInf 20; // changed from 0.1
lRef 1;
Aref 1;
outputControl timeStep;
outputInterval 100;
}
);

This is the error message I get in log.SimpleFoam;
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.

I've tried looking at other tutorials that use functions, however, I can't spot how they're set-up any differently... and I don't really understand what the error message is telling me from forces.c. I think I'm missing something simple in the initialization of the problem... Thanks in advance for your help!
Greg Givogue is offline   Reply With Quote

Old   August 23, 2010, 12:01
Default
  #2
Member
 
Alex
Join Date: Apr 2010
Posts: 32
Rep Power: 16
aloeven is on a distinguished road
Just add:

rhoName rhoInf;

It can be that you have to uncomment:

pName p;
Uname U;
FrankFlow likes this.
aloeven is offline   Reply With Quote

Old   August 23, 2010, 13:48
Default
  #3
Member
 
Greg Givogue
Join Date: Aug 2010
Location: Ottawa Canada
Posts: 57
Rep Power: 16
Greg Givogue is on a distinguished road
Thanks Alex! I'm away from my computer but I'll give it a shot later tonight and I'll let you know how I make out. I hope it's something that simple.

Thanks again for the help! Greg
Greg Givogue is offline   Reply With Quote

Old   August 23, 2010, 19:03
Default
  #4
Member
 
Greg Givogue
Join Date: Aug 2010
Location: Ottawa Canada
Posts: 57
Rep Power: 16
Greg Givogue is on a distinguished road
Yep that did it. Thanks.
Greg Givogue is offline   Reply With Quote

Reply


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
OpenFOAM 1.7 installation on Redhat linux maxims OpenFOAM Installation 2 November 30, 2012 05:29
[swak4Foam] OpenFOAM 1.6 and 1.7 with interFoam, groovyBC give different strange results Arnoldinho OpenFOAM Community Contributions 7 December 9, 2010 17:29
OpenFOAM 1.7 - openSUSE 11.3 - gcc 4.5.0 alberto OpenFOAM 12 July 28, 2010 12:59
Forces viscous calculation in VWT with OpenFOAM 15x terrybarnaby OpenFOAM Running, Solving & CFD 0 November 28, 2008 09:39
Determining forces on a cell face in OpenFoam srinath OpenFOAM 1 September 6, 2008 03:44


All times are GMT -4. The time now is 19:01.