Power Flow Curve - Matlab (Report)
Power Flow Curve - Matlab (Report)
Assignment (1)
Study of the flow curve
Submitted To
Prof. Abdalla Wifi
Eng. Mohamed H El-Moayed
Name B.N
Anton Tamer Shafique Abdel-Sayed 12
Ayman Hisham Mahmoud Ahmed 13
Sarah Hussam Marzok El-Ganzory 15
Mohamed Ahmed Morsi Ahmed 23
Mohamed Ashraf Mohamed Osman 24
Mahmoud Ahmed El-Sayed Kassab 28
Hager Ali Mahmoud Ali 35
April 5, 2021
MATLAB Code
%defining the stress & strain for our material
stress=[250 420 496 586 646 692 730 763 792 818];
strain=[0 0.1 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6];
%drawing the flow curve for our data (first requirement)
plot(strain, stress,'rx-' , 'LineWidth', 2, 'MarkerEdgeColor','k'), xlabel(' True Strain'), ylabel('True
Stress (MPa)'), title('Stress-Strain flow curve unfitted'), grid on
%calculating the mean flow stress using summation different methods (second requirement)
strainft=strain(1,2:10);
stressft=stress(1,2:10);
sec1=(strainft(1,2)-strainft(1,1))*(sum(stressft(1,[1 2])))/(2*(2-1)); %using trapezoidal rule
%using composite trapezoidal rule with equal segments
sec2=(strainft(1,9)-strainft(1,2))*(sum(stressft(1,[2 9]))+2*(sum(stressft(1,[3:8]))))/(2*(9-2));
%getting the total flow stress
in=sec1+sec2;
sgmn=in/(strainft(1,9)-strainft(1,1));
%getting tangent modulus at three points (third requirement)
%using central method in calculating tangent modulus for the first two points
j=[2 5];
Etn=zeros(1,3);
for i = 1:2,
Etn(1,i)=(stressft(1,(j(1,i)+1))-stressft(1,(j(1,i)-1)))/(strainft(1,(j(1,i)+1))-
strainft(1,(j(1,i)-1)));
i=i+1;
end
%using backward method in calculating tangent modulus for the last point
Etn(1,3) = (stressft(1,9)-stressft(1,8))/(strainft(1,9)-strainft(1,8));
%fitting the data to power law using the app curve fitting in MATLAB generating the code
(fourth requirement a)
[xData, yData] = prepareCurveData( strainft, stressft );
ft = fittype( 'power1' );
opts = fitoptions( 'Method', 'NonlinearLeastSquares' );
opts.Display = 'off';
opts.StartPoint = [730.283020247307 0.24021655237191];
[fitresult, gof] = fit( xData, yData, ft, opts );
figure( 'Name', 'untitled fit 1' );
h = plot( fitresult, xData, yData );
xlabel TrueStrain
ylabel TrueStress(MPa)
title ('Fitted Curve (Hollomon)')
grid on
%calculating the flow stress and tangent modulus using the power law fitted curve (fourth
requirement b)
k=fitresult.a; %getting the value of strain coefficient
n=fitresult.b; %getting the value of strain hardening exponent
%calculating the flow stress
sgmd=(k*(((strainft(1,9))^(n+1))-((strainft(1,1))^(n+1))))/((n+1)*(strainft(1,9)-strainft(1,1)));
%calculating the tangent modulus at the end of plastic flow
Etf=n*k*((strainft(1,9))^(n-1));
%displaying the final result
fprintf('mean flow stress numerical = %.2f MPa. \n', sgmn);
fprintf('tangent modulus numerical first point = %.2f MPa. \n', Etn(1,1));
fprintf('tangent modulus numerical second point = %.2f MPa. \n', Etn(1,2));
fprintf('tangent modulus numerical third point = %.2f MPa. \n', Etn(1,3));
fprintf('strain coefficient = %.2f MPa. \n', k);
fprintf('strain hardening exponent = %.2f . \n', n);
fprintf('mean flow stress using power law = %.2f MPa. \n', sgmd);
fprintf('tangent modulus for third point using power law = %.2f MPa. \n', Etf);
Result and Comparison (fifth requirement)
Discussion
1- All the stress strain points are sited on the fitted power law curve so this states that our
material behaves according to Hollomon’s equation.
2- both mean flow stress obtained from numerical and power law are very close (have error
= .18%).
3- both tangent modulus for third point obtained from numerical and power law are very
close (have error = 5.8%).
So the numerical methods used are accurate enough to be used for our martial as approximate
methods.