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

calculate lift and drag coefficient

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 26, 2021, 13:45
Default calculate lift and drag coefficient
  #1
New Member
 
alireza
Join Date: Sep 2021
Posts: 11
Rep Power: 5
alirez is on a distinguished road
Hi, I am a new user and I am working on wind turbine blades. To do this, I need to calculate the lift and drag coefficient by OpenFoam software.
I added the coefficient calculation function in the controldict but I get a zero answer at different times And I get this error

No finite volume options present
forces forceCoeffsIncompressible:
--> FOAM Warning :
From function Foam: abelHashSet Foam olyBoundaryMesh atchSet(const Foam::UList<Foam::wordRe>&, bool, bool) const
in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 804
Cannot find any patch or group names matching patch1
--> FOAM Warning :
From function Foaml abelHashSet Foam olyBoundaryMesh atchSet(const Foam::UList<Foam::wordRe>&, bool, bool) const
in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 804
Cannot find any patch or group names matching patch2
Not including porosity effects
forceCoeffs forceCoeffsIncompressible:
--> FOAM Warning :
From function Foam labelHashSet Foamo lyBoundaryMesh atchSet(const Foam::UList<Foam::wordRe>&, bool, bool) const
in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 804
Cannot find any patch or group names matching patch1
--> FOAM Warning :
From function Foam labelHashSet Foam olyBoundaryMesh atchSet(const Foam::UList<Foam::wordRe>&, bool, bool) const
in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 804
Cannot find any patch or group names matching patch2
Not including porosity effects
forceCoeffs forceCoeffsIncompressible write:
Cm = 0
Cd = 0
Cl = 0
Cl(f) = 0
Cl(r) = 0

Thank you for helping me solve this problem
alirez is offline   Reply With Quote

Old   September 26, 2021, 14:28
Default calculate lift and drag Coefficient
  #2
New Member
 
alireza
Join Date: Sep 2021
Posts: 11
Rep Power: 5
alirez is on a distinguished road
Hi, I am a new user and I am working on wind turbine blades. To do this, I need to calculate the lift and drag coefficient by OpenFoam software.
I added the coefficient calculation function in the controldict but I get a zero answer at different times And I get this error

No finite volume options present
forces forceCoeffsIncompressible:
--> FOAM Warning :
From function Foam:labelHashSet FoamolyBoundaryMeshatchSet(const Foam::UList<Foam::wordRe>&, bool, bool) const
in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 804
Cannot find any patch or group names matching patch1
--> FOAM Warning :
From function Foam::labelHashSet FoamolyBoundaryMeshatchSet(const Foam::UList<Foam:wordRe>&, bool, bool) const
in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 804
Cannot find any patch or group names matching patch2
Not including porosity effects
forceCoeffs forceCoeffsIncompressible:
--> FOAM Warning :
From function Foam:labelHashSet FoamolyBoundaryMesh:atchSet(const Foam::UList<Foam::wordRe>&, bool, bool) const
in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 804
Cannot find any patch or group names matching patch1
--> FOAM Warning :
From function Foam:labelHashSet Foam:olyBoundaryMeshatchSet(const Foam::UList<Foam::wordRe>&, bool, bool) const
in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 804
Cannot find any patch or group names matching patch2
Not including porosity effects
forceCoeffs forceCoeffsIncompressible write:
Cm = 0
Cd = 0
Cl = 0
Cl(f) = 0
Cl(r) = 0

Thank you for helping me solve this problem[/QUOTE]
alirez is offline   Reply With Quote

Old   September 27, 2021, 04:02
Default
  #3
Member
 
Ashutosh
Join Date: Jul 2021
Location: India
Posts: 76
Rep Power: 5
night-hawk is on a distinguished road
You are trying to calculate forces and moment on patch2. Make sure it exist in constant/polyMesh/boundary
night-hawk is offline   Reply With Quote

Old   September 27, 2021, 04:41
Default
  #4
New Member
 
alireza
Join Date: Sep 2021
Posts: 11
Rep Power: 5
alirez is on a distinguished road
Thank you for your reply.
My geometry is such that I have an airfoil 2D and a wall boundary and a pressure far field
I put these writings inside the defined function in the controldict.

