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

Custom convergence criteria

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 30, 2021, 05:42
Default Custom convergence criteria
  #1
New Member
 
costantino barro
Join Date: Sep 2021
Posts: 16
Rep Power: 5
costabarro95 is on a distinguished road
Hello everybody, do you think that there is a way to stop the simulation using a criteria that is not based on residuals?
I was wondering if there is a way to stop it when a certain force value is reached
costabarro95 is offline   Reply With Quote

Old   September 30, 2021, 05:57
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,170
Rep Power: 27
Yann will become famous soon enough
Hi,

If you are using the ESI-OpenCFD branch (openfoam.com), you can use the runTimeControl function object : https://www.openfoam.com/documentati...e-control.html

This function has been introduced in OpenFOAM-v3.0+ so you should have it in pretty much any version of the ESI-OpenCFD branch.

I'm not aware of a similar functionality in the OpenFOAM foundation branch (openfoam.org) but I would be happy to learn about it if it exists.

Cheers,
Yann
Yann is offline   Reply With Quote

Old   September 30, 2021, 07:28
Default
  #3
New Member
 
costantino barro
Join Date: Sep 2021
Posts: 16
Rep Power: 5
costabarro95 is on a distinguished road
ok, thank you for the answer. Actualy the situation is a bit more complicated, cause I want to create a convergence criteria on the force, that is confronting the last n values of the force and if the difference is lower than a certain value the simulation is stopped.
costabarro95 is offline   Reply With Quote

Old   September 30, 2021, 07:51
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,170
Rep Power: 27
Yann will become famous soon enough
Isn't it pretty close to one of the examples provided in the documentation?

Quote:
if the average drag coefficient remains within a 0.001 range over a window of 20 steps and the maximum momentum equation residual falls below 1e-4
Yann is offline   Reply With Quote

Old   September 30, 2021, 07:59
Default
  #5
New Member
 
costantino barro
Join Date: Sep 2021
Posts: 16
Rep Power: 5
costabarro95 is on a distinguished road
You're right!.But on openFoam 9 I wasn't able to find that function
costabarro95 is offline   Reply With Quote

Old   September 30, 2021, 08:38
Default
  #6
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,170
Rep Power: 27
Yann will become famous soon enough
Yes, as I was saying earlier, this function is not available in the OpenFOAM foundation branch (openfoam.org), but only in the ESI-OpenCFD branch (openfoam.com)

Sorry but I don't have a solution for the foundation versions.

Yann
Yann is offline   Reply With Quote

Old   October 1, 2021, 11:15
Default
  #7
New Member
 
Anup Singh
Join Date: Mar 2020
Posts: 22
Rep Power: 6
Anup Singh is on a distinguished road
Either go for the solution control library associated with your solver and after customizing attach it with your solver.
Or just get the solution control directly into your solver and modify the loops according to your needs.
Anup Singh 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
OpenFoam programming new convergence criteria m_zanichelli OpenFOAM Programming & Development 2 August 11, 2021 04:06
Time step size & convergence absolute criteria yuitsang FLUENT 5 April 15, 2013 04:27
Convergence criteria PrandtlGlawert Main CFD Forum 1 August 13, 2009 17:13
Convergence of CFX field in FSI analysis nasdak CFX 2 June 29, 2009 01:17
convergence criteria mujahid FLUENT 7 March 6, 2004 15:06


All times are GMT -4. The time now is 17:48.