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

UDF table

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 29, 2012, 04:44
Default UDF table
  #1
Member
 
Join Date: Apr 2010
Posts: 53
Rep Power: 6
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, 21:29
Default
  #2
Senior Member
 
Real Name :)
Join Date: Jan 2010
Location: United States
Posts: 178
Rep Power: 6
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, 05:52
Default
  #3
Member
 
Join Date: Apr 2010
Posts: 53
Rep Power: 6
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

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
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 22:14
UDF lookup table or similar... bobo Fluent UDF and Scheme Programming 0 August 12, 2009 11:15
lookup table UDF for dynamic mesh potrero Fluent UDF and Scheme Programming 1 March 30, 2009 01:41
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 04:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 04:01


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