ElmerPost scripting

Post processing utility for Elmer
Post Reply
petroo
Posts: 148
Joined: 13 Jan 2010, 19:07
Location: Aachen, Germany

ElmerPost scripting

Post by petroo » 11 May 2010, 11:56

Sorry to ask twice, but I simply cannot re-locate an old communication on this behalf (some 15 months ago): :shock:

I compiled a post-processing script for ElmerPost in order to set display variables as desired for quick inspection of results, like

...
rotate 180 0 0
background 90 90 70
set GlobalOptions(VolumeSides) 1
readfile case.ep 1 100 1
#
set ColorScaleColor "Temperature"
set ColorScaleDecimals 3
set ColorScaleColorMin 290
set ColorScaleColorMax 330
...

Those commands were put into a separate file to be invoked by the command line of ElmerPost. But now I just cannot figure out any more how to invoke this file. The nearest I could get was the command "exec ./epeval", but that returned some error messages like "./epeval: 2: rotate: not found" and similar.

Could some kind soul put me on the road again, please? :roll:

Peter

petroo
Posts: 148
Joined: 13 Jan 2010, 19:07
Location: Aachen, Germany

Re: ElmerPost scripting

Post by petroo » 19 May 2010, 22:47

Well, once again answering my own question:

After some tinkering I finally found the answer, somewhat accidentally:

Entering "source ep-eval" into the ElmerPost command line will read the aforementioned script and execute it. So it eases significantly the effort to analyse some parametric studies if several standard settings are always to be set in the beginning.

But this brings me to another problem:

I'd like to create a series of images of a temporal development in my systems. The generally suggested command "screensave \$t.ppm", entered on the command line of the timestep control window in ElmerPost, produces only a series of images number like 1.ppm, 2.ppm, ... etc.. I'd rather like the simulated time coded into the respective filename, like "nr15-at-4530sec.ppm".

I approached this goal somewhat already, by finalizing my script with the lines

Code: Select all

gloabel time_current
...
set time_cmd "global time_current; screensave [string map {"Simulation timestep: " "nr" ", Simulation time: " "-at-" " sec" "sec"} $time_current].ppm"
time_Edit
But contrary to the canonical numbering command (which indeed works) this variation does not seem to create the ever-new individual file name, but overwrites just a former (randomly created?) template that indeed was constructed in the intended way: In my case the name "nr150-at-12000sec.ppm" was created, but is used for all image creation actions.

Could someone point me to the conceptional error in my approach, presumably due to a misunderstanding of TCL's syntax or internal invocation schema?

Kind regards,

Peter

Post Reply