lift force calculation

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
yany
Posts: 60
Joined: Fri Aug 04, 2017 11:02 pm

lift force calculation

Post by yany »

Hello,
I have used code_saturne over 1 year. But by now there is no meaningful result I have got.

I just ran a very simple aerofoil case. I used version 5.0.3.

The cs_user_extral_operation.f90 which is for lift and drag coefficient cannot link and compile. I don't know why. I attached the file and compile.log

In addition, I also used paraview to get the lift and drag. But the result is still not right. I used the formula "stress_Y*normal_Y" to get the lift force. Is that right?

I'm looking forward to your reply. Thank you very much.

all the best.
Attachments
compile.log
(903 Bytes) Downloaded 231 times
cs_user_extra_operations.f90
(5 KiB) Downloaded 267 times
Yvan Fournier
Posts: 4079
Joined: Mon Feb 20, 2012 3:25 pm

Re: lift force calculation

Post by Yvan Fournier »

Hello,

I c"an't tell which component of stress you need fo the lift force without knowing how your mesh is oriented.

For the user subroutine you can't use a subroutine written for version 4.0 in version 5.0, so you need to rewrite you code in the current version.

Regards,

Yvan
yany
Posts: 60
Joined: Fri Aug 04, 2017 11:02 pm

Re: lift force calculation

Post by yany »

Hello Yvan,
Thank you for the reply. I think that's the point.I used the subroutine for version in version 5.0. Is there any subroutines for version 5.0 could be used to calculate the lift and drag force?

I attached the mesh. The direction of free stream velocity is (1,0,0), so that that the direction of lift is (0,1, 0) I used "stress_Y*normal_Y" to get the lift force.

Thank you.









Yvan Fournier wrote:Hello,

I c"an't tell which component of stress you need fo the lift force without knowing how your mesh is oriented.

For the user subroutine you can't use a subroutine written for version 4.0 in version 5.0, so you need to rewrite you code in the current version.

Regards,

Yvan
Attachments
mesh.PNG
Yvan Fournier
Posts: 4079
Joined: Mon Feb 20, 2012 3:25 pm

Re: lift force calculation

Post by Yvan Fournier »

Hello,

Sorry, the version of the cs_user_extra_operations.f90 you attached is for version 4.0, not 5.0.

Regards,

Yvan
Paul Brss
Posts: 32
Joined: Mon Dec 04, 2017 3:00 pm

Re: lift force calculation

Post by Paul Brss »

Hello Yany and Yvan,

I'm also working on lift and drag calculations over a NACA profile. I attached my cs_user_extral_operation.f90 subroutines. I changed some variables and the type of output files in order to make it readable by paraview easily. It's based on another cs_user_extral_operation.f90 subroutines found on this forum. I can try to find the topic if you want. Hope it can help !

So, I have good results for the lift, but not so good for the drag, according to the Sandia lab experimental results and Xfoil on NACA0015:
Capture.PNG
I use SST kw model, Re=1.0^6. My mesh is good, according to ICEM and respect the y+ condition at the wall. Does someone experience the same problem ?
I didn't find so much on SST kw on the CS documentations.

I can post my mesh and my case if you want (or create another topic on the forum if you prefer).

Regards,
Attachments
cs_user_extra_operations-lift_drag.f90
(5.7 KiB) Downloaded 279 times
Yvan Fournier
Posts: 4079
Joined: Mon Feb 20, 2012 3:25 pm

Re: lift force calculation

Post by Yvan Fournier »

Hello,

Did you try any other turbulence model ? Or other wall function options ? If your mesh is wall-resolved, I am not sure the default k-w is the best option.

Best regards,

Yvan
Paul Brss
Posts: 32
Joined: Mon Dec 04, 2017 3:00 pm

Re: lift force calculation

Post by Paul Brss »

Hi Yvan,

Thanks for answering. Concerning the SST k-w, I tried the scalable two scales model (best one for my case), the 2 scales model and the 1 scales model. Is the functions "no wall function" still available ? I can't choose it.
I did not try any k-eps or Rij models cause I don't know them but I'll probably give it a try !

Regards
Luciano Garelli
Posts: 284
Joined: Fri Dec 04, 2015 1:42 pm

Re: lift force calculation

Post by Luciano Garelli »

Hello,

Here you can check the wall function options for the turbulence

https://www.code-saturne.org/cms/sites ... 9ec058107

Also I think that it is important to check the turbulent viscosity added by the turbulence method and the yplus.

Regards,
Luciano
yany
Posts: 60
Joined: Fri Aug 04, 2017 11:02 pm

Re: lift force calculation

Post by yany »

Hello Paul,

Thanks soooooo much for your reply! I really appreciate that. You can try to use Paraview to calculate the drag force. I attached a link from youtube which may tell you how to do that.

https://www.youtube.com/watch?v=J944HOj_4b0

All the best, Yany.







Paul Brss wrote: Wed Apr 11, 2018 4:59 pm Hello Yany and Yvan,

I'm also working on lift and drag calculations over a NACA profile. I attached my cs_user_extral_operation.f90 subroutines. I changed some variables and the type of output files in order to make it readable by paraview easily. It's based on another cs_user_extral_operation.f90 subroutines found on this forum. I can try to find the topic if you want. Hope it can help !

So, I have good results for the lift, but not so good for the drag, according to the Sandia lab experimental results and Xfoil on NACA0015:
Capture.PNG

I use SST kw model, Re=1.0^6. My mesh is good, according to ICEM and respect the y+ condition at the wall. Does someone experience the same problem ?
I didn't find so much on SST kw on the CS documentations.

I can post my mesh and my case if you want (or create another topic on the forum if you prefer).

Regards,
yany
Posts: 60
Joined: Fri Aug 04, 2017 11:02 pm

Re: lift force calculation

Post by yany »

Hello Paul,
But I have one more stupid question about your attached subroutine. It can get the value the lift and drag coefficient of "Foil", not the force?
Thank you very much.

All the best, Yan.


Paul Brss wrote: Wed Apr 11, 2018 4:59 pm Hello Yany and Yvan,

I'm also working on lift and drag calculations over a NACA profile. I attached my cs_user_extral_operation.f90 subroutines. I changed some variables and the type of output files in order to make it readable by paraview easily. It's based on another cs_user_extral_operation.f90 subroutines found on this forum. I can try to find the topic if you want. Hope it can help !

So, I have good results for the lift, but not so good for the drag, according to the Sandia lab experimental results and Xfoil on NACA0015:
Capture.PNG

I use SST kw model, Re=1.0^6. My mesh is good, according to ICEM and respect the y+ condition at the wall. Does someone experience the same problem ?
I didn't find so much on SST kw on the CS documentations.

I can post my mesh and my case if you want (or create another topic on the forum if you prefer).

Regards,
Post Reply