UDF table
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. |
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:
|
Hi and thanks for the answer. I solved it and it was much easier than I thought... :)
|
All times are GMT -4. The time now is 10:17. |