# Time dependence UDFs. Emergency

 Register Blogs Members List Search Today's Posts Mark Forums Read

 February 28, 2011, 00:39 Time dependence UDFs. Emergency #1 New Member   phanh Join Date: Feb 2011 Posts: 20 Rep Power: 6 Hi all, I am using UDFs for defining variation of velocity.vs. time function at inlet boundary condition. However, variation of velocity.vs.time function is not any function regulation (eg. sin(x) function), velocity varies time data which I get from *txt file (contain time and velocity, respectively). Anybody have any idea for this problem. Thanks in advanced

 February 28, 2011, 06:16 #2 Senior Member     Amir Join Date: May 2009 Location: Shiraz, Iran Posts: 739 Blog Entries: 1 Rep Power: 14 Hi, you have two choices: 1) fit a specific curve to your data 2)use profile in FLUENT. (you can provide a text file that contains velocity descrete data VS. time)

 February 28, 2011, 08:06 #3 New Member   phanh Join Date: Feb 2011 Posts: 20 Rep Power: 6 Hi Amir, Acttually, I tried to fit data by using least square method and got time function which corresponds to variation of velocity. Also, I can read this data (veloctiy.vs.time) from *txt file into Fluent. However, I haven't yet understood how to get time data for time variable in C program. Now, I think I should use "CURRENT_TIME" variable to form time variable. Is that right? However, if I use this variable for time variable, when Fluent software running, how to get velocity correspond to time step? Actually, I haven't yet enderstand unteady problem with UDFs. Please help me. Thanks

 February 28, 2011, 09:58 #4 Senior Member     Amir Join Date: May 2009 Location: Shiraz, Iran Posts: 739 Blog Entries: 1 Rep Power: 14 Hi Phanh, if you want to fit a curve to your data, you should use a UDF and define v=v(t), here you should obtain your proper curve equation before with other softwares and use that in UDF and you can use CURRENT_TIME variable for time. when FLUENT running, CURRENNT_TIME is passed from FLUENT to UDF and from equation v=v(t), velocity is obtained in UDF. regards, Amir

 March 1, 2011, 19:31 #5 Senior Member   Real Name :) Join Date: Jan 2010 Location: United States Posts: 180 Rep Power: 7 Phanh, Post your velocity curve function and I'll post a UDF that will work. ComputerGuy

March 3, 2011, 04:48
#6
Member

ThanhToan
Join Date: Sep 2010
Posts: 47
Rep Power: 6
Quote:
 Originally Posted by Amir Hi Phanh, if you want to fit a curve to your data, you should use a UDF and define v=v(t), here you should obtain your proper curve equation before with other softwares and use that in UDF and you can use CURRENT_TIME variable for time. when FLUENT running, CURRENNT_TIME is passed from FLUENT to UDF and from equation v=v(t), velocity is obtained in UDF. regards, Amir
Hi Amir,

If I want to use data from text file, what kind of variable should I define?
If we use time variable to define for time data, it means that there are no relation between time variable (time data) and time solution (which I think it's called by "CURRENT_TIME"). My understanding is right, isn't it?

Phanh.

March 3, 2011, 05:35
#7
Senior Member

Amir
Join Date: May 2009
Location: Shiraz, Iran
Posts: 739
Blog Entries: 1
Rep Power: 14
Quote:
 Originally Posted by trantoan2008 Hi Amir, If I want to use data from text file, what kind of variable should I define? If we use time variable to define for time data, it means that there are no relation between time variable (time data) and time solution (which I think it's called by "CURRENT_TIME"). My understanding is right, isn't it? I hope I will receive your responding as soon as possible. Thanks in advanced. Phanh.
Hi,
if you want to use data from text file, it doesn't need to use any variable because it doesn't need to use any UDF! to obtain good result with this method you should prepare a text file with good resolution. it's better that reserve time step in both text file and FLUENT GUI.
(user guide FLUENT 6.3.26 -> 7.1.9 Deﬁning Transient Boundary Conditions)

regards,

Amir

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post pUl| FLUENT 27 May 12, 2015 20:04 trantoan2008 Fluent UDF and Scheme Programming 3 August 1, 2011 12:47 skabilan OpenFOAM Running, Solving & CFD 12 September 17, 2007 17:48 Anne CFX 13 July 10, 2004 08:53 Sanjay Padhiar Main CFD Forum 1 March 31, 1999 12:32

All times are GMT -4. The time now is 14:44.