Uploaded by data312kanal

ME303 MiniProject Report DorukAlpEmür 2519031

advertisement
ME 303 MANUFACTURING ENGINEERING
FALL 2022-2023
HOMEWORK 1
REPORT
Name, Surname: Doruk Alp Emür
Student ID: 2519031
Section: 2
TABLE OF CONTENTS
1) INTRODUCTION
2) QUESTION 1
3) QUESTION 2
4) QUESTION 3
5) APPENDICES
2) INTRODUCTION
In this report, three homework questions are solved in a systematic order. The details of
solution approach, calculation steps, and results are explained thoroughly. When it is required,
some figures are provided to make the steps more understandable. For the question 3,
“Python” is selected as the main program for performing data analysis, data manipulation, and
graphical representation. In the Appendices part, the source codes of question 3 is provided.
3) QUESTION 1
In the question 1, stress state of a body is given. The stress state can be expressed in a 3x3
stress matrix.
๐œŽ๐œŽ๐‘ฅ๐‘ฅ๐‘ฅ๐‘ฅ
๏ฟฝ๐œ๐œ๐‘ฆ๐‘ฆ๐‘ฆ๐‘ฆ
๐œ๐œ๐‘ง๐‘ง๐‘ง๐‘ง
๐œ๐œ๐‘ฅ๐‘ฅ๐‘ฅ๐‘ฅ
๐œŽ๐œŽ๐‘ฆ๐‘ฆ๐‘ฆ๐‘ฆ
๐œ๐œ๐‘ง๐‘ง๐‘ง๐‘ง
๐œ๐œ๐‘ฅ๐‘ฅ๐‘ฅ๐‘ฅ
๐œ๐œ๐‘ฆ๐‘ฆ๐‘ฆ๐‘ฆ ๏ฟฝ =
๐œŽ๐œŽ๐‘ง๐‘ง๐‘ง๐‘ง
20 −8 −4
๏ฟฝ−8 10 5 ๏ฟฝ ๐‘€๐‘€๐‘€๐‘€๐‘€๐‘€
−4 5 −6
a) In part a, it is asked to find principal stresses of the stress state. By using the
knowledge of “Strength of Material”, principal stresses in a stress matrix can be
obtained by finding the eigenvalues. Moreover, the principal stress directions can be
obtained from the eigenvectors. The eigenvalues and eigenvectors of a matrix can be
found as follows:
Define ๐ด๐ด as the stress matrix, ๐œ๐œ as the eigenvectors, ๐œ†๐œ† as the eigenvalues.
๐ด๐ด โˆ™ ๐œ๐œ = ๐œ†๐œ† โˆ™ ๐œ๐œ
(๐ด๐ด − ๐œ†๐œ†๐œ†๐œ†) โˆ™ ๐œ๐œ = 0
(1)
If the inverse of the matrix (๐ด๐ด − ๐œ†๐œ†๐œ†๐œ†) exists, it implies that the system has only one
trivial solution which is ๐œ๐œ = 0. To find a meaningful solution, the matrix should have
infinitely many solutions, meaning that (๐ด๐ด − ๐œ†๐œ†๐œ†๐œ†) shouldn’t have an inversed matrix.
This condition can only be satisfied with ๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘(๐ด๐ด − ๐œ†๐œ†๐œ†๐œ†) = 0.
๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘(๐ด๐ด − ๐œ†๐œ†๐œ†๐œ†) = 0
20 − ๐œ†๐œ†
๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘ ๏ฟฝ๏ฟฝ −8
−4
−8
10 − ๐œ†๐œ†
5
−4
5 ๏ฟฝ๏ฟฝ = 0
−6 − ๐œ†๐œ†
(20 − ๐œ†๐œ†)๏ฟฝ(10 − ๐œ†๐œ†)(−6 − ๐œ†๐œ†) − 25๏ฟฝ + 8๏ฟฝ(48 + 8๐œ†๐œ†) + 20๏ฟฝ − 4(−40 + 40 − 4๐œ†๐œ†) = 0
Eigenvalues and corresponding principal stresses can be obtained from this equation:
๐œ†๐œ†1 = ๐œŽ๐œŽ1 = 25.556 ๐‘€๐‘€๐‘€๐‘€๐‘€๐‘€
๐œ†๐œ†2 = ๐œŽ๐œŽ2 = 5.992 ๐‘€๐‘€๐‘€๐‘€๐‘€๐‘€
๐œ†๐œ†3 = ๐œŽ๐œŽ3 = −7.548 ๐‘€๐‘€๐‘€๐‘€๐‘€๐‘€
To calculate eigenvectors, ๐œ†๐œ† values that are found should be substituted into the
equation (1).
For ๐œ†๐œ†1 = 25.556
๐œ๐œ1 can be found as:
For ๐œ†๐œ†2 = 5.992
๐œ๐œ2 can be found as:
For ๐œ†๐œ†3 = −7.548
๐œ๐œ3 can be found as:
20 − ๐œ†๐œ†
๏ฟฝ −8
−4
−8
10 − ๐œ†๐œ†
5
−4
5 ๏ฟฝ โˆ™ ๐œ๐œ = 0
−6 − ๐œ†๐œ†
−5.556
−8
−4
๏ฟฝ −8
๏ฟฝ โˆ™ ๐œ๐œ = 0
−15.556
5
−4
5
−31.556
14.008
๏ฟฝ −8
−4
27.548
๏ฟฝ −8
−4
0.848
๐œ๐œ1 = ๏ฟฝ−0.496๏ฟฝ
−0.186
−8
4.008
5
−4
๏ฟฝ โˆ™ ๐œ๐œ = 0
5
−11.992
−0.525
๐œ๐œ2 = ๏ฟฝ−0.833๏ฟฝ
−0.172
−8
−4
17.548
5 ๏ฟฝ โˆ™ ๐œ๐œ = 0
5
1.548
0.070
๐œ๐œ3 = ๏ฟฝ−0.244๏ฟฝ
0.967
The results obtained are tabulated in Table 1.
Table 1. Results of Eigenvalue Eigenvector Calculations
Principal Stresses
Magnitude
Direction Vector
0.848
๏ฟฝ−0.496๏ฟฝ
๐ˆ๐ˆ๐Ÿ๐Ÿ
25.556 ๐‘€๐‘€๐‘€๐‘€๐‘€๐‘€
−0.186
−0.525
๏ฟฝ−0.833๏ฟฝ
๐ˆ๐ˆ๐Ÿ๐Ÿ
5.992 ๐‘€๐‘€๐‘€๐‘€๐‘€๐‘€
−0.172
0.070
๏ฟฝ−0.244๏ฟฝ
๐ˆ๐ˆ๐Ÿ‘๐Ÿ‘
−7.548 ๐‘€๐‘€๐‘€๐‘€๐‘€๐‘€
0.967
b) In part b, it is asked to find orientation angles of the principal stresses with respect to
the fundamental axes.
The direction vectors of the principal stresses are known from the part a. We need to
perform a dot product operation to calculate orientation angles. Define that
fundamental axes are ๐‘–๐‘–, ๐‘—๐‘—, and ๐‘˜๐‘˜ axes, direction vectors of principles axes are ๐‘›๐‘›๏ฟฝ, and
angle between principal axes and fundamental axes are ๐œƒ๐œƒ ๏ฟฝ๐œƒ๐œƒ๐‘ฅ๐‘ฅ , ๐œƒ๐œƒ๐‘ฆ๐‘ฆ , ๐œƒ๐œƒ๐‘ง๐‘ง ๏ฟฝ.
For ๐œŽ๐œŽ1 :
For ๐œŽ๐œŽ2 :
For ๐œŽ๐œŽ3 :
๐‘›๐‘›๏ฟฝ
๐‘›๐‘›๏ฟฝ
๐‘›๐‘›๏ฟฝ
โˆ™ ๐šค๐šคฬ‚ = cos (๐œƒ๐œƒ๐‘ฅ๐‘ฅ )
โˆ™ ๐šฅ๐šฅฬ‚ = cos (๐œƒ๐œƒ๐‘ฆ๐‘ฆ )
โˆ™ ๐‘˜๐‘˜๏ฟฝ = cos (๐œƒ๐œƒ๐‘ง๐‘ง )
๐œƒ๐œƒ๐‘ฅ๐‘ฅ = arccos(๐‘›๐‘›๏ฟฝ1 โˆ™ ๐šค๐šคฬ‚) = 31.989°
๐œƒ๐œƒ๐‘ฆ๐‘ฆ = arccos(๐‘›๐‘›๏ฟฝ1 โˆ™ ๐šฅ๐šฅฬ‚) = 119.735°
๐œƒ๐œƒ๐‘ง๐‘ง = arccos๏ฟฝ๐‘›๐‘›๏ฟฝ1 โˆ™ ๐‘˜๐‘˜๏ฟฝ๏ฟฝ = 100.725°
๐œƒ๐œƒ๐‘ฅ๐‘ฅ = arccos(๐‘›๐‘›๏ฟฝ2 โˆ™ ๐šค๐šคฬ‚) = 121.679°
๐œƒ๐œƒ๐‘ฆ๐‘ฆ = arccos(๐‘›๐‘›๏ฟฝ2 โˆ™ ๐šฅ๐šฅฬ‚) = 146.337°
๐œƒ๐œƒ๐‘ง๐‘ง = arccos๏ฟฝ๐‘›๐‘›๏ฟฝ2 โˆ™ ๐‘˜๐‘˜๏ฟฝ๏ฟฝ = 99.921°
๐œƒ๐œƒ๐‘ฅ๐‘ฅ = arccos(๐‘›๐‘›๏ฟฝ3 โˆ™ ๐šค๐šคฬ‚) = 86.007°
๐œƒ๐œƒ๐‘ฆ๐‘ฆ = arccos(๐‘›๐‘›๏ฟฝ3 โˆ™ ๐šฅ๐šฅฬ‚) = 104.115°
๐œƒ๐œƒ๐‘ง๐‘ง = arccos๏ฟฝ๐‘›๐‘›๏ฟฝ3 โˆ™ ๐‘˜๐‘˜๏ฟฝ๏ฟฝ = 14.691°
Since sum of squares of direction cosines should be equal to 1, only two of the
orientation angles can be expressed as an answer. The answer is tabulated in Table 2.
Table 2. Results of Orientation Angle Calculations
Principal Stresses
๐œฝ๐œฝ๐’š๐’š
๐œฝ๐œฝ๐’™๐’™
๐ˆ๐ˆ๐Ÿ๐Ÿ
31.989°
119.735°
๐ˆ๐ˆ๐Ÿ๐Ÿ
121.679°
146.337°
๐ˆ๐ˆ๐Ÿ‘๐Ÿ‘
86.007°
104.115°
c) In this part, it is asked to draw accompanying Mohr’s circle diagram for the given
stress state. Mohr’s circle diagram is mainly applicable and functional when a plane
stress or 2D stress state is analysed. According to textbook “Mechanics of Materials”
(written by Ferdinant P. Beer, E. Russell Jonston, John T. DeWolf, David F. Mazurek,
Sanjeev Sanghi), 3D state of stresses cannot be represented properly on the Mohr’s
diagram. There are some other advanced techniques to turn this 2D diagram into a 3D
diagram (or to represent the surface stress states by points in admissible region of the
Mohr’s circle diagram); however, they are overall not efficient and practical
techniques to use in complex calculations.
Although it is nearly impossible to represent a 3D state of stress in Mohr’s circle
diagram, the principal stresses can still be represented properly, and the maximum
shear stress can be obtained.
The accompanying Mohr’s circle diagram can be drawn as follows:
Figure 1. Mohr’s Circle Diagram of Principal Stresses
4) QUESTION 2
The question is asked to find the money which needs to be deposited to the bank to cover
future expenses. The future expenses can be found from the information given in the question:
Cost of new machine after 25 years: ๐ถ๐ถ๐‘š๐‘š๐‘š๐‘š๐‘š๐‘šโ„Ž๐‘–๐‘–๐‘–๐‘–๐‘–๐‘– = 30000 ๐‘ˆ๐‘ˆ๐‘ˆ๐‘ˆ๐‘ˆ๐‘ˆ
Future scrap value of the old machine: ๐ต๐ต๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘  = 7500 ๐‘ˆ๐‘ˆ๐‘ˆ๐‘ˆ๐‘ˆ๐‘ˆ
Future total cost: ๐ถ๐ถ๐‘ก๐‘ก๐‘ก๐‘ก๐‘ก๐‘ก๐‘ก๐‘ก๐‘ก๐‘ก = ๐ถ๐ถ๐‘š๐‘š๐‘š๐‘š๐‘š๐‘šโ„Ž๐‘–๐‘–๐‘–๐‘–๐‘–๐‘– − ๐ต๐ต๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘  = 22500 ๐‘ˆ๐‘ˆ๐‘ˆ๐‘ˆ๐‘ˆ๐‘ˆ
According to the question, an amount of money is deposited to the bank each month to cover
future expenses. Monthly interest rate (๐‘–๐‘–๐‘š๐‘š ) is 1%. Money is continuously deposited until the
new machine is bought. First month, no money is deposited to the bank since the business
with the machine (which will be older after 25 years) is just started and no money is earned.
Last day of last month, the money corresponding to the next month is directly used (without
interest rate); because assume that the new machine is bought in one day and no more money
needs to be deposited. According to this information, this figure can be drawn:
Figure 2. Money Deposited Throughout the Months
In this figure, A represents the money deposited to the bank.
The money earned after N months from the money (A) is deposited can be found with the
following formula:
๐ด๐ด โˆ™ (1 + ๐‘–๐‘–๐‘š๐‘š )๐‘๐‘
According to the figure 2, the money deposited in the second month is stayed 299 months in
the bank. The money deposited in the third month is stayed 298 months in the bank. The
money deposited in the fourth month is stayed 297 months in the bank. After the same order is
extended for 300 months, the following results are obtained:
๐‘‡๐‘‡โ„Ž๐‘’๐‘’ ๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’ ๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“ ๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“ ๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘ ๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š:
๐ด๐ด โˆ™ (1 + 0.01)299
๐‘‡๐‘‡โ„Ž๐‘’๐‘’ ๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’ ๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“ ๐‘ก๐‘กโ„Ž๐‘–๐‘–๐‘–๐‘–๐‘–๐‘– ๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘ ๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š:
๐ด๐ด โˆ™ (1 + 0.01)297
๐‘‡๐‘‡โ„Ž๐‘’๐‘’ ๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’ ๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘  ๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘ ๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š: ๐ด๐ด โˆ™ (1 + 0.01)298
๐‘‡๐‘‡โ„Ž๐‘’๐‘’ ๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’ ๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“ ๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“โ„Ž ๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘ ๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š: ๐ด๐ด โˆ™ (1 + 0.01)296
โ‹ฏโ‹ฏโ‹ฏ
๐‘‡๐‘‡โ„Ž๐‘’๐‘’ ๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’ ๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“ 299๐‘ก๐‘กโ„Ž ๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘ ๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š: ๐ด๐ด โˆ™ (1 + 0.01)1
๐‘‡๐‘‡โ„Ž๐‘’๐‘’ ๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’ ๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“ 300๐‘ก๐‘กโ„Ž ๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘ ๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š: ๐ด๐ด โˆ™ (1 + 0.01)0
When the earnings are summed up,
The total money earned:
299
๏ฟฝ ๐ด๐ด โˆ™ (1 + 0.01)๐‘›๐‘›
๐‘›๐‘›=0
The total money earned should be equal to the future expenses (๐ถ๐ถ๐‘ก๐‘ก๐‘ก๐‘ก๐‘ก๐‘ก๐‘ก๐‘ก๐‘ก๐‘ก ).
299
๐ด๐ด โˆ™ ๏ฟฝ(1 + 0.01)๐‘›๐‘› = ๐ด๐ด โˆ™
๐‘›๐‘›=0
1 − (1.01)299+1
= 22500 ๐‘ˆ๐‘ˆ๐‘ˆ๐‘ˆ๐‘ˆ๐‘ˆ
1 − 1.01
๐ด๐ด = 11.975 ๐‘ˆ๐‘ˆ๐‘ˆ๐‘ˆ๐‘ˆ๐‘ˆ
The money required to be deposited for future expenses is equal to 11.975 ๐‘ˆ๐‘ˆ๐‘ˆ๐‘ˆ๐‘ˆ๐‘ˆ per month.
5) QUESTION 3
In the question 3, it is asked to find material properties of several materials whose tensile test
data is provided as Excel files. The special names of the six materials are AA1050 Soft
Aluminium, AA5182 Hard Aluminium, DC 04 Steel, CRM661 Nimonic 75, BS
EN10025:S355, ZStE180.
In this part, all solution steps required to find the material properties of AA1050 Soft
Aluminium is explained with figures. The same calculations that are done for AA1050 are
performed for the remaining 5 materials and the results of calculations are provided with
figures and explanations in logical sequence. Finally, all results are tabulated in a table.
To analyse and manipulate the long and complex data obtained from the Excel spreadsheet,
Python programming language is used. The source codes of all calculations (for AA1050 Soft
Aluminium) performed in this solution part are provided in appendix part.
AA1050 Soft Aluminium
To calculate material properties, these steps are implemented:
First, the extensometer data in the Excell file should be corrected. Since the tensile test data is
obtained from a real experiment, the initial data for extensometer is not accurate. Their values
are below zero up to a point because of the extensometer sensor calibration issues. This
inaccurate data should be eliminated before continuing the calculations.
Then, the Excell data are imported to Python programme by using a library called “Pandas”.
In the Excell data, the initial cross-section area (๐ด๐ด0 ) and gauge length (๐‘™๐‘™0 ) are provided as
14.48 ๐‘š๐‘š๐‘š๐‘š2 and 80 ๐‘š๐‘š๐‘š๐‘š. The raw force and extensometer data are turned into float arrays to
perform further data manipulation by using the “NumPy” module of Python. Since it is
needed to obtain both engineering and true stresses and strains, the following calculations are
done for all array of raw data and the results are assigned to a newly defined array.
๐œ€๐œ€๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’ =
๐œŽ๐œŽ๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’ [๐‘€๐‘€๐‘€๐‘€๐‘€๐‘€] =
[๐‘Ÿ๐‘Ÿ๐‘Ÿ๐‘Ÿ๐‘Ÿ๐‘Ÿ ๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“ ๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘][๐‘๐‘] [๐‘Ÿ๐‘Ÿ๐‘Ÿ๐‘Ÿ๐‘Ÿ๐‘Ÿ ๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“ ๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘][๐‘๐‘]
=
๐ด๐ด0
14.48 ๐‘š๐‘š๐‘š๐‘š2
[๐‘Ÿ๐‘Ÿ๐‘Ÿ๐‘Ÿ๐‘Ÿ๐‘Ÿ ๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’ ๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘ (โˆ†l)][๐‘š๐‘š๐‘š๐‘š] [๐‘Ÿ๐‘Ÿ๐‘Ÿ๐‘Ÿ๐‘Ÿ๐‘Ÿ ๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’ ๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘๐‘‘ (โˆ†l)][๐‘š๐‘š๐‘š๐‘š]
=
๐‘™๐‘™0
80 ๐‘š๐‘š๐‘š๐‘š
Assuming that the volume of the material is constant throughout the tensile test, the
corresponding true stress and true strain values can be calculated from engineering definitions
such that:
๐œ€๐œ€๐‘ก๐‘ก๐‘ก๐‘ก๐‘ก๐‘ก๐‘ก๐‘ก = ๐‘™๐‘™๐‘™๐‘™(๐œ€๐œ€๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’ + 1)
๐œŽ๐œŽ๐‘ก๐‘ก๐‘ก๐‘ก๐‘ก๐‘ก๐‘ก๐‘ก [๐‘€๐‘€๐‘€๐‘€๐‘€๐‘€] = ๐œŽ๐œŽ๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’ โˆ™ (๐œ€๐œ€๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’ + 1)
After all data is processed, the data graphs for Engineering Stress – Engineering Strain and
True Stress - True Strain plotter graphs can be drawn. For graphical representation,
“matplotlib” library of Python is used.
Figure 3. Engineering Stress – Engineering Strain Data Points for Material 1
Figure 4. True Stress – True Strain Data Points for Material 1
As expected, the engineering stress – strain graph has a maximum point for UTS (Ultimate
Tensile Strength) and true stress – strain graph is increasing until near the fracture region.
a) In this part, it is asked to find the Young’s modulus of the material. To find Young's
modulus, the slope of the elastic behaviour line should be obtained. By carefully
examining the figure 3, a random point on the elastic line is defined and all data points
corresponding to ๐œ€๐œ€๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’ < 0.0002 are separated via coding (0.002 is a random point
where the elastic behaviour still can be observed.). Then, a line is fit the data points
between ๐œ€๐œ€๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’ = 0 and ๐œ€๐œ€๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’ = 0.0002 by using least squares method. By calculating
the pseudo inverse matrix of the data, the slope of the line is obtained as 64853.36
MPa. Since the slope is equal to Young’s Modulus, Young’s Modulus value is equal to
64.853 GPa for this material.
b) In this part, it is asked to find the Yield Strength of the material. Since the material has
a smooth yield point (which can be observed from Figure 3.), the material doesn’t
have upper and lower limits of YS. To find YS of the material, a line should be drawn
on the engineering stress – strain graph with a slope of Young’s Modulus. The line
should pass through 0.2% strain point on the strain axis. Since the Elastic (Young’s)
Modulus is found in part (a), such a line can be created as shown:
๐‘‡๐‘‡โ„Ž๐‘’๐‘’ ๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“๐‘“ ๐‘œ๐‘œ๐‘œ๐‘œ ๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’ ๐‘œ๐‘œ๐‘œ๐‘œ ๐‘™๐‘™๐‘™๐‘™๐‘™๐‘™๐‘™๐‘™:
๐‘‡๐‘‡โ„Ž๐‘–๐‘–๐‘–๐‘– ๐‘๐‘๐‘๐‘๐‘๐‘๐‘๐‘๐‘๐‘๐‘๐‘๐‘๐‘๐‘๐‘๐‘๐‘ ๐‘ ๐‘ โ„Ž๐‘œ๐‘œ๐‘œ๐‘œ๐‘œ๐‘œ๐‘œ๐‘œ ๐‘๐‘๐‘๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ ๐‘ :
๐œŽ๐œŽ = ๐ธ๐ธ โˆ™ ๐œ€๐œ€ + ๐‘๐‘
0 = ๐ธ๐ธ[๐‘€๐‘€๐‘€๐‘€๐‘€๐‘€] โˆ™ 0.002 + ๐‘๐‘
๐‘๐‘ = −๐ธ๐ธ[๐‘€๐‘€๐‘€๐‘€๐‘€๐‘€] โˆ™ 0.002
๐‘‡๐‘‡โ„Ž๐‘’๐‘’ ๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’ ๐‘œ๐‘œ๐‘œ๐‘œ ๐‘™๐‘™๐‘™๐‘™๐‘™๐‘™๐‘™๐‘™:
๐œŽ๐œŽ(๐œ€๐œ€) = ๐ธ๐ธ โˆ™ ๐œ€๐œ€ − ๐ธ๐ธ โˆ™ 0.002
Then, the Yield Strength of the material can be found by intersecting the line with data
points curve. Intersection point should give the YS value. These calculations are
performed in Python and following results are obtained:
Figure 5. 0.2% Offset Line and Intersection Point for Material 1
As can be seen from the Figure 5, intersection point is obtained as 30.26 MPa which
corresponds to the Yield Strength of this material.
c) In this part, it is asked to find the Ultimate Tensile Strength of the material. The
location of the UTS can be approximately observed from the Figure 3. To find exact
value, a data filtering can be performed by Python. The max data point from the stress
data set is selected by a Python code. Result is obtained as follows:
Figure 6. UTS Point of the Graph for Material 1
After the data analysis is performed, the UTS value is found as 83.56 MPa and the
corresponding engineering stress is found as 0.29.
d) In this part, it is asked to find the best fit values of K and n for the Power Law which
is known as:
๐œŽ๐œŽ๐‘“๐‘“ = ๐พ๐พ๐œ€๐œ€๐‘๐‘๐‘๐‘ ๐‘›๐‘›
The best parameters for ๐พ๐พ and ๐‘›๐‘› can be found by using the Pseudo Inverse Method
(PIM). To perform this technique, the equation is needed to be linearized as shown:
๐‘™๐‘™๐‘™๐‘™๏ฟฝ๐œŽ๐œŽ๐‘“๐‘“ ๏ฟฝ = ๐‘™๐‘™๐‘™๐‘™๏ฟฝ๐พ๐พ๐œ€๐œ€๐‘๐‘๐‘๐‘ ๐‘›๐‘› ๏ฟฝ
๐‘™๐‘™๐‘™๐‘™๏ฟฝ๐œŽ๐œŽ๐‘“๐‘“ ๏ฟฝ = ๐‘™๐‘™๐‘™๐‘™(๐พ๐พ) + ๐‘›๐‘› โˆ™ ๐‘™๐‘™๐‘™๐‘™(๐œ€๐œ€๐‘๐‘๐‘๐‘ )
The parameters x, y, a, and b can be defined as:
๐‘ฆ๐‘ฆ = ๐‘™๐‘™๐‘™๐‘™๏ฟฝ๐œŽ๐œŽ๐‘“๐‘“ ๏ฟฝ
๐‘ฅ๐‘ฅ = ๐‘™๐‘™๐‘™๐‘™๏ฟฝ๐œ€๐œ€๐‘๐‘๐‘๐‘ ๏ฟฝ
๐‘Ž๐‘Ž = ๐‘›๐‘›
๐‘๐‘ = ๐‘™๐‘™๐‘™๐‘™(๐พ๐พ)
Then, the equation becomes:
๐‘ฆ๐‘ฆ = ๐‘Ž๐‘Ž โˆ™ ๐‘ฅ๐‘ฅ + ๐‘๐‘
The power law is mostly valid for the plastic strains (๐œ€๐œ€๐‘๐‘๐‘๐‘ ) in the true stress – true strain
graph. Consequently, the stresses related to elastic strains are eliminated by removing
the data up to ~0.002 strain.
๐œ€๐œ€ = ๐œ€๐œ€๐‘’๐‘’๐‘’๐‘’ + ๐œ€๐œ€๐‘๐‘๐‘๐‘
Moreover, the stresses and strains bigger than UTS point is also removed from
calculations because the behaviour of the graph is generally not stable after the UTS
point.
The remaining data is turned into matrix form as follows:
๐‘ฅ๐‘ฅ1
๐‘ฅ๐‘ฅ
๏ฟฝ 2
โ‹ฎ
๐‘ฅ๐‘ฅ๐‘›๐‘›
๐‘ค๐‘คโ„Ž๐‘’๐‘’๐‘’๐‘’๐‘’๐‘’ ๐‘ฆ๐‘ฆ = ๐‘™๐‘™๐‘™๐‘™๏ฟฝ๐œŽ๐œŽ๐‘“๐‘“ ๏ฟฝ
1
๐‘๐‘1
1 ๐‘Ž๐‘Ž
๐‘๐‘2
๏ฟฝ๏ฟฝ ๏ฟฝ = ๏ฟฝ ๏ฟฝ
1 ๐‘๐‘
โ‹ฎ
1
๐‘๐‘๐‘›๐‘›
๐ด๐ด๐ด๐ด = ๐ต๐ต
๐‘ฅ๐‘ฅ = ๐‘™๐‘™๐‘™๐‘™๏ฟฝ๐œ€๐œ€๐‘๐‘๐‘๐‘ ๏ฟฝ
๐‘Ž๐‘Ž = ๐‘›๐‘›
๐‘๐‘ = ๐‘™๐‘™๐‘™๐‘™(๐พ๐พ)
For such a matrix system, there is no exact solution. However, the closest solution can
be obtained with Pseudo Inverse Method as shown:
๐‘ฅ๐‘ฅ = (๐ด๐ด๐‘‡๐‘‡ ๐ด๐ด)−1 ๐ด๐ด๐‘‡๐‘‡ ๐ต๐ต
The solution steps are implemented in the Python and the best fitted curve is drawn.
The results are obtained as follows:
Figure 7. Power Law Best Fit Curve for Material 1
For this material K value is obtained as 146.73 MPa and n value is obtained as 0.23.
e) In this part, it is asked to find the best fit values of ๐พ๐พ and ๐œŽ๐œŽ๐‘“๐‘“0 for a linear line which
can be represented as:
๐œŽ๐œŽ๐‘“๐‘“ = ๐œŽ๐œŽ๐‘“๐‘“0 + ๐พ๐พ๐œ€๐œ€๐‘๐‘๐‘๐‘
The same Pseudo Inverse Method (PIM) can be implemented to find the best fitted
values. The matrix can be created as:
๐œ€๐œ€๐‘๐‘๐‘๐‘
โŽก 1
โŽข๐œ€๐œ€๐‘๐‘๐‘๐‘ 2
โŽข โ‹ฎ
โŽข
โŽฃ๐œ€๐œ€๐‘๐‘๐‘๐‘ ๐‘›๐‘›
1
๐œŽ๐œŽ๐‘“๐‘“
โŽค
โŽก ๐œŽ๐œŽ 1 โŽค
1โŽฅ ๐พ๐พ
๐‘“๐‘“
๏ฟฝ๐œŽ๐œŽ ๏ฟฝ = โŽข โ‹ฎ 2 โŽฅ
โŽฅ
1 ๐‘“๐‘“0
โŽข โŽฅ
โŽฅ
1โŽฆ
โŽฃ๐œŽ๐œŽ๐‘“๐‘“ ๐‘›๐‘› โŽฆ
The results can be obtained with the same technique that is used in part (d) as follows:
Figure 8. Linear Best Fit Curve for Material 1
For this material and this equation model, ๐พ๐พ value is obtained as 246.78 MPa and ๐œŽ๐œŽ๐‘“๐‘“0
value is obtained as 55.17 MPa.
f) In this part, it is asked to find the best fit values of ๐พ๐พ, ๐‘›๐‘›, and ๐œŽ๐œŽ๐‘“๐‘“0 for a flow curve
which can be represented as:
๐œŽ๐œŽ๐‘“๐‘“ = ๐พ๐พ๐œ€๐œ€๐‘๐‘๐‘๐‘ ๐‘›๐‘› + ๐œŽ๐œŽ๐‘“๐‘“0
In this model, we have 3 unknowns, which implies that we cannot use simple
linearization for a Least Squares Solution. A non-linear least square solution would be
better to find the best fitted values for ๐พ๐พ, ๐‘›๐‘›, and ๐œŽ๐œŽ๐‘“๐‘“0 . Nonlinear curve-fitting can be
performed successfully with the “scipy.optimize” module of Python. The best fitted
model is defined as a function and the data is assigned in Python. The coding details
can be found in the Appendices part. The results obtained by program by solving the
non-linear curve fitting program are shown:
Figure 9. Improved Power Law Best Fit Curve for Material 1
For this material K value is obtained as 136.94 MPa, n value is obtained as 0.30, and
๐œŽ๐œŽ๐‘“๐‘“0 is obtained as 17.06 MPa. ๐œŽ๐œŽ๐‘“๐‘“0 value is slightly smaller than the expected value
which close to the YS. Overall, the results seem reasonable and consistent with the
previous models.
The analysis for AA1050 Soft Aluminium is completed. The same calculations are made for
remaining 5 materials. The results are obtained as follows:
AA5182 Hard Aluminium
Figure 10. Engineering Stress – Engineering Strain Data Points for Material 2
Figure 11. True Stress – True Strain Data Points for Material 2
Figure 12. Upper and Lower Yield Stresses for Material 2
For the material, Upper and Lower Yielding points are shown in Figure 12. The 0.2%
offset line method is not applicable for this kind of materials. The local maximum and
local minimum data points are calculated with Python coding. The Upper Yield Point
is obtained as 404.11 MPa and the Lower Yield Point is obtained as 396.66 MPa. The
Young’s Modulus is obtained as 68.81 GPa.
Figure 13. UTS Point for Material 2
For this material, the UTS point is obtained as 434.31 MPa.
Figure 14. Power Law Best Fit Curve for Material 2
For this material K value is obtained as 436.28 MPa and n value is obtained as 0.01.
Figure 15. Linear Best Fit Curve for Material 2
For this material and this equation model, ๐พ๐พ value is obtained as 1125.03 MPa and ๐œŽ๐œŽ๐‘“๐‘“0
value is obtained as 400.22 MPa.
Figure 16. Improved Power Law Best Fit Curve for Material 2
For this material K value is obtained as 170.27 MPa, n value is obtained as 0.48, and ๐œŽ๐œŽ๐‘“๐‘“0 is
obtained as 397.20 MPa.
DC 04 Steel
Figure 17. Engineering Stress – Engineering Strain Data Points for Material 3
Figure 18. True Stress – True Strain Data Points for Material 3
Figure 19. 0.2% Offset Line and Intersection Point for Material 3
For this material, Young’s Modulus is obtained as 208.84 GPa and Yield Strength is obtained
as 162.83 MPa.
Figure 20. UTS Point of the Graph for Material 3
For this material, the UTS point is obtained as 301.46 MPa.
Figure 21. Power Law Best Fit Curve for Material 3
For this material K value is obtained as 496.38 MPa and n value is obtained as 0.19.
Figure 22. Linear Best Fit Curve for Material 3
For this material and this equation model, ๐พ๐พ value is obtained as 637.78 MPa and ๐œŽ๐œŽ๐‘“๐‘“0 value is
obtained as 232.24 MPa.
Figure 23. Improved Power Law Best Fit Curve for Material 3
For this material K value is obtained as 458.09 MPa, n value is obtained as 0.44, and ๐œŽ๐œŽ๐‘“๐‘“0 is
obtained as 145.71 MPa.
CRM661 Nimonic 75
Figure 24. Engineering Stress – Engineering Strain Data Points for Material 4
Figure 25. True Stress – True Strain Data Points for Material 4
Figure 26. 0.2% Offset Line and Intersection Point for Material 4
For this material, Young’s Modulus is obtained as 124.82 GPa and Yield Strength is obtained
as 312.34 MPa.
Figure 27. UTS Point of the Graph for Material 4
For this material, the UTS point is obtained as 761.14 MPa.
Figure 28. Power Law Best Fit Curve for Material 4
For this material K value is obtained as 1554.85 MPa and n value is obtained as 0.34.
Figure 29. Linear Best Fit Curve for Material 4
For this material and this equation model, ๐พ๐พ value is obtained as 2095.62 MPa and ๐œŽ๐œŽ๐‘“๐‘“0 value
is obtained as 446.41 MPa.
Figure 30. Improved Power Law Best Fit Curve for Material 4
For this material K value is obtained as 1758.51 MPa, n value is obtained as 0.65, and ๐œŽ๐œŽ๐‘“๐‘“0 is
obtained as 290.76 MPa.
BS EN10025:S355
Figure 31. Engineering Stress – Engineering Strain Data Points for Material 5
Figure 32. True Stress – True Strain Data Points for Material 5
Figure 33. Upper and Lower Yield Stresses for Material 5
The Upper Yield Point is obtained as 479.36 MPa and the Lower Yield Point is obtained as
432.12 MPa. The Young’s Modulus is obtained as 229.64 GPa.
Figure 34. UTS Point of the Graph for Material 5
For this material, the UTS point is obtained as 567.19 MPa.
Figure 35. Power Law Best Fit Curve for Material 5
For this material K value is obtained as 758.93 MPa and n value is obtained as 0.08.
Figure 36. Linear Best Fit Curve for Material 5
For this material and this equation model, ๐พ๐พ value is obtained as 448.83 MPa and ๐œŽ๐œŽ๐‘“๐‘“0 value is
obtained as 568.01 MPa.
Figure 37. Improved Power Law Best Fit Curve for Material 5
For this material K value is obtained as 528.15 MPa, n value is obtained as 0.46, and ๐œŽ๐œŽ๐‘“๐‘“0 is
obtained as 462.12 MPa.
ZStE180
Figure 38. Engineering Stress – Engineering Strain Data Points for Material 6
Figure 39. True Stress – True Strain Data Points for Material 6
Figure 40. Upper and Lower Yield Stresses for Material 6
The Upper Yield Point is obtained as 270.06 MPa and the Lower Yield Point is obtained as
231.94 MPa. The Young’s Modulus is obtained as 205.41 GPa.
Figure 41. UTS Point of the Graph for Material 6
For this material, the UTS point is obtained as 318.86 MPa.
Figure 42. Power Law Best Fit Curve for Material 6
For this material K value is obtained as 462.13 MPa and n value is obtained as 0.11.
Figure 43. Linear Best Fit Curve for Material 6
For this material and this equation model, ๐พ๐พ value is obtained as 634 MPa and ๐œŽ๐œŽ๐‘“๐‘“0 value is
obtained as 271.38 MPa.
Figure 44. Improved Power Law Best Fit Curve for Material 6
For this material K value is obtained as 375.19 MPa, n value is obtained as 0.46, and ๐œŽ๐œŽ๐‘“๐‘“0 is
obtained as 224.09 MPa.
All results obtained can be tabulated in a single table as shown:
MATERIALS
YOUNG’S
MODULUS
YIELD
STRENGTH(S)
ULTIMATE
TENSILE
STRESS
AA1050 SOFT
ALUMINIUM
64.85 GPa
30.26 MPa
83.56 MPa
68.80 GPa
UYP = 404.11
MPa
LYP=
396.66 MPa
AA5182 HARD
ALUMINIUM
434.31 MPa
DC 04 STEEL
208.84 GPa
162.83 MPa
301.46 MPa
CRM661
NIMONIC 75
124.82 GPa
312.34 MPa
761.14 MPa
BS
EN10025:S355
ZSTE180
229.64 GPa
205.41 GPa
UYP = 479.36
MPa
LYP=
432.12 MPa
UYP = 270.06
MPa
LYP=
231.94 MPa
567.19 MPa
318.86 MPa
๐ˆ๐ˆ๐’‡๐’‡ = ๐‘ฒ๐‘ฒ๐œบ๐œบ๐’‘๐’‘๐’‘๐’‘ ๐’๐’
๐ˆ๐ˆ๐’‡๐’‡ = ๐ˆ๐ˆ๐’‡๐’‡๐’‡๐’‡ + ๐‘ฒ๐‘ฒ๐œบ๐œบ๐’‘๐’‘๐’‘๐’‘
๐ˆ๐ˆ๐’‡๐’‡ = ๐‘ฒ๐‘ฒ๐œบ๐œบ๐’‘๐’‘๐’‘๐’‘ ๐’๐’ + ๐ˆ๐ˆ๐’‡๐’‡๐’‡๐’‡
๐พ๐พ= 436.28
MPa
๐‘›๐‘›= 0.01
๐พ๐พ= 1125.03 MPa
๐œŽ๐œŽ๐‘“๐‘“0 = 400.22 MPa
๐พ๐พ= 170.27 MPa
๐‘›๐‘›= 0.48
๐œŽ๐œŽ๐‘“๐‘“0 = 397.20 MPa
๐พ๐พ= 146.73
MPa
๐‘›๐‘›= 0.23
๐พ๐พ= 496.38
MPa
๐‘›๐‘›= 0.19
๐พ๐พ= 1554.85
MPa
๐‘›๐‘›= 0.34
๐พ๐พ= 758.93
MPa
๐‘›๐‘›= 0.08
๐พ๐พ= 462.13
MPa
๐‘›๐‘›= 0.11
๐พ๐พ= 246.78 MPa
๐œŽ๐œŽ๐‘“๐‘“0 = 55.17 MPa
๐พ๐พ= 637.78 MPa
๐œŽ๐œŽ๐‘“๐‘“0 = 232.24 MPa
๐พ๐พ= 2095.62 MPa
๐œŽ๐œŽ๐‘“๐‘“0 = 446.41 MPa
๐พ๐พ= 448.83 MPa
๐œŽ๐œŽ๐‘“๐‘“0 = 568.01 MPa
๐พ๐พ= 634 MPa
๐œŽ๐œŽ๐‘“๐‘“0 = 271.38 MPa
๐พ๐พ= 136.94 MPa
๐‘›๐‘›= 0.30
๐œŽ๐œŽ๐‘“๐‘“0 = 17.06 MPa
๐พ๐พ= 458.09 MPa
๐‘›๐‘›= 0.44
๐œŽ๐œŽ๐‘“๐‘“0 =145.71 MPa
๐พ๐พ=1758.51 MPa
๐‘›๐‘›= 0.65
๐œŽ๐œŽ๐‘“๐‘“0 =290.76 MPa
๐พ๐พ=528.15 MPa
๐‘›๐‘›= 0.46
๐œŽ๐œŽ๐‘“๐‘“0 = 462.12 MPa
๐พ๐พ=375.19 MPa
๐‘›๐‘›= 0.46
๐œŽ๐œŽ๐‘“๐‘“0 =224.09 MPa
6) APPENDICES
In this part, the Python source code related to the AA1050 Soft Aluminium calculations and
graphs is provided.
import pandas as pd
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
import numpy as np
import math
import warnings
data = pd.read_csv("AA1050_plate_tensile_test_data.csv", delimiter=';')
#Given data points as arrays
force_kN = data["Force [kN]"].values #in kN
force = force_kN * 1000 #in N
elongation = data["Extensometer_corrected [mm]"].values #in mm
area = 14.48 #in mm
length_0 = 80 #in mm
#Calculations
l_over_l0 = (elongation+length_0)/(length_0)
true_strain = np.log(l_over_l0)
eng_strain = elongation/length_0
eng_stress = force/area #in MPa
true_stress = eng_stress*(eng_strain + 1) #in MPa
#print(true_strain)
#print(eng_strain)
#print(eng_stress)
#Plot the eng stress-strain data scatter
plt.scatter(eng_strain, eng_stress, color = "red", s = 5, label='Data
Points')
plt.xlabel('Engineering Strain')
plt.ylabel('Engineering Stress [MPa]')
plt.title('Engineering Stress - Engineering Strain Data Points')
plt.legend()
plt.grid(True)
plt.show()
#Plot the eng stress-strain curve
plt.plot(eng_strain, eng_stress, label="Data Curve")
plt.xlabel('Engineering Strain')
plt.ylabel('Engineering Stress [MPa]')
plt.title('Engineering Stress - Engineering Strain Curve')
plt.legend()
plt.grid(True)
plt.show()
#Curve Fitting for Elastic Modulus
#for values between 0 - 0.0002 [eng strain]
#0.0002 is arbitrarily selected for the Hooke's Law line
#Find the first strain value bigger than 0.0002
for i in range(len(eng_strain) - 1):
if eng_strain[i] > 0.0002:
eng_strain_elastic = eng_strain[1: i+1]
eng_stress_elastic = eng_stress[1: i+1]
break
#Define a function to fit the data
def func(x, a, b):
return a * x + b
popt, pcov = curve_fit(func, eng_strain_elastic, eng_stress_elastic)
# Get the coefficients of the fitted curve
a_fit, b_fit = popt
E = a_fit / 1000 #Elastic Modulus in GPa
print("Elastic Modulus:",E)
#Plot the eng stress-strain curve with elastic curve
plt.plot(eng_strain, eng_stress, label="Data Curve")
#Point Intersection Code
#
#desired_x = 0.0002
#desired_index = np.abs(eng_strain - desired_x).argmin()
#desired_y = eng_stress[desired_index]
#
#plt.scatter(desired_x, desired_y, color='red', label=f'Point at
x={desired_x} y={desired_y}')
#Line Intersection Code
#
#eng_strain_half = eng_strain[1: int(len(eng_strain)/2)]
#
#line_slope = 1000
#line_intercept = 0
#line_y = line_slope * eng_strain_half + line_intercept
#
#plt.plot(eng_strain_half, line_y, color='green', label='Test Line')
#
#
#intersection_points = []
#for i in range(len(eng_strain_half) - 1):
#
if (eng_stress[i] - line_y[i]) * (eng_stress[i + 1] - line_y[i + 1])
<= 0:
#
# If the signs of the y differences change, there's a potential
intersection
#
x_intersect = (eng_strain_half[i] + eng_strain_half[i + 1]) / 2 #
Midpoint interpolation
#
y_intersect = (eng_stress[i] + eng_stress[i + 1]) / 2
#
intersection_points.append((x_intersect, y_intersect))
#
#intersection_points = np.array(intersection_points).T
#plt.scatter(intersection_points[0], intersection_points[1], color='green',
label='Intersection Points')
#Find the first strain value bigger than 0.002
for i in range(len(eng_strain) - 1):
if eng_strain[i] > 0.002:
eng_strain_half = eng_strain[i: i+80]
eng_fit_index = i-1
break
line_slope = E*1000 #in MPa
line_intercept = E*1000*(-0.002)
line_y = line_slope * eng_strain_half + line_intercept
plt.plot(eng_strain_half, line_y, color='red', label=f'0.2% Offset Line
with Slope E={E:.2f}GPa')
intersection_points = []
for i in range(len(eng_strain_half) - 1):
if (eng_stress[i+eng_fit_index] - line_y[i]) * (eng_stress[i +
1+eng_fit_index] - line_y[i + 1]) <= 0:
# If the signs of the y differences change, there's a potential
intersection
x_intersect = (eng_strain_half[i] + eng_strain_half[i + 1]) / 2
Midpoint interpolation
y_intersect = (eng_stress[i+eng_fit_index] +
eng_stress[i+1+eng_fit_index]) / 2
intersection_points.append((x_intersect, y_intersect))
intersection_points = np.array(intersection_points).T
YS = format(intersection_points[1, 0], ".2f")
YS_raw = intersection_points[1, 0]
print("Yield Stress:",intersection_points[1, 0])
YS_eng_strain = intersection_points[0, 0]
plt.scatter(intersection_points[0], intersection_points[1], color='red',
label=f'Intersection Point (YS={YS}MPa)')
plt.xlabel('Engineering Strain')
plt.ylabel('Engineering Stress [MPa]')
plt.title('Engineering Stress - Engineering Strain Curve')
plt.legend()
plt.grid(True)
plt.show()
#Code for finding UTS point
max_eng_stress_index = np.argmax(eng_stress)
max_eng_stress = eng_stress[max_eng_stress_index]
max_eng_strain = eng_strain[max_eng_stress_index]
print("Ultimate Tensile Stress:", max_eng_stress)
print("Engineering Strain at UTS:", max_eng_strain)
max_eng_stress_r = format(max_eng_stress, ".2f")
max_eng_strain_r = format(max_eng_strain, ".2f")
plt.scatter(max_eng_strain, max_eng_stress, color = "red", label=f"UTS
Point (UTS={max_eng_stress_r} MPa, Eng. Strain={max_eng_strain_r})")
plt.plot(eng_strain, eng_stress, label="Data Curve")
plt.xlabel('Engineering Strain')
plt.ylabel('Engineering Stress [MPa]')
plt.title('Engineering Stress - Engineering Strain Curve')
plt.legend()
plt.grid(True)
plt.show()
#Plot the true stress-strain data scatter
plt.scatter(true_strain, true_stress, color = "red", s = 5, label='Data
Points')
#
plt.xlabel('True Strain')
plt.ylabel('True Stress [MPa]')
plt.title('True Stress - True Strain Data Points')
plt.legend()
plt.grid(True)
plt.show()
#Plot the true stress-strain curve
plt.plot(true_strain, true_stress, label="Data Curve")
plt.xlabel('True Strain')
plt.ylabel('True Stress [MPa]')
plt.title('True Stress - True Strain Curve')
plt.legend()
plt.grid(True)
plt.show()
#Curve fitting for True Stress First Equation
#Since we are calculating the plastic behaviour, we need to
#eliminate the data related to elastic region
#new zero strain is where the plastic strain starts
for i in range(len(true_strain) - 1):
if true_strain[i] > math.log(YS_eng_strain + 1):
true_plastic_strain = true_strain[i::]
meaningful_true_stress = true_stress[i::]
true_plastic_strain = true_plastic_strain - (math.log(YS_eng_strain
+ 1))
break
#fracture region is removed
meaningful_true_stress_calc = meaningful_true_stress[:-120:]
true_plastic_strain_calc = true_plastic_strain[:-120:]
warnings.filterwarnings('ignore') #to prevent overflow warning
# Define a function to fit the data
def func1(x, a, b):
return a * x**b
#Fit the curve to the data
popt, pcov = curve_fit(func1, true_plastic_strain_calc,
meaningful_true_stress_calc)
#Get the coefficients of the fitted curve
a_fit1, b_fit1 = popt
#Generate points for the curve fit
x_fit1 = np.linspace(0, true_strain[-1], 300)
y_fit1 = func1(x_fit1, a_fit1, b_fit1)
K1 = format(a_fit1, ".2f")
n1 = format(b_fit1, ".2f")
print("First Equation:"," K:",a_fit1," n:",b_fit1)
plt.plot(x_fit1, y_fit1, color = "red", label=f"Power Law K={K1}MPa
n={n1}")
#plt.scatter(true_strain, true_stress, s = 5, label='Data Points')
plt.scatter(true_plastic_strain, meaningful_true_stress, s = 5, label='Data
Points')
plt.xlabel('True Plastic Strain')
plt.ylabel('True Stress [MPa]')
plt.title('True Stress - True Plastic Strain Power Law Best Fit Curve')
plt.legend()
plt.grid(True)
plt.show()
#Curve fitting for True Stress Second Equation
for i in range(len(true_strain) - 1):
if true_strain[i] > math.log(YS_eng_strain + 1):
true_plastic_strain = true_strain[i::]
meaningful_true_stress = true_stress[i::]
true_plastic_strain = true_plastic_strain - (math.log(YS_eng_strain
+ 1))
break
#fracture region is removed
meaningful_true_stress_calc = meaningful_true_stress[:-744:]
true_plastic_strain_calc = true_plastic_strain[:-744:]
# Define a function to fit the data
def func2(x, a, b):
return a * x + b
#Fit the curve to the data
popt, pcov = curve_fit(func2, true_plastic_strain_calc,
meaningful_true_stress_calc)
#Get the coefficients of the fitted curve
a_fit2, b_fit2 = popt
#Generate points for the curve fit
x_fit2 = np.linspace(0, true_strain[-1], 300)
y_fit2 = func2(x_fit2, a_fit2, b_fit2)
K2 = format(a_fit2, ".2f")
sigma2 = format(b_fit2, ".2f")
print("Second Equation:"," K:",a_fit2," sigma_0:", sigma2)
plt.plot(x_fit2, y_fit2, color = "red", label=f"Linear Relation K={K2}MPa $
\u03C3_0$={sigma2}MPa")
plt.scatter(true_plastic_strain, meaningful_true_stress, s = 5, label='Data
Points')
plt.scatter(true_plastic_strain_calc, meaningful_true_stress_calc, s = 5,
color = "red", label='Data Points')
plt.xlabel('True Strain')
plt.ylabel('True Stress [MPa]')
plt.title('True Stress - True Strain Linear Relation Best Fit Curve')
plt.legend()
plt.grid(True)
plt.show()
#Curve fitting for True Stress Third Equation
#Since we are calculating the plastic behaviour, we need to
#eliminate the data related to elastic region
#new zero strain is where the plastic strain starts
for i in range(len(true_strain) - 1):
if true_strain[i] > math.log(YS_eng_strain + 1):
true_plastic_strain = true_strain[i::]
meaningful_true_stress = true_stress[i::]
true_plastic_strain = true_plastic_strain - (math.log(YS_eng_strain
+ 1))
break
#fracture region is removed
meaningful_true_stress_no_fructure = meaningful_true_stress[:-300:]
true_plastic_strain_no_fructure = true_plastic_strain[:-300:]
#print(true_strain)
#print(true_stress)
#print(meaningful_true_strain)
#print(meaningful_true_stress)
warnings.filterwarnings('ignore') #to prevent overflow warning
# Define a function to fit the data
def func3(x, a, b, c):
return a * x**b + c
#Fit the curve to the data
popt, pcov = curve_fit(func3, true_plastic_strain_no_fructure,
meaningful_true_stress_no_fructure)
#Get the coefficients of the fitted curve
a_fit3, b_fit3, c_fit3 = popt
#Generate points for the curve fit
#We will only take the plastic part of the curve
x_fit3 = np.linspace(0, true_strain[-1], 500)
y_fit3 = func3(x_fit3, a_fit3, b_fit3, c_fit3)
K3 = format(a_fit3, ".2f")
n3 = format(b_fit3, ".2f")
sigma3 = format(c_fit3, ".2f")
print("Third Equation:"," K:",a_fit3," n:",b_fit3," sigma_0:", sigma3)
plt.plot(x_fit3, y_fit3, color = "red", label=f"Improved Power Law
K={K3}MPa n={n3} $ \u03C3_0$={sigma3}MPa")
#plt.scatter(true_plastic_strain_calc, meaningful_true_stress_calc, s = 5,
label='Data Points')
plt.scatter(true_plastic_strain, meaningful_true_stress, s = 5, label='Data
Points')
plt.xlabel('True Strain')
plt.ylabel('True Stress [MPa]')
plt.title('True Stress - True Strain Improved Power Law Best Fit Curve')
plt.legend()
plt.grid(True)
plt.show()
Download