engg-stats
ENG3104 Engineering Simulations and Computations Semester 2, 2014
Page 1 of 5
Assessment: Assignment 3
Due: 24 October 2014
Marks: 400
Value: 40%
Question 1 (100 marks) Introduction
You have been supplied with a set of measurements for the lifetime of a bearing in the file
ass3q1data.csv. You should use this data to construct a model for the behaviour of the real lifetime
(the lifetime of the population). It has been well-established that the Weibull distribution is the best
model for the reliability of objects (Juvinall & Marshek 2011).
For quality control and defining warranties, models for population lifetimes are used to determine
how many products will fail within a stipulated period. Using the model for the population, determine
which samples are in the bottom 2% of the population. Also determine the fraction of samples which
do not last the desired minimum of 950 hours and which fraction of the population would not last 950
hours.
Requirements
For this assessment item, you must produce MATLAB code which:
1. Loads the data file ass3q1data.csv and verifies that it has been loaded correctly (first 5 values) 2. Determines the estimated parameters for the Weibull distribution and reports the values to the
Command Window.
3. Compares the sample pdf with the population pdf graphically. 4. Compares the mean and standard deviation computed from the samples with the mean and
standard deviation computed from the Weibull distribution’s parameters. Discuss why the
results are the same or different. This comparison and discussion is to be reported to the
Command Window.
5. Verifies the mean and standard deviation calculations by comparing the results for the first 5 values with hand calculations. Be careful how you calculate the standard deviation.
6. Computes the fraction of the samples that are in the bottom 2% of the population and reports the result to the Command Window.
7. Computes the fraction of the samples and fraction of the population that do not satisfy the minimum of 950 hours and reports the result to the Command Window.
8. Has appropriate comments throughout.
Assessment Criteria
Your code will be assessed using the following scheme. Note that you are marked based on how well
you perform for each category, so the correct answer determined in a basic way will receive half
marks and the correct answer determined using an excellent method/code will receive full marks.
Quality of the code 5 marks
Quality of header(s) and comments 10 marks
Quality of the data loading and verification 10 marks
Quality of the Weibull distribution parameter estimation 10 marks
Quality of the pdf comparison 15 marks
Quality of the statistics verification 10 marks
Quality of the bottom 2% calculation 20 marks
Quality of minimum 950 hours calculation 20 marks
Reference
Juvinall, RC & Marshek, KM 2011, Fundamentals of Machine Component Design, 5 th
edn, Wiley, USA.
ENG3104 Engineering Simulations and Computations Semester 2, 2014
Page 2 of 5
Question 2 (150 marks) Introduction
a) It’s time to do assignment 1 properly. To begin with, Eq. (1) in assignment 1 is incorrect; this is the correct derivation:
0 0
0
0
0
0
v t t
v
t
t
dv a t
dt
dv adt
dv adt
v t v adt
v t v adt
(1)
It is therefore necessary to add the initial condition to the integral (as defined previously).
For this assignment, load the data in ass1data.csv and integrate it accurately to determine the
position as a function of time. Graphically compare the x-position and y-position as functions
of time for the method used in assignment 1 and a better method. Also graphically compare
the heart-shapes that are produced. Compare the position at 6.28 s for both methods.
b) Taking the acceleration formulae from Assignment 2 Question 3, solve the ODEs for x- position and y-position to determine what the position should be at 6.28 s using:
i. Euler’s method ii. A MATLAB ode solver (programmed in MATLAB)
iii. Simulink iv. Validation with the analytical solution
Verify your code for Part (b)(i) by performing hand calculations for the first 5 timesteps and
comparing to the result from the code.
Compare the four results from Part (b) with each other and the two results from Part (a).
c) Theoretically, the heart shape should be closed at 2 seconds. Prove that this is true analytically. Determine how closely the following numerical methods come to achieving this:
i. Euler’s method (choose 2 different timesteps) ii. ode23 (report any changes to the settings from the default)
iii. ode45 (report any changes to the settings from the default) iv. ode113 (report any changes to the settings from the default)
Compare the results by using these four methods programmed in MATLAB and also using
Simulink (you should have a total of 8 simulations: do not create a Simulink model for
Euler’s method).
ENG3104 Engineering Simulations and Computations Semester 2, 2014
Page 3 of 5
Requirements
For this assessment item, you must produce MATLAB code and Simulink models [each Simulink
solution should be a separate *.slx file for all parts of (b) and (c)] which:
1. Repeats Assignment 1 in terms of calculating and displaying the positions and compares the results for the positions with a more accurate numerical method.
2. Solves the ODEs from Assignment 2 Question 3 using three different numerical methods and the analytical solution.
3. Verifies the Euler’s method from Requirement 2 using hand calculations. 4. Plots the results for positions as functions of time from parts (a) and (b) together. Repeat for
the heart shape. It is acceptable to split up the plots if they are too crowded, so long as there
is at least one line that is the same in all plots [e.g. Euler’s method is shown in a plot with the
results from part (a) and separately Euler’s method is shown with the results from part (b)].
5. Compares the values of locations at 6.28 s for the methods in part (b) and reports the outcome to the Command Window.
6. Compares the values of locations at 2 seconds calculated analytically and computed numerically with a report displayed in the Command Window. Plots the heart shape for the
various calculations, comparing to the analytical solution.
7. Has appropriate comments throughout. 8. All Simulink models should display the required graphical and numerical outputs and also
allow the outputs to be used in MATLAB for the requisite comparisons.
Assessment Criteria
Your code will be assessed using the following scheme. Note that you are marked based on how well
you perform for each category, so the correct answer determined in a basic way will receive half
marks and the correct answer determined using an excellent method/code will receive full marks.
Quality of the code 5 marks
Quality of header(s) and comments 10 marks
Quality of part (a) calculations 15 marks
Quality of part (a) plots (e.g., axis labels, titles) 5 marks
Quality of part (a) reporting 5 marks
Quality of part (b)(i) calculations 20 marks
Quality of part (b)(ii) calculations 20 marks
Quality of part (b)(iii) calculations 20 marks
Quality of part (b)(iv) calculations 10 marks
Quality of part (b)(i) verification 10 marks
Quality of part (b) plots (e.g., axis labels, titles) 5 marks
Quality of part (b) reporting 5 marks
Quality of part (c) calculations 10 marks
Quality of part (c) plots (e.g., axis labels, titles) 5 marks
Quality of part (c) reporting 5 marks
ENG3104 Engineering Simulations and Computations Semester 2, 2014
Page 4 of 5
Question 3 (140 marks) Introduction
A heater is mounted on a wall and is designed to turn on at 1 kW when the temperature is below or
equal to a lower threshold temperature (TL) and off when the temperature is above or equal to an
upper threshold temperature (TU). The transport equation for this behaviour is:
2
2
2
2
, 0.2 m
, 0.2 m
p
p
T T P c k x
t x V
T T c k x
t x
(2)
where T is the temperature of the air (which is initially 10°C), is the density (which can be taken to be 1.225 kg/m
3 at room temperature), cp is the specific heat at constant pressure (which
is 1.005 kJ/kg.K at room temperature), k is the conductivity of air (which is 0.025 W/m.K at room
temperature), P is the power of the heater and V = 2 m 3 is the volume that the heating element acts on.
The heater is modelled to apply heat uniformly within 20 cm of the wall, as noted in Eq. (2). The
room is L = 5 m across and to solve for the temperature at the ends, assume that there is a “ghost
node” outside the domain which has the same temperature as the first interior node. For each case,
determine:
i. How long it takes for the heater to reach TU for the first time ii. How much energy is consumed by the heater in 8 hours (in units of kWh)
Solve for each of the following situations:
a) TL = 19°C and TU = 21°C. b) Repeat part (a) with a person in the middle of the room, who provides a constant source of
heat of 30 W acting over the range 2 2 2 2L w x L w applied over a volume of
Vp = 10 m 3 with w = 0.4 m.
c) Repeat part (a) but find the minimum TU (as a whole number) so that the temperature 0.5 m from the heater reaches 15°C within one hour. Maintain TU – TL = 2°C and produce the plots
only for the first hour.
d) Repeat part (a) using variable coefficients (which are functions of temperature). e) Repeat part (b) using variable coefficients (which are functions of temperature).
To calculate variable coefficients, use Eq. (3) and Table 1. The ideal gas law is:
p RT (3)
where the atmospheric pressure can be taken to be p = 101.3 kPa and the ideal gas constant for air is
R = 287.0 J/kg.K. SI units must be used in Eq. (3).
Table 1: Properties of air at atmospheric pressure (National Bureau of Standards 1955)
Temp (K) 150 200 250 300 350 400 450 500
cp (kJ/kg.K) 1.0099 1.0061 1.0053 1.0057 1.0090 1.0140 1.0207 1.0295
k (W/m.K) 0.013735 0.01809 0.02227 0.02624 0.03003 0.03365 0.03707 0.04038
ENG3104 Engineering Simulations and Computations Semester 2, 2014
Page 5 of 5
Requirements
For this assessment item, you must produce MATLAB code which:
1. Simulates the heater operating in the room for 8 hours. 2. Produces an x-t contour plot, where the variable plotted on the x-axis is t, the variable plotted
on the y-axis is x and the colour (the dependent variable) is the temperature. Depending on
the memory of your computer, it may be difficult to plot for all timesteps; it is sufficient to
plot no more than 5 values per second (the minimum interval between storing temperatures
should be 0.2 seconds).
3. Produces a plot of the temperature as a function of time at five equally-spaced locations in the room, including the walls. For part (c), include the location where the temperature must meet
a minimum value.
4. Determines how long it takes for the heater to first reach TU and reports the value to the Command Window.
5. For part (c), reports the minimum value of TU to the Command Window. 6. Calculates the total energy consumed by the heater. 7. Repeats the simulation for 4 other cases. 8. Has appropriate comments throughout.
Assessment Criteria
Your code will be assessed using the following scheme. Note that you are marked based on how well
you perform for each category, so the correct answer determined in a basic way will receive half
marks and the correct answer determined using an excellent method/code will receive full marks.
Quality of the code 10 marks
Quality of header(s) and comments 10 marks
Quality of solution of Eq. (2) 50 marks
Quality of plots (e.g., axis labels, titles) 10 marks
Quality of reporting (including calculation of quantities) 10 marks
Quality of solving part (b) 10 marks
Quality of solving part (c) 20 marks
Quality of solving part (d) 15 marks
Quality of solving part (e) 5 marks
Reference
National Bureau of Standards 1955, National Bureau of Standard (US) Circular 564.
Question 4 (10 marks) After submissions have closed for Assignment 2, you will be provided with a dummy submission for
Assignment 2 containing a number of errors. Fill in the table in the file “Corrections to Assignment 2
dummy submission.doc” with how the code should be amended. Do not submit corrections to your
own Assignment 2 submission.
Submission Submit your assignment by the due date to the StudyDesk.
Note that:
MATLAB code must appear in a *.m file otherwise it will not be marked.
you should upload all of your files individually (not zipped together).
you will NOT receive any confirmation of receipt. If you can see that the files have uploaded, then you have successfully submitted your assignment. There is no need to click a
“send for marking” button, but you will have to click a button confirming that the submission
is your own work.
- ZEqnNum422070
- ZEqnNum668800