|
[Sponsors] |
Automatically change fvSchemes after a certain number of iterations |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 15, 2018, 13:25 |
Automatically change fvSchemes after a certain number of iterations
|
#1 |
Member
James Gross
Join Date: Nov 2017
Posts: 77
Rep Power: 8 |
Hi OFers,
I would like to be able to automatically change the schemes after a certain number of iterations has passed (or when a certain threshold of residuals has been reached). I can't do this manually as this will be part of a larger optimisation loop. I was thinking it could be possible to define two different fvSchemes (e.g. fvSchemes0 and fvSchemes1) and to write a script that will write over fvSchemes after the threshold has been reached. If I do this bash, this requires knowledge of solver progress, which I can't currently access (unless I read in the log file, but that could be a pain). Furthermore, the difference between the two files is only a few lines. If I want to make global changes, I have to manually change both. It would be much preferred to have a way of doing this with a single fvSchemes file, but if that's not possible, I can write two. Does anyone have any experience with this or any help/advice to offer? James |
|
February 16, 2018, 04:26 |
|
#2 |
Senior Member
|
Hi James,
You can use the timeActivatedFileUpdate functionObject. For information use the source guide and click on functionObjects. There you can search many, if not all currently available functionObjects. Regards, Tom |
|
February 16, 2018, 13:16 |
|
#3 |
Member
James Gross
Join Date: Nov 2017
Posts: 77
Rep Power: 8 |
Hi Tom,
Thanks for the reply. I am using OF-extend, which apparently doesn't have functionObjects (performed a search through all the files to be sure). It does seem to have a utility called timeDependentFvSolutionFvSchemes, which is exactly what I want. Unfortunately, when I test it, I get Code:
--> FOAM FATAL ERROR: This Foam-version does not have the facilities to overwrite fvSolution in memory. Seems like OF-extend 4.0 can't use either of these utilities. Anyone have any ideas/solutions? James |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Segmentation fault when using reactingFOAM for Fluids | Tommy Floessner | OpenFOAM Running, Solving & CFD | 4 | April 22, 2018 13:30 |
Floating point exception error | lpz_michele | OpenFOAM Running, Solving & CFD | 53 | October 19, 2015 03:50 |
[OpenFOAM.org] OF2.3.1 + OS13.2 - Trying to use the dummy Pstream library | aylalisa | OpenFOAM Installation | 23 | June 15, 2015 15:49 |
Micro Scale Pore, icoFoam | gooya_kabir | OpenFOAM Running, Solving & CFD | 2 | November 2, 2013 14:58 |
pisoFoam with k-epsilon turb blows up - Some questions | Heroic | OpenFOAM Running, Solving & CFD | 26 | December 17, 2012 04:34 |