|November 5, 2013, 00:11||
Create an script for a Local Application of OpenFOAM
Join Date: Jun 2013
Posts: 26Rep Power: 5
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!
|November 5, 2013, 04:17||
Join Date: Sep 2009
Posts: 790Rep Power: 13
Yes, this is easy
Call your script "run"
#!/bin/bash blockMesh $1 foamToVTK paraFoam
Is this what you need?
|November 7, 2013, 10:54||
Join Date: Nov 2013
Posts: 1Rep Power: 0
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?
|November 11, 2013, 06:36||
Join Date: Nov 2009
Posts: 16Rep Power: 8
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.
#!/bin/bash chmod +x Allrun ./Allrun
#!/bin/bash touch case.foam blockmesh simpleFoam foamToVTK
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.
|application, caeses, local, openfoam 2.2.x, scripting|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Script for converting a mesh from Salome-Platform to OpenFOAM||nsf||OpenFOAM Meshing & Mesh Conversion||53||July 6, 2016 16:16|
|dynamic Mesh is faster than MRF????||sharonyue||OpenFOAM Running, Solving & CFD||14||August 26, 2013 07:47|
|how to create the sediment transport using openfoam||hxxxmu||OpenFOAM||0||April 2, 2013 22:49|
|fluent add additional zones for the mesh file||SSL||FLUENT||2||January 26, 2008 12:55|
|Transient simulation not converging||skabilan||OpenFOAM Running, Solving & CFD||12||September 17, 2007 17:48|