CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Compiling UDF (http://www.cfd-online.com/Forums/fluent/29305-compiling-udf.html)

Zhang_clement January 31, 2002 04:05

Compiling UDF
 
Hello everyone!

After I input the command :make "FLUENT_ARCH=irix6r10"

The following information appear:

.... sh: cc: not found error code 127 (bu21) "libudf.so" not remade because of errors (bu14) ....

Anyone know how to solved it?

I am pretty sure that my UDF code was right because it can run smoothly in "interpreted" mode.

Have a nice day!

chiseung January 31, 2002 06:11

Re: Compiling UDF
 
That error means your unix machine doesn't have a C compiler. Get the compiler that is fit to your unix machine.

Zhang_clement February 1, 2002 04:50

Re: Compiling UDF
 
Thanks! But some other problems come out.

This is the UDF I use: DEFINE_SOURCE(Esource_ball, cell, thread, dS, eqn)

When compiling, it give the message like this:

The parametr "ds" was never referenced. The parametr "eqn" was never referenced.

What is the possible reason for this message?

kevin February 1, 2002 11:10

Re: Compiling UDF
 
you can detail explain your problem in here , i operated software of FLUENT for a lot times so , i hope to assist you to solve problem ...

Hsin-Ping-Chang

Zhang_clement February 2, 2002 00:26

Re: Compiling UDF
 
Thanks!

When comiling the following code, some error messages will give like this:

cc-3201 cc: REMARK file= source.c, line=9 The parameter "eqn" was never referenced

By the way, how to build a ellipse volume in Gambit 1.3.

Have a nice day!

#include "udf.h"

extern Domain* domain; cell_t c; face_t f; Thread *t; Domain *d; int i; DEFINE_SOURCE(Gsource_ball, cell, thread, dS, eqn) {

float source, volume, temp, mass1,mass2, den1,stand,avgc;

float mass3, mass4, mass5, mass6,mass7,mass8,cleft;

thread_loop_c (thread, domain)

{

{switch (THREAD_ID(thread))

{

case(6):

{

begin_c_loop_all(cell,thread)

{

volume=C_VOLUME(cell, thread);

temp = C_YI(cell, thread, 0);

den1 = C_R(cell, thread);

mass6 +=temp*volume*den1;

}

end_c_loop_all(cell, thread)

}

case(7):

{

begin_c_loop_all(cell,thread)

{

volume=C_VOLUME(cell, thread);

temp = C_YI(cell, thread, 0);

den1 = C_R(cell, thread);

mass7 +=temp*volume*den1;

}

end_c_loop_all(cell, thread)

}

case(8):

{

begin_c_loop_all(cell,thread)

{

volume=C_VOLUME(cell, thread);

temp = C_YI(cell, thread, 0);

den1 = C_R(cell, thread);

mass8 +=temp*volume*den1;

}

end_c_loop_all(cell, thread)

}

}

}

stand = mass1+mass2+mass3+mass4+mass5+mass6+mass7+mass8;

avgc = mass7/1.491848e-11;

if (RP_Get_Real("flow-time") <= 24*24*3600 && 5*0.45 >= avgc && stand <= 0.8*7.800317e-11*13.5)

{

cleft = (1.491848e-11*13.5-mass8-mass7)/1.491848e-11;

source=1.38889e-7*(5*0.45-avgc)+3.086e-8*cleft;

}

else

{

source=0;

}

}

return source; }

kevin February 3, 2002 01:56

Re: Compiling UDF
 
please added this item (eqn) inside your program . error message told you that your program must exist the argument of "eqn" , because you defined the argument[DEFINE_SOURCE(Gsource_ball, cell, thread, dS, eqn)] previously .but , you didn't write this argument(eqn)in above model. so , you can modify this code of program ,

For example: **************** source=13*P+201; /*P is variable */ ds[eqn]=201; ****************


All times are GMT -4. The time now is 23:12.