|
[Sponsors] |
June 18, 2010, 12:42 |
Problem with my udf
|
#1 |
New Member
Join Date: Jun 2010
Posts: 2
Rep Power: 0 |
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_CENTROID(x,f,thread); y=x[2]; u=40*(1-0.2*exp(-(y/b)*(y/b))); F_PROFILE(f,thread,index) = 100376.35*pow((1+0.2*(u)*(u)/(1.4*287*293.15)),(1.4/0.4))-101325; } end_f_loop(f,thread) } Thanking you in advance for your help. July |
|
June 19, 2010, 13:26 |
|
#2 |
Member
Join Date: Apr 2009
Posts: 46
Rep Power: 17 |
Check line end format of ur UDF file.
Try 'dos2unix filename' before using the file on the cluster. |
|
June 19, 2010, 22:31 |
|
#3 |
Senior Member
Join Date: Nov 2009
Posts: 411
Rep Power: 19 |
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. Do |
|
June 20, 2010, 06:56 |
|
#4 |
New Member
Join Date: Jun 2010
Posts: 2
Rep Power: 0 |
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 |
|
Tags |
syntax error, udf |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 06:05 |
UDF problem | mansha goraya | FLUENT | 0 | October 29, 2007 00:31 |
udf compiling problem | akr | FLUENT | 3 | August 22, 2007 07:14 |
udf problem | shan | FLUENT | 6 | March 17, 2004 03:01 |
UDF problem | chiseung | FLUENT | 4 | January 10, 2002 09:58 |