Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
1.3 kB
1
Indexable
Never
close all
s01=12.0982;%area
s02=12.57267;
M = dlmread ('Brass_test.csv',';',3,0);
M2= dlmread ('test_1_alu.csv',';',3,0);

sigma=(M(1:end,4)/s01);
epsilon=(M(1:end,3));

sigma2=(M2(1:end,4)/s02);
epsilon2=(M2(1:end,3));

plot(epsilon, sigma, epsilon2, sigma2 ,'.-')
xlabel('Engineering strain %')
ylabel('Engineering stress [MPa]')
legend('Brass','Aluminium')
grid on

%brass
Rp02guess = 300; %[MPa]
sigma_el = sigma( sigma > 0.1*Rp02guess & sigma < 0.4*Rp02guess & epsilon<0.01);
epsilon_el = epsilon( sigma > 0.1*Rp02guess & sigma < 0.4*Rp02guess & epsilon<0.01);
P = polyfit( epsilon_el, sigma_el, 1);
E = P(1);
offset = 0.002;
sigma_line = E * ( epsilon - offset );
[~, imin] = min( abs( sigma - sigma_line ) );
Rp02 = sigma( imin );
Rm=max(sigma);

E_brass=E
Offsetyieldstrength_Brass=Rp02
Brottgrans_Brass=Rm

%Aluminum
Rp02guess = 300; %[MPa]
sigma_el_2 = sigma2( sigma2 > 0.1*Rp02guess & sigma2 < 0.4*Rp02guess & epsilon2<0.01);
epsilon_el = epsilon2( sigma2 > 0.1*Rp02guess & sigma2 < 0.4*Rp02guess & epsilon2<0.01);
P = polyfit( epsilon_el, sigma_el_2, 1);
E2 = P(1);
offset = 0.002;
sigma_line = E2 * ( epsilon2 - offset );
[~, imin] = min( abs( sigma2 - sigma_line ) );
Rp02_2 = sigma2( imin );

Rm2=max(sigma2)
E_alu=E2
Offsetyieldstrength_alu=Rp02_2
Brottgrans_alu=Rm2