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/)
-   -   UDF value to large for defined data type (http://www.cfd-online.com/Forums/fluent-udf/118750-udf-value-large-defined-data-type.html)

Anna73 June 3, 2013 13:27

UDF value to large for defined data type
 
Hi everyone,

I'm new to Fleunt and this is my first time interpreting a UDF. When using the Interpreted UDFs dialogue in Fluent version 14.5 I get the following error:
cpp -I "/usr/css/apps/ansys_inc/v145/fluent/Fleunt14.5.0/src" ...
: Value too large for defined data type
cpp: netudf.c: Value too large for defined data type
Error: "netudf.c": line 1: syntax error.

Anyone know what this means? My UDF, netudf.c, is below:

# include "udf.h"
DEFINE_PROFILE(ICA,thread,position)
{
face_t f;
real t = CURRENT_TIME;
begin_f_loop(f,thread)
{
F_PROFILE(f,thread,position)=(1/11.716310)*(4.600000/3.8909)*(3.8909-(0.0725*cos(2*3.14*(0.9-t)/0.9))-(0.1920*cos(2*2*3.14*(0.9-t)/0.9))-(0.4004*cos(2*3*3.14*(0.9-t)/0.9))-(0.2157*cos(2*4*3.14*(0.9-t)/0.9))-(0.2692*cos(2*5*3.14*(0.9-t)/0.9))-(0.0699*cos(2*6*3.14*(0.9-t)/0.9))+(0.0607*cos(2*7*3.14*(0.9-t)/0.9))+(0.0140*cos(2*8*3.14*(0.9-t)/0.9))+(0.0409*cos(2*9*3.14*(0.9-t)/0.9))-(0.0015*cos(2*10*3.14*(0.9-t)/0.9))-(0.0193*cos(2*11*3.14*(0.9-t)/0.9))-(0.0312*cos(2*12*3.14*(0.9-t)/0.9))-(0.0571*cos(2*13*3.14*(0.9-t)/0.9))-(0.0205*cos(2*14*3.14*(0.9-t)/0.9))-(0.0070*cos(2*15*3.14*(0.9-t)/0.9))-(0.9802*sin(2*3.14*(0.9-t)/0.9))-(0.5866*sin(2*2*3.14*(0.9-t)/0.9))-(0.2279*sin(2*3*3.14*(0.9-t)/0.9))-(0.0648*sin(2*4*3.14*(0.9-t)/0.9))+(0.0212*sin(2*5*3.14*(0.9-t)/0.9))+(0.2039*sin(2*6*3.14*(0.9-t)/0.9))+(0.0433*sin(2*7*3.14*(0.9-t)/0.9))+(0.0093*sin(2*8*3.14*(0.9-t)/0.9))-(0.0109*sin(2*9*3.14*(0.9-t)/0.9))-(0.0527*sin(2*10*3.14*(0.9-t)/0.9))-(0.0299*sin(2*11*3.14*(0.9-t)/0.9))-(0.0355*sin(2*12*3.14*(0.9-t)/0.9))-(0.0001*sin(2*13*3.14*(0.9-t)/0.9))+(0.0283*sin(2*14*3.14*(0.9-t)/0.9))+(0.0127*sin(2*15*3.14*(0.9-t)/0.9)));
}
end_f_loop(f,thread)
}

Thanks for the help,
Anna

xmaspako September 5, 2013 05:10

Quote:

Originally Posted by Anna73 (Post 431733)
Hi everyone,

I'm new to Fleunt and this is my first time interpreting a UDF. When using the Interpreted UDFs dialogue in Fluent version 14.5 I get the following error:
cpp -I "/usr/css/apps/ansys_inc/v145/fluent/Fleunt14.5.0/src" ...
: Value too large for defined data type
cpp: netudf.c: Value too large for defined data type
Error: "netudf.c": line 1: syntax error.

Anyone know what this means? My UDF, netudf.c, is below:

# include "udf.h"
DEFINE_PROFILE(ICA,thread,position)
{
face_t f;
real t = CURRENT_TIME;
begin_f_loop(f,thread)
{
F_PROFILE(f,thread,position)=(1/11.716310)*(4.600000/3.8909)*(3.8909-(0.0725*cos(2*3.14*(0.9-t)/0.9))-(0.1920*cos(2*2*3.14*(0.9-t)/0.9))-(0.4004*cos(2*3*3.14*(0.9-t)/0.9))-(0.2157*cos(2*4*3.14*(0.9-t)/0.9))-(0.2692*cos(2*5*3.14*(0.9-t)/0.9))-(0.0699*cos(2*6*3.14*(0.9-t)/0.9))+(0.0607*cos(2*7*3.14*(0.9-t)/0.9))+(0.0140*cos(2*8*3.14*(0.9-t)/0.9))+(0.0409*cos(2*9*3.14*(0.9-t)/0.9))-(0.0015*cos(2*10*3.14*(0.9-t)/0.9))-(0.0193*cos(2*11*3.14*(0.9-t)/0.9))-(0.0312*cos(2*12*3.14*(0.9-t)/0.9))-(0.0571*cos(2*13*3.14*(0.9-t)/0.9))-(0.0205*cos(2*14*3.14*(0.9-t)/0.9))-(0.0070*cos(2*15*3.14*(0.9-t)/0.9))-(0.9802*sin(2*3.14*(0.9-t)/0.9))-(0.5866*sin(2*2*3.14*(0.9-t)/0.9))-(0.2279*sin(2*3*3.14*(0.9-t)/0.9))-(0.0648*sin(2*4*3.14*(0.9-t)/0.9))+(0.0212*sin(2*5*3.14*(0.9-t)/0.9))+(0.2039*sin(2*6*3.14*(0.9-t)/0.9))+(0.0433*sin(2*7*3.14*(0.9-t)/0.9))+(0.0093*sin(2*8*3.14*(0.9-t)/0.9))-(0.0109*sin(2*9*3.14*(0.9-t)/0.9))-(0.0527*sin(2*10*3.14*(0.9-t)/0.9))-(0.0299*sin(2*11*3.14*(0.9-t)/0.9))-(0.0355*sin(2*12*3.14*(0.9-t)/0.9))-(0.0001*sin(2*13*3.14*(0.9-t)/0.9))+(0.0283*sin(2*14*3.14*(0.9-t)/0.9))+(0.0127*sin(2*15*3.14*(0.9-t)/0.9)));
}
end_f_loop(f,thread)
}

Thanks for the help,
Anna

Maybe have you edited .c file by windows and are you running on linux platform?
I have had the same problem and I've solved it by using of dos2unix command.
The problem, sometimes, is due to LF and CR special characters misunderstanding between the two O.S. and dos2unix helps to fix it.

xmaspako October 28, 2013 09:33

Quote:

Originally Posted by Anna73 (Post 431733)
Hi everyone,

I'm new to Fleunt and this is my first time interpreting a UDF. When using the Interpreted UDFs dialogue in Fluent version 14.5 I get the following error:
cpp -I "/usr/css/apps/ansys_inc/v145/fluent/Fleunt14.5.0/src" ...
: Value too large for defined data type
cpp: netudf.c: Value too large for defined data type
Error: "netudf.c": line 1: syntax error.

Anyone know what this means? My UDF, netudf.c, is below:

# include "udf.h"
DEFINE_PROFILE(ICA,thread,position)
{
face_t f;
real t = CURRENT_TIME;
begin_f_loop(f,thread)
{
F_PROFILE(f,thread,position)=(1/11.716310)*(4.600000/3.8909)*(3.8909-(0.0725*cos(2*3.14*(0.9-t)/0.9))-(0.1920*cos(2*2*3.14*(0.9-t)/0.9))-(0.4004*cos(2*3*3.14*(0.9-t)/0.9))-(0.2157*cos(2*4*3.14*(0.9-t)/0.9))-(0.2692*cos(2*5*3.14*(0.9-t)/0.9))-(0.0699*cos(2*6*3.14*(0.9-t)/0.9))+(0.0607*cos(2*7*3.14*(0.9-t)/0.9))+(0.0140*cos(2*8*3.14*(0.9-t)/0.9))+(0.0409*cos(2*9*3.14*(0.9-t)/0.9))-(0.0015*cos(2*10*3.14*(0.9-t)/0.9))-(0.0193*cos(2*11*3.14*(0.9-t)/0.9))-(0.0312*cos(2*12*3.14*(0.9-t)/0.9))-(0.0571*cos(2*13*3.14*(0.9-t)/0.9))-(0.0205*cos(2*14*3.14*(0.9-t)/0.9))-(0.0070*cos(2*15*3.14*(0.9-t)/0.9))-(0.9802*sin(2*3.14*(0.9-t)/0.9))-(0.5866*sin(2*2*3.14*(0.9-t)/0.9))-(0.2279*sin(2*3*3.14*(0.9-t)/0.9))-(0.0648*sin(2*4*3.14*(0.9-t)/0.9))+(0.0212*sin(2*5*3.14*(0.9-t)/0.9))+(0.2039*sin(2*6*3.14*(0.9-t)/0.9))+(0.0433*sin(2*7*3.14*(0.9-t)/0.9))+(0.0093*sin(2*8*3.14*(0.9-t)/0.9))-(0.0109*sin(2*9*3.14*(0.9-t)/0.9))-(0.0527*sin(2*10*3.14*(0.9-t)/0.9))-(0.0299*sin(2*11*3.14*(0.9-t)/0.9))-(0.0355*sin(2*12*3.14*(0.9-t)/0.9))-(0.0001*sin(2*13*3.14*(0.9-t)/0.9))+(0.0283*sin(2*14*3.14*(0.9-t)/0.9))+(0.0127*sin(2*15*3.14*(0.9-t)/0.9)));
}
end_f_loop(f,thread)
}

Thanks for the help,
Anna

Have you solved this issue? In some cases... it does not work for me.

J.Leypoldt August 27, 2014 12:23

Dear Anna,

I have encountered the same error on our system. I also tried to use dos2unix to resolve it, but it didn't work. So far, I suspect that it is related to
a) the mounting of the file system that holds my working directory, or
b) the C-preprocessor version used by Fluent.

