Run function objects on final time
Hi all,
I am running a range of natural ventilation simulations. I have a handful of function objects and two surfaces files that I want to run on the final time/iteration of the simulation once my convergence criteria has been met. The problem I am having is that when the simulation converges some of my function objects and my two surface files are not getting updated with the results from the final simulation time. The probes and residual function objects are updated correctly at the end of the simulation but my four volFieldValue, FieldMinMax and surface files are not. Does anyone know if there is a method by which I can either get my simulation to run all my function objects at time of convergence or re-run them after the simulation has finished? The postProcessing folder is updated correctly with all my function objects and surface files values at the declared writeIntervals in the controlDict. Ideally, I want to find a way for the simulation to automatically update the postProcessing folder at the end of the simulation instead of me having to manually change the writeInterval when the simulation gets close to converging. I have looked into the postProcess tool but when I use the -list command their is no volFieldValue in the list of function objects. So I am not sure if that function object is available for use with the postProcess tool. I am using OpenFOAM 8 on Ubuntu 18.04.2. I am running buoyantSimpleFoam in parallel on 6 processors. My simulations are converging correctly and the reconstruct process appears to be working as intended. Thank you in advance for any support you can provide me. Kind regards, Ben My controlDict: Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
/*--------------------------------*- C++ -*----------------------------------*\ |
Hi,
Did you find solution to your problem? I have the same problem. |
Hi,
I was unable to find a perfect solution to this problem. So what I have done is after the simulation has converged but before performing the reconstruction tasks I re-ran the solver (buoyantSimpleFoam in my case) but with an edited/updated controlDict file. In the controlDict, I made sure the startFrom was set to latestTime. I removed the startTime and set the writeInterval to 10. I also increased the endTime abit (by 200 in my case) just in case the simulation didn't converge. This then re-ran buoyantSimpleFoam from the converged solution but writing all my results every 10 iterations. My simulations usual re-converged very quickly, so it didn't take me too much extra time. Then when they re-converged I had results written out within a few iterations of the final convergence. This does not seem like a proper solution to the problem but it was the best work around I was able to come up with. I will include my edited/second controlDict in case that helps, but it will be abit different as my models have changed abit since I created this thread. I hope this helps. Regards, Ben Code:
/*--------------------------------*- C++ -*----------------------------------*\ |
Hi,
Thanks for the reply. Your solution might work for me even though it is not the best one. Have a nice day! |
All times are GMT -4. The time now is 16:51. |