Experimental results management#

Experiments#

The Experiments command allows some management of experimental data in order to put them in a form suitable for comparisons with simulation results prior to optimization. In the application, experimental data are manipulated through three different types of Experiment items :

  • base experiment items are X-Y curves extracted directly from the raw experimental data by selecting columns in input ASCII files ;

  • derived experiment items can be generated from the previous ones (or from other derived experiment items) by applying various transformation operations ;

  • composite experiment items can be defined to regenerate multi-columns data from the results obtained after transformation.

These experiment items are the basis of comparisons with simulation results in the definition of the optimization procedures, and can also be used to define the loading of simulations. The transformation operations supported in the definition of the derived experiment items are quite comprehensive, including :

  • selection of regions of the input curve ;

  • simple transformations of the X-Y coordinates using mathematical functions ;

  • complex manipulations by means of a Zprogram script ;

  • powerful data smoothing (LOESS algorithm).

Finally, composite experiment items are mainly used to define multiaxial (and/or anisothermal) loadings in simulations.

Experiments management dialogs#

The main dialog is made of 3 selection boxes, one for each of the 3 types of experiment items described in the previous section, and various commands that can be applied on the selected items.

../_images/exp_l.svg

Add command#

This command allows to create base experiments items, ie. X-Y curves defined by selecting 2 columns of an input ASCII file containing the experimental data. By hitting the Add command, the user opens the Add base experiment dialog (see Experiments/Add).

Derive command#

This command creates a new derived experiment item from the selected experiment item. Either base or derived types of items can be derived from. By hitting the Derive command, the user opens the Add derived experiment dialog (see Experiments/Derive).

Composite command#

This command creates a new composite experiment item that allows to regenerate multicolumns data by pasting together base or derived experiment items. By hitting the Composite command, the user opens the Add composite experiment dialog (se Experiments/Composite).

Mod command#

This command edits the selected simulation item, allowing to change its definition.

Cop command#

Using this command, the user can create a new item by copying the selected base, derived or composite experiment item. The copied item then appears at the end of the corresponding items selection tree.

Del command#

This command deletes from the database all the selected items.

Sel/Clear command#

This command clears all selections in the selection trees associated to the 3 types of experiment items.

Plot command#

This command draws all X-Y curves defined in the selected simulation items. Plots are tiled in the graphics area across the X-Y plane, as shown in the next figure.

../_images/expplot.svg

Cancel command#

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

Add base experiment dialog#

This command allows to create base experiment items, ie. X-Y curves defined by selecting two columns of an input ASCII file containing the experimental data. The graphics dialog opened when the command is activated is shown below.

../_images/addbaseexp.svg

The following sub-items are managed by the dialog.

  • The name of the experiment item defined in the A default name is assigned at creation, that should be changed to something more meaningful to the user.

  • The name of the file containing the experimental data, specified in the File textfield. The browse button available on the right of the textfield opens a file selection dialog that helps selecting an existing file.

../_images/filesel.svg
  • Column indexes in the input ASCII file that will define the X and Y values to store in the experiment item. Syntax is \(\$nc\), where \(nc\) is the column index required.

  • 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 checkbox can be used to plot the curve with a logarithmic abscissa. Default is off.

  • The y log scale checkbox that can be used to plot the curve with a logarithmic ordinate. Default is off.

The following sub-commands may be activated from this dialog.

Go command#

This command updates the database with the informations included in the present dialog.

Edit command#

This command edits the input experimental file specified in the File textfield.

Plot command#

This command draws the X-Y curve stored in the current base Experiment item.

Cancel command#

This command closes the current dialog, without further modification to the database.

Add derived experiment dialog#

This command is used to apply transformations on pre-existing base or derived experiment items. The dialog is shown in the next figure.

../_images/derive.svg

The name of the experiment item can be defined in the Name textfield.

The Derived from textfield contains the name of the experiment item from which new data are derived. At creation, this textfield is filled automatically with the name of the experiment item selected before activating the Derive command of the Experiments dialog (see Experiments).

If the show reference checkbox is toggled, the original curve (from which new data is derived) will also be shown when the derived item is plotted. Default is off.

The no zero checkbox that 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 that can be used to respectively plot the curve with a logarithmic abscissa and ordinate. Default is off.

The Selection textfield may be used to select the regions of the input curve that should be retained before applying transformation operations. Any function of the X (entered as “\(\$1\)”) or Y coordinate (entered as “\(\$2\)”) can be specified. Complex selection criteria may be built by using the “\(*\)” (logical .OR. operator) and “\(+\)” (logical .AND. operator) operators.

