|
[Sponsors] |
June 20, 2020, 08:19 |
How to resolve this UDF error in Fluent?
|
#1 |
New Member
Ussama Ali
Join Date: Jun 2020
Posts: 2
Rep Power: 0 |
Hello everyone,
I am working on analyzing the flow around a cylinder in Fluent. The cylinder wall is to be rotated via UDF in a clockwise and anti-clockwise direction (like an oscillatory motion). I get an error if I try to compile or interpret the UDF. Please help me in resolving the following error: When I try to interpret: Error: C:/Users/Ali/AppData/Local/Temp/2.c.6616.0.c: line 17: structure reference not implemented When I try to compile: ..\..\src\2.c(17) : error C2440: '=' : cannot convert from 'double' to 'Profile' Following is the UDF code: #include "udf.h" #include "threads.h" #define o 0.5 #define st 0.2 #define pi 3.1416 DEFINE_ADJUST(rotational_profile, d) { Thread *thread = Lookup_Thread(d, 8); real current_time = RP_Get_Real("flow-time"); THREAD_VAR(thread).wall.omega = o*sin(2*pi*st*current_time); } I am using windows 8.1 64bit with MS Visual Studio installed. Ansys version is 2019 R3. |
|
June 20, 2020, 12:30 |
Wall Motion
|
#2 |
Senior Member
|
You don't need a UDF for this; use transient profile.
If, for some reason, you want to use UDF, then you need to use DEFINE_TRANSIENT_PROFILE.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
June 21, 2020, 05:13 |
|
#3 |
New Member
Ussama Ali
Join Date: Jun 2020
Posts: 2
Rep Power: 0 |
Dear Vinerm,
Thank you for your reply, can you please elaborate on how to use transient profile? |
|
June 21, 2020, 08:50 |
Transient Profile
|
#4 |
Senior Member
|
Search Fluent forum for transient profile, you'll find what you are looking for.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
Tags |
fluent, rotating cylinder, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to solve UDF compilation problems in Fluent. | pakk | Fluent UDF and Scheme Programming | 16 | September 10, 2018 03:48 |
Problem running fluent with udf on batch | tobi b. | Fluent UDF and Scheme Programming | 3 | April 14, 2016 14:54 |
implementing UDF for fluent in workbench for running multiple simulations | faizan_habib7 | Fluent UDF and Scheme Programming | 0 | March 18, 2016 23:29 |
Running UDF with Supercomputer | roi247 | FLUENT | 4 | October 15, 2015 14:41 |
fluent UDF external library lapack problem | Rick | FLUENT | 0 | May 7, 2008 11:16 |