Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

ENGG952 Spring 2018 – Assignment 1 1 University of Wollongong Faculty of Engineering and Information Sciences Assignment 1 Rules: 1. The assignment may be completed individually or by a group of up to...

1 answer below »
ENGG952 Spring 2018 – Assignment 1 1

University of Wollongong
Faculty of Engineering and Information Sciences
Assignment 1
Rules:
1. The assignment may be completed individually or by a group of up to 3 students. The
group formation is your own responsibility. Members may be from the same or
different tutorial groups.
2. Any case of plagiarism including copying, sharing works
esults between groups, will be
penalized. Students should make themselves aware of the university policies regarding
plagiarism (see Subject Outline under University and Faculty Policies).
3. The assignment is due Monday 27th August by 4pm and to be submitted to EIS Central
Bldg. 4 as a report. For each of the questions, the report should include a short
description of the solution methods, use figures to explain the results if required, and
contain a short discussion of the results as appropriate. Use the barcoded page as the
cover sheet for your report (see Subject Outline under Submission and Return of
Assessments). Late submission will incur penalties as described in the Subject Outline.
4. If the assignment is completed by a group, a statement indicating the effort or
contribution to the assignment by each member and signed by all members must be
included in the beginning of the report. Alternatively, all group members agree that they
have contributed equally to the report and a statement to this effect is added to the front
of the report and signed by all members.
5. All MATLAB code (script files and function files) must be included in the hard copy of your
eport. If required, you will be asked for the files to be provided electronically and these
must be made available promptly.
6. Please make sure your MATLAB code is well commented 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.
ENGG952 Engineering Computing
Spring Session 2018
ENGG952 Spring 2018 – Assignment 1 2

Question 1: Numerical vs. Analytical Solution (35 Marks)


The exact solution of the falling parachutist problem (see Week 1 lecture notes) can be
expressed as:
?(?) =
?(???? + ??ℎ???)
?
[1 − ?
(
−??
????+??ℎ???
)
]
where, v is the velocity, g is the gravity, mman and mchute are the mass of the parachutist
and the parachute respectively, c is the drag coefficient, and t the time.
(a) Write a MATLAB script/function and use symbolic programming to find the exact
solution from t = 0 to t = 50.0 seconds. Use g = 9.81 m/s2, mman = 84.0 kg, mchute=
31.0 kg and c = 75.0 kg/s. Assume v = 0.0 at t = 0.0. Plot the exact solution (v vs t).
Hint: Look up the lecture and MATLAB notes for the syms and subs commands.
(b) The numerical solution to the same problem can be computed using Euler’s method
with the equations below:
???+1 = ??? +
??
??
(??+1 − ??)
???ℎ,
??
??
= ? −
?
(???? + ??ℎ???)
???
Implement this in MATLAB and find a time step for the numerical solution that
ings the largest e
or between the numerical and analytical velocities to under
1.0 m/s. Plot the numerical solution over the exact solution from (a).
Hint: Evaluate the exact solution at the same time steps as the analytical solution
and look at the difference.
(c) Use your implementation of the numerical method to find a value of the drag
coefficient c, that results in a steady-state velocity of less than 10m/s. Plot the
solution over those from (a) and (b).
ENGG952 Spring 2018 – Assignment 1 3

Question 2: Design of a Rollercoaster (35 Marks)

You work at an engineering firm that specialises in the design of rollercoasters. The
hard work is already over! Your colleague has designed a rollercoaster for a client and
it is your job to present the results to the client. Here is the information that you receive
from your colleague.
The rollercoaster consists of an inner and outer track, the 3D profile of which are based
on a helix as follows:
? = ? ???(??)
? = ? ???(??)
? = ?
For the inside track, βinner linearly increases from 10.0 to 20.0 m. For the outside track,
βouter linearly increases from 15.0 to 25.0 m. For both tracks, θ linearly increases from
0 to 20*pi radians. The variable α controls the overall shape and number of rotations
of the tracks.
(a) Write a function in MATLAB that computes and plots the inner and outer tracks in
3D. Join co
esponding points on the inner and outer tracks with lines (e.g. see
figure above). Plot the changing track shapes using α values ranging from 0.1 to 0.5
in steps of XXXXXXXXXXuse a new figure or subplot for each α value).
Hint: Use the linspace, plot3 and plot commands. Additional useful commands may
e grid, hold, axis, view, xlabel, title, subplot etc.
(b) Compute the total path length for each of the track shapes above. Assuming that
each meter of track costs 40000 AUD to construct, calculate the total cost of
constructing each of them and print this cost in millions of AUD in the figure title
(e.g. see figure above).
Hint: Use an average βmiddle ranging from 12.5 to 22.5 m. Compute the path and
approximate it with a series of small line segments to get the total length as the sum
of individual lengths.
ENGG952 Spring 2018 – Assignment 1 4

