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

UDF table

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 29, 2012, 05:44
Default UDF table
  #1
Member
 
Join Date: Apr 2010
Posts: 51
Rep Power: 16
bephi is on a distinguished road
Dear all,

I would like to create an UDF where I define a table with 2 columns.
time | mass flow rate

Lets say at the end there are 100 times and 100 corresponding values.
Between these values a linear interpolation would be nice.

Is this difficult to handle? I always find time-dependent functions but nothing with certain values.

Thanks a lot in advance.
bephi is offline   Reply With Quote

Old   March 1, 2012, 22:29
Default
  #2
Senior Member
 
Real Name :)
Join Date: Jan 2010
Location: United States
Posts: 192
Rep Power: 16
ComputerGuy is on a distinguished road
I would simply read the values into a global 2-d array at the beginning of the run.

You'll need to write your own linear interpolation function, but if you're doing CFD it shouldn't be too hard

Then, you can call the interpolation in your define profile function (for mass rate), passing it the actual flow time and returning a double which represents the mass flow rate.

If you need more help, let us know!

ComputerGuy

Quote:
Originally Posted by bephi View Post
Dear all,

I would like to create an UDF where I define a table with 2 columns.
time | mass flow rate

Lets say at the end there are 100 times and 100 corresponding values.
Between these values a linear interpolation would be nice.

Is this difficult to handle? I always find time-dependent functions but nothing with certain values.

Thanks a lot in advance.
ComputerGuy is offline   Reply With Quote

Old   March 2, 2012, 06:52
Default
  #3
Member
 
Join Date: Apr 2010
Posts: 51
Rep Power: 16
bephi is on a distinguished road
Hi and thanks for the answer. I solved it and it was much easier than I thought...
bephi 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
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
UDF lookup table or similar... bobo Fluent UDF and Scheme Programming 0 August 12, 2009 12:15
lookup table UDF for dynamic mesh potrero Fluent UDF and Scheme Programming 1 March 30, 2009 02:41
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 05:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01


All times are GMT -4. The time now is 21:11.