|
[Sponsors] |
February 29, 2012, 05:44 |
UDF table
|
#1 |
Member
Join Date: Apr 2010
Posts: 51
Rep Power: 16 |
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. |
|
March 1, 2012, 22:29 |
|
#2 | |
Senior Member
Real Name :)
Join Date: Jan 2010
Location: United States
Posts: 192
Rep Power: 16 |
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:
|
||
March 2, 2012, 06:52 |
|
#3 |
Member
Join Date: Apr 2010
Posts: 51
Rep Power: 16 |
Hi and thanks for the answer. I solved it and it was much easier than I thought...
|
|
|
|
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 |