CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   UDS DIFFUSIVITY (http://www.cfd-online.com/Forums/fluent/32419-uds-diffusivity.html)

naima October 31, 2003 06:33

UDS DIFFUSIVITY
 
I like te difine the UDS Diffusivity with a UDF but i have some problems. so, I used the udf given by fluent :

# include "udf.h" DEFINE_DIFFUSIVITY(mean_age_diff, c, t, i) { return C_R(c,t) * 2.88e-05 + C_MU_EFF(c,t) / 0.7; }

also with this udf(fluent) ihave the same error : Error: C:\work\tt.c: line 1: parse error. I'd appreciate your help, think you

thomas October 31, 2003 07:12

Re: UDS DIFFUSIVITY
 
Hi, This has nothing to do with your UDS. You just have certainly not well placed or simply forgotten a ';' somewhere. Check all your ';' and your parse error will disappear. Where are you from in France ? thomas

naima November 3, 2003 04:48

Re: UDS DIFFUSIVITY
 
In the UDF I sent , there is only one ";". I've checked it again and it doesn't work no more! Any other suggestions Thanks

thomas November 3, 2003 05:39

Re: UDS DIFFUSIVITY
 
Hi, You should also check everything which you make your syntax wrong like ';' ',' '('. I would suggest to put your mathematical expression between brackets '()' after the command return. Like return ( C_R(c,t)*2.88e-05+C_MU_EFF(c,t)/0.7 ); You could also declare a UDMI variable to stock this operation result and then return it. Hope this help. thomas

Devin November 3, 2003 18:57

Re: UDS DIFFUSIVITY
 
I believe your error is in the line

# include "udf.h"

there should be no space between # and include, also udf.h should not be in quotations it should be enclosed by <>. I would type the line exactly as it should appear, but for some reason it won't display properly.

Cheers, Devin

naima November 4, 2003 05:07

Re: UDS DIFFUSIVITY
 
Thanks for your suggestions, that i tried, but it doesn't work, I don't know why!!!

nounou November 4, 2003 05:56

Re: UDS DIFFUSIVITY
 
Dear Miss Reaaly, I don't know where is your problem, because I have the same message!!! oh my god, Does any one tried to use the same expression of naima in his station!!!

Mohamed November 4, 2003 06:14

Re: UDS DIFFUSIVITY
 
I tried it me also, and it gives me the same error message!!! May be because I'm a beginner with UDF. But this one seems very easy and despite of that, it doesn't work! Does any one other tried it? Mohamed

Naima November 5, 2003 07:20

Re: UDS DIFFUSIVITY
 
Thanks for all of you.

Finally I can interpret my UDF. I'm not sure about the raison but it seems that it was a problem of file source format (bin or ascii or informatics mystery!!). Indeed, since I've rewritten the same UDF in a C Compiler Editor, it became possible to compile it successfully.

Thanks


All times are GMT -4. The time now is 10:57.