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/)
-   -   Testing a UDF without Fluent (https://www.cfd-online.com/Forums/fluent-udf/102557-testing-udf-without-fluent.html)

unver May 28, 2012 08:23

Testing a UDF without Fluent
 
Dear Friends;
I am cruious if we can easily test the workings of a UDF without pluging it into FLUENT and let it run.

Patrick1 May 28, 2012 16:58

Quote:

Originally Posted by unver (Post 363432)
Dear Friends;
I am cruious if we can easily test the workings of a UDF without pluging it into FLUENT and let it run.

Well it would be easy for a simple UDF, to copy and paste the working part of the code, (eg. definition of velocity that changes with time), into a C program, then output the velocity for your desired time range and plot the results as a graph.

But you could just as easily set this up in excel using your exact velocity function. What exactly do you want to test?

unver May 29, 2012 06:25

Dear Patrick;
There is no problem with simple problems, as you have mentioned, check can be made by a complier or an excel. However, as the program gets larger with many "DEFINE_**" commands it is difficult to check which one works at which time, so it is easy to lose the track of logic. At the moment, I am doing this track keeping with a paper and a pen, and just wondering if there is a faster way of doing it.

Patrick1 May 29, 2012 11:45

Quote:

Originally Posted by unver (Post 363542)
Dear Patrick;
There is no problem with simple problems, as you have mentioned, check can be made by a complier or an excel. However, as the program gets larger with many "DEFINE_**" commands it is difficult to check which one works at which time, so it is easy to lose the track of logic. At the moment, I am doing this track keeping with a paper and a pen, and just wondering if there is a faster way of doing it.

I don't think there is, to save using a pen and paper you could put every DEFINE between comments, and test one at a time, but otherwise there's no easy way to check unless you want to write your own checking program. Unless you have large numbers of UDFs to write there is no point in that, however.


All times are GMT -4. The time now is 02:37.