CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Paraview & paraFoam (https://www.cfd-online.com/Forums/openfoam-paraview/)
-   -   Calculating Lift and Drag in Paraview (paraFoam) (https://www.cfd-online.com/Forums/openfoam-paraview/88739-calculating-lift-drag-paraview-parafoam.html)

scott May 24, 2011 22:11

Calculating Lift and Drag in Paraview (paraFoam)
 
Hi there,

I have a body that I wish to extract the lift and drag forces for in Paraview.

I assume that this can be achieved using the calculator but I cannot work it out. Could someone please give me some pointers on this.

Basically I need to calculate the normals for each surface, then find the pressure on each surface in the components of X (or Y or Z, depending on if it is Drag, Lift or side force), then intergrate these values for the whole body to get the Force value.

If someone has a procedure for something like this then please let me know!

Thanks for your help,

Scott

scott May 25, 2011 02:49

I found a solution:

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.

Let me know if you see any problems with this approach!

Cheers,

Scott

CThib July 18, 2011 15:17

Hey Scott,

I am trying to do the same thing and am attempting your approach. I was just wondering if you've made any more progress since you posted. I'd like to collaborate with you if possible.

CThib July 18, 2011 17:33

Scott,

Where (and how) do you calculate the area of each panel? I'm struggling finding a particularly good way of doing this. Right now I'm performing a similar calculation in Fortran, but I would prefer to do this in paraview.

drrbradford September 12, 2011 10:28

Any advances on this? Also, how would you go about including the effect of skin friction? I guess the wallShearStress post-pro function would be a start.

arashfluid January 3, 2014 04:19

lift and drag coeffs in paraview
 
Hi
How can I calculate lift and drag coefficient in paraview?
I've run an oscillating airfoil with pitching motion.I've calculated lift and drag coefficient through libforces in controlDict, but the values ​​are wrong. I want to calculate them in paraview and plot them over the time or angle.
Please tell me how to do this?

louisgag March 27, 2014 12:38

In 2D, you might want to try something like this in paraview on the surfaces you want to evaluate,

1. filter: generate surface normals (disable splitting, activate compute cell normals)
2. filter: calculator using something like this for moments : Normals_Y*p*yourDensity*(yourCoRx-16) + Normals_X*p*yourDensity*(yourCoRy-coordsY) replacing yourDensity and yourCoR* by appropriate values or simplify it to get forces
3. filter: integrate variables and look for the results of the integration in the table that appears

in the end this procedure gives you sum_cells(P*rho*A*norm_y)

I think this can be easily adapted to 3D.

cheers

drrbradford April 16, 2014 07:13

I've had some success working with cell data (as opposed to point data) on 3D surface meshes, if it's of use:

Cell area can be obtained using the Mesh Quality filter and the Area option. Use the Point Data to Cell Data on your pressure data. Then use Generate Surface Normals (may need to Extract Surface first) with the Compute Cell Nomals option enabled. Pop these into a calculator using the Cell Data mode and that should have you on the right track for the pressure side of things.

Strike February 12, 2016 08:58

Hello louisgag, could you please explain what do you mean by "yourCoR"?
Thank you very much.

louisgag February 12, 2016 08:59

Center of Rotation
Regards,
-Louis

Strike February 12, 2016 09:00

Quote:

Originally Posted by louisgag (Post 482483)
replacing yourDensity and yourCoR* by appropriate values or simplify it to get forces

cheers

Could you please explain what is "yourCoR"?
Thank you very much.

Strike February 12, 2016 09:07

Thank you for your quick reply.
Another question if you don't mind,
So, If my center of rotation is (0,0,0), Does this mean that CoRx=0, and CoRy=0?

Sorry if the question is too simple, I am new to CFD.

louisgag February 12, 2016 09:10

Yes, that is correct.
-Louis

ordinary October 24, 2016 06:50

Quote:

Originally Posted by louisgag (Post 482483)
In 2D, you might want to try something like this in paraview on the surfaces you want to evaluate,

1. filter: generate surface normals (disable splitting, activate compute cell normals)
2. filter: calculator using something like this for moments : Normals_Y*p*yourDensity*(yourCoRx-16) + Normals_X*p*yourDensity*(yourCoRy-coordsY) replacing yourDensity and yourCoR* by appropriate values or simplify it to get forces
3. filter: integrate variables and look for the results of the integration in the table that appears

in the end this procedure gives you sum_cells(P*rho*A*norm_y)

I think this can be easily adapted to 3D.

cheers

Hello and thank you very much. But after doing this I still can't see the drag force (Normal_X*p*1.16)

brucecumt November 18, 2016 10:20

Quote:

Originally Posted by louisgag (Post 482483)
In 2D, you might want to try something like this in paraview on the surfaces you want to evaluate,

1. filter: generate surface normals (disable splitting, activate compute cell normals)
2. filter: calculator using something like this for moments : Normals_Y*p*yourDensity*(yourCoRx-16) + Normals_X*p*yourDensity*(yourCoRy-coordsY) replacing yourDensity and yourCoR* by appropriate values or simplify it to get forces
3. filter: integrate variables and look for the results of the integration in the table that appears

in the end this procedure gives you sum_cells(P*rho*A*norm_y)

I think this can be easily adapted to 3D.

cheers

Hi louisgag,
May I ask why it's 16 in your equation: Normals_Y*p*yourDensity*(yourCoRx-16) + Normals_X*p*yourDensity*(yourCoRy-coordsY) ?
Another quenstion is about the center of rotation in paraView. My understanding is that the center of the geometry will be the center of rotation. please correct me if I am wrong. It will be very appreciated if you can indicate how to get or display the coordinates of the center of rotation.
Thank you very much in advance!

louisgag November 18, 2016 10:42

Hi Bruce,
I'm pretty sure that's a typo, and should read "coordsX" thanks for noting it I'll correct it.
Regards,
-Louis

brucecumt November 18, 2016 22:34

Hi Louis,
Thank you very much for your prompt reply. It's clear now.
By the way, I found a way to get the center of rotation: simply click the Probe Location button in the tool bar and the 'Center' followed by three values in the Properties tab would be the Center of Rotation used in the equation. If you cannot find the Probe Location button in your tool bar, go to the main menu, then Fliters>Data Analysis>Probe Location, you will get the same thing. This may be very redundant for experienced ParaView user, but I think it should be helpful for newbie of ParaView, like me.
Cheers,
Bruce


All times are GMT -4. The time now is 16:40.