CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

Help....varibbles are unset at somewhere in udf

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 24, 2010, 09:18
Unhappy Help....varibbles are unset at somewhere in udf
  #1
New Member
 
iman
Join Date: Oct 2009
Posts: 9
Rep Power: 7
iman_1844 is on a distinguished road
#include "udf.h"

#define m 101

real X,Y;

.
.
.

static real timestep;

DEFINE_GRID_MOTION(canopy,domain,dt,time,dtime)
{
Thread *tf;
face_t f;
Node *V;

.
.
.

timestep = dtime ;


.
.
.


Message ("current time = %f, time step %f, dt %f\n", time, dtime, timestep); /* line:77 */


.
.
.


Message ("////time step = %i\n", timestep ); /* line:349 */

.
.
.


}


timestep is correct in first message but incorrect in second message.

first message:
current time = 0.000010, time step 0.000010, dt 0.000010

second message:
////time step = -2147483648

plz help...
iman_1844 is offline   Reply With Quote

Old   May 25, 2010, 09:56
Default
  #2
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 647
Rep Power: 11
dmoroian is on a distinguished road
I would use instead of:
Code:
Message ("////time step = %i\n", timestep ); /* line:349 */
the following:
Code:
Message ("////time step = %f\n", timestep ); /* line:349 */
dmoroian is offline   Reply With Quote

Old   May 28, 2010, 11:36
Smile thx
  #3
New Member
 
iman
Join Date: Oct 2009
Posts: 9
Rep Power: 7
iman_1844 is on a distinguished road
Thanks friend!!!
iman_1844 is offline   Reply With Quote

Reply

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
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 21:38
Dynamic Mesh UDF Qureshi FLUENT 1 December 2, 2009 01:27
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 05:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01


All times are GMT -4. The time now is 00:52.