CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   read a file .txt with nurecial values of time and acceleration (https://www.cfd-online.com/Forums/fluent-udf/94616-read-file-txt-nurecial-values-time-acceleration.html)

sicfred November 21, 2011 07:02

read a file .txt with nurecial values of time and acceleration
 
Hi all!

Someone know how to make an UDF that reads a file (.txt) with numerical values of time and aceleration. I'll use the acceleration as a source term in the momentun equation.
I though to copy these values in two arrays (one for time and one for acceleration) and if the current time is between two times use a linear inerpolation to calculate the acceleration, but I don't know how to do that and, also I'm not very sure about the efficiency of this method, becouse the arrays are going to be too large (more than 2000).


thank you and excuse me for my english (I'm trying to improve)


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