University of Wollongong
Faculty of Engineering and Information Sciences
MECH201 Engineering Analysis
Spring Session – 2024
Assignment 1
Rules:
1.The assignment could be completed individually or by a group of 2 to 3 students. The group formation is your own responsibility. Members may be from the same or different tutorial groups.
2.No collaboration between groups is permitted. Any case of plagiarism (including Open AI) will be penalized, and students should make themselves aware of the university policies regarding plagiarism (see subject outline under University and Faculty Policies)
3.The assignment is due on Friday, 30 August and submitted on Moodle. The assignment should be submitted to Moodle. Late submission will incur a penalty as described in the subject outline,
4.If the assignment is completed by group, a statement indicating the effort or contribution to the assignment by each member and signed by all members must be included at the beginning of the report, or all students agree that they have contributed equally to the report –add a statement at the front of the report, signed by all members.
5.Please make sure your MATLAB code is well commented to ensure readability and that your variable and function names are understandable. Use the lecture and tutorial examples for guidance. Scripts without comments and badly named variables will be graded poorly.
6.All MATLAB code (script files and function files) must be uploaded into Moodle as part of your report.
Question 1: (30 marks)
According to Archimedes principle, the buoyancy forces is equal to the weight of fluid displaced by the submerged portion of an object. For the sphere depicted in Fig. 1, r = 1 m, = density of sphere = 200 kg/m3, and = density of water = 1000 kg/m3. Note the volume of the above-water portion of the sphere can be computed with .
Fig. 1
(a)Set up a mathematical model to determine the height h of the portion that is above water.
(b)Choose a proper numerical method and calculate the height h by hand.
(It is requested to justify the choice of the method and show the detailed calculation procedure in your report. Three Iterations are requested to be calculated.)
(c)Develop an M-file for the numerical method in Item (b) without the use of MATLAB built-in function to determine the height h (here the code should be terminated on your defined error criteria)
(The M-file must be included in the report, and the developed code must be submitted for checking)
(d)Choose a proper MATLAB built-in function to determine the height h.
(The M-file must be included in the report, and the developed code must be submitted for checking)
Question 2: (40 marks)
An automobile company has two versions of the same model car for sale, a two-door coupe and the full-size four door. These two versions yield different profits to the company. Their production involves both time and on-site storage constraints. Also, when developing a production plan, it is necessary to consider the number of consumers and their demand for the two versions of cars. All these factors are listed below.
Two-door Four-door Availability
Profit $ 13,500/car $15,000/car
Production time 15 hr/car 20 hr/car 8,000 hr
Storage 400 cars 350 cars
Consumer demand 700/car 500/car 240,000
(a)Formulate the problem as a linear programming problem to decide how many cars of each design should be produced to maximise the profit.
(b)Solve the above linear programming problem by hand using Simplex method.
(It is requested to show the details of Simplex tableau calculation, pivoting, optimality check and Gauss-Jordan elimination)
(c)Develop an M-file without the use of MATLAB built-in function to determine the number of cars of each version should be produced to maximise the profit. In your MATLAB code, you need to implement the Simplex method using your own code.
(The M-file must be included in the report and the developed code must be submitted for checking)
(d)Choose a proper MATLAB built-in function to solve the problem and compare results with (b) and (c).
(The M-file must be included in the report, and the developed code must be submitted for checking)
Question 3: (30 marks)
An investigator has reported the data tabulated below. It is known that such data can be modelled by the following equation:
where a and b are parameters.
x 1 2 3 4 5
y 0.5 2 2.9 3.5 4
(a)Conduct a nonlinear exponential function curve fitting to determine the parameters of a and b.
(It is requested to justify the methodology and show the detailed calculation procedure in your report)
(b)Create a function M-file to fit this exponential function relation to the data and return a and b. Finally, predict the y at x = 2.6 in your program using a and b obtained.
(The M-file must be included in the report, and the developed code must be submitted for checking)
(c)Choose a proper MATLAB built-in function(s) to find the best polynomial and fit the data.
(The M-file must be included in the report, and the developed code must be submitted for checking. It is requested to justify why the chosen order of the polynomial is the best.
(d)Compare the curves which developed in (b) and (c), and with the original experiment data. The two developed curves and the experimental data are to be plotted together in a clearly labelled figure, in which the experimental data is drawn with blue ‘*’ signs; curve developed in (b) with a red solid line, and curve developed in (c) with a black dash line. Label the x axis as ‘X’, the y axis as ‘Y’, and the title as ‘Curve fitting’.
请加QQ:99515681 邮箱:99515681@qq.com WX:codinghelp