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

Time dependence UDFs. Emergency

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 27, 2011, 23:39
Exclamation Time dependence UDFs. Emergency
  #1
New Member
 
phanh
Join Date: Feb 2011
Posts: 20
Rep Power: 15
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, 05:16
Default
  #2
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
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, 07:06
Default
  #3
New Member
 
phanh
Join Date: Feb 2011
Posts: 20
Rep Power: 15
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, 08:58
Default
  #4
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
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, 18:31
Default
  #5
Senior Member
 
Real Name :)
Join Date: Jan 2010
Location: United States
Posts: 192
Rep Power: 16
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, 03:48
Exclamation
  #6
Member
 
ThanhToan
Join Date: Sep 2010
Posts: 49
Rep Power: 15
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, 04:35
Default
  #7
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
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


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
Time step size and max iterations per time step pUl| FLUENT 33 October 23, 2020 22:50
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 14 December 16, 2019 23:12
Advection Time Anne CFX 15 March 1, 2018 16:53
UDFs and Time dependence.vs.Velocity trantoan2008 Fluent UDF and Scheme Programming 3 August 1, 2011 12:47
unsteady calcs in FLUENT Sanjay Padhiar Main CFD Forum 1 March 31, 1999 12:32


All times are GMT -4. The time now is 23:26.