|
[Sponsors] |
casename.foam file creation for Paraview (manually) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 25, 2011, 12:23 |
casename.foam file creation for Paraview (manually)
|
#1 |
New Member
Join Date: Mar 2011
Posts: 4
Rep Power: 15 |
Hey guys,
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 :-) Regards, Max |
|
July 26, 2011, 03:07 |
|
#2 | |
New Member
Joel Lehikoinen
Join Date: Jun 2011
Posts: 26
Rep Power: 15 |
Quote:
|
||
July 26, 2011, 03:23 |
|
#3 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
Quote:
Although generally I would have thought that the following should always work: Code:
paraFoam -builtin -touch Code:
touch "${PWD##*/}.foam" |
||
July 26, 2011, 14:06 |
|
#4 |
New Member
Join Date: Mar 2011
Posts: 4
Rep Power: 15 |
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: caseName=${PWD##*/} caseFile="$caseName.OpenFOAM" touch $caseFile 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 Thanks again |
|
July 26, 2011, 17:31 |
|
#5 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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): Code:
paraview --data="case.foam" 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 Best regards, Bruno
__________________
|
|
July 28, 2011, 12:10 |
|
#6 |
New Member
Join Date: Mar 2011
Posts: 4
Rep Power: 15 |
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! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |
gcc and executable file from Mac to Linux | simone Marras | Main CFD Forum | 0 | April 8, 2007 16:49 |
Results saving in CFD | hawk | Main CFD Forum | 16 | July 21, 2005 21:51 |
error while compiling the USER Sub routine | CFD user | CFX | 3 | November 25, 2002 16:16 |