rjsa wrote: ↑09 Nov 2019, 18:06
I got this from Andre a while back but didn't manage to get it right:
We can get a running standard MVRC simulation and make run further even if it was finished?
After it is finished you have to edit the controlDict file. Change the number of endTime (this is the number of total iterations), the writeInterval and change startFrom startTime; to startFrom latestTime;
rjsa wrote: ↑09 Nov 2019, 23:22
CAEdevice wrote: ↑09 Nov 2019, 18:11
Thanks Rjsa. This is what I do when I decide to longer iterate the simulation while the simulation is running. But what I have to do after the simulation has been completed to resume it? Maybe I should re launch it? Let us see tomorrow, I don't have a workstation available today.
That’s the information I miss too, it will always start from 0.
With bit of experience in OpenFOAM - maybe that will help you, but I would take confirmation from LVDH/Andre
I've noticed that MantiumFlow has some unusual for me ControlDicts and it switches simulation from first order to second relatively to max number of iterations, so I would check first what will happen exactly when your simulation would be restarted.
However with regular OpenFOAM cases you can continue already finished cases with changes in
controlDict, but I have completely no clue how post-process will work with 2nd set of data, as new run saves new files with new calculated data, eg. forces on surfaces.
Let's say you want to continue calculation after 2000 iterations and run additional 500 iterations (2500 in total):
your controlDict will look like that
- application simpleFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 2000;
deltaT 1;
writeControl timeStep;
writeInterval 2000;
purgeWrite 0;
You need to change it to:
- application simpleFoam;
startFrom startTime;
startTime 2000;
stopAt endTime;
endTime 2500;
deltaT 1;
writeControl timeStep;
writeInterval 500;
purgeWrite 0;
I left purgeWrite visible, as this one is good one when you want to do tests of custom settings for the simulation. This parameter tells you how many last writeIntervals will be saved, when "0" all intervals will be saved, when "1" only last, when "2" last, and 2nd last and so on.
On previous example if you would run from 0 to 2500 iterations with intervals of 500 iterations you will have 5 timesteps saved beside "0": 500, 1000, 1500, 2000, 2500.
It may happen that simulation could converge before your endTime, then you need to lower the residuals control in system/fvSolution file from e-5, to e-6 or lower:
- SIMPLE
{
nNonOrthogonalCorrectors 1;
residualControl
{
p 5e-5;
"(U|k|epsilon|omega)" 1e-6;
}
}
Such convergence happens mostly on first order calculations, second order to properly converge requires much more detailed mesh, iterations, better model, etc. It's always a trade-off between numerical convergence, stability, speed of calculations and if for real case numbers match reality or at least match trends.
That should work, if anyway somewhere I missed something regarding typical OpenFOAM case, let me know. Still some details may differ due to MantiumFlow customizations.
BTW
I couldn't manage 'code' flag to make proper rows with code parts that why I used 'lists'