Adaptive time step control for generic problems
Hello,
I'm working on a solver that employs other equations than flow, like radiation and electromagnetic equations. The solver is very dependent on the time step size, it quickly diverges and crashes if it gets too high. I'm wondering if I can implement a time step control that considers every field, and not just the flow. I found this post for residual based time step control: http://www.cfd-online.com/Forums/ope...tml#post240272 Is this a feasible approach for transient problems where no steady solution is expected, due to unsteady boundary conditions? What kind of control loop would I use? A PID loop, separately for each residual, and use the minimum time step then? Or are there other methods I could try for stabilizing the solver? Maybe use different schemes? Unfortunately robust schemes like upwind make no sense for equations unrelated to the flow...are there others that could be used here? |
I have it half-way working for absolute tolerances...
I added a residualDict: Code:
IOdictionary residualDict Code:
forAll(absDict.toc(), i) Is there any other place where OF exposes the residual data, or do I need to modify the OF core files for this? Relative tolerances aren't implemented yet, but will be in the future. I'll post the example code as reference then. Having relative tolerances requires storing the initial residuals from a previous time step, by doing this I also get the benefit of being able to use a PID loop instead of this simple control loop here. |
This bug report and the links within it might help:
http://www.openfoam.org/mantisbt/view.php?id=270 |
All times are GMT -4. The time now is 04:32. |