External simulation items management#

External simulations#

The External simulations command allows to define and launch interactively simulations performed with an arbitrary external script or program, and especially programs that can not be launched using Simulations command.

Simulations command is restricted to RVE calculations (using the Zsim module) that only apply to standard experimental tests where the response may be considered as homogeneous (eg. conventional tensile tests). For other experimental tests where a complete structural calculation may be needed (eg. bending tests), the External simulations mode can be used to drive a finite element code or any external program within Sim-Opt Plugin. An external simulation can be a list of several executions commands.

The external simulation results can then be used to define comparisons with experimental results to drive the optimization module.

Note that external simulations can be launched either from this dialog, or from the Variables Panel dialog.

External simulations management dialog#

The External simulations dialog is shown in the following figure. The selection tree allows to select external simulation items to apply appropriate commands on.

../_images/ext_sim.svg

Add ext sim command#

This command may be used to create a new external simulation item in the database by opening the Add/Mod external sim dialog (see add_ext_sim).

Mod ext sim command#

This command edits the selected external simulation item. By hitting the Mod ext sim command, the user opens the Add/Mod external sim dialog that allows to change the definition of the item (see add_ext_sim).

Del ext sim command#

This command deletes from the database all the external simulation items selected in the External simulation items selection tree.

Run command#

This command launches all the external simulations selected in the External simulation items selection tree using the appropriate module.

Sel/Clear command#

This command clears selections in the External simulation items selection tree.

Plot command#

This command draws all output curves defined in the external simulation items selected in the External simulation items selection tree. Plots are tiled in the graphics area across the X-Y plane, as shown in the following figure.

../_images/ext_sim_plot.svg

Cancel command#

This command closes the External simulations management dialog without further modification to the database.

Add/Mod external sim dialog#

This dialog, used to create or modify external simulation items that will be run using the appropriate module, is shown in the next figure.

../_images/ext_l.svg

The proceedings of this dialog consists of :

  • firstly, filling the upper part of the dialog, to define a name, to select an input file and a template file, and then to use or modify execution command(s) ;

  • secondly, using the External simulation results by means of the lower part of the dialog, to define as many plots as needed with available variables.

The name of the external simulation item can be modified in the Name textfield. The default name assigned at creation should be changed to something more meaningful to the user.

The Input file textfield may be filled by the user or by means of the browse button available on the right of the textfield that opens a file selection dialog to help the selection of an existing file as shown in the next figure.

../_images/filesel.svg

The first selection box at the top is filled with the names of all template files loaded in the application. Assigning a material file behavior to the external simulation item is done by selecting a particular file in this list.

The second box is used to define execution commands. The default execution commands written at creation should be adjusted to the particular commands needed to launch the external scripts or programs. Note that as many execution commands as needed may be specified, in that case they are separated by a carriage return in the Execution commands edition box.

The informations given in the Input file textfield is only indicative. Setting on actual value allows to edit the input file to check the data needed by the execution commands. A template should be selected in the Template selection box (see add_ext_sim). This template file should correspond to an input file needed by the execution commands. Note that in the current implementation, there is only one template file allowed, such that all variable definitions that may affect the execution commands results should be located in the same file.

The Output file textfield allows to define the name of a file (generated by the execution commands) that may be used to draw plots. This output file should include ASCII data where the number of lines corresponds to the number of points, and columns (separated by a blank space character) correspond to the various components that can be plotted. If the output file contains the name of the components as headers, these headers (appearing in the two selection boxes of the Define Plot dialog) may be used to define the plot, otherwise the definition of the plot in the Define Plot dialog uses the number of the columns (for instance \(\$1\) or \(\$2\)) to specify the X and Y parameters that will be drawn.
The following sub-commands may be activated from this dialog.

Edit command#

This command edits the file specified by means of the Input file or Output file text-field. Note that the Edit input file dialog allows to modify the selected file, using the Save command, while the Edit output file dialog does not allow to modify the selected file.

Add plot command#

This command adds a new plot item to the current external simulation item by opening the Define Plot dialog described in External simulations/Define plot.

Mod plot command#

This command edits the plot item selected in the Plot items selection box to allow some modifications. By hitting the Mod ext sim command, the user opens the Define Plot dialog (described in External simulations/Define plot) with the current definition of the plot item.

Del plot command#

This command deletes from the external simulation item definition all the plot items selected in the Plot items selection box.

Set names command#

This command assigns to all the defined plots a name constituted by the name of the external simulation item and the rank of each plot in the Plot items selection box.

Go command#

This command updates the database with the definition of the external simulation item currently edited.

Run command#

This command launches the external simulation item considered using the appropriate module.

Plot command#

This command draws all output curves defined in the external simulation item. Note that plots are tiled in the graphics area across the X-Y plane.

Cancel command#

This command closes the Add/Mod external sim dialog without further modification to the database.

Define plot dialog#

This dialog, used to create or modify a plot item attached to the current external simulation item, is shown in the figure hereafter.

../_images/ext_sim_defplot.svg

The name of the plot item can be modified in the Name textfield. The default name assigned at creation should be changed to something more meaningful to the user.

The History textfield allows to define the number nc of curves the user wants to display on this particular plot. The plotted nc curves will correspond to the \(nc\) more recent external simulations. This type of plots is a convenient way to visualize for instance the influence of material coefficients on the simulated response.

Example#

In this example, 3 simulations have been performed for increasing values of the initial yield stress R0. Plots of sig11 vs eto11 and the cumulated plastic strain evcum vs time obtained by setting the History parameter to 3 are shown in the next figure.

../_images/plothistory.svg

The combo box filled with the available experiment items defined beforehand may be used to select a particular item that will be drawn on the same plot as a reference curve.

The two selection boxes filled with the components of the external simulation output file selected in the Output file textfield of the Add/Mod external sim dialog, allows to respectively specify the X (top box) and Y (bottom box) parameters that will be drawn on the plot.

The no zero checkbox can be used to specify if the origin of the curve, when not available in the actual data, should be included when drawing the plot. Default is off.

The x log scale and y log scale checkboxes can be used to respectively plot the curve with a logarithmic abscissa and ordinate. Default is off.
The following sub-commands can be activated from this dialog.

Go command#

This command updates the definition of the current plot of the considered external simulation item, using the informations included in the dialog.

Cancel command#

This command closes the Define Plot dialog without updating the definition of the current plot.