CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   fluent UDF on linux machine (http://www.cfd-online.com/Forums/fluent-udf/33869-fluent-udf-linux-machine.html)

Min-Hua Wang June 2, 2004 14:34

fluent UDF on linux machine
 
Hi, All:

I am running fluent 5/6 on a linux machine. Does any one experience using UDF in fluent simulation on that machine.

Which makefile should I get from fluent directory. How to compile it and link to solver. I don't have a problem in running fluent on a Unix machine.

Thanks

MHW

D Harvey June 4, 2004 13:19

Re: fluent UDF on linux machine
 
you will get two makefiles. your directory structure should look like this in linux

/home/username

so place the UDF directory as follows:

/home/username/UDF

then libudf

/home/username/libudf

then add lnx86

/home/username/libudf/lnx86

then add src

/home/username/libudf/src

then in the lnx86 dir

/home/username/libudf/lnx86

add 2d 3d 3ddp (this corresponds to 2d 3d and 3d double precision)

then in the source directory you place your .c code

cp /directory location of fluent/Fluent.Inc/fluent6.1.??/src/makefile.udf /home/username/UDF/libudf/src/makefile cp /directory location of fluent/Fluent.Inc/fluent6.1.??/src/makefile.udf2 cp /home/username/UDF/libudf/Makefile

that should do it.

Cheers,

DH

D Harvey June 4, 2004 13:20

Re: fluent UDF on linux machine
 
you will get two makefiles. your directory structure should look like this in linux

/home/username

so place the UDF directory as follows:

/home/username/UDF

then libudf

/home/username/UDF/libudf

then add lnx86

/home/username/libudf/lnx86

then add src

/home/username/libudf/src

then in the lnx86 dir

/home/username/libudf/lnx86

add 2d 3d 3ddp (this corresponds to 2d 3d and 3d double precision)

then in the source directory you place your .c code

cp /directory location of fluent/Fluent.Inc/fluent6.1.??/src/makefile.udf /home/username/UDF/libudf/src/makefile cp /directory location of fluent/Fluent.Inc/fluent6.1.??/src/makefile.udf2 cp /home/username/UDF/libudf/Makefile

that should do it.

Cheers,

DH

D Harvey June 4, 2004 13:21

Re: fluent UDF on linux machine
 
ignore the first reply it had an error.

BTW this is all in the UDF manual, which you will need.

Podila June 11, 2004 17:18

Re: fluent UDF on linux machine
 
Please contact smadhava@dal.ca. I guess he is the right person to help u with. Bye Podila

zhangyluck January 15, 2013 04:57

[QUOTE=D Harvey
;113010]
cp /directory location of fluent/Fluent.Inc/fluent6.1.??/src/makefile.udf /home/username/UDF/libudf/src/makefile

cp /directory location of fluent/Fluent.Inc/fluent6.1.??/src/makefile.udf2 cp /home/username/UDF/libudf/Makefile


there should be no 'cp' in the second sentence

majid_m87 June 29, 2013 08:41

UDF syntax error
 
Hi all,

I did write a UDF for inlet velocity of my fluent case, but every time I try to interpreted it in Fluent, it says

"Error: /home/mp-current/9-2nd-50-tran/inlet_velocity.c: line 2: syntax error."

I will appreciate it if anyone help me in this case.

and this my UDF Vleocity profile


#include"udf.h"
DEFINE_PROFILE(inlet_velocity, thread, position) /* inlet x velocity = name of the x velocity */
{
real x[ND_ND]; /* this will hold the position vector */
real z;
face_t f; /* f = all the cell faces on the boundary*/
begin_f_loop(f,thread) /* thread = given boundary zone, defined automatically when the UDF is hooked to inlet boundary, the macro begin_f_loop is applied to all the cell faces*/
{
F_CENTROID(x, f, thread); /* the coordinates of the face centroid accessed by F_CENTROID */
z= x[1];
F_PROFILE(f, thread, position) = pow((60+z)/60,(1/7))+((50+z)/5); /* return velocity is assigned through F_PROFILE */
}
end_f_loop(f, thread)
}


All times are GMT -4. The time now is 13:59.