In my case, the file system is a non-unix (Windows), mounted using cifs-mount package.

Working with Fluent 15 on some older SuSE 11 system, the error does not occur. On our newer Linux OS (SuSE Enterprise ...) the mount options are slightly different (due to the newer cifs package) and the error occurs. So I am convinced at least it has nothing to do with the source code of your UDF.

If you have resolved the problem in the meantime, please let me know. Hopefully it will work here, too. :)

Many thanks for a brief reply.
Jens.

silvi November 18, 2015 16:24

Quote:

Originally Posted by J.Leypoldt (Post 508063)
Dear Anna,

I have encountered the same error on our system. I also tried to use dos2unix to resolve it, but it didn't work. So far, I suspect that it is related to
a) the mounting of the file system that holds my working directory, or
b) the C-preprocessor version used by Fluent.

In my case, the file system is a non-unix (Windows), mounted using cifs-mount package.

Working with Fluent 15 on some older SuSE 11 system, the error does not occur. On our newer Linux OS (SuSE Enterprise ...) the mount options are slightly different (due to the newer cifs package) and the error occurs. So I am convinced at least it has nothing to do with the source code of your UDF.

If you have resolved the problem in the meantime, please let me know. Hopefully it will work here, too. :)

Many thanks for a brief reply.
Jens.

I have the same problem and I don't know what to do

silvi November 18, 2015 16:38

Quote:

Originally Posted by xmaspako (Post 459418)
Have you solved this issue? In some cases... it does not work for me.

Did you solve your problem?


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