casename.foam file creation for Paraview (manually)
Please can anyone help me on a small issue. I am trying to create a single command or maybe a small program that I can run using terminal in a unix based system (mac os in this case, because paraFoam command doesn't quite work properly.)
Ok, so basically, I need to create the casename.foam file via terminal, so that I can open that with Paraview. This is simple enough using "touch casename.foam", then opening that with Paraview, which loads the files 0, 0.1, 0.2 etc etc to be viewed.
So my questions are:
How do I get the working directory into, say, an export command,
eg. export WORKING="pwd" in my .bashrc file... the problem is that I can't get the working directory to export properly to a global variable which I could use in a command to create the casename.foam file without having to type the case directory/name manually.
Secondly, I had a perusal of the Paraview source code, but I'm stuck with another small thing...
Is there an argument I can add (to a command that opens Paraview.app) to load a file automatically in Paraview?
Many thanks in advance :-)
Although generally I would have thought that the following should always work:
Thanks guys :-)
I just took a peek inside the paraFoam application that comes with openfoam, and created a .bat file for which there is an alias to, with contents:
This works good in any directory.
Still unsure how to get the .OpenFOAM file loaded automatically. This is because on my mac os, I required a standalone binary of Paraview, so I have to open this then load up the .OpenFOAM file.
I guess I'll get by with a few extra mouse clicks in the meantime :p
Thanks again :)
Greetings to all!
Max_sph, in the last lines of paraFoam you would find the solution you are looking for ;) (at least on OpenFOAM 2.0.0/x):
I haven't yet quite understood what you are trying to do, but you could simply use the already existing paraFoam script to do what you need! At least the one from OpenFOAM 2.0.
Anyway, I suppose that either way, you should now know everything you need for your minimalist script :)
Thanks Bruno :)
I did indeed take a quick peek at paraFoam. On a linux system it will work properly, but on a mac os the paraview application is "Paraview.app"... I'm no expert on this, but perhaps someone can't load ".app" applications with a --data argument.
Anyway, the standalone ParaView.app for Mac works good, it's just I have to load the data in manually! (All those clicks... Laziness has got me you see) :P
Anyway, its only a small issue and doesn't matter too much :)
Thanks for all the support!
|All times are GMT -4. The time now is 17:15.|