Case ID and simple calculation whit SaveLine

Numerical methods and mathematical models of Elmer
Post Reply
Posts: 21
Joined: 10 Mar 2018, 15:05
Antispam: Yes

Case ID and simple calculation whit SaveLine

Post by joni » 22 Mar 2019, 10:16


I have simple School work where I compare
same 1m x 1m plate by changeing
elmentsize Mesh, element ordder p2/p:4
and solver plate/shell/Linear elasticy
and there will 53 cases,...

Save Line + append operator will do good
job but I like to save to first column ID
, case.sif filename and I like to divide
resulted Deflections whit analytical values
to get comparatable parameter.

I could not figure out where I should use
MATC to manipulate values and how to add

Site Admin
Posts: 3416
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland

Re: Case ID and simple calculation whit SaveLine

Post by raback » 24 Mar 2019, 19:56

Hi joni

I would perhaps not save everything in one file. Currently SaveLine does not support adding any index in a nice way. SaveScalars has the keyword "Line Marker" which makes it possible to mark different lines easily.

Instead if you're running over several meshes you could have some simple unix script, e.g.

Code: Select all

for i in {1..10}
  export FILEIND=$i
  ElmerSolver case.sif
in the sif file you can access the environmental variables by MATC, for example.

Code: Select all

  $ind = env("FILEIND")
And you canu use this index in Simulation section to choose the mesh

Code: Select all

  Mesh DB = "." mesh$ind$
and in Solver section for to choose the filename for SaveLine

Code: Select all

  Filename = line$ind$.dat

And the results would be easy to script in Matlab or octave, for example.


Posts: 21
Joined: 10 Mar 2018, 15:05
Antispam: Yes

Re: Case ID and simple calculation whit SaveLine

Post by joni » 24 Mar 2019, 20:27


I have actually three scripts creating .sif files.
I have about three "TEMPLATE.SIF" files where i have
parameters "E_JOB , E_MESH".

One of scripts replaces "E_JOB , E_MESH" at TEMPLATE.SIF
file whit parameter's.

And all cases have code name P1N8CP
P1= 1/4 fourt model, only one element
N8= 808 elemnt

Case name like P1N8CP can be easyly decoded
to parameters like E_JOB, E_MESH, E_SCALE
and replaced from TEMPLATE.SIF


Boundary Condition 4
Target Boundaries(1) = 2
Name = SYM2
E_SC21 Deflection 1 = 0
E_SC22 Deflection 2 = 0
E_SC23 Deflection 3 = 0

So to remove Boundary condition E_SC21="!" and
to activate E_SC21="" , vòla

And result is *.sif file that work's as evidence what
had been calculated !

I'am useing operator APPEND to get both saveline and savescalar
to one file.

Purpose was to use this case as test case how to deploy jobs
via slurm to my small three machine cluster.

Now I do calculation at seriers, at one machine, so I know
order of calculated cases, i can add id at LibreCalc !!

When I'am done I will post all "source" files, if one need to
solve same problem form nothing.


Post Reply