Page 1 of 2

lift force calculation

Posted: Fri Apr 06, 2018 7:34 pm
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.

Re: lift force calculation

Posted: Sat Apr 07, 2018 9:01 pm
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

Re: lift force calculation

Posted: Sun Apr 08, 2018 6:25 pm
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

Re: lift force calculation

Posted: Sun Apr 08, 2018 8:47 pm
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

Re: lift force calculation

Posted: Wed Apr 11, 2018 4:59 pm
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,

Re: lift force calculation

Posted: Thu Apr 12, 2018 4:08 pm
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

Re: lift force calculation

Posted: Thu Apr 12, 2018 5:57 pm
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

Re: lift force calculation

Posted: Fri Apr 13, 2018 4:43 pm
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

Re: lift force calculation

Posted: Mon Apr 16, 2018 10:42 pm
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,

Re: lift force calculation

Posted: Mon Apr 16, 2018 11:51 pm
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,