CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Fluent 6.3.26 on Linux does not compile an UDF (https://www.cfd-online.com/Forums/fluent-udf/126533-fluent-6-3-26-linux-does-not-compile-udf.html)

Entwistle November 20, 2013 04:58

Fluent 6.3.26 on Linux does not compile an UDF
 
Hello to everybody;

I have a problem when I try to interpret a very basic UDF (a velocity inlet boudary condition) in Fluent 6.3.26. When I press the "compile" button, fluent show me the next message:

cpp -I"/usr/Fluent.Inc/fluent6.3.26/src" -I"/usr/Fluent.Inc/fluent6.3.26/cortex/src" -I"/usr/Fluent.Inc/fluent6.3.26/client/src" -I"/usr/Fluent.Inc/fluent6.3.26/multiport/src" -I. -DUDFCONFIG_H="<udfconfig.h>" "here is the path of my UDF"

Error: PATH OF MY UDF: line 1: syntax error.

cpp: output pipe has been closed

my .c file is this (as you can see it is very simple:
Quote:

#include "udf.h"

DEFINE_PROFILE(inlet_x_velocity, thread, position)

{

real x[ND_ND];

real z; /* Z siempre tiene que ser la coordenada vertical */

face_t f;

begin_f_loop(f, thread)

{

F_CENTROID(x,f,thread);

z = x[2];

F_PROFILE(f, thread, position) = 0.567*z;

}

end_f_loop(f, thread)

}
Well, this happens in Fluent 6.3.26, that is installed on a linux server. I try to compile both, in serial mode and in parallel mode; and it fails in both.

Instead of this, when I try to compile in my W7 (64) workstation, there is no problem and it runs correctly.

Someone could help me, please?

Thank you very much.

m2montazari March 4, 2014 14:49

hi,
the problem is with line endings. in windows the line ending character is different from *nix systems.
so convert line endings with a program like geany or in your linux, delete the line endings to have ONE-line text and then press enter at appropriate locations to have correct form of file.


All times are GMT -4. The time now is 07:41.