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

 August 28, 2014, 06:56 Adaptive time stepping #1 New Member   Thomas Green Join Date: Aug 2014 Posts: 7 Rep Power: 4 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

 August 28, 2014, 08:52 #2 Senior Member   Join Date: Nov 2013 Posts: 943 Rep Power: 13 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.)

 August 28, 2014, 10:18 #3 New Member   Thomas Green Join Date: Aug 2014 Posts: 7 Rep Power: 4 Thank you so much! It works perfectly

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post mbay101 OpenFOAM Running, Solving & CFD 13 December 28, 2013 14:12 sharonyue OpenFOAM Running, Solving & CFD 14 August 26, 2013 07:47 chouki FLUENT 1 August 13, 2013 00:11 new Fluent user FLUENT 0 May 24, 2007 07:53 Freeman FLUENT 0 December 2, 2005 14:31

All times are GMT -4. The time now is 02:56.