-
Notifications
You must be signed in to change notification settings - Fork 1
/
KM_parameters.m
68 lines (65 loc) · 2.79 KB
/
KM_parameters.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
%% This code can be used to fit a straight line over the strain hardening vs.
% (sigma-sigma0) curve. For this first create the the required data for the
% KM curve i.e. (d_sigma/d_epsilon_p) vs. (sigma-sigma0) using tensiletesAnalysis2
% script in current repo. This code requires input from the user to select the
% the correct straight line portion of the KM curve which needs to be fitted with
% the straight line. The intercept of the straight line on ordinate and the abscissa
% gives important paramters for the dislocation storage and dynamic recovery paramters
% of the materisl.
% This script uses burgers vector-b and shear modulus -G value, at present it has
% used these values for Aluminum. One need to change it for a different material.
%% PLotting KM plot and analysis
figure( 'Name', 'd\sigma/d\epsilon vs \sigma-\sigma_{y}' );
h1 = plot(KMX-KMX(1),KMY);
xlabel( '\sigma-\sigma_{y} (MPa)' );
ylabel( 'd\sigma/d\epsilon' );
grid on
grid minor
pause
% Here the select the range where you want to fit the linear voce curve and
% save that data as 'ans2' variable in work space
plot((KMX-KMX(1)),KMY,'-.k','LineWidth',2);
hold on
[linfitKM, gofKM] = fit(ans2(:,1),ans2(:,2),'poly1');
xspace = linspace(0,200,50);
fit_y = linfitKM(xspace);
plot(xspace,fit_y,'g','LineWidth',2);
hold off
ylim([0 10000]);
xlim([0 280]);
box('on');
axis('square');
set(gca,'FontName','Arial','FontSize',16,'FontWeight','bold','GridColor',...
[0.5 0.5 0.5],'GridLineStyle','--','LineWidth',1,'MinorGridColor',...
[0.9 0.9 0.9],'TickLabelInterpreter','latex','TickLength',[0.03 0.075],...
'XGrid','on','XMinorTick','on','YGrid','on','YMinorTick','on','XTick',...
[0 40 80 120 160 200 240 280]);
xlabel( '\sigma-\sigma_{y} (MPa)' );
ylabel( 'd\sigma/d\epsilon (MPa)' );
legend(gca, 'd\sigma/d\epsilon vs \sigma-\sigma_{y}', 'linear fit' ,...
'Location', 'NorthEast');%,'FontSize',14 );
%% parameter calculations
p = [linfitKM.p1,linfitKM.p2];
saturation_stress = roots(p); % sigma_s
initial_strain_Hardening = p(2); %theta_0
recovery_param = initial_strain_Hardening/saturation_stress;
alpha = 0.3;
G = 27e3;% MPa
b = 284e-12;% meter
M = 3.01;%
k1 = 2*initial_strain_Hardening/(alpha*G*b*M^2);
k2 = 2*initial_strain_Hardening/saturation_stress;
txt1 = ['\sigma_{s} = ', num2str(saturation_stress,'%6.2e')];
txt2 = ['\theta_{o} = ', num2str(initial_strain_Hardening,'%6.2e')];
txt3 = ['k1 = ', num2str(k1,'%6.2e')];
txt4 = ['k2 = ', num2str(k2,'%6.2e')];
text(gca,160,7000,txt1,'FontSize',14);
text(gca,160,6000,txt2,'FontSize',14);
text(gca,10,1800,txt3,'FontSize',14);
text(gca,10,1200,txt4,'FontSize',14);
%% To save the figure in tiff
% print(h, '-dtiff', ['myfigure',name,'.tiff']);
% savefig('PATH\filename.fig')
%% Voce equation
% sigma = saturation_stress(1-exp(-initial_strain_Hardening*eps_p/saturation_stress));
%% forest evolution