CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Foam exciting while Force calculation in OF 1.6 (http://www.cfd-online.com/Forums/openfoam/71776-foam-exciting-while-force-calculation-1-6-a.html)

devesh.baghel January 14, 2010 10:26

Foam exciting while Force calculation in OF 1.6
 
Hi Foamers,

I am trying to simulate flow over airfoil by using Spalat-Allmaras model.
I want to calculate Pressure & Viscous forces to find out Lift & Drag coefficients.

Below are the description of "controlDict file" contains......
/************************************************** ******************
application simpleFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 10;
deltaT 5.0e-2;
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"); //Lib to load
outputControl outputTime;
patches (wall); //change to your patch name
pName p; // name of the field
UName U; // name of the field
log true; //Dump to file
rhoInf 1.225; //Reference density for fluid
CofR (0 0 0); //Origin for moment calculations
}

forceCoeffs
{
type forceCoeffs;
functionObjectLibs ("libforces.so");
outputControl outputTime;
patches (wall); //change to your patch name
pName p; // name of the field
UName U; // name of the field
log true; //Dump to file
rhoInf 1.225; //density
CofR (0 0 0);
liftDir (0 1 0); //Direction for lift
dragDir (1 0 0); //Direction for Drag
pitchAxis (0 0 0); //Pitching axis
magUInf 26.0; //Free stream velocity magnitude
lRef 0.6; //reference length "frontal length at velocity inlet"
Aref 1.632653; //reference area "frontal area at velocity inlet"
}
);
// ************************************************** *********************** //


while running the simpleFoam.....,after some time I get the message shown below

" A component used as a directory in "/data/OpenFOAM/user1-1.6/Experiments_by_ourself/Tutorial_solved/Airfoil/SimpleFoam/forceCoeffs/5" is not, in fact, a directory.

From function Foam::mkDir(const fileName&, mode_t)
in file POSIX.C at line 372.

FOAM exiting...................................... "


Now, I got POSIX.C file, where at line 372, below codes were written.....

case ENOTDIR:
{
FatalErrorIn("Foam::mkDir(const fileName&, mode_t)")
<< "A component used as a directory in " << pathName
<< " is not, in fact, a directory."
<< exit(FatalError);

return false;
}



I din't find any solution/hint to resolve it :confused:.
Please help on this problem......

Thanks alot

devesh.baghel January 15, 2010 03:05

Hi all,

I got the solution for the problem, I pasted there.:D

thanks

t_regert January 25, 2010 09:02

wall as a patch
 
Hello!
I'm a newcommer to openFOAM and I would like to ask how did you manage to apply the forces function that you used here for a "type wall"? For me it works only for "type patch" boundaries. I have also an airfoil and using also Spalart-Allmaras model, thus wall BC was inevitable. Sorry if I ask some too obvious question and thank you for your help in advance.

devesh.baghel January 28, 2010 06:15

Hi,

Have you defined the exact name of "wall" (as in Boundary File in constant/polymesh folder) in the above function? Other than that, I did not change anything else.

t_regert January 28, 2010 09:20

Hello,

thank you for your answer. Finally I realised that the type 'wall' is accepted by the forces function as a patch, just I made a mistake when I defined the patches. As I have multiple wall faces (airfoil pressure and suction side), I had to write:

patches(Airfoil_pressureside Airfoil_Suctionside);

but in the beginning I made a mistake because I put a comma between the individual surfaces. This way here above works fine.

Best regards,
Tamas

sandy February 7, 2010 08:52

Quote:

Originally Posted by devesh.baghel (Post 242701)
Hi all,

I got the solution for the problem, I pasted there.:D

thanks


Hi Devesh,

Could you help me to solve the similar problem?
http://www.cfd-online.com/Forums/ope...e-posix-c.html

Thanks.
Sandy

val46 November 2, 2010 03:31

Hi,

sorry to put up such an old thread.
I have the same error message and you said you solved it.

Quote:

Originally Posted by devesh.baghel (Post 242701)
Hi all,

I got the solution for the problem, I pasted there.:D

thanks

Where? ;-)

Regards,
Toni


All times are GMT -4. The time now is 00:32.