CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Udf for 2D rotating cylinder (https://www.cfd-online.com/Forums/fluent-udf/229886-udf-2d-rotating-cylinder.html)

Rick 037 August 29, 2020 07:28

Udf for 2D rotating cylinder
 
Dear firends:
I have to rotating three cylinders in different speed in a 2D modle, last time I use the moving wall and finish as speed is a constant.
I rotating three cylinder with the moving wall and don't use the udf or dynamic mesh. now I have to rotating speed as a function, it can like a "u=asin(wt)" or "u=at".
I use the TUI and have this below commend. Can I only use UDF profile to achieve?
this is my first time to use UDF and could help me how to write it
thanks a lot

/define/boundary-conditions> wall
(wall1 wall2 wall_cy1 wall_cy2 wall_cy3)
zone id/name [wall1] wall_cy2
Wall Motion [motion-bc-moving]: Change current value? [no] no
Shear Boundary Condition [shear-bc-noslip]: Change current value? [no] no
Define wall motion relative to adjacent cell zone? [no] no
Apply a rotational velocity to this wall? [no] yes
Define wall velocity components? [no]
Use Profile for Rotation Speed? [no] yes
Use UDF Profile for Rotation Speed? [no] no

AlexanderZ August 30, 2020 20:12

what you are doing is not UDF, but TUI commands

so you are setting parameters for boundary conditions to wall_cy2
its the same, if you are doing it with mouse in graphical interface

last two options are:
Use Profile for Rotation Speed? [no] yes
Use UDF Profile for Rotation Speed? [no] no

here:
Use Profile is an option to use profile - file which contains table inside, it could be time vs parameter, depends on your needs

Use UDF is an option to use UDF, but not profile, in UDF you have much more flexibility, however, could be more difficult to define.
use DEFINE_PROFILE macro if you want to go ahead with UDF (read Ansys Fluent Customization manual for details and examples)

From version 19.0 you can use expressions, so for your case expressions is an easiest way, from my point of view, you can define "u=asin(wt)" or "u=at"

Rick 037 August 31, 2020 07:59

Quote:

Originally Posted by AlexanderZ (Post 781647)
what you are doing is not UDF, but TUI commands

so you are setting parameters for boundary conditions to wall_cy2
its the same, if you are doing it with mouse in graphical interface

last two options are:
Use Profile for Rotation Speed? [no] yes
Use UDF Profile for Rotation Speed? [no] no

here:
Use Profile is an option to use profile - file which contains table inside, it could be time vs parameter, depends on your needs

Use UDF is an option to use UDF, but not profile, in UDF you have much more flexibility, however, could be more difficult to define.
use DEFINE_PROFILE macro if you want to go ahead with UDF (read Ansys Fluent Customization manual for details and examples)

From version 19.0 you can use expressions, so for your case expressions is an easiest way, from my point of view, you can define "u=asin(wt)" or "u=at"

Dear AlexanderZ:
Yes I'm trying to use the TUI command in Jounal and want to Autorun it.
I use the Fluent 17.0, and now iI don't know what macro should I use the udf in Dynamic Mesh part or only use DeFine_PROFILE macro in the moving wall


All times are GMT -4. The time now is 02:34.