Example#

Entering the following function in the Selection textfield :

($1>0.45)*($1<1.1)

selects portion of the original curve with X values between \(0.45\) and \(1.1\), as illustrated in the next figure.

../_images/derive1.svg

Three modes of transformation are allowed, the particular type chosen being specified by means of the checkbox included in the dialog.

  • Function mode

    In this case the (X,Y) coordinates of the derived curve are defined by functions entered in the X and Y textfields. Arguments of these functions are typically the (X,Y) coordinates of the original curve, denoted as “\(\$1\)” and “\(\$2\)” in the function definitions. Most mathematical functions of the libc library are allowed in the definition.

    Example

    In the following example the original curve is translated in the X direction by a value of 0.5 (function “\(\$1+0.5\)” entered in the X textfield), and Y values are multiplied by 2 (function “\(\$2*2\)” entered in the Y textfield). Note, that the same selection criterion as before (function “\((\$1>0.45)*(\$1<1.1)\)” entered in the Selection textfield) has been applied, in order to restrict the transformation to a particular region of the input curve. The show reference checkbox is toggled on, such that both the original and derived curves are drawn on the same plot.

../_images/derivefunc.svg
  • Program mode

    In this case the transformation is defined by means of a Zprogram script, which may allow more complex transformations than in the previous mode. The user should refer to the Developer’s manual for a complete reference on the Zprogram language syntax. The script to be applied can be edited by activating the Program command. A default script is provided that simply copies the original curve to the output :

    void main()
    { int ip;
      for(ip=0;ip<!x;ip++) {
        xres[ip]=x[ip];
        yres[ip]=y[ip];
      }
    }
    

    The original (X,Y) values are stored respectively in the “x” and “y” vectors, while coordinates of the result curve should be defined in the “yres” and “xres” vectors. By default the latter output vectors have the same size as the input ones. However they can be resized in the script, in which case the input and output curves will have a different number of points.

    Example

    The following script selects one point every each increment of \(0.1\) along the X axis, and multiplies the Y value by \(2.0\).

    void main()
    { int ip, count;
      double xinc, x0;
    
      xinc=0.1;
      count=0;
      x0=0.;
    //Calculation of the number of points retained in the output curve
      for(ip=0;ip<!x;ip++) {
        if((x[ip]-x0)>xinc) {
          count=count+1;
          x0=x[ip];
        }
      }
    //Resizing of the ouput vector
      xres.resize(count);
      yres.resize(count);
      count=0;
      x0=0.;
      for(ip=0;ip<!x;ip++) {
        if((x[ip]-x0)>xinc) {
          xres[count]=x[ip];
          yres[count]=2*y[ip];
          count=count+1;
          x0=x[ip];
        }
      }
    }
    

    The results are shown in the following figure.

../_images/derive2.svg
  • Filter mode

    This mode allows to smooth experimental data by means of the LOESS algorithm LOESS (Cleveland W. S. and Devlin S. J. 1988). In this method the smoothed values are obtained at each point of the original curve, by performing a least-square fit on a subset of the curve centered at the current point. During the fit, the weights assigned to each point in this subset are given decreasing values when the distance to the current point increases. The functions used in the least-square fits may be polynomials of an arbitrary degree. However only linear or quadratic polynomials are used in practice.

    Clicking on the Filter command opens the dialog shown in the next figure that allows to specify the various smoothing parameters.

    ../_images/filter1.svg

    Sub-items included in the dialog have the following meaning :

    • The Smooth textfield defines the size of the subsets on which least-square fits are performed. Values given should be less than \(1.0\), and correspond to a fraction of the total number of points in the original curve. Increasing values of Smooth yields smoother curves, a value of \(1\) corresponding to a simple polynomial fit on the whole curve.

    • The Degree textfield defines the degree of the polynomial used in the fits. Only values of \(1\) (linear fit) or \(2\) (quadratic fit) are allowed. Linear fits yield smoother results, but may miss critical points from the original curve.

    • The reduced output option can be activated to specify the number of output points (default is to generate a smoothed value for each point in the original curve). In this case the number of output points required should be defined in the Output size textfield.

    • If the get min max option is selected, min/max points of the original curve will be retained in the output, for each reversal of the Y value. The Precision parameter may then be used to define the precision involved in the detection of these reversal points. A fine tuning of this Precision parameter may be necessary to avoid non significant reversal points on fuzzy data. This option can be used in conjunction with the reduced output option. Note that in this case the Smooth parameter defines the size of subsets as a fraction of the number of points between 2 reversals. Similarly the Output size parameter is the number of output points required between 2 reversals.

    • If the extrapolate zero option is activated, a point with a null Y coordinate will be calculated and included in the output curve. This option is particularly interesting when the experiment item generated is used to define a simulation loading (see Simulations/Define load block from exp).

    • If the get linear option is activated, the algorithm attempts to generate a piecewise linear output, by detecting change in slopes of the smoothed curve. In this case, an output point will be generated for each change in slope. The Precision parameter can be tuned to control the precision involved in the detection. This option is exclusive and cannot be used in conjunction with the get min max and reduced output options.

    Example

    The following figure illustrates the effect of the smoothing algorithms implemented.

    ../_images/filter2.svg

    Example

    The following figure illustrates the use of the reduced output option on the same input data as before.

    ../_images/filter3.svg

    Example

    The following example illustrates the use of the reduced output, get min max and extrapolate zero options, as defined in the dialog shown in the next figure.

    ../_images/filter5.svg

    Results obtained are shown hereafter.

    ../_images/filter6.svg

