CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Problem with my udf

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   June 18, 2010, 12:42
Default Problem with my udf
New Member
Join Date: Jun 2010
Posts: 2
Rep Power: 0
july is on a distinguished road
Hi all!
I have a question relative to UDF. I have already used UDF before but I have never encountered this problem.
In fact I got the error message "inlet3d.c": line 1: syntax error.
I don't understand because the first line of my udf is just as in any udf I have used # include "udf.h".

I have just changed my Fluent version from 6.3 to 12.1.4. Moreover the problem only appears when I launch my simulations in parallel on a cluster. I have no problem when I open Fluent and interpret my udf directly.
Do I need to add something to my c-code when I launch it in parallel on the cluster? Is it a problem of Fluent version?

Here is my udf:
#include "udf.h"

/* pressure profile */

real b=0.01;

DEFINE_PROFILE(pressure_profile, thread, index)
real x[ND_ND],y;
face_t f;
real u;

begin_f_loop(f, thread)
F_PROFILE(f,thread,index) = 100376.35*pow((1+0.2*(u)*(u)/(1.4*287*293.15)),(1.4/0.4))-101325;

Thanking you in advance for your help.

july is offline   Reply With Quote

Old   June 19, 2010, 13:26
fox000002's Avatar
Join Date: Apr 2009
Posts: 46
Rep Power: 10
fox000002 is on a distinguished road
Check line end format of ur UDF file.

Try 'dos2unix filename' before using the file on the cluster.
fox000002 is offline   Reply With Quote

Old   June 19, 2010, 22:31
Senior Member
Join Date: Nov 2009
Posts: 411
Rep Power: 13
DoHander is on a distinguished road
Or ... maybe your UDF is not a parallel UDF ...

Since it runs flawlessly on serial Fluent I suppose there is not a syntax problem or an EOL mismatch.

You need to parallelize an UDF in order to properly run in parallel - see Fluent UDF manual there is an entire chapter about parallelizing a serial UDF.

DoHander is offline   Reply With Quote

Old   June 20, 2010, 06:56
New Member
Join Date: Jun 2010
Posts: 2
Rep Power: 0
july is on a distinguished road
Thanks for your answers!

fox000002: I have worked on a Linux computer so I don't think the problem comes from the format.
DoHander: I will try what you have told me. However it's strange because yesterday I managed to launch it on the cluster with a simpler mesh so I really don't understand but I'll have a go at parallelizing my udf!

july is offline   Reply With Quote


syntax error, udf

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM Rizwan Fluent UDF and Scheme Programming 40 October 18, 2017 07:17
UDF problem mansha goraya FLUENT 0 October 29, 2007 01:31
udf compiling problem akr FLUENT 3 August 22, 2007 07:14
udf problem shan FLUENT 6 March 17, 2004 04:01
UDF problem chiseung FLUENT 4 January 10, 2002 10:58

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