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

DEFINE_DELTAT problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 8, 2016, 04:19
Default DEFINE_DELTAT problem
  #1
D.M
Member
 
Davoud Malekian
Join Date: Jan 2016
Posts: 53
Rep Power: 10
D.M is on a distinguished road
Hi guys,
anyone knows how can i hook DEFINE_DELTAT in fluent?
i know i should use adaptive time step in the fluent menu and ... but when i hook my udf in that menu and start the calculation nothing happens (it just calculates 1 time step and nothing more!), i want to know if there is anything that i should do before starting calculation or not, here is my udf :

#include "udf.h"
DEFINE_DELTAT(delta_t,d)
{
real time_step;
real flow_time = CURRENT_TIME;
if (flow_time < 0.1)
time_step = 0.001;
else if (flow_time < 0.14)
time_step = 0.0001;
else
time_step = 0.001;
return time_step;
}
D.M is offline   Reply With Quote

Old   August 8, 2016, 09:32
Default
  #2
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23
vasava will become famous soon enough
Try
Code:
if (flow_time >= 0.1 && flow_time < 0.14)
time_step = 0.001;
else 
time_step = 0.0001;
return time_step;
}
vasava is offline   Reply With Quote

Old   August 9, 2016, 02:05
Default
  #3
D.M
Member
 
Davoud Malekian
Join Date: Jan 2016
Posts: 53
Rep Power: 10
D.M is on a distinguished road
Hi vasava,
tnx for the help , i got the point & tried something similar to your code and it really worked , thanks for the help again
D.M 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 compiling problem Wouter Fluent UDF and Scheme Programming 6 June 6, 2012 05:43
Gambit - meshing over airfoil wrapping (?) problem JFDC FLUENT 1 July 11, 2011 06:59
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 07:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 20:13
Is this problem well posed? Thomas P. Abraham Main CFD Forum 5 September 8, 1999 15:52


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