CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

How does Adjustable Time stepping work?

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By Joshua14

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 19, 2017, 14:12
Default How does Adjustable Time stepping work?
  #1
Member
 
Sheikh Ahmed
Join Date: Dec 2015
Location: South Carolina, USA
Posts: 88
Rep Power: 11
sahmed is on a distinguished road
Dear Foamers
I have a very basic question regarding the adjustable time stepping method. I can have that by turning on the adjustTimeStep and maxCo in the controlDict, which gives a mean and max courant number and time steps for each iteration.
Could anyone PLEASE elaborate a little bit of how this adjusting works. The user manual doesnt have much info.
Thanks in advance.
sahmed is offline   Reply With Quote

Old   January 19, 2017, 14:27
Default
  #2
Member
 
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 91
Rep Power: 10
Joshua14 is on a distinguished road
Sahmed,

By using an adjustable time step, the simulation will be able to change its delta(t). Delta(t) will be determined from the max Co you specify. This will help prevent your simulation from crashing from too large of a time step when running a transient solution.

Hope this helps,
Joshua
Joshua14 is offline   Reply With Quote

Old   January 19, 2017, 14:35
Default
  #3
Member
 
Sheikh Ahmed
Join Date: Dec 2015
Location: South Carolina, USA
Posts: 88
Rep Power: 11
sahmed is on a distinguished road
Thanks Joshua for your prompt reply. Could you tell me how does it calculate the delt AT EACH ITERATION. I mean what value of delx and u does it take.
sahmed is offline   Reply With Quote

Old   January 19, 2017, 14:52
Default
  #4
Member
 
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 91
Rep Power: 10
Joshua14 is on a distinguished road
Sahmed,

The full calculations of how it determines the new delta(T) can be seen in the source code. I show the path to it below.

OpenFOAM Instulation -> src -> postProcessing -> functionObjects -> solverControl -> adjustableTimeStep.C

My C++ is a little rusty but the following appears to be how they define the new delta(t).

scalar maxDeltaTFact = targetCo_/(CoNum + SMALL);
scalar deltaTFact = min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2);

const_cast<Time&>(obr_.time()).setDeltaT
(
deltaT_ = min
(
deltaTFact*obr_.time().deltaT().value(),
maxDeltaT_
)
);

Joshua
Joshua14 is offline   Reply With Quote

Old   January 19, 2017, 14:55
Thumbs up
  #5
Member
 
Sheikh Ahmed
Join Date: Dec 2015
Location: South Carolina, USA
Posts: 88
Rep Power: 11
sahmed is on a distinguished road
Thanks a lot
sahmed is offline   Reply With Quote

Reply

Tags
adjusttimestep, controldict, maxco


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
[General] Extracting ParaView Data into Python Arrays Jeffzda ParaView 30 November 6, 2023 22:00
Elastic or Plastic Deformations in OpenFOAM NickolasPl OpenFOAM Pre-Processing 36 September 23, 2023 09:22
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 05:13
pisoFoam with k-epsilon turb blows up - Some questions Heroic OpenFOAM Running, Solving & CFD 26 December 17, 2012 04:34
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 05:03


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