Question 3: Beam Deflection Analysis (30 Marks)
The deflection y of a beam subject to a tapering load w, may be computed as
?(?) =
?
120???
[−?5 + 2?2?3 − ?4?]
Use w = XXXXXXXXXXkN/cm, L = 150 cm, E = 27000 kN/cm2, I = 35000 cm4.
(a) Compute and plot the beam deflection, y, along the beam length, x, as well as the
ate of change of deflection (dy/dx).
(b) Implement the
acketing method “false position” and use the plots from step (a) to
choose a sensible
acketing window. Find the point of maximum deflection (where
dy/dx = 0), and compute the x and y(x) values at this point. DO NOT use the MATLAB
uilt-in function fzero. Write your own
acketing function that implements the false-
position method. Use εs = 0.01%.
Hint: Use the MATLAB examples from Week 3’s lecture as a template.
(c) Use fprintf to print the
acketing results for each iteration as values of :
[iteration_number xl xu xr f(xl) f(xr) f(xl)f(xr) εa]
Answered Same Day Aug 21, 2020 ENGG952

Solution

Abr Writing answered on Aug 25 2020
137 Votes
Question_no_3.m
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%
%% Question 3: Beam Deflection Analysis (30 Marks) %%
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%
clc;
close all;
clear;
%% program starts here
syms x;
w=122.35;%kN/cm
L=150; %cm
E=27000; %kN/cm^2
I=35000; %cm^4
x=-200:0.01:200;
y=(w/(120*E*I*L))*(-x.^5+2*L^2*x.^3-L^4.*x);
dy_dx=(w/(120*E*I*L))*(-5*x.^4+6*L^2*x.^2-L^4);
figure;
plot(x,y,'b');
title('Beam Deflection');
xlabel('Beam Length (x) -->');
ylabel('Beam deflection (y) -->')
grid on;
figure;
plot(x,dy_dx,'b');
title('Beam Deflection');
xlabel('Beam Length (x) -->');
ylabel('derivative of Beam deflection (dy/dx) -->')
grid on;
%% Part B
tolerance=0.000001;
x0 = 40;
x1 = 140;
y= @(x) (w/(120*E*I*L))*(-5*x.^4+6*L^2*x.^2-L^4);
f= @(x) (w/(120*E*I*L))*(-x.^5+2*L^2*x.^3-L^4.*x);
fprintf('i xl xu xr f(xl) f(xr) f(xl)f(xr) Ea\n');
for i=0:100
x2= x1 - (y(x1)* (x1-x0)/(y(x1)-y(x0))) ;
c = y(x2)-y(x1);
absolute_c= abs(c);
fprintf('%d %2.3f %2.3f %2.3f %2.3f %2.3f %2.3f %1.8f\n',i,x0,x1,x2,f(x0),f(x2),f(x0)*f(x2),absolute_c);
if absolute_c < tolerance

eak
end
if y(x0)*c <0
x1=x2;
continue
else
x0=x2;
continue
end

end
Solution.docx
ENGG952 Engineering Computing
Spring Session 2018
Assignment 1
Question 1: Numerical vs. Analytical Solution (35 Marks)
The exact solution of the falling parachutist problem (see Week 1 lecture notes) can be expressed as:
(a) Write a MATLAB script/function and use symbolic programming to find the exact solution from t = 0 to t = 50.0 seconds. Use g = 9.81 m/s2, mman = 84.0 kg, mchute= 31.0 kg and c = 75.0 kg/s. Assume v = 0.0 at t = 0.0. Plot the exact solution (v vs t).
Hint: Look up the lecture and MATLAB notes for the syms and subs commands.
Solution:
MATLAB Code:
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%
%% Question 1: Numerical vs. Analytical Solution (35 Marks) %%
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%
clc;
close all;
clear;
%% program starts here
syms t ; % symbolic declaration of variable
%initialize variable
h=0.1; % step size
t=0.0:h:50.0; % time span
m_man=84;%kg mass of man
m_para=31;%kg mass of parachute
c=75;%kg/s drag coefficient
g=9.81;%m/s^2 gravity
v=(g*(m_man+m_para)/c)*(1-(exp(-c*t/(m_man+m_para))));
% Part a : ploting exact solution
plot(t,v,'b');
title('Parachute Problem');
xlabel('Time (sec) -->');
ylabel('Velocity (m/sec) -->')
grid on;

hold on;
%% Part B : Euler's Method Approximation
N=length(t);
v_approx(1)=0.0;
for i=1:N-1
v_approx(i+1)=v_approx(i)+(g-(c*v_approx(i)/(m_man+m_para)))*(t(i+1)-t(i));
end
max_e
or=max(abs(v-v_approx));
plot(t,v_approx,'r');
legend('Exact solution','Numerical solution');
%% Part C : Drag Coefficient Value for steady state velocity less than 10
v_approx_2(1)=0.0;
% equate the velocity derivative to 0 to find the drag coefficient value.
c=g*(m_man+m_para)/9.9;
disp('The value of drag coefficient...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here