|June 30, 2015, 08:27||
Matlab m file to create openfoam case "like Helyx"
Join Date: Jan 2012
Location: Strasbourg, France
Posts: 82Rep Power: 6
Hello dear Foamers,
I am creating a crazy solver in openfoam which needs hundreds of parameters to be defined in the case folder.
some of the boundary conditions, setField values depend on these parameters.
so i thought about creating a matlab, octave, or scilab function that will generate the case files based on provided parameters or read from text file.
Is there anything like this done before? it will make my task easier.
Thank you very much
|July 8, 2015, 10:49||
Join Date: Sep 2013
Posts: 62Rep Power: 5
I think python is the ideal language for this type of task. With the numpy modules you can do any kind of calculations you need and with the OS module you can easily open, naviguate, etc. between files.
The work on pyFOAM is but an example of what you can do with python and openFOAM.
|July 12, 2015, 13:52||
Join Date: Jun 2012
Location: NH, USA
Posts: 141Rep Power: 6
I have not used pyFoam, but Python in general is very good at working with text--quite a bit better than Matlab/Octave. Here's an example of a script I use to generate a dict with a large table of values, which is admittedly not optimized to take advantage of Python's advanced string formatting abilities: https://github.com/petebachant/UNH-R...dynmeshdict.py
|Thread||Thread Starter||Forum||Replies||Last Post|
|groovyBC in openFOAM-2.0 for parabolic velocity bc||ofslcm||OpenFOAM Pre-Processing||24||August 23, 2015 22:41|
|centOS 5.6 : paraFoam not working||yossi||OpenFOAM Installation||2||October 9, 2013 01:41|
|funkySetFields compilation error||tayo||OpenFOAM||39||December 3, 2012 06:18|
|"parabolicVelocity" in OpenFoam 2.1.0 ?||sawyer86||OpenFOAM Running, Solving & CFD||21||February 7, 2012 12:44|
|Free surface boudary conditions with SOLA-VOF||Fan||Main CFD Forum||10||September 9, 2006 12:24|