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

Correct pressure distribution but wrong aerodynamics coefficients

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 29, 2010, 07:35
Default Correct pressure distribution but wrong aerodynamics coefficients
  #1
New Member
 
Juanito
Join Date: Oct 2010
Posts: 27
Rep Power: 6
Aerospace is on a distinguished road
Hello to everybody.

I have been working with OpenFOAM and I have a strange problem. I have simulated several times a 2D cylinder, with different meshes and solvers and I always obtain a correct pressure and velocity results but a too small drag coefficient. I have calculated it by hand, sampling the pressure over the cylinder, and then the drag coefficient is ok. Where could be the problem?

In literature Cd for a cylinder with our Reynold is about 0.8 but forceCoeffs function calculates 0.3.

This our controlDict file:


---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application simpleFoam;

startFrom latestTime;

startTime 0;

stopAt endTime;

endTime 600;

deltaT 1;

writeControl timeStep;

writeInterval 50;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression uncompressed;

timeFormat general;

timePrecision 6;

runTimeModifiable yes;

functions
(
forceCoeffs
{
type forceCoeffs;
functionObjectLibs ("libforces.so");
//outputControl outputTime;
//outputInterval 1;
outputControl timeStep;
outputInterval 1;
patches (paredes); //change to your patch name
rhoInf 1.225;
CofR (0 0 0);
liftDir (0 0 1);
dragDir (-1 0 0);
pitchAxis (0 0 0);
magUInf -50;
lRef 1;
Aref 1;
}

forces
{
type forces;
functionObjectLibs ("libforces.so"); // Lib to load
//outputControl outputTime;
//outputInterval 1;
outputControl timeStep;
outputInterval 10;
patches (paredes); // change to your patch name
rhoName rhoInf;
rhoInf 1.225; // Reference density for fluid
CofR (0 0 0); // Origin for moment calculations
}

);

// ************************************************** *********************** //

Any suggestions.

Thank you.
Aerospace is offline   Reply With Quote

Old   October 29, 2010, 07:57
Default
  #2
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 361
Rep Power: 10
vkrastev is on a distinguished road
Quote:
Originally Posted by Aerospace View Post
Hello to everybody.

I have been working with OpenFOAM and I have a strange problem. I have simulated several times a 2D cylinder, with different meshes and solvers and I always obtain a correct pressure and velocity results but a too small drag coefficient. I have calculated it by hand, sampling the pressure over the cylinder, and then the drag coefficient is ok. Where could be the problem?

In literature Cd for a cylinder with our Reynold is about 0.8 but forceCoeffs function calculates 0.3.

This our controlDict file:


---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application simpleFoam;

startFrom latestTime;

startTime 0;

stopAt endTime;

endTime 600;

deltaT 1;

writeControl timeStep;

writeInterval 50;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression uncompressed;

timeFormat general;

timePrecision 6;

runTimeModifiable yes;

functions
(
forceCoeffs
{
type forceCoeffs;
functionObjectLibs ("libforces.so");
//outputControl outputTime;
//outputInterval 1;
outputControl timeStep;
outputInterval 1;
patches (paredes); //change to your patch name
rhoInf 1.225;
CofR (0 0 0);
liftDir (0 0 1);
dragDir (-1 0 0);
pitchAxis (0 0 0);
magUInf -50;
lRef 1;
Aref 1;
}

forces
{
type forces;
functionObjectLibs ("libforces.so"); // Lib to load
//outputControl outputTime;
//outputInterval 1;
outputControl timeStep;
outputInterval 10;
patches (paredes); // change to your patch name
rhoName rhoInf;
rhoInf 1.225; // Reference density for fluid
CofR (0 0 0); // Origin for moment calculations
}

);

// ************************************************** *********************** //

Any suggestions.

Thank you.
Are you sure of your Aref and lref values? For a 2D cilinder drag calculation in OpenFOAM lref should be the diameter (or the radius if you are simulating only half of the domain) and Aref should be lref*Zmesh, where Zmesh is cells' dimension in the direction orthogonal to your solution domain.

Hope this helps

V.
vkrastev is offline   Reply With Quote

