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

How to control the time step and iteration for summation?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By josh_z

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 23, 2010, 10:05
Exclamation How to control the time step and iteration for summation?
  #1
New Member
 
Josh zhao
Join Date: Jan 2010
Posts: 4
Rep Power: 16
josh_z is on a distinguished road
Hi,

I need to sum a variable per each time step while not sum per each iteration. the UDF is like the following:

if (N_TIME==1)
{
sum=C_UDMI(c,t,0);
N=0;
}
else if (N_TIME==N)
{
sum+=C_UDMI(c,t,0);
}
...
N=N_TIME+1;

It does not working. What's wrong?

Thanks in advance
BlnPhoenix likes this.
josh_z is offline   Reply With Quote

Old   February 23, 2010, 10:19
Default
  #2
New Member
 
Josh zhao
Join Date: Jan 2010
Posts: 4
Rep Power: 16
josh_z is on a distinguished road
I mean, the UDF did not do the summation.
josh_z is offline   Reply With Quote

Old   February 23, 2010, 11:02
Default
  #3
Member
 
Amol Ramteke
Join Date: May 2009
Location: Kolkata
Posts: 30
Rep Power: 17
Goldsstean is on a distinguished road
Compile and hook it.
Goldsstean is offline   Reply With Quote

Reply


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
udf - iteration number within one time step?! Mira FLUENT 1 January 23, 2008 04:16
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09
HELP TIME STEP!! merry FLUENT 2 March 25, 2004 15:38
the max iteration numbers in one time step yangqing FLUENT 4 February 1, 2002 11:24
unsteady calcs in FLUENT Sanjay Padhiar Main CFD Forum 1 March 31, 1999 13:32


All times are GMT -4. The time now is 18:04.