Simulation Module (-S)#
Module -S is the module for post-processing simulation results. It generates and works on a simply-structured and human-friendly Simulation Directory (.sim). The Simulation Directory (.sim) is particularly well suited for result management and allows for the computation of new results.
A Simulation Directory (.sim) is typically generated by FEPX [IOP2022]. It can also be generated by the Tessellation Module (-T) or the Meshing Module (-M) (option -format sim), in which case it contains the (raster) tessellation or mesh file but no simulation results — the various post-processing capabilities of the Simulation Module (-S) can then be used on the (raster) tessellation or mesh. Finally, simulation directories that represent successive parts of a simulation (e.g. resulting from FEPX restarts) can be merged into a single one (FEPX 3 continues a restarted simulation in the same directory).
New results can be computed for several entities of the (raster) tessellation and mesh, including the (raster) tessellation cells and the mesh nodes, elements and elsets. The whole (raster) tessellation and mesh can also serve as entities. New entities corresponding to sets of elements can also be defined.
Results of (raster) tessellation entities are computed from the (raster) tessellation, while results of the mesh entities are computed from the mesh or the simulation results. The results of sets of elements (elset, mesh and new entities) are computed from the element results, by averaging or other statistical processing. Results can also be imported from external files. The results can be assigned names and defined from general expressions, as in energy:0.1234*(crss-crss(step=0))^2. Results can also be removed or updated. The results are computed at the steps for which result files exist; a step without result files (e.g. not printed by the simulation) is skipped.
The crystal symmetry is that of the FEPX configuration file, simulation.cfg, if any (crystal_type: fcc and bcc for cubic, hcp for hexagonal and bct for 4/mmm, see Crystal Symmetries), and that of the (raster) tessellation or mesh otherwise.
The Simulation Directory (.sim) can be loaded by the Visualization Module (-V) for result visualization.
Here is what a typical run of module -S looks like:
$ neper -S simulation.sim -reselset stress
======================== N e p e r =======================
Info : A software package for polycrystal generation and meshing.
Info : Version 5.0.1
Info : Built with: gsl|libgmsh|muparser|opengjk|openmp|libscotch
(full)
Info : Running on 8 threads.
Info : <https://neper.info>
Info : Copyright (C) 2003-2026, and GNU GPL'd, by Romain Quey, CNRS.
Info : Loading initialization file `/home/rquey/.neperrc'...
Info : ---------------------------------------------------------------
Info : MODULE -S loaded with arguments:
Info : [ini file] (none)
Info : [com line] simulation.sim -reselset stress
Info : ---------------------------------------------------------------
Info : Reading input data...
Info : - Reading arguments...
Info : > Input files: msh config
Info : > Node number : 49
Info : > Element number : 16
Info : > Elset number : 2
Info : > Partition number : 2
Info : > Step number : 2
Info : > Node results : coo disp vel
Info : > Elt results : ori stress
Info : Running post-processing...
Info : - Loading inputs...
Info : > simulation.msh...
Info : > simulation.cfg...
Info : - Writing results...
Info : [o] Writing directory `simulation.sim/results/elsets'...
Info : . stress ........................................... 100%
Info : [o] Wrote directory `simulation.sim/results/elsets'.
Info : Elapsed time: 0.010 secs.
========================================================================
Input Data#
Entity Options#
- -entity <name>:<logical_expression>#
Define a new entity (based on elements) from one or several logical expressions based on the variables described in Mesh Keys. The expression argument can be:
a single logical expression;
file(<file_name>): logical expressions to load from a file.
An entity corresponds to one or several sets of elements (just as
meshrepresents the set of all elements andelsetrepresents the sets of elements of the mesh and corresponding to the tessellation cells).Default value: -.
Results Options#
Below are options to manipulate (add, remove or update) the results of a simulation directory. New results can be computed from the simulation inputs (tess, mesh, …), existing simulation results, or be loaded from a file. Any result can also be assigned a name alongside its expression. [1] Results of element-based entities (including elset and mesh) are computed from the mesh in the case of known variables, or from the element results (when they exist), in this order of priority.
- -res{cell,tess,node,elt,elset,mesh,<entity>} <res1>,<res2>,...#
Specify the results to add, remove or update, using
<res>,'!<res>'[3] or\<res>, respectively. A new result is typically computed from the tessellation, mesh or existing simulation results, as described in the following. To (optionally) assign a name to a result, use<name>:<expression>, where<name>is the name and<expression>is its expression. A result expression can be:any expression based on the tessellation results (see Tessellation Keys or Raster Tessellation Keys), mesh results (see Mesh Keys) or simulation results (see Simulation Results);
<res>: for element-based entities (includingelsetandmesh), the value of a result computed from the element results, by weighted-averaging (considering the element volumes);<res>_<operation>: for element-based entities (includingelsetandmesh), the value of a result computed from the element results, by a given statisticaloperation(always considering the element volumes), which can be:<res><X>or<res><X><Y>: a specific component of an existing result (<X>or<X><Y>, for a vector or a tensor, respectively, 1-indexed) [2];file(<basename>[,type=<type>])(in which case a name must be assigned, as in<name>:file(<basename>)): a custom result to be loaded from files of basename<basename>(files<basename>.step*if they exist, and<basename>otherwise). Files<basename>.step*must have the steps of the simulation directory, and they set them if the simulation directory has no results. A file<basename>is used for all the steps. A file must have one line per entity member. The type of the result,type, can beint,real,vector,skewtensor,symtensor,tensororori. It is needed to use the components of the result, and for operations that depend on its type, unless the name of the result is that of a result of known type (see Simulation Results).
Note
To use a simulation result at a specific step, use
<res>(step=<step_nb>), where<res>is the result and<step_nb>is the step number.Default value: -.
Orientation Space Options#
- -orispace <space> (secondary option)#
Specify the orientation space used for ODF computation, of the form
rodrigues(fr<N>), where<N>is the refinement level (5,10,15or20, and also40for the cubic crystal symmetry). The orientation space is read only when an ODF is computed, and is available only for the cubic and hexagonal crystal symmetries.Default value:
rodrigues(fr20).
Output Options#
- -o <directory_name>#
Specify the name of the output simulation directory, when merging simulation directories (the
simextension is added if missing). The option cannot be used otherwise, as results are then written in the input simulation directory.Default value:
<directory_1>-<directory_2>-....sim(with thesimextensions of the input directories removed).
Output Directory#
.sim: simulation directory (see Simulation Directory (.sim)).
Footnotes