How to change settings codewise
I would like to know how to change settings codewise rather than using the current IO functionality, like changing the temporal discretization rather than monitor the log file and do this manually. I would appreciate if someone could paste a snippet code example or point me to a relevant post, tried the search engine but failed utterly .
|
There is an example of a hard-coded temporal discretization scheme selection in the interFoam solver here:
/OpenFOAM-2.3.x/applications/solvers/multiphase/interFoam/alphaEqn.H That might give you a few hints as to how to go about what you're after. Cheers, Kyle |
Quote:
|
Quote:
Edit: One simple solution that I have implemented is by using system call. Then supply it with a string with the command : "sed -i s/XXX/YYY/g filename". I can of course augment it with much more complex instructions, but this is the most simple, then save this as .H file and include it whenever u wanna change parameter. |
All times are GMT -4. The time now is 19:10. |