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/)
-   -   error in compiling UDF (https://www.cfd-online.com/Forums/fluent-udf/108822-error-compiling-udf.html)

89566008 November 2, 2012 03:47

error in compiling UDF
 
hi all , I try to compile my UDF , but I have an error :
'nmake' is not recognized as an internal or external command,
I link the Visual studio with fluent and do any thing else!
please help
thank you

Sixkillers November 2, 2012 05:17

Read FAQ first ;)

http://www.cfd-online.com/Wiki/Fluen...tch_file.22.3F

89566008 November 2, 2012 08:00

Quote:

Originally Posted by Sixkillers (Post 389834)

thanks Sixkillers
I do it , but now I get a new messages :
c:\fluent.inc\fluent6.3.26\src\config.h(119) : error C2143: syntax error : missing '{' before ':'
c:\fluent.inc\fluent6.3.26\src\config.h(119) : error C2059: syntax error : ':'
C:\Fluent.Inc\fluent6.3.26\cortex\src\dll.h(58) : error C2061: syntax error : identifier 'CX_DLL_GetProc'
C:\Fluent.Inc\fluent6.3.26\cortex\src\dll.h(58) : error C2059: syntax error : ';'
C:\Fluent.Inc\fluent6.3.26\cortex\src\dll.h(58) : error C2059: syntax error : 'type'


here is my UDF :

#include "udf.h"
#include "dpm.h"
#include "mem.h"
#include "metric.h"
#include "math.h"
#define Pia 3.14
#define epsilon_0 8.85e-12
#define epsilon_r 1.000590
#define K_ion 0.00022

DEFINE_DPM_BODY_FORCE(particle_body_force,p,i)
{
real bforce=0,Qd,Q, halftime;
cell_t c;
Thread *t;
if(i==1)
{
Qd=3*Pia*epsilon_0*(epsilon_r/(epsilon_r+2))*pow(P_DIAM(p),2.0)*C_UDSI_G(c,t,1)[0];
halftime=4*epsilon_0/(C_UDSI(c,t,0)*K_ion);
if(P_TIME(p)<=0)
{
Q=0;
}
else if(P_TIME(p)<=halftime)
{
Q=(3*Qd/2)-(halftime*Qd/P_TIME(p));
}
else
{
Q=fabs(Qd);
}
bforce=Q*C_UDSI_G(c,t,0)[0];
}
return (bforce/P_MASS(p));
}

thank you
IVI

Sixkillers November 9, 2012 01:55

It works for me. Don't you have non-ASCII characters in your source code? Copy your code from this forum and try it one more time.

89566008 November 9, 2012 02:07

thank you for your reply
I do it and it work . thank you


All times are GMT -4. The time now is 08:58.