|
[Sponsors] |
UDF compile warning: no newline at end of file |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 28, 2007, 03:03 |
UDF compile warning: no newline at end of file
|
#1 |
Guest
Posts: n/a
|
Dear All,
I try to compile a simple UDF which is involving an inlet velocity profile. But I get this common warning : warning: no newline at end of file It is explained in Fluent tutorial: "Another common error occurs when the argument list for a DEFINE statement is placed on multiple lines. (All DEFINE macro arguments must be listed on the same line in a C file.)" My macro arguments are already on the same line (as seen below). Can anyone help me with this error? with kind regards, #include "udf.h" DEFINE_PROFILE(axial_velocity,t,i) { real x[ND_ND]; real y; face_t f; begin_f_loop(f,t) { F_CENTROID(x,f,t); y = x[0]; F_PROFILE(f,t,i) = 5.31*(1-(y/.05)*(y/.05)); } end_f_loop(f,t) } |
|
November 30, 2007, 12:43 |
Re: UDF compile warning: no newline at end of file
|
#2 |
Guest
Posts: n/a
|
I din't see any error while compiling your code. I used "compiled" udf option and load the library using manage option(define->user-defined->functions->compiled & load library). I am able to see as a profile in the boundary condition panel.
Thanks, mohan |
|
December 1, 2007, 01:15 |
Re: UDF compile warning: no newline at end of file *NM*
|
#3 |
Guest
Posts: n/a
|
|
|
December 1, 2007, 01:16 |
Re: UDF compile warning: no newline at end of file
|
#4 |
Guest
Posts: n/a
|
i am not getting any mistake in your udf.
|
|
December 5, 2007, 04:48 |
Re: UDF compile warning: no newline at end of file
|
#5 |
Guest
Posts: n/a
|
This is a common compiler error. You simply need to add one new empty line at the end of your .c source code file before saving it. Then it should work fine.
Greetings szz |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 10:23 |
transient simulation of a rotating rectangle | icesniffer | CFX | 1 | August 8, 2009 07:25 |
ParaView Compilation | jakaranda | OpenFOAM Installation | 3 | October 27, 2008 11:46 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 01:24 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 17:51 |