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

Time dependence UDFs. Emergency

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 28, 2011, 00:39
Exclamation Time dependence UDFs. Emergency
  #1
New Member
 
phanh
Join Date: Feb 2011
Posts: 20
Rep Power: 6
phanh is on a distinguished road
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
phanh is offline   Reply With Quote

Old   February 28, 2011, 06:16
Default
  #2
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Shiraz, Iran
Posts: 739
Blog Entries: 1
Rep Power: 14
Amir is on a distinguished road
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)
Amir is offline   Reply With Quote

Old   February 28, 2011, 08:06
Default
  #3
New Member
 
phanh
Join Date: Feb 2011
Posts: 20
Rep Power: 6
phanh is on a distinguished road
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
phanh is offline   Reply With Quote

Old   February 28, 2011, 09:58
Default
  #4
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Shiraz, Iran
Posts: 739
Blog Entries: 1
Rep Power: 14
Amir is on a distinguished road
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
Amir is offline   Reply With Quote

Old   March 1, 2011, 19:31
Default
  #5
Senior Member
 
Real Name :)
Join Date: Jan 2010
Location: United States
Posts: 180
Rep Power: 7
ComputerGuy is on a distinguished road
Phanh,

Post your velocity curve function and I'll post a UDF that will work.

ComputerGuy
ComputerGuy is offline   Reply With Quote

Old   March 3, 2011, 04:48
Exclamation
  #6
Member
 
ThanhToan
Join Date: Sep 2010
Posts: 47
Rep Power: 6
trantoan2008 is on a distinguished road
Send a message via Yahoo to trantoan2008 Send a message via Skype™ to trantoan2008
Quote:
Originally Posted by Amir View Post
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?

I hope I will receive your responding as soon as possible.
Thanks in advanced.

Phanh.
trantoan2008 is offline   Reply With Quote

Old   March 3, 2011, 05:35
Default
  #7
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Shiraz, Iran
Posts: 739
Blog Entries: 1
Rep Power: 14
Amir is on a distinguished road
Quote:
Originally Posted by trantoan2008 View Post
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.
for more information about this method you can also refer to:
(user guide FLUENT 6.3.26 -> 7.1.9 Defining Transient Boundary Conditions)

regards,

Amir
Amir is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time step size and max iterations per time step pUl| FLUENT 27 May 12, 2015 20:04
UDFs and Time dependence.vs.Velocity trantoan2008 Fluent UDF and Scheme Programming 3 August 1, 2011 12:47
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 12 September 17, 2007 17:48
Advection Time Anne CFX 13 July 10, 2004 08:53
unsteady calcs in FLUENT Sanjay Padhiar Main CFD Forum 1 March 31, 1999 12:32


All times are GMT -4. The time now is 16:06.