The various sub-commands included in the Add derived experiment dialog are summarized hereafter.

Go command#

This command updates the database with the current definition of the derived experiment item.

Edit command#

This command edits an output file containing the (X-Y) values obtained by applying the transformation operations selected in the dialog.

Plot command#

This command plots the (X,Y) curve stored in the derived experiment item.

Plot base command#

This command plots the original (X,Y) curve, that is stored in the experiment item from which new data are derived.

Grab command#

This command may be used to update the selection defined in the Selection textfield, by clicking on various regions of the original curve. The corresponding dialog is shown in the next figure. Selection of single points, or portions of the curve included between two selected points, are allowed. Also, options to either erase or add to the selection criterion already defined in the Selection textfield are available.

../_images/grab.svg

Program command#

This command edits the Zprogram script used to generate the derived results when the program option is selected.

Filter command#

This command opens the Loess filter parameters dialog that allows to set various parameters involved in the smoothing algorithm applied when the filter option is selected.

Cancel command#

This command closes the dialog without further modification to the current derived experiment item.

Add composite experiment dialog#

This type of experiment item is used to re-generate multi-columns data from (X-Y) curves stored in base or derived experiment items. The main usage of those is to define multiaxial and/or anisothermal simulation loadings as described in Simulations/Define load block from exp. .

Composite items store data of the form (X,Y1,…,Y\(n\)), where \(n\) is the number of non-composite experiment items that are pasted together. The Y\(i\) values are calculated from the Y values of the \(i^{th}\) non-composite item, and the X values are computed as a combination of available X values in the latter items.

Definition of composite experiment items uses the dialog shown in the next figure.

../_images/composite1.svg

The Name textfield defines the name of the item in the database. A default name is assigned at creation, that should be changin Simulations/Define load block from exp.omething more meaningful by the user.

By default, two non-composite items are used in the definition. The corresponding combo boxes are filled with the name of all non-composite items defined previously in the database, and a particular item in this list should be selected in both cases. The Add Y command allows to add an unlimited number of non-composite experiment items in the definition. Activation of this command adds a new combo box in the dialog, that allows to select the name of the new experiment added.

Three modes of generation are available :

  • use Y master mode. If this mode is selected the master curve must be specified in the Y master textfield. The rank of the master curve within the list of non-composite items defining the composite experiment item is expected. In this case, the X values of the composite item generated will correspond to those of the master curve. Y values associated to slave curves will be computed by linear interpolation if no data is available at the current X coordinate.

  • intersection mode. Only points for which the X values correspond in the curves added in the composite item will be generated.

  • union mode. The X values generated will be an union of the X values available in the curves added in the composite item. Linear interpolation is used to calculate missing Y values.

The Y plot textfield allows to specify which Y value will be plotted when the Plot command is hit. The Edit command edits an ASCII file with the generated results.

Example#

Let us assume that the experimental data define a multiaxial (sig11,sig12) loading. Two base experiment items are extracted from the experimental file, one for each component of the loading, as shown in the next figure. Note that both sig11 and sig12 are periodic, but the loading is out of phase.

../_images/composite2.svg

Derived experiment items are then generated with the filter option (see LOESS) to extract only the loading extremum points.

../_images/composite3.svg

Next a composite item is defined to store both components of the filtered multiaxial loading. The corresponding input is shown in the next figure. The union option has been selected.

../_images/composite4.svg

The new curves obtained are shown hereafter. The output includes a point corresponding to each extremum point of the 2 out of phase loading components, and can be used to define a valid multiaxial simulation loading.

../_images/composite5.svg