Page 1 of 1

script to generate a result image

Posted: 03 Jul 2014, 12:34
by Kankreu
Hello Everybody,

I'm looking for some help about the follwing: I want ot generate automatically an image for the stress of my result file.
thanks to (http://elmerfem.org/forum/viewtopic.php ... efe3#p1518), I found out that we can do the following "ElmerPost.exe source ep_post.cmd" whereep_post.cmd contains some command.
this is similar to doing source ep_post.cmd in the command line of the elmer post GUI.
in my ep_post.cmd, I can load my model, modify the background and adjust the view but I can't find command to display some results.
The command supports:
set ColorScaleColor "Vonmises"
does it support something like:
set ColorMeshColor "Vonmises"
and what is the syntax?
If I use the above command, I don't have any error message in the console.
I need to do 2 things: set mesh style to surface + set colorvariable to Vonmises.

Thanks for the help.

Re: script to generate a result image

Posted: 03 Jul 2014, 15:44
by Kankreu
Ok I did some progress, I found out that I have to use set MeshColor "Vonmises".
Now the next step is to update the viewer:
I have all my menus with the correct setup but I still have to Apply to display the Mesh and the ColorScale.
What is the function to call? I tried UpdateObject, Play, .... nothing works.

Annex question, how to specify the ColorScaleFont?
in the scripts it's set ColorScaleFontColor [@ 256*256*255+256*255+255]
How do I put that to black (0 0 0)?

Re: script to generate a result image

Posted: 04 Jul 2014, 12:45
by mzenker
Hi,

my usual advice in case of ElmerPost problems: ParaView... ;)

Matthias

Re: script to generate a result image

Posted: 08 Jul 2014, 09:33
by Kankreu
Hi Matthias,

Thanks for the advice but it's not really an option: I'm trying to put in place a complete process going from a CAD modification all the way to post-processing.
I'm working for a company developing a Process Integration and Design Optimization software which links together those codes.
For demo purpose, I'm working with FreeCAD, Gmsh and Elmer. I'm trying to limit the number of driven software.
Originally, I was willing to do FreeCAD-Elemer only but I can't mesh in Elmer in batch (at least I haven't got any answer on my question about that).
In one of my process, I'm testing all Elmer solvers and preconditioners, I already exchange with Peter on that.

Basically, I manage to solve my issue. with the attached script (quite general).
I was missing the following
set DisplayStyle(ColorMesh) 1 # apparently it's like clicking on the ColorMesh button
UpdateObject # and this one on the play (button on the right)
display

So if my script can help people...

Thanks again,
max
it's called with batch command:
elmerpost.exe source ep_post.cmd

Re: script to generate a result image

Posted: 08 Jul 2014, 13:09
by mzenker
Hi,

I see your point.
As an alternative, if you don't get what you want with ElmerPost (I noticed you did for now, but just in case), you could try to do the postprocessing with gmsh.

Matthias