How to modify fvScheme automatically inside the code?
I would like to be able to modify my code so that after N iterations it switches automatically from a certain fvScheme (for example a first order schemes for the div term) to another ( for example to a second order scheme).
So Inside my code I would like to able to do something like this:
if (runTime.time().value()> 10)
or something similar.. (this obviously doesn't work..divSchemes_ is private and is a dictionary...)
Any Idea on how to do it?
Quick and dirty:
thank you very much for you answer, I see what you mean.
At the moment I have actually managed to solve it with en even dirtier trick:
I have written a small code that modify directly the "system/fvSchemes" file and replace the words directly there (the file system/fvSchemes is re-read a the beginning of every time step) and I call it after a certain number of time steps...
Not very elegant but it works...
Your way is actually much cleaner, I will give it a try tomorrow.
|All times are GMT -4. The time now is 06:35.|