|
[Sponsors] |
January 30, 2014, 17:45 |
Creating UDF and loading it in ANSYS Fluent
|
#1 |
New Member
Glenn Ong
Join Date: Jan 2014
Posts: 3
Rep Power: 12 |
Hi I'm new to using CDF softwares and I need some help in making a UDF for my project.
1. How do I create a UDF? Must I use a C programming software or can I just write the code in a text document? 2. Do I have to save the UDF files at a specific location? 3. I'm trying to enable 6DOF for my 2D cylinder to move freely along the y-axis subjected to an unsteady flow. Below is my rough write up for a code. Advise me if it would work. DEFINE_SDOF_PROPERTIES(sdof_props, prop, dt, time, dtime) { real cg; real k = 1; cg = DT_CG(dt)[1]; prop[SDOF_MASS] = 1; prop[SDOF_LOAD_F_Y] = -k*cg; prop[SDOF_ZERO_TRANS_X] = TRUE; prop[SDOF_ZERO_ROT_X] = TRUE; prop[SDOF_ZERO_ROT_Y] = TRUE; } Any help would be much appreciated. |
|
February 7, 2014, 13:10 |
Udf
|
#2 |
Member
Nick Cleveland
Join Date: Mar 2012
Posts: 35
Rep Power: 14 |
Hi Singingfish,
1. You can sometimes use just text files instead of .c files. When you do this, you have to choose "interpret udf" rather than "compile udf" in fluent. However, more complicated UDFs need to be compiled. The code you posted might have to be compiled I'm guessing. You can download Microsoft visual studio C++ 2010 or other to do this though. 2. The udf file needs to be in the fluent working directory, where autosaved .dat files get generated. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
problem loading UDF library in parallel cluster | Veera Gutti | FLUENT | 8 | July 26, 2016 08:24 |
problem with loading udf in fluent 6.3 | James | Fluent UDF and Scheme Programming | 6 | January 22, 2015 06:51 |
Fluent UDF c source file problem (Linux) | jayilosa | Fluent UDF and Scheme Programming | 1 | November 21, 2011 09:25 |
problem loading UDF in parallel fluent | Tim | FLUENT | 12 | July 12, 2008 13:59 |
compiling my UDF | Seyed Farid Hosseinizadeh | FLUENT | 22 | February 14, 2006 11:19 |