Page 1 of 1
Case ID and simple calculation whit SaveLine
Posted: 22 Mar 2019, 10:16
by joni
hi,
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
ID.
Re: Case ID and simple calculation whit SaveLine
Posted: 24 Mar 2019, 19:56
by raback
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
#!/bin/bash
for i in {1..10}
do
export FILEIND=$i
ElmerSolver case.sif
done
in the sif file you can access the environmental variables by MATC, for example.
And you canu use this index in Simulation section to choose the mesh
and in Solver section for to choose the filename for SaveLine
And the results would be easy to script in Matlab or octave, for example.
-Peter
Re: Case ID and simple calculation whit SaveLine
Posted: 24 Mar 2019, 20:27
by joni
hi,
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
C=Clamped
P=Pressure
Case name like P1N8CP can be easyly decoded
to parameters like E_JOB, E_MESH, E_SCALE
and replaced from TEMPLATE.SIF
Example:
Boundary Condition 4
Target Boundaries(1) = 2
Name = SYM2
E_SC21 Deflection 1 = 0
E_SC22 Deflection 2 = 0
E_SC23 Deflection 3 = 0
End
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.
joni