Research Article

Investigation on Dynamic Recrystallization Behavior of Martensitic Stainless Steel

Algorithm 1

%=====================================================================
% Calculation of adjustable constants of (1)(psi and zeta)
% Fei CHEN
% 25.12.2013
%=====================================================================
%The needed information is the stress-strain curve data
%These points should be provided in a variable named
%“DATA_T_STRAINRATE”
%The variable “DATA_T_STRAINRATE” should be in format of (strain,
%stress) in 2 columns
%=====================================================================
clc;
clear all;
a=load(‘DATA_T_STRAINRATE’);% reading the experimental data
N=size(a); N=N(1);%Number of rows
s0=a(1,2);%Value of initial stress
sp=max(a);sp=sp(2);%Value of peak stress
Q=size(a); Q=Q(1);%Number of rows
for i=1:Q;
 if(a(i,2)==sp)
 ep=a(i,1);% Value of peak strain
 M=i;
 end
end
for i=1:M
 b(i,1)=a(i,1);
 b(i,2)=a(i,2);
end
x1=b(:,1);
y1=b(:,2);
for i=1:M
 c(i,1)=a(i,1)/ep;
 c(i,2)=a(i,2)/sp;
end
x2=c(:,1);
y2=c(:,2);
k0=[0.001,0.001];
x=0:0.001:1;
f1=@(k,x) (1-exp(k(1)*(x).k(2)));
for i=1:1000
k=lsqcurvefit(f1,k0,x2,y2);%the method of least squares
k0=k;
end
y=1-exp(k(1)*(x).k(2));
for i=1:M
 d(i,1)=b(i,1);
 d(i,2)=sp*(1-exp(k(1)*c(i,1).k(2)));
end
%psi=k(1)
%zeta=k(2)
%=====================================================================
%Following lines could be used to compare the predicted data with the
%experimental data
%=====================================================================
%x3=d(:,1);
%y3=d(:,2);
%subplot(1,2,1),plot(x2,y2,‘b:*’)
%hold on
%subplot(1,2,1),plot(x,y,‘g:+’);
%hold off
%subplot(1,2,2),plot(x1,y1,‘b:*’)
%hold on
%subplot(1,2,2),plot(x3,y3,‘g:+’)
%hold off