Report
Report
The main objective of this project is to solve problem on MATLAB and analyze it how to solve
it on MATLAB.
Introduction:
Consider the cantilevered pressurized thick-walled cylinder.
The system stresses in the x, r, θ plane are given by the stress matrix S.
x x 0
S = x 0
0 0 r
FLRi pRi2 R2 + R2 T
x = + = p o2 i
r = −p x = x =
( ) (
Ro4 − Ri4 Ro2 − Ri2 ) o
R − R 2
i 2R (Ro − Ri )
i
2
( 1 − 2 )2 + ( 2 − 3 )2 + ( 3 − 1 )2
VM =
2
where 1 , 2 , 3 are principal stresses and are the eigenvalues of the S matrix. The system
fundamental vibration frequency is given by
freq =
1 4.73
2
(
E Ro2 + Ri2 )
4 L
Similarly, Management System such as testing lab is looking into purchasing equipment for
highly specialized noise output measurement of various products. Preliminary research and
analysis have produced the information and implemented on MATLAB.
Discussion:
Firstly, we analyzed the problems and then declare the parameters on MATLAB and then plotted
f (Ro) vs. Ro. After that defined x=Ro and set up f(x)=0 using the equality version of equation
(1) below. After that solved for the root x in f(x)=0 using root method to find and checked result
graphically.
Used the root determined before and calculated the frequency freq using the formula given.
Rearranged the freq formula and calculate the value of Ro required to exactly meet freq required.
(1) 𝜎𝑉𝑀 ≤ 𝜎𝑎𝑙𝑙𝑜𝑤𝑎𝑏𝑙𝑒
Results:
Conclusion:
It is concluded that, MATLAB is a very help programming language and with the help of it we
can analyze everything almost in details. In this project we analyzed problem 1 and 2 in detailed
and got the results.
APPENDIX
part1.m
clc;clear all;close all;
format long
L= 36; % 36 inches
E=30e6;
freq_req=1700;
ID=[4,5,6];
Ri=3*(1+(ID./1000).^2);
T =80000;
p = 5000;
F= 2000.*(1+(ID./1000).^0.7);
R0= 1+(Ri);
freq=(1./4.*pi).*((4.73./L).^2).*sqrt((E.*(R0.^2 +Ri.^2))./p); %
fundamental frequency
sigma_allowable=0.2836/386 ;
sigma_x1=(((F.*L.*Ri)./(pi.*(R0.^4 -Ri.^4)))+((p.*(Ri.^2))./(R0.^2 -
Ri.^2))) ;
sigma_x=mean(sigma_x1);
sigma_theta=p.*((R0.^2 + Ri.^2)./(R0.^2 - Ri.^2));
sigma_theta= mean(sigma_theta);
sigma_r=-p;
tau_xtheta= (T./(2.*pi.*(Ri.^2).*(R0-Ri)));
tau_xtheta=mean(tau_xtheta);
%% Tasks
%% Part A
% Plot f (Ro) vs. Ro
f=@(R0) (((F.*L.*Ri)./(pi.*(R0.^4 -Ri.^4)))+((p.*(Ri.^2))./(R0.^2 -
Ri.^2))) ;
subplot(2,1,1)
plot(f(R0))
grid on
title('Plot f(Ro)')
subplot(2,1,2)
plot(R0)
title('Plot Ro ')
grid on
%% Part B
x=R0;
t=f(x);
%% Part C
root=roots(t)
figure
stem(real(root))
xlim([0 4])
title('roots')
grid on
%% Part D
freq=(1./4.*pi).*((4.73./L).^2).*sqrt((E.*(root.^2 +Ri.^2))./p) %
fundamental frequency
%% Part E
R0=sqrt(((freq.*4.*pi.*(L.^2)./((4.73.^2))).^2).*(p./E)-Ri.^2)
part2.m
clc;clear all;close all;
beta=linspace(0,0.3,10);
P=200000;
N=2;
I=5*N;
PIC=P.*[(I*(1+I).^N)./(((1+I).^N)-1)].*N
for n=1:N
MOC=sum(0.05.*(n-1)+0.1).*P;
EC=150000.*sum(((1+beta)).^(n-1));
Total_revenue=sum((270000.*(1+beta).^(n-1)));
end
MOC
EC
Total_revenue
Total_Project_Cost=PIC+MOC+EC
f=Total_Project_Cost-Total_revenue
x=N;
x1 = fzero(@(x) f,0)
p = bisection(@(x) f,0,1)
plot(linspace(1,N,10),beta)
xlabel('years N')
ylabel('revenue growth rate ')
grid on
%% function
function p = bisection(f,a,b)
if f(a)*f(b)>0
p=('No root');
else
p = (a + b)/2;
err = abs(f(p));
while err > 1e-7
if f(a)*f(p)<0
b = p;
else
a = p;
end
p = (a + b)/2;
err = abs(f(p));
end
end
end