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

Error with forces computation in 1.5

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 21, 2009, 03:54
Default Error with forces computation in 1.5
  #1
New Member
 
Join Date: Jul 2009
Posts: 14
Rep Power: 6
aaurouss is on a distinguished road
Hello everyone

I tried to use the function described in some posts about forces, but i get an error.

Here is what's written in the log file :
************************************************** *****************
attempt to read beyond EOF


file:..............................;/system/controlDict::functions at line 60.


From function ITstream::read(token& t)
in file db/IOstreams/Tstreams/ITread.C at line 64.


FOAM exiting
************************************************** *******************
It seems that there's a library missing or smthg like that

Any idea ?
Here is my code :

***************************************

functions
(
forces
{
type forces;
functionObjectLibs ("libforces.so");
patches (turbine);
rhoInf 1.225;
CofR (0 0 0);
}
);
aaurouss is offline   Reply With Quote

Old   July 21, 2009, 04:29
Default
  #2
Senior Member
 
Henrik Rusche
Join Date: Mar 2009
Location: Braunschweig, Niedersachsen, Germany
Posts: 271
Rep Power: 8
henrik is on a distinguished road
Dear aaurouss,

Please post the complete controlDict. What's in line 60?

Henrik
henrik is offline   Reply With Quote

Old   July 21, 2009, 04:53
Default
  #3
New Member
 
Join Date: Jul 2009
Posts: 14
Rep Power: 6
aaurouss is on a distinguished road
Dear Henrik,


Here is my controlDict: line 60 is about loading the library



*****************************************

application simpleFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 1000;
deltaT 1;
writeControl timeStep;
writeInterval 100;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
functions
(
forces
{
type forces;
functionObjectLibs("libforces.so");
patches(HULL);
rhoInf 1000;
CofR (0 0 0);
}
forceCoeffs
{
type forceCoeffs;
functionObjectLibs("libforces.so"); // LINE 60
patches(HULL);
rhoInf 1000;
CofR (0 0 0);
liftDir (0 1 0);
dragDir (1 0 0);
pitchAxis (0 0 0);
magUInf 1;
lRef 1;
Aref 1;
}


);




Regards
aaurouss is offline   Reply With Quote

Old   July 21, 2009, 05:08
Default
  #4
Senior Member
 
Henrik Rusche
Join Date: Mar 2009
Location: Braunschweig, Niedersachsen, Germany
Posts: 271
Rep Power: 8
henrik is on a distinguished road
Try putting a space here

functionObjectLibs[SPACE]("libforces.so");

Henrik
henrik is offline   Reply With Quote

Old   July 21, 2009, 05:47
Default
  #5
New Member
 
Join Date: Jul 2009
Posts: 14
Rep Power: 6
aaurouss is on a distinguished road
Thanks, this error is gone now. But i got another one:

************************************************** *******
keyword patches is undefined in dictionary "/system/controlDict::functions"


system/controlDict::functions from line 59 to line 69.


From function dictionary::lookupEntry(const word& keyword) const
in file db/dictionary/dictionary.C at line 213.


FOAM exiting
***************************************

It seems that the "patches()" doesn't get a correct argument. I actually don't know what to put here. Is this the name of a BC or its type ? "
HULL" is a wall boundary condition on which I want to calculate the drag.

Here is my boundar file :


************************************************** *****************

FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


5
(
HULL
{
type wall;
nFaces 3743;
startFace 651641;
}
SYM
{
type symmetryPlane;
nFaces 15143;
startFace 655384;
}
INLET
{
type patch;
nFaces 120;
startFace 670527;
}
OUTLET
{
type patch;
nFaces 120;
startFace 670647;
}
WALL
{
type patch;
nFaces 4216;
startFace 670767;
}
)
aaurouss is offline   Reply With Quote

Old   July 21, 2009, 05:53
Default
  #6
New Member
 
Join Date: Jul 2009
Posts: 14
Rep Power: 6
aaurouss is on a distinguished road
Dear Henrik,

I finally solved the problem for the patch: it just also needed a space between "patches" and "()". So it was all about syntax ....

Thank you very much for your help !

Best regards

Antoine
aaurouss is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Forces in 1.5 with an Ahmed VWT case terrybarnaby OpenFOAM Running, Solving & CFD 3 June 9, 2009 08:21
Forces in Symmetry Matt CFX 2 February 25, 2009 05:41
OpenFOAM Version 1.5 Released OpenFOAM discussion board administrator OpenFOAM Announcements from ESI-OpenCFD 0 July 14, 2008 18:22
CFX4.3 -build analysis form Chie Min CFX 5 July 12, 2001 23:19
Valve Forces in CFdesign Mike Clapp Main CFD Forum 3 March 8, 2001 14:09


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