You are on page 1of 5

College of Engineering

Fall Session- 2015 Programming and Computer Applications for ME -ME201


Due Day: Thursday of Week5 (First week after Hajj vacation)
PROBLEM 1.1 STATEMENT

The Coefficient of friction (μ), can be determined in an experimental by measuring the Force (F)
required to move a mass (m). When F is measured and m is known, the coefficient of friction can
be calculated by:
𝐅 𝐦
𝛍= (𝐠 = 𝟗. 𝟖𝟏 𝟐 )
𝐦𝐠 𝐬

mg
Test # 1 2 3 4 5 6
Mass (m) kg 2 4 5 10 20 50
Force 12.5 23.5 30 61 117 294

Plot the friction coefficient vs mass of the block?


clear all
clc
g=9.81;
m=[2 4 5 10 20 50];
F=[12.5 23.5 30 61 117 294];
mu=F./(m*g);
plot(m,mu,'--o')
xlabel('m [kg]');ylabel('Friction Coefficient-mu')
grid on
College of Engineering
Fall Session- 2015 Programming and Computer Applications for ME -ME201
Due Day: Thursday of Week5 (First week after Hajj vacation)
PROBLEM 1.2 STATEMENT

The piston-connection rod-crank mechanism is used in many engineering applications. In the


mechanism shown in the following figure, the crank is rotating at a constant speed of 500 rpm.
L1=120 mm (piston arm) and L2= 250 mm (Connecting rod).

Calculate and plot the position, velocity, and acceleration of the piston for one revolution of the
crank. Make the three plots on the same page. Set Ѳ=0 when t=0 sec, r =L1, and c = 0.25.
The displacement of the piston:
1
x = rcos(θ) + (c 2 − r 2 sin2(θ))2

r 2 θ̇ sin(2θ)
ẋ = −rθ̇ sin(θ) − 1 (The velcoity of the piston)
2(c 2 − r 2 sin2(θ))2
The acceleration of the piston is:
dẋ
ẍ =
dt
2πn
θ = θ̇t, and θ̇ =
60
clear all
clc
c=0.25;
r=0.12;
t=0:1:120;
n=500;
College of Engineering
Fall Session- 2015 Programming and Computer Applications for ME -ME201
Due Day: Thursday of Week5 (First week after Hajj vacation)
thetadot=(2*pi*n)/60;
theta=thetadot*t;
x=r*cos(theta)+(c^2-r^2*(sin(theta)).^2).^(1/2);
subplot(3,1,1)
plot(t,x)
title('Displacment, Velcoity, and Acceleration vs time')
grid on
xlabel('time [s]');ylabel('Displacment in [m]')
subplot(3,1,2)
xdot=-r*thetadot*sin(theta)-(r^2*thetadot*sin(2*theta))./(2*(c^2-
r^2.*(sin(theta)).^2)).^(1/2);
plot(t,xdot)
grid on
xlabel('time [s]');ylabel('Velocity in [m/sec]')
subplot(3,1,3)
A=4*r^2*cos(2*theta).*(c^2-r^2.*(sin(theta)).^2)+(r^2.*sin(2*theta)).^2;
B=4*(c^2-r^2*(sin(theta)).^2).^(3/2);
xddot=-r*thetadot.^2.*cos(theta)-A./B;
plot(t,xddot)
grid on
xlabel('time [s]');ylabel('Acceleration in [m/s^2]')
hold off

PROBLEM 1.3 STATEMENT

Use AX=B to find the displacement of the springs as shown in Fig. 1.3. If W1=W1=W3 = 50 N
and the spring stiffness for all springs is 5 N/mm.
College of Engineering
Fall Session- 2015 Programming and Computer Applications for ME -ME201
Due Day: Thursday of Week5 (First week after Hajj vacation)

Fig.1.3 Spring Systems

clear all
clc
k1=5;
k2=k1;k3=k1;k4=k1;k5=k1;
W1=50;W2=W1,W3=W1;
K=[k1+k2+k3+k5 -k3 -k5;-k3 k3+k4 -k4;-k5 -k4 k4+k5];
W=[W1;W2;W3];
X=inv(K)*W
X =

15
25
25

PROBLEM 1.4 STATEMENT

Use Ku=P to find the displacement u at the joints of the truss as shown in Fig. 1.4.
College of Engineering
Fall Session- 2015 Programming and Computer Applications for ME -ME201
Due Day: Thursday of Week5 (First week after Hajj vacation)

Fig.1.4 Truss

clear all
clc
K=[27.58 7.004 -7.004 0 0;7.004 29.57 -5.253 0 -24.32;
-7.004 -5.253 29.57 0 0;0 0 0 27.58 -7.004;
0 -24.32 0 -7.004 29.57]*1000;
P=[0 0 0 0 -45]';
u=inv(K)*P
u =

0.0014
-0.0065
-0.0008
-0.0019
-0.0073

You might also like