|
[Sponsors] |
September 14, 2015, 06:48 |
whats wrong with this udf ?
|
#1 |
Member
hani mortezaee
Join Date: Sep 2014
Posts: 30
Rep Power: 12 |
hi there
im new to udf , im trying to learn how to use define source ? when i Intereprete this udf fluent exits with an error, i was wondering what is causing this? #include "udf.h" #include "math.h" DEFINE_SOURCE(energy_source,c,t,dS,eqn) { real x[ND_ND]; real con, source; C_CENTROID(x,c,t); con = 50*exp(1/((x[1]*x[1])*(x[2]*x[2]))); source = con; dS[eqn] = 0; return source; } |
|
September 14, 2015, 08:02 |
|
#2 |
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13 |
which error appears? did you try to compile instead of interpret it?
|
|
September 14, 2015, 08:16 |
|
#3 |
Member
hani mortezaee
Join Date: Sep 2014
Posts: 30
Rep Power: 12 |
no i didn't compile it, but i think this is because of the math.h header , any comment on that ?
btw fluent shuts down rapidly so i cant catch the error |
|
September 14, 2015, 08:32 |
|
#4 |
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13 |
there is no need to include math.h since it is included already by the udf.h
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
something wrong when compiling udf, however the code is correct when interpreting | richard ben | Fluent UDF and Scheme Programming | 7 | May 11, 2013 08:36 |
Help me to check my UDF | Liufeng_ustb | Fluent UDF and Scheme Programming | 2 | May 7, 2013 11:25 |
parse error while interpreting udf | Kristin | Fluent UDF and Scheme Programming | 3 | March 15, 2012 07:43 |
what's wrong with the UDF | major | FLUENT | 6 | March 3, 2005 07:39 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 05:01 |