functions
{
{
forceCoeffs_object

{
// rhoInf - reference density
// CofR - Centre of rotation
// dragDir - Direction of drag coefficient
// liftDir - Direction of lift coefficient
// pitchAxis - Pitching moment axis
// magUinf - free stream velocity magnitude
// lRef - reference length
// Aref - reference area
type forceCoeffs;
functionObjectLibs ("libforces.so");
//patches ("airfoil"pressure far field 5" );
patches ("airfoil");
pName p;
Uname U;
rhoName rhoInf;
rhoInf 1.0;
//// Dump to file
log true;
CofR (0.0 0 0);
liftDir (0 1 0);
dragDir (1 0 0);
pitchAxis (0 0 1);
magUInf 15.0;
lRef 1.0; // reference lenght for moments!!!
Aref 1.0; // reference area 1 for 2d
writeControl timeStep;
writeInterval 1;
}
}
}

Did I do the right thing?
alirez is offline   Reply With Quote

Old   September 27, 2021, 07:23
Default
  #5
Member
 
Ashutosh
Join Date: Jul 2021
Location: India
Posts: 76
Rep Power: 5
night-hawk is on a distinguished road
You have set patches ("airfoil");


make it patches (airfoil);
night-hawk is offline   Reply With Quote

Old   September 27, 2021, 11:18
Default
  #6
New Member
 
alireza
Join Date: Sep 2021
Posts: 11
Rep Power: 5
alirez is on a distinguished road
Thank you for your reply.
I was involved in this problem for a few days. I was able to converge to compare the results of experimental results and my own simulation, but I did not have coefficients.

It gave the same error when I set this function.

I used another method today.

I entered the Tutorials folder and copied the .c coefficients file of the motorbike problem and called it by changing it in the controldict file.

And this time the did not get error and did not give me zero value.

Thank you very much for your guidance
alirez is offline   Reply With Quote

Old   September 28, 2021, 16:49
Default
  #7
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16
mAlletto will become famous soon enough
Hello,

there is a tutorial here https://wiki.openfoam.com/NACA0012_by_Michael_Alletto

where the lift and drag coefficients are calculated. Maybe looking at it is helpfull.

Best

Michael
mAlletto is offline   Reply With Quote

Old   October 2, 2021, 06:41
Default
  #8
New Member
 
alireza
Join Date: Sep 2021
Posts: 11
Rep Power: 5
alirez is on a distinguished road
Hello dear Michael
Thank you for your reply.
The link was very useful.
You mentioned in some of your explanations for the boundary conditions:
The constant angle of attach α0 is achieved by applying a z-component to the velocity at the inlet.
Excuse me. Can you explain more?
For my work, I want to validate my calculations with laboratory results to calculate lift coefficients for different angles of attack, for example in the range of 0-20
What boundary conditions should I set for the entry speed or what assumptions should I make?
Best regards,
alireza.
alirez is offline   Reply With Quote

Old   October 2, 2021, 08:10
Default
  #9
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16
mAlletto will become famous soon enough
The angle of attach is the angle between the velocity vector and the airfoil. So either you inclined the airfoil or the velocity vector
mAlletto is offline   Reply With Quote

Old   October 2, 2021, 13:29
Default
  #10
New Member
 
alireza
Join Date: Sep 2021
Posts: 11
Rep Power: 5
alirez is on a distinguished road
Very well. Thank you.
I think if I want to inclined the airfoil, I have to change the mesh and it takes a long time.
It makes more sense to change the speed in the input conditions.
What method do you suggest to inclined the input speed ?
best.
alirez is offline   Reply With Quote

Old   October 2, 2021, 15:38
Default
  #11
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16
mAlletto will become famous soon enough
If you want to avoid to change the mesh you should change the inflow condition. For a static mesh it's the same.
mAlletto is offline   Reply With Quote

Old   October 4, 2021, 16:46
Default
  #12
New Member
 
alireza
Join Date: Sep 2021
Posts: 11
Rep Power: 5
alirez is on a distinguished road
okay.good
Thank you for your help
alirez 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
Calculation of lift and drag coefficients on airfoil CoolHersheys OpenFOAM Post-Processing 5 September 27, 2021 07:04
wrong SU2 calculation for lift and drag coefficient for NAC4421 mechy SU2 7 January 9, 2017 06:18
How can I calculate force for lift coefficient and drag coefficient ? gemxx CFX 3 July 4, 2015 09:37
drag and lift coefficient Noé Siemens 5 July 13, 2004 11:21
how can i calculate the lift and drag coefficient yujun Main CFD Forum 5 January 23, 2003 16:16


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