Computer Science C++
Project: Material Science
Uploads and hard copies due by 9:00am.
Hard copies can be turned in during class, School of Engineering office or Mrs. Ford’s office.
Part of being an engineer is that you will work on teams and projects. The project may not always be in your comfort zone or area but that is why you work with a team of people to accomplish the job. For this project, you will be working on a material science problem. You do not need any knowledge of mechanical engineering in order to program a solution to this problem. You have already been given all of the tools you need in class.
The data supplied is the result of applying a load to a specimen. That specimen could be steel, aluminum, cast iron or any alloy. By applying this load we are testing the material properties using a uniaxial tension test. (Basically, we are breaking it to see what happens!)
In this project you will be supplied with certain values. With these values you will have to use the formulas given to compute several results. The first result is the yield point of the material and the associated engineering stress & strain and true stress & strain at that point. The second result is the maximum or necking point value of the material and the engineering stress & strain and true stress & strain at that point.
Formulas:
Where:
d Diameter original of the material
Note: “at point i” represents a point in time of the material being tested.
Given:
Diameter original
Length original
Force values at all points
Change in length at all points
Compute:
1. Yield point as defined by when engineering stress <= engineering stress estimated using the .2% offset method.
2. Engineering Stress at the above yield point.
3. Engineering Strain at the above yield point.
4. True Stress at the above yield point.
5. True Strain at the above yield point.
6. Max or neck value as defined by engineering stress at point i is less than the engineering stress at the last point (i-1).
7. Engineering Stress at the above max/neck point.
8. Engineering Strain at the above max/neck point.
9. True Stress at the above max/neck point.
10. True Strain at the above max/neck point.
Output Results:
· You should have output results for each data set provided to you.
· Precision should be to 3 decimal places, where appropriate.
· Example below.
================================================
Data Set: 1
Yield occurred at point: x
Yield value: xx.xxx
Engineering Stress:
Engineering Strain:
True Stress:
True Strain:
Max/Neck occurred at point: x
Max/Neck value: xx.xxx
Engineering Stress:
Engineering Strain:
True Stress:
True Strain:
=================================================
Data File Format:
· Place your data files in the directory: P:\\Private. If not, then I will not be able to run your program and your grade will reflect that.
· Name of input file: tension.txt available on Angel. Do not change the name of the file.
· Name of output file: tresults.txt. Do not change the name of this file!
· Your file open command will include “P:\\Private\\filenamehere.txt”. If not, then your grade will reflect that your program does not run.
· Text only file that contains the following information in the following order:
# of data sets
Diameter original
Length original
# of values that will be provided for this material
Fi Δli for the # of values listed above
Diameter original for the next set
Length original for the next set
Etc.
Example of data file:
5
0.505
2.000
3
0 .000
1650 .002
3400 .004
4.8
15.9
4
0 .000
4740 .025
9140 .050
12920 .075
Etc.
Notes:
· You will need to compute engineering stress & strain and true stress & strain for each data point.
·
· Be sure to cycle through all data points even after you have found the yield and max point before you move on to the next set of data.
· Every formula will be its own function!
· The main function will control the data file.
· Recommend using “flags” to control some of the conditions. In other words, you may have one or two variables defined as Boolean to check the yield and max points.
· No global constants or variables can be used. No arrays.
What are you turning in?
1. A printout of your original source code and a printout of your output.
2. Log into Angel and locate the Project drop box. Upload your project’s source file that you created. This must be done by the deadline! Be sure to follow the naming procedures for the class.
3. If you neglect to either upload your file or turn in your paperwork, I will not grade your project and you will get a zero for the assignment. I assume you are all adults and I do not have to chase you down for your work.
Graded on:
CMPSC 201 SP15
4
· Logic
· Neat & Readable
· Comments
· Functions
· Input
· Output
· Data File Manipulation
· Function headers
· Meaningful Variable names
· 6 steps of data files
4
2
0
d
A
p
=
i
i
T
A
F
i
=
s
0
0
l
l
l
E
i
T
D
+
=
i
i
l
l
l
A
A
D
+
=
0
0
0
i
e
i
e
E
i
s
=
i
i
i
est
E
e
E
)
002
.
(
1
-
+
=
+
s
i
e
s
i
F
0
A
i
e
i
T
s
T
E
i
l
D
0
l
i
E
est
s
0
A
F
i
e
i
=
s
0
l
l
e
i
i
D
=