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 changing rotational velocity (https://www.cfd-online.com/Forums/fluent-udf/80388-udf-changing-rotational-velocity.html)

peterchen September 24, 2010 03:16

udf for changing rotational velocity
 
Hi,

I'd like to create an UDF to change the wall rotation during an unsteady simulation after a certain amount of time.

It seems that I can't put the UDF in the wall settings if I'm selecting a rotating wall.

Is there an easy solution or do I have to select "components" instead of "rotational" and change the UDF?

Thanks for your help,

peter

coglione September 24, 2010 04:03

There is a macro called THREAD_VAR(thread).wall.omega
that can be used to set the rotational speed (rad/s) for a given wall-thread. Your udf can't be hooked in the BC-menue of this wall but you may use e.g. DEFINE_ADJUST or EXECUTE_AT_END to update the rotation speed. In the GUI you will still see a constant (initial) value but it will change actually according to your specifications.

cheers

peterchen September 24, 2010 04:24

Sounds good, thanks for the advice

dmoroian September 29, 2010 11:43

Another alternative is to use a scheme script that is run every time step. In this script you may use a TUI command to setup your rotating wall velocity.

peterchen October 19, 2010 06:43

Quote:

Originally Posted by coglione (Post 276451)
There is a macro called THREAD_VAR(thread).wall.omega
that can be used to set the rotational speed (rad/s) for a given wall-thread. Your udf can't be hooked in the BC-menue of this wall but you may use e.g. DEFINE_ADJUST or EXECUTE_AT_END to update the rotation speed. In the GUI you will still see a constant (initial) value but it will change actually according to your specifications.

cheers

I tried using the macro, but I always get the ACCESS_VIOLATION error.


All times are GMT -4. The time now is 15:45.