VPSC7d gui

From EVOCD
Jump to: navigation, search

VPSC7d_gui – a graphical user interface and semi-automated calibration tool for the visco-plastic self-consistent (VPSC) model of plastic deformation of polycrystalline aggregates. The interface utilizes the VPSC executable, input files and output files described in Manual for Code Visco-Plastic Self-Consistent (VPSC), Version 7d, by C.N. Tomé and R.A. Lebensohn, Los Alamos National Laboratory, USA. The VPSC7d_gui license is File:License BSD 3 MSU.PDF.

For questions, comments, and suggestions regarding VPSC7d_gui, send e-mail to Mark F Horstemeyer or Haitham El Kadiri. The VPSC7d_gui code was written in MATLAB by Ricolindo L Carino.

A report for an older version is File:VPSC7b gui.zip.


Contents

Features

VPSC7d_gui enables the user to:

  1. Load a VPSC input deck (vpsc7.in and all files referenced in it)
  2. Interactively edit items in the input deck, activate/deactivate modes, replace the FILECRYS, FILEAXES, FILETEXT
  3. Run the VPSC executable on the input deck
  4. Plot predefined or arbitrary pairs of columns of numbers from STR_STR.OUT, ACT_PHn.OUT, PCYS.OUT, LANKFORD.OUT
  5. Run parameter studies of certain items in the input deck
  6. Run semi-automatic calibration of VPSC model parameters

If necessary, VPSC7d_gui exploits the multi-processing capabilities of the computational environment in order to run several instances of the VPSC executable simultaneously.


Setup on 64-bit Windows without MATLAB

  1. Download File:VPSC7d gui Win64 R2016b Installer web.zip, or a newer installer File:VPSC7d gui Win10 R2017b Installer web.zip. Unzip to a temporary folder.
  2. Run VPSC7d_gui_WinXX_R20YYz_Installer_web.exe in the temporary folder.
  3. Specify C:\VPSC7d_gui as the installation destination. As part of the installation process, the required MATLAB Runtime will be downloaded automatically if it is not yet installed on the local system. Be prepared to wait for a long download time.
  4. Run C:\VPSC7d_gui\application\VPSC7d_gui.exe
  5. As a first time test of VPSC7d_gui, click menu item File | Load restart file, then select the file example_AZ31_VPSC7d_gui-restart.mat. The display should be similar to the following figure.
    VPSC7d gui 1.png

Organizing experimental data for VPSC7d_gui

Below is an example "experiment list" that is understood by VPSC7d_gui. Lines starting with "#" are treated as comments.

#
# Example list of experimental data files and their corresponding vpsc7.in
#
# STRAIN-STRESS: stress-strain data file name
# ORIENTATION  : 1=a (Y), 2=b (X), 3=tt (Z)
# LOADING_TYPE : 1=tension, 2=compression, 3=torsion, 4=channel die, ...
# TEMP         : temperature (K)
# RATE         : strain rate
# VPSC7_IN     : VPSC input file (all files referenced must be in the same directory where this input file is located)
#
# MULTIPLE_MATERIALS: data files describe different materials.
#   If this keyword is absent, the same crystal file will be used 
#   for each data set during modeling

STRAIN-STRESS= Compression/az_rt_comp_1e-3_samp_4_deg_0.dat
ORIENTATION= 3
LOADING_TYPE= 2
TEMP= 298
RATE= 1.0E-3
VPSC7_IN= Compression/vpsc7.in

STRAIN-STRESS= Tension/az31_rt_ten_1e-3_samp_2_deg_0.dat
ORIENTATION= 3
LOADING_TYPE= 1 
TEMP= 298
RATE= 1.0E-3
VPSC7_IN= Tension/vpsc7.in


The above list describes the following file organization:

 |-- az31
 |     |-- az31.list (above file)
 |     |
 |     |-- Compression
 |     |     |-- az_rt_comp_1e-3_samp_4_deg_0.dat
 |     |     |-- vpsc7.in
 |     |     |-- (other files referenced in vpsc7.in)
 |     |
 |     |-- Tension
 |     |     |-- az31_rt_ten_1e-3_samp_2_deg_0.dat
 |     |     |-- vpsc7.in
 |     |     |-- (other files referenced in vpsc7.in)


To test the correctness of a file organization, run the VPSC executable on a subdirectory containing a vpsc7.in. If the expected outputs are produced, then the organization will be usable by VPSC7d_gui.


Basic operations

  1. Start VPSC7d_gui by running C:\VPSC7d_gui\application\VPSC7d_gui.exe (not vpsc7.exe)
  2. Configure execution environment using menu item File | Configure VPSC to select the executable (not VPSC7d_gui.exe), to enter a limit on the number of simultaneous instances of the executable, and to specify the working directory.
  3. Load experimental stress-strain datasets using the menu item File | Load experiment list (see #Organizing experimental data for VPSC7d_gui). If the load operation is successful, the first popup (henceforth referred to as the "dataset popup") will be populated with tags derived from the filenames of the stress-strain datasets.
  4. Left-click the dataset popup to select an experiment for focus. The vpsc7.in associated with the dataset on focus will be displayed on the text box.
  5. Right-click the dataset popup to Restore/Exclude the dataset on focus. Excluded datasets will be marked with (excl) after the dataset tag.
  6. Right-click the dataset popup to Run included datasets, i.e., run the VPSC executable on all datasets not marked with (excl). If multiple datasets are included, several instances of the VPSC executable will run simultaneously, one for each dataset, up to the number of processing cores available on the machine or as set by File | Configure VPSC.
  7. By default, the plot area will display a single plot. To display several plots, click the menu item Plots | ... then specify the number plots.
  8. Select a plot position using the "@(row,col)" popup.
  9. Select a predefined result to display using the "(select) result" popup (beside the plot position popup). For results that are not predefined, select a curve to plot using the Y-axis and X-axis popups.
  10. Show the selected result at plot position @(row,col) by clicking the Plot button.
  11. Repeat the sequence 'Select dataset', 'Select plot position', 'Select predefined result' or 'Select y-data, x-data', then click 'Plot' to display multiple plots.
  12. To update an item in the VPSC input deck, first click the item on the text box to select it. Then right-click on the selection and choose Edit (or some other "update" verb) on the context menu. An input screen will appear to capture the new value.
  13. After one or more updates, right-click the dataset popup to Run included again to recalculate the VPSC model based on the updated items.


Parameter study

  1. To add an item in the VPSC input deck for parameter study, first click the item on the text box to select it. Then right-click on the selection and choose Add to PARAMETER STUDY on the context menu. On the dialog that appears, enter the range (min, max) for the item, and the number of (equidistant) values from within that range. Items for parameter study will be listed at the top of the text box, under section heading PARAMETER STUDY:
  2. Repeat above step for additional items to study. Don't select too many.
  3. To run, left-click ​section title PARAMETRIC STUDY: to highlight it, then right-click highlighted selection, and choose Run PARAMETRIC STUDY.
  4. Wait.
  5. Select parameter study results to plot using the Parametric popup. Then use the sequence 'Select dataset', 'Select plot position', 'Select y-data, x-data', then 'Plot' to display specific (x,y) parametric curves.
  6. Below is a sample screenshot
    VPSC7d gui 2.png
  7. Make a record of the study using File | Write restart file with a descriptive filename. This restart file can be retrieved in the future using File | Load restart file.
  8. To end the study, left-click ​section title PARAMETRIC STUDY: to highlight it, then right-click highlighted selection, and choose Cancel PARAMETRIC STUDY:.


Calibration

VPSC7d_gui implements semi-automated calibration using MATLAB's fminisearch() as the optimization method. Calibration and manual Parameter study are mutually exclusive operations. Manual Parameter study has the higher priority than semi-automated Calibration.

  1. To add a VPSC model parameter to calibrate, left-click the model parameter on the text box to highlight it, then right-click and Add to CALIBRATION. On the dialog that appears, enter the bounds (min, max) for the parameter, and its initial value for when the optimization starts.
  2. Repeat above step for additional parameters to calibrate. Don't select too many. Selected calibration parameters will be listed at the top of the left panel under section title CALIBRATION:.
  3. To run calibration, left-click section title CALIBRATION: to highlight it, then right-click highlighted selection, and choose Run CALIBRATION.
  4. On the dialog that appears, enter the left and right indices to the experimental stress-strain data points that will be used as calibration targets, as well as the weight of the error estimate of the VPSC stress-strain model at those selected data points. To illustrate the use of weights, for example, when targeting two (2) datasets and you set the weights to be 1.0 and 3.0, the weight of the error estimate for the first data set will be 1.0/(1.0+3.0) = 0.25, while the weight of the error estimate for the second dataset will be 3.0/(1.0+3.0) = 0.75.
  5. Wait for calibration to complete. This may take several hours. The process can be stopped by selecting the Stop button in the figure that displays the progress of the optimization. The files used during calibration will be in the "Calibrate" subdirectory of the work directory set by File | Configure VPSC.
  6. The History popup will list attempted calibrations. Selecting an entry in this popup will "recall" the input deck (vpsc7.in, crystal file, etc) for that calibration attempt. This input deck will be the current focus for display, and model curves can be plotted as usual.



The VPSC code and user manual

From the manual (File:VPSC7d manual.pdf):

VPSC is a computer code written mostly in Fortran 77 which simulates the plastic deformation of polycrystalline aggregates. VPSC stands for Visco Plastic Self Consistent and refers to the particular mechanical regime addressed (VP) and to the approach used (SC). VPSC was developed for application to low-symmetry materials (hexagonal, trigonal, orthorhombic, monoclinic, triclinic), although it also performs well when simulating plasticity of cubic materials.

VPSC accounts for full anisotropy of properties and response of the single crystals and the aggregate. It simulates the plastic deformation of aggregates subjected to external strain, external stress, or a combination of both. VPSC is based on the physical shear mechanisms of slip and twinning, and accounts for grain interaction effects. In addition to providing the macroscopic stress-strain response, it accounts for hardening, reorientation and shape change of individual grains. As a consequence, it predicts the evolution of hardening and texture associated with plastic forming. The simulation procedure can be applied to deformation of metals, inter-metallics and geologic aggregates.

The source code may be obtained from the authors. The code was modified as described in the following sections so that the executable will work with VPSC7d_gui. The modifications basically comment out the debugging pauses (print *, 'enter c to continue'; read *), and make the executable write STOPPED to standard output as indicator of successful completion.


Changes to vpsc7.for

285,286c285,286
<         print *, 'enter c to continue'
<         read  *
---
> cRLC        print *, 'enter c to continue'
> cRLC        read  *
571a572
>       write(*,*) 'STOPPED'


Changes to vpsc7.sub

114a115
>         write(*,*) 'STOPPED'
122,123c123,124
<         print *, 'enter c to continue'
<         read  *
---
> cRLC        print *, 'enter c to continue'
> cRLC        read  *
128,129c129,130
<         print *, 'enter c to continue'
<         read  *
---
> cRLC        print *, 'enter c to continue'
> cRLC        read  *
139,140c140,141
<           print *, 'enter c to continue'
<           read  *
---
> cRLC          print *, 'enter c to continue'
> cRLC          read  *
153,154c154,155
<         print *, 'enter c to continue'
<         read  *
---
> cRLC        print *, 'enter c to continue'
> cRLC        read  *
161,162c162,163
<           print *, 'enter c to continue'
<           read  *
---
> cRLC          print *, 'enter c to continue'
> cRLC          read  *
333a335
>           write(*,*) 'STOPPED'
798a801
>         write(*,*) 'STOPPED'
818a822
>           write(*,*) 'STOPPED'
823a828
>             write(*,*) 'STOPPED'
849a855
>           write(*,*) 'STOPPED'
868a875
>           write(*,*) 'STOPPED'
875a883
>           write(*,*) 'STOPPED'
882a891
>           write(*,*) 'STOPPED'
907a917
>           write(*,*) 'STOPPED'
949,950c959,960
<           print *, 'enter c to continue'
<           read  *
---
> cRLC          print *, 'enter c to continue'
> cRLC          read  *
1031a1042
>         write(*,*) 'STOPPED'
1055a1067
>           write(*,*) 'STOPPED'
2979a2992
>         write(*,*) 'STOPPED'
3320,3321c3333,3334
<           print *, 'enter c to continue'
<           read  *
---
> cRLC          print *, 'enter c to continue'
> cRLC          read  *
3335,3336c3348,3349
<           print *, 'enter c to continue'
<           read  *
---
> cRLC          print *, 'enter c to continue'
> cRLC          read  *
3484a3498
>       write(*,*) 'STOPPED'
3534a3549
>           write(*,*) 'STOPPED'
3550,3551c3565,3566
<         print *, 'enter c to continue'
<         read  *
---
> cRLC        print *, 'enter c to continue'
> cRLC        read  *
3558a3574
>           write(*,*) 'STOPPED'
3567a3584
>         write(*,*) 'STOPPED'
3575a3593
>           write(*,*) 'STOPPED'
3596a3615
>           write(*,*) 'STOPPED'
3605a3625
>         write(*,*) 'STOPPED'
3653a3674
>         write(*,*) 'STOPPED'
4089a4111
>           write(*,*) 'STOPPED'
4301a4324
>           write(*,*) 'STOPPED'
4357a4381
>           write(*,*) 'STOPPED'
4873a4898
>       write(*,*) 'STOPPED'
4923a4949
>       write(*,*) 'STOPPED'
6322,6323c6348,6349
<                 print *, 'enter c to continue'
<                 read  *
---
> cRLC                print *, 'enter c to continue'
> cRLC                read  *
6641a6668
>         write(*,*) 'STOPPED'
6782a6810
>           write(*,*) 'STOPPED'
7445a7474
>         write(*,*) 'STOPPED'
8365a8395
>         write(*,*) 'STOPPED'
8372a8403
>         write(*,*) 'STOPPED'
8378a8410
>         write(*,*) 'STOPPED'
8391,8392c8423,8424
<         print *, 'enter c to continue'
<         read  *
---
> cRLC        print *, 'enter c to continue'
> cRLC        read  *
8453,8454c8485,8486
<           print *, 'enter c to continue'
<           read  *
---
> cRLC          print *, 'enter c to continue'
> cRLC          read  *
8459,8460c8491,8492
<           print *, 'enter c to continue'
<           read  *
---
> cRLC          print *, 'enter c to continue'
> cRLC          read  *
8492a8525
>         write(*,*) 'STOPPED'
8499a8533
>         write(*,*) 'STOPPED'
8554,8555c8588,8589
<           print *, 'enter c to continue'
<           read  *
---
> cRLC          print *, 'enter c to continue'
> cRLC          read  *
8560,8561c8594,8595
<           print *, 'enter c to continue'
<           read  *
---
> cRLC          print *, 'enter c to continue'
> cRLC          read  *
8582,8583c8616,8617
<           print *, 'enter c to continue'
<           read  *
---
> cRLC          print *, 'enter c to continue'
> cRLC          read  *
8613a8648
>         write(*,*) 'STOPPED'
9676a9712
>        write(*,*) 'STOPPED'
10327,10328c10363,10364
<             print *, 'enter c to continue'
<             read  *
---
> cRLC            print *, 'enter c to continue'
> cRLC            read  *


Compilation command

On a 64-bit Windows 7 PC with MinGW-gcc-5.3, the compilation command is:

gfortran -fdefault-real-8 -fdefault-double-8  -ffixed-line-length-none  -fno-automatic vpsc7.for -o vpsc7

If relocating the VPSC executable, the following DLLs must be in the same directory as vpsc7.exe: libgcc_s_dw2-1.dll, libgfortran-3.dll, and libquadmath-0.dll.

Personal tools
Namespaces

Variants
Actions
home
Materials
Material Models
Design
Resources
Projects
Education
Toolbox