CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT

Floating Point Error

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

LinkBack Thread Tools Display Modes
Old   September 1, 2008, 17:00
Default Floating Point Error
Posts: n/a
Hi folks. Im trying to apply a x-velocity profile and a x-momentum source. So i made a file when i put the profile and the source code. When Fluent iterate it given an error: Error: Floatng point erro: invalid number How I can fix that? Thanks for all help

#include "udf.h" /* must be at the beginning of every UDF you write */

#define C2 0.2 #define a 2.0

DEFINE_PROFILE(x_velocity,thread,index) { real x[ND_ND]; /* this will hold the position vector */ real y; face_t f;

begin_f_loop(f,thread) /* loops over all faces in the thread passed

in the DEFINE macro argument */



y = x[1];

F_PROFILE(f,thread,index) = 1.5*pow(y/42,0.14);

} end_f_loop(f,thread) }

DEFINE_SOURCE(xmom_source, c, t, dS, eqn) { real x[ND_ND]; real con, source; C_CENTROID(x, c, t);

con = C2*a*0.5*C_R(c, t)*x[1]; source = -con*sqrt(C_U(c, t)*C_U(c, t)+C_V(c, t)+C_V(c, t))*C_U(c, t); dS[eqn] = -2.*con*sqrt(C_U(c, t)*C_U(c, t)+C_V(c, t)+C_V(c, t));

return source; }

  Reply With Quote


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
Floating point error prapanj OpenFOAM Running, Solving & CFD 1 March 12, 2009 08:57
Floating point error - help sk FLUENT 2 December 17, 2008 11:32
Floating point error Chico Mbanu FLUENT 0 July 14, 2004 13:56
floating point error Mavinakere FLUENT 3 March 1, 2002 18:22
floating point error sivakuamr Main CFD Forum 12 August 31, 2001 01:37

All times are GMT -4. The time now is 01:03.