|
[Sponsors] |
December 19, 2018, 06:20 |
How to set a time-adjustable writeInterval
|
#1 |
Senior Member
Abe
Join Date: May 2016
Posts: 119
Rep Power: 10 |
Hey everyone,
I have some simulations that take a long time to wind up, and take some big time steps at the beginning. At later times I need a short write interval, but don't want it to chop up my early timestep interval. I can't seem to access time in the control dict though: Code:
writeInterval #codeStream { code #{ scalar t = this->db().time().value(); //wishful thinking if(t < 2000) {os << 5;} else {os << .1;} #}; }; I can't seem to codeInclude here either - maybe this is the wrong approach? Does anyone have a workaround for this, maybe using a function object? Thanks |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
courant number increases to rather large values | 6863523 | OpenFOAM Running, Solving & CFD | 22 | July 5, 2023 23:48 |
pressure in incompressible solvers e.g. simpleFoam | chrizzl | OpenFOAM Running, Solving & CFD | 13 | March 28, 2017 05:49 |
High Courant Number @ icoFoam | Artex85 | OpenFOAM Running, Solving & CFD | 11 | February 16, 2017 13:40 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 06:20 |
Micro Scale Pore, icoFoam | gooya_kabir | OpenFOAM Running, Solving & CFD | 2 | November 2, 2013 13:58 |