Create an script for a Local Application of OpenFOAM
I'm looking for how to create an script (OpenFOAM 2.2.2 local application) which can run the following applications:
My goal is to create an script for any solver so I can use it in CAESES software for the case directory. CAESES just executes the executable files.
Also I was wondering if is possible to make an srcipt which can run the "blockMesh", the solver (any solver) and generate or transform the results in VTK format or FLUENT format or .foam format
Any help is wellcome. Thanks!
Yes, this is easy
Call your script "run"
Is this what you need?
Actually you can combine different Software Connectors in CAESES to set up such a chain of tools. If you do so you wouldn't need a script.
Create a Software Connector for each tool.
Add a result file in the first Software Connector. The result file is here the output of the application, e.g. a produced mesh file.
Then add an input file for this very same file in the Software Connector of the next application in line.
Now you have to replace the file name of the input file with the following command:
-> see attached image
So, what you basically do is setting the output file of the first application as input for the second application.
I guess that is what you are trying to achieve?
there are two nice ways of doing this:
a) a script which takes the solver as an argument (or you may use the getapplication command to extract that information from the control.dict). Use the one Bernhard gave you (except for parafoam, much of the post-processing can also be done in CAESES)
b) the way I prefer: a script that executes one of your CAESES template files, i.e. a file named Allrun. Pretty much the way it is done in the CAESES sample for the ahmed body.
Solver and specific settings can be managed from within CAESES, the executable runOpenFOAM.sh basically just runs this script.
This is not completely ready for any case, but since you can make all the changes within CAESES, it's quite efficient.
To clarify this: runOpenFOAM can be used for any case, this should be the executable for your Local Application for all OpenFOAM projects. Only Allrun should be unique for every case. With this method you can also easily open and run the OF tutorials, since they use such an Allrun file.
|All times are GMT -4. The time now is 19:49.|