CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Center of Pressure for an Aero Body (http://www.cfd-online.com/Forums/openfoam-post-processing/87224-center-pressure-aero-body.html)

Greg Givogue April 14, 2011 09:02

Center of Pressure for an Aero Body
 
Hi Everyone!

Does a center of pressure(CP) utility exist in OpenFOAM? I have not been able to find anything. Secondly, does anyone know how to manipulate the fields in order to determine CP as a post processing activity.

I tried using the moments and forces generated using the forces utility to find CP, however, the calculated positions are not located anywhere on my body.

Without CP, the calculated forces are useless when it comes to structural stress calcs.

Thanks for your time!
Greg

Greg Givogue April 24, 2011 15:13

Ok this is how the centre of pressure coordinates (x,y,z) are related to a 3D body.

Mx=-Fy*z+Fz*y
My=Fx*z-Fz*x
Mz=-Fx*y+Fy*x

Simple enough - 3 equations and 3 unknowns. Can someone tell me why using the moments and forces calculated using the Forces utility produces x,y,z values that aren't located anywhere close to the body (wall patch)? Where is the error being introduced? Both the moments and forces are calculated using the shear stress and pressure on the body.

Can someone pppplease chime in? Thanks!

Greg Givogue April 24, 2011 15:54

Interesting finding:

The forces utility gives the following result for pressure forces on the body

-431.2195 7.0978491 364.73453

If I use patchIntegrate command on the body I get the following force;

-352.01592 5.7941609 297.74247

This result was confirmed using the Forces and Moments tool in Tecplot 360. The moments were also significantly less than those calculated in OF.

...why the difference with OF?

jms April 24, 2011 18:37

Hi Greg,

In order to get Cp with Paraview, go to the following post! I hope it helps!
If you discover anything new for the moment coefficeint, please keep me posted!


Regards,

Josť

Greg Givogue April 24, 2011 21:21

Thanks for the suggestion but that is for coefficient of pressure and not center of pressure. Center of pressure(CP) is bit more involved because it involves the position of each cell (x) on the surface.

CP = Integral (x * P dA)/Integral(P dA) or discretely as Sum (xi *Pi *Ai)/Sum (Pi*Ai)

I can calculate CP but I can't get coordinates x y z for CP that actually lie on the surface of the body. I'm also not sure why there's a difference between the forces utility and patchIntegrate results...

Thanks again!

jms April 25, 2011 04:53

Of course! I misunderstood CP and Cp...

Greg Givogue April 27, 2011 08:18

No problem.

Greg Givogue April 27, 2011 08:19

Ok, I've added a few lines in Forces.C to calculate CP, however, I'm not sure what needs to be done to the Forces.H file. How do I define the variable 'CP' in the .H file?

Here's what I've added to the Forces.C;

if (log_)
{
Info<< "forces output:" << nl
<< " forces(pressure, viscous)" << fm.first() << nl
<< " moment(pressure, viscous)" << fm.second() << nl
<< " centre of pressure (total)" << CP << nl
<< endl;
}
....

fm.first().second() += sum(vf); // sum of viscous forces
fm.second().second() += sum(Md ^ vf); // sum of cross products of position vector and viscous forces = viscous moments
vector CP = sum(Md^(vf+pf))/sum(vf+pf); // centre of pressure

When I run wmake I get the following error;
...
forces/forces.C:469: warning: unused variable ‘CP’
make: *** [Make/linux64GccDPOpt/forces.o] Error 1

I'd appreciate any suggestions! In the end I just want to know where the resultant force is acting on the body.

Thanks, Greg


Update: This isn't a valid approach since I'm essentially dividing a vector by a vector.

Greg Givogue April 28, 2011 23:39

The reason why the pressure force found using patchIntegrate and the forces utility are different is because the fluid density was set to 1.225 in the forces utility while the patchIntegrate used a density of 1.

Greg Givogue May 8, 2011 23:17

Mx=-Fy*z+Fz*y
My=Fx*z-Fz*x
Mz=-Fx*y+Fy*x

It turns out that the above equations in matrix form reveal that they are singular (i.e., one or more equations are not independent). inv(A) does not exist and det A = 0.

Is there another equation that I could use to augment them? Does anyone know another way of solving this problem? How do other codes solve it?

Thanks

scott May 25, 2011 02:32

Hi Greg,

Not sure if this will help, but you can extract the pressure values for each cell on the surface in their normal components by following the steps below in Paraview.

Extract Surfaces
Generate Surface Normals
Use the calculator to multiply pressure by the surface normals (Normals*p)

This then prints the values in the data tab at the right in three columns, one for each normal direction.

I then integrate these to get total forces on the area using Integrate Variables, BUT...

In the calculator though there will be options to calculate the normals multiplied by pressure individually in the three components, which you can then use in your equation to specify the centre of pressure.

If you get this working please let us know the next couple of steps. I'm short of time otherwise I'd try it myself.

Hope this helps!

Scott

scott June 2, 2011 19:29

Hi Greg and all,

Any luck getting this to work?

If so, please let me know how.

Cheers,

Scott

wangjl July 15, 2011 10:39

yes, I have noticed this equations set are not inconsistent sets too.
the rank of coeffcient is 2
and this matrix is asymmetric

in Fluent help , it only use two equations on one time
but need the user given the third coordinate

So I think how to find a point that the moment is zero in 3D
or is this point exist

Givgue , do you find a solutin
let me known
hustwjl@gmail.com


Quote:

Originally Posted by Greg Givogue (Post 306723)
Mx=-Fy*z+Fz*y
My=Fx*z-Fz*x
Mz=-Fx*y+Fy*x

It turns out that the above equations in matrix form reveal that they are singular (i.e., one or more equations are not independent). inv(A) does not exist and det A = 0.

Is there another equation that I could use to augment them? Does anyone know another way of solving this problem? How do other codes solve it?

Thanks


Greg Givogue July 18, 2011 22:10

http://www.cfd-online.com/Forums/mai...tml#post316275

Hope this helps a bit. Greg

wangjl July 19, 2011 02:15

Thanks very much,I have read that post before.
and now I use a force and moment to equivalent the resultant force and the moment get from surface integral

but how to choose a radius in FEM with the structural analysis, and use the force to form the moment is the problem, especially when in time this resultant force and moment change ,then the point change

I want to use a fixed point and change the components of the force to equivalent to this

Thanks again! Greg Givogue
Quote:

Originally Posted by Greg Givogue (Post 316543)


Greg Givogue July 19, 2011 08:38

I'm not sure if I understand what you're trying to say. The moment arm (or radius as you call it?) is just r= CP-Datum and then the moment = r x F.

What software are you using? I'm using OpenFOAM which produce total forces on a patch as well as Moments with respect to a datum that I select.


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