Old   October 29, 2010, 08:04
Default
  #3
Member
 
Rasoul
Join Date: Feb 2010
Posts: 32
Rep Power: 7
aut_iut is on a distinguished road
I'm not sure. But for me this values seem to be strange!
Check them again.
liftDir (0 0 1);
dragDir (-1 0 0);

You defined -x as the direction for the drag and +z for the lift.
Are you sure about them?
aut_iut is offline   Reply With Quote

Old   October 29, 2010, 10:13
Default
  #4
New Member
 
Juanito
Join Date: Oct 2010
Posts: 27
Rep Power: 6
Aerospace is on a distinguished road
Quote:
Originally Posted by vkrastev View Post
Are you sure of your Aref and lref values? For a 2D cilinder drag calculation in OpenFOAM lref should be the diameter (or the radius if you are simulating only half of the domain) and Aref should be lref*Zmesh, where Zmesh is cells' dimension in the direction orthogonal to your solution domain.

Hope this helps

V.
Thankyou very much, i didn't know it so I'm going to try!!
Aerospace is offline   Reply With Quote

Old   October 29, 2010, 10:17
Default
  #5
New Member
 
Juanito
Join Date: Oct 2010
Posts: 27
Rep Power: 6
Aerospace is on a distinguished road
Quote:
Originally Posted by aut_iut View Post
I'm not sure. But for me this values seem to be strange!
Check them again.
liftDir (0 0 1);
dragDir (-1 0 0);

You defined -x as the direction for the drag and +z for the lift.
Are you sure about them?
Thank you for your coment aut_iut, lift Dir was wrong because I did not want to know it and dragDir is ok because my magUInf is also negative.
Aerospace is offline   Reply With Quote

Old   May 19, 2012, 00:27
Default
  #6
New Member
 
Esmaeil Ahmadiyan
Join Date: Sep 2011
Posts: 26
Rep Power: 5
e.ahmadiyan is on a distinguished road
Hi aut_iut and Aerospace
I am new user in openFoam and tried with dsmcFoam solver. i need to have aerodynamic coefficient
and i change the controlDict as above but it don't answer
could you help me ?
tanks a lot
e.ahmadiyan is offline   Reply With Quote

Old   May 21, 2012, 03:59
Default
  #7
Member
 
Rasoul
Join Date: Feb 2010
Posts: 32
Rep Power: 7
aut_iut is on a distinguished road
Salam Esmaeil,

Could you let me know what kind of error you've got?

regards,
aut_iut is offline   Reply With Quote

Old   May 21, 2012, 04:09
Default
  #8
New Member
 
Esmaeil Ahmadiyan
Join Date: Sep 2011
Posts: 26
Rep Power: 5
e.ahmadiyan is on a distinguished road
salam dear Rasoul
Tanks for your reply
In fact I saw fallowing warning in log.dsmcfoam file
FOAM Warning :
From function void forces::read(const dictionary&)
in file forces/forces.C at line 277
Could not find U, p in database.
De-activating forces.
best regardes
e.ahmadiyan is offline   Reply With Quote

Old   May 21, 2012, 04:13
Default
  #9
New Member
 
Esmaeil Ahmadiyan
Join Date: Sep 2011
Posts: 26
Rep Power: 5
e.ahmadiyan is on a distinguished road
of course I added the following lines in controlDict file
forceCoeffs1
{
type forceCoeffs;
functionObjectLibs ("libforces.so");
outputControl outputTime;
//outputInterval 1;
//outputControl timeStep;
outputInterval 1;
patches (obstacle); //change to your patch name
pName p;
UNmae U;
log true;
rhoName rhoInf;
rhoInf 1.225;
CofR (0 0 0);
liftDir (0 1 0);
dragDir (1 0 0);
pitchAxis (0 0 0);
magUInf 7600;
lRef 2.5146;
Aref 0.25146;
}
e.ahmadiyan is offline   Reply With Quote

Old   May 21, 2012, 10:57
Default
  #10
Member
 
Rasoul
Join Date: Feb 2010
Posts: 32
Rep Power: 7
aut_iut is on a distinguished road
Hi Esmaeil,

It seems that the OpenFOAM can not find U and p files. Be sure that U and p files are available at 0 filder (initial conditions).
Are you using the same name for your patch? I guess you need to change the name of the patch based on your case.
By the way, you should have been added both forcecoeffs and forces at ControlDict file.
Add this:

functions
(
forceCoeffs
{
type forceCoeffs;
functionObjectLibs ("libforces.so");
//outputControl outputTime;
//outputInterval 1;
outputControl timeStep;
outputInterval 1;
patches (paredes); //change to your patch name
rhoInf 1.225;
CofR (0 0 0);
liftDir (0 0 1);
dragDir (-1 0 0);
pitchAxis (0 0 0);
magUInf -50;
lRef 1;
Aref 1;
}

forces
{
type forces;
functionObjectLibs ("libforces.so"); // Lib to load
//outputControl outputTime;
//outputInterval 1;
outputControl timeStep;
outputInterval 10;
patches (paredes); // change to your patch name
rhoName rhoInf;
rhoInf 1.225; // Reference density for fluid
CofR (0 0 0); // Origin for moment calculations
}


If you have some difficulties send me your test case and I will take a look on it.

regards,
Rasoul
aut_iut is offline   Reply With Quote

Old   May 24, 2012, 02:55
Default
  #11
New Member
 
Esmaeil Ahmadiyan
Join Date: Sep 2011
Posts: 26
Rep Power: 5
e.ahmadiyan is on a distinguished road
Hi dear Rasoul
Thanks fr your suggestions
There is no P and U files in 0 folder in dsmcfoam solver at all !!!
What means of PatchName ?
Best regards.
e.ahmadiyan is offline   Reply With Quote

Old   December 12, 2012, 06:05
Default
  #12
New Member
 
Qiang Zhou
Join Date: May 2010
Location: Tongji University, Shanghai, China
Posts: 27
Rep Power: 7
michael1023 is on a distinguished road
Quote:
Originally Posted by Aerospace View Post
Hello to everybody.

I have been working with OpenFOAM and I have a strange problem. I have simulated several times a 2D cylinder, with different meshes and solvers and I always obtain a correct pressure and velocity results but a too small drag coefficient. I have calculated it by hand, sampling the pressure over the cylinder, and then the drag coefficient is ok. Where could be the problem?

In literature Cd for a cylinder with our Reynold is about 0.8 but forceCoeffs function calculates 0.3.

This our controlDict file:


---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application simpleFoam;

startFrom latestTime;

startTime 0;

stopAt endTime;

endTime 600;

deltaT 1;

writeControl timeStep;

writeInterval 50;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression uncompressed;

timeFormat general;

timePrecision 6;

runTimeModifiable yes;

functions
(
forceCoeffs
{
type forceCoeffs;
functionObjectLibs ("libforces.so");
//outputControl outputTime;
//outputInterval 1;
outputControl timeStep;
outputInterval 1;
patches (paredes); //change to your patch name
rhoInf 1.225;
CofR (0 0 0);
liftDir (0 0 1);
dragDir (-1 0 0);
pitchAxis (0 0 0);
magUInf -50;
lRef 1;
Aref 1;
}

forces
{
type forces;
functionObjectLibs ("libforces.so"); // Lib to load
//outputControl outputTime;
//outputInterval 1;
outputControl timeStep;
outputInterval 10;
patches (paredes); // change to your patch name
rhoName rhoInf;
rhoInf 1.225; // Reference density for fluid
CofR (0 0 0); // Origin for moment calculations
}

);

// ************************************************** *********************** //

Any suggestions.

Thank you.
what`s your Reynolds number and is it suitable to simulate at that Re number by 2D?
michael1023 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
Setup/monitor points of pressure and force coefficients siw CFX 3 October 22, 2010 06:07
changing the coefficients of pressure correction Noel Phoenics 1 April 7, 2009 08:54
Correct lift but wrong pressure drag - possible? zx Main CFD Forum 4 July 27, 2007 23:38
Neumann pressure BC and velocity field Antech Main CFD Forum 0 April 25, 2006 02:15
About the pressure coefficients Wong Phoenics 3 June 11, 2003 16:15


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