CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   Use UDF to change the attack angle of flow over 3D wing (

nvtrieu May 3, 2013 03:07

Use UDF to change the attack angle of flow over 3D wing
Hi everyone,

I am a new with ANSYS FLUENT. I am doing simulation with the flow over 3Dwing (NACA0012). I want to change the attack angle by using UDF. Could anyone teach me how to use the UDF for this case?
thanks you!


blackmask May 3, 2013 03:34

Are you studying the pitching motion of the wing or you simply want to study the flow at several angles of attack?

Ananthakrishnan May 3, 2013 05:55

if it just the angle of attack which you want to change, you can do it directly by changing the x and y component of velocity in the velocity inlent boundary condition.
If you want to learn to do it in udf you have to do the same by writing this component inside a small c program..
this is an example of how the inlet velocity is changed according to the y distance to get a profile

Far May 3, 2013 14:42

You can also do it in workbench

nvtrieu May 15, 2013 01:07

2 Attachment(s)
Hi everyone,

Thanks to all of you!
@blackmask: I am not going to simulate for pitching motion, only do simulation for some AoA.
Because the wing is located in the virtual wind tunnel, is it ok when I change the AoA by change the Vx, Vy components?

Ananthakrishnan May 15, 2013 05:22

No, its not going to pose any serious threat..There will be some difference in magnitude of result between the two. But you will not be misguided..In brief, if there is a increase in lift then there will always be an increase whether you change the components of velocity or if you change the wing AOA. If you want a very very very precise result, later you can continue by changing the AOA. I suggest you to get an idea of whats happening by changing the components and then "if required" change the AOA

nvtrieu May 15, 2013 23:12

Thanks Ananthakrishnan,

As I understand, for this case of fluid domain, the inlet bc is a straight line. This is different compare with the semi-circle (C-shape) as many people used. So I think that for every AoA we should change the geometry rather than change the velocity components. Because the top and the bottom are wall, they are not velocity inlet.

bikalpa10 June 14, 2013 03:37

sir Ananthakrishnan
i am doing a similar type of simulation
but whet i set inlet velocity at certain angle of attack
i get the flow accumulated at upper surface of wind tunnel
giving uneven flow throughout the wind tunnel ( higher velocity at upper surface of wind tunnel and lower velocity at lower surface of wind tunnel)
and i have chosen boundary conditions as symmetry for both upper and lower surface of wind tunnel

yasegharib June 26, 2016 05:53

angle of attack in fluent
hi.i want to give angle of attack in fluent but i can not.please help me

All times are GMT -4. The time now is 14:48.