CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Creating UDF and loading it in ANSYS Fluent

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By NCle

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 30, 2014, 17:45
Default Creating UDF and loading it in ANSYS Fluent
  #1
New Member
 
Glenn Ong
Join Date: Jan 2014
Posts: 3
Rep Power: 12
singingfish is on a distinguished road
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.
singingfish is offline   Reply With Quote

Old   February 7, 2014, 13:10
Default Udf
  #2
Member
 
Nick Cleveland
Join Date: Mar 2012
Posts: 35
Rep Power: 14
NCle is on a distinguished road
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.
Mike Romeo likes this.
NCle is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


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