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

Stop simulation when time step reaches specified threshold

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By Yann
  • 1 Post By finn_amann
  • 2 Post By panda007

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 13, 2023, 10:51
Default Stop simulation when time step reaches specified threshold
  #1
New Member
 
Join Date: Dec 2021
Posts: 27
Rep Power: 5
finn_amann is on a distinguished road
Hello friends!

Does anyone know if it is possible to automatically stop a running simulation if the time step reaches a specified lower bound? E.g. when dt gets as low as 1e-7 s, I'd like for the simulation to stop. This way, I could save valuable computation time on my cluster, since in my case, something must have gone very wrong, if the time step is that small.

Best regards

Finn
finn_amann is offline   Reply With Quote

Old   December 13, 2023, 13:00
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hello Finn,

If you are using the OpenCFD branch (openfoam.com) you should be able to do it using the runTimeControl function object: https://doc.openfoam.com/2306/tools/...unTimeControl/

The minTimeStep condition looks like it does what you are looking for.

Regards,
Yann
finn_amann likes this.
Yann is offline   Reply With Quote

Old   December 13, 2023, 13:24
Default
  #3
New Member
 
Join Date: Dec 2021
Posts: 27
Rep Power: 5
finn_amann is on a distinguished road
Exactly what I needed, thanks so much Yann

Best regards
Yann likes this.
finn_amann is offline   Reply With Quote

Old   June 20, 2024, 14:55
Default
  #4
New Member
 
Join Date: Mar 2024
Posts: 18
Rep Power: 2
panda007 is on a distinguished road
Hi finn_amann,

Have you figured out how to use the minTimeStep condition? I'm trying to use it for my case, but I couldn't figure out the input format in the controlDict and it doesn't seem to be anywhere from openfoam documents. Would it be possible to share your inputs for this function if you have successfully used it before? Thanks!
panda007 is offline   Reply With Quote

Old   July 17, 2024, 11:44
Default minTimeStep code
  #5
New Member
 
Join Date: Mar 2024
Posts: 18
Rep Power: 2
panda007 is on a distinguished road
Thanks Finn_amann to give me this code for how to use minTimeStep function inside the controlDict, I have tested it, and it worked very good for me to stop the simulation once the deltaT value drops below the threshold. I put it here in case anyone else needs.

Code:
functions
{
    runTimeControl1
    {
        type            runTimeControl;
        libs            (utilityFunctionObjects);
        conditions
        {
            condition0
            {
                type            minTimeStep;
                minValue               1e-6;
            }
        }
    }
}
Yann and joshwilliams like this.
panda007 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
Convergence problem of OF WUYing OpenFOAM Running, Solving & CFD 2 September 20, 2021 11:09
LES, Courant Number, Crash, Sudden Alhasan OpenFOAM Running, Solving & CFD 5 November 22, 2019 03:05
Star cd es-ice solver error ernarasimman STAR-CD 2 September 12, 2014 01:01
plot over time fferroni OpenFOAM Post-Processing 7 June 8, 2012 08:56
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07


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