knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
TPMplt is a tool-kit for building and visualizing the dynmaic materials model (DMM), suggested by Prasad and Gegel. It provides an easy approach to calculate constructive functions and other related material constants based on a given strain condiiton. 2D and 3D processing-maps with temperature as its x axis, while logarithm strain rate as its y axis are also available.
Valid data for TPMplt strictly obey the management logic in VBTree package. Additionally, factors for temperature (celsius) and strain rates should be written in the format of pure numeric. All different variables are desired to be connected using "-" symbol. For example, if there's a strain data collected in the conditions of 900 celsius, $10^{-3}$ strain rate, "0.001-Strain-900" is one of available column names for this data, rather than "10e-3_Strain_T900C", "SR0.001-Strain-1173K" or such like. If your data contains some unnecessary patterns, a certain degree of data cleaning for column names is required.
The following codes partially display a typical valid data for TPMplt:
library(TPMplt) head(TPMdata[,1:3])
Users can apply any applicable tools to make the summary table for TPMplt, with the format as above-showed.
Besides, it is common to obtain multiple exported files based on different experiments. TPMplt affords two functions to automatically generate a summary table from multiple exported files. For details, please check the R documents for API4TMZ
and TMZdatainput
.
It is necessary to build the conceptions for layers and levels in layer for variables, defined by VBTree package. For example, run the following codes to check all column names in the demo dataset in TPMplt pacakge:
colnames(TPMdata)
As we can see, all column names are arranged by the style of "(Strain&Stress)-(Temperature)-(Strain Rate)-(Other)". In this case, we attribute the variable the concept 'layer', and the order of values in specified layer the 'level'. The layer for temperature is 2, while the layer for strain rate is 3; the temperature of 1000 is at level 3 in layer 2.
The function epsExtract
is capable to export a strain rate-temperature table by specifying eps
as the selected strain condition. However, lyT
and lySR
, the two necessary arguments corresponding to layers for temperature and strain rate respectively, require correct assignment as well.
Executinge the following codes:
require(VBTree) dl2vbt(chrvec2dl(colnames(TPMdata)))
The complete structure for all variables is showed. As the result showed above, there're 7 temperatures and 4 strain rates in our summary table, therefore the numbers of level for temperature and strain rate are 7 and 4 respectively. Based on all introduced knowledge, we can easily find that all factors will be corresponded with a unique identity with the format as (layer, level). For example, we can define the factor "950" is located in layer 2, level 2.
SSplots
is automatic completion for stress-strain curve plots, using VBTree package group strategy. It help researchers check the profiles of their experimental data conveniently. The argument grpby
determines attribute to be grouped for each plot. As an instance, stress-strain curves grouped by strain rates, separated by temperature condition in each individual plot can be achieved using the code SSplots(TPMdata, 3, mfrow=c(3, 3))
. The layer for strain rate is 3, therefore the 2nd argument grpby
is 3 (7 figures totally, therefore mfrow
use a 3*3 division to ensure correct display):
Grouped by temperature is also available, by running SSplots(TPMdata, 2, mfrow=c(2, 2))
, four figures will be exported as:
However, multiple plots export using graphics
is very sensitive to the Plots pane's in RStudio. Before plotting, please make sure the area of this pane is large enough to include all your output.
Sometimes, curves of flow stress as function of flow strain might be of high vibration, therefore the fitting process for all data is necessary. However, in most circumstances, raw stress-strain curves always present too complicated appreance to be fitted by a single linear model. The function KFprocess()
in this package is designed to solve this problem. From the aforementioned raw stress-strain curves generated by SSplots(TPMdata, 2, mfrow=c(2, 2))
, it is not difficult to find for most curves, vibration starts from where the plastic deformation occurs; Using the dV
as 0.3 and dW
as 0.006, the main paths of flow stress vs. flow strain curves can successfully obtained:
Fitted_data <- KFprocess(TPMdata, dV = 0.3, dW = 0.006) SSplots(Fitted_data, 2, mfrow=c(2, 2))
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.