CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > 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 Search this Thread 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: 16
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: 648
Rep Power: 20
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: 16
iman_1844 is on a distinguished road
Thanks friend!!!
iman_1844 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 07:37
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 22:14
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 21:38
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 04:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 04:01


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