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

Adaptive time stepping

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 28, 2014, 06:56
Default Adaptive time stepping
  #1
New Member
 
Thomas Green
Join Date: Aug 2014
Posts: 7
Rep Power: 11
.Thomas. is on a distinguished road
I post again here because maybe the discussion in which I posted was closed.

Dear All,
I have the same problem of DIVERGENCE DETECTED IN AMG SOLVER: y-momentum.
I am simulating a constant flow profile but I would like to analyze it in transient mode.
My mass flow inlet is of 0.000001 kg/s, I thought that using an adaptive time step that change from 0.001 for the first second to something bigger for the rest of the simulation (for instance 10 seconds) because the fluid flow will be developed.

Solution Method (in order): PISO (Skewness Correction & Neighbor Correction = 1), Least Squares Cell Based, Second Order, Second Order Upwind, First Order Implicit.
Run Calculation: Adaptive Time Stepping Method (deltat); Time Step Size (s)=0.001 (because I have to select the initial time step); Number of Time Step=1000, Max Iterations/Time Step=200.

My code for the adaptive time stepping is:

#include "udf.h"
DEFINE_DELTAT(deltat,d){
real time_step;
real tx=CURRENT_TIME;
if ( tx<=1 ) {
time_step=0.001;
}
else{
time_step=10;
return time_step;
}
}


I don`t get very well what is wrong in what I am doing, anybody has suggestions?
Thank you so much.

Thomas
.Thomas. is offline   Reply With Quote

Old   August 28, 2014, 08:52
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
If your time is below 1 second, nothing is returned.

Code:
#include "udf.h"
DEFINE_DELTAT(deltat,d){
real time_step;
real tx=CURRENT_TIME;
if ( tx<=1 ) {
  time_step=0.001;
} else {
  time_step=10;
}
return time_step;
}
If you do this, the time_step will always be returned. (I don't know if this will solve your problem.)
pakk is offline   Reply With Quote

Old   August 28, 2014, 10:18
Default
  #3
New Member
 
Thomas Green
Join Date: Aug 2014
Posts: 7
Rep Power: 11
.Thomas. is on a distinguished road
Thank you so much! It works perfectly
.Thomas. is offline   Reply With Quote

Reply

Tags
time step size, transient analysis, transient convergence, udf and programming

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
Unstabil Simulation with chtMultiRegionFoam mbay101 OpenFOAM Running, Solving & CFD 13 December 28, 2013 13:12
dynamic Mesh is faster than MRF???? sharonyue OpenFOAM Running, Solving & CFD 14 August 26, 2013 07:47
number of iterations per time step chouki FLUENT 1 August 13, 2013 00:11
adaptive time stepping new Fluent user FLUENT 0 May 24, 2007 07:53
Adaptive Time Stepping: extrange behavior! Freeman FLUENT 0 December 2, 2005 13:31


All times are GMT -4. The time now is 19:54.