Possible to setup a case with only one masterfile?
Hi,
I do a lot of studies with basically the same OpenFOAM case. I have to setup a lot of cases, and i fill out U, T, p, tranportProperties etc manually for each case. So what i would like to do is use one file to create the case. I heard about changeDictionary, but i have never used it. I want to fill out one file, run a piece of software that changes the entries in my mastercase and then i am finished. The mesh is always different, so there is still some manual work to be done. How to do it? Is changeDictionary an option? Write a python/bash script? I use the OpenFOAM.com Version. thanks, fanta |
I found a very simple solution. I write a file with the structure:
Code:
rho 910; and place it in the case. Then i include it in every file i have to substitute a variable. I use lines with #calc commands to evaluate certain values. I am happy with that :) |
Quote:
What you describe sound a lot like what some of the tutorials already do. For example, tutorials/incompressible/lumpedPointMotion/building/steady/ where the regular input values and the environment description are split into two files and included back in. In general, you should be able to avoid using #calc (or #eval) if you structure things properly. The post is pretty old, but might still be helpful http://olesenm.github.io/2009/11/17/...ludeIfPresent/ If you forget the bit about using "~OpenFOAM/" (which should be written as "<etc>/" these days, you will see that there a number of ways to structure things. |
All times are GMT -4. The time now is 03:53. |