CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   why can not find udf.h? (https://www.cfd-online.com/Forums/fluent/39806-why-can-not-find-udf-h.html)

wanghong February 23, 2006 22:55

why can not find udf.h?
 
hi! my UDF code is following: #include "udf.h" #define CON 20.0 DEFINE_SOURCE(cell_x_source, cell, thread, dS, eqn) { real source; if (C_T(cell,thread) >= 1974.) { /* source term */ source = CON*C_U(cell,thread); /* derivative of source term w.r.t. x-velocity. */ dS[eqn] = CON; } else source = dS[eqn] = 0.; return source; }

after my momentum source is interpreted, my computer shows: cpp -ID:\Fluent.Inc-2\fluent6.2.16/src -ID:\Fluent.Inc-2\fluent6.2.16/cortex/src -ID:\Fluent.Inc-2\fluent6.2.16/client/src -ID:\Fluent.Inc-2\fluent6.2.16/multiport/src -I. -DUDFCONFIG_H="<udfconfig.h>" F:\momentum source.c Error: F:\momentum source.c: line 1: parse error. trying it IN C: again,computer still can not find udf.h. but when trying a UDF'example provided by FLUENT, computer finds udf.h file,it appears following information: cpp -ID:\Fluent.Inc-2\fluent6.2.16/src -ID:\Fluent.Inc-2\fluent6.2.16/cortex/src -ID:\Fluent.Inc-2\fluent6.2.16/client/src -ID:\Fluent.Inc-2\fluent6.2.16/multiport/src -I. -DUDFCONFIG_H="<udfconfig.h>" F: ry.c

.entry inlet_x_velocity:

.local.pointer thread (r0)

.local.int index (r1)

0 .local.end

0 save

.local.pointer x (r3)

1 begin.data 12 bytes, 0 bytes initialized:

.local.float y (r5)

6 push.float 0

....

159 restore

160 ret.v

why can not it find udf.h?

Thanks!


RoM February 24, 2006 03:58

Re: why can not find udf.h?
 
Dont use spaces in the name of your source file. Try "momentum_source.c" instead of "momentum source.c".

RoM

A February 25, 2006 11:56

Re: why can not find udf.h?
 
you have to include it


All times are GMT -4. The time now is 19:30.