Professional Documents
Culture Documents
A Guide To Using MATLAB in Statics
A Guide To Using MATLAB in Statics
August 2000
TABLE OF CONTENTS
Chapter
Page
Introduction
4
5
6
8
10
13
14
17
18
21
22
24
26
28
29
31
34
36
39
40
42
45
49
51
53
54
56
58
59
61
Chapter 1
Introduction
There is a class of engineering problems that requires numerical solution either because finding exact solutions
is tedious, or because exact solutions cannot be found. Computer programs are indispensable in finding
numerical solutions. A wide choice of options is available including traditional high-level programming
languages such as FORTRAN, C, C++ etc. MATLAB provides a different option. It is an integrated
environment where numerical computations can be carried out either using MATLAB commands, or using a
user-written program. Excellent references are available to study, understand and use the capabilities of
MATLAB. The reader is encouraged to use these references. An excellent list is available at the following web
site: http://www.mathworks.com/support/books/index.php3.
The Student Edition of MATLAB has several manuals and tutorials. One of them MATLAB: The Language of
Technical Computing (using_ml.pdf) provides a good starting point. The developers of MATLAB, Mathworks,
Inc. have an excellent web site (http://www.mathworks.com) where additional resources can be found. In addition,
there are several books available that combine numerical analysis and MATLAB.
In this guide we will take a look at solving problems in statics using custom MATLAB programs. In other
words, we will develop custom computer programs using the MATLAB programming language. These
programs are developed usually using the MATLAB editor, and the computer program is saved in one or more
.m files. All the problems are taken from the current textbook for ECE210 Engineering Mechanics: Statics by
R.W.Soutas-Little and D.J.Inman, a Prentice-Hall publication (ISBN: 0-13-769001-0).
The first step in this process is to understand the (statics) theory necessary to solve the problem. Second, one
must write an algorithm (a sequence of steps) that outlines how the problem input can be used along with the
theory to generate the required output. Third, these steps must be translated into correct MATLAB statements.
Inherent in these steps is the possibility of making logical errors (errors that are based on flawed theory) or
syntax errors (errors in translating the algorithmic steps into MATLAB statements). Each one of us must find
ways of debugging these errors.
As a starting point, become familiar with the MATLAB environment. Run a few simple examples that are
command driven. Later, develop a few simple programs in MATLAB to solve very simple problems whose
solution can be easily checked by hand. Once you have mastered this, you are ready to understand the examples
in this guide and solve the computer-based problems in the ECE210 text.
Chapter 2
Sample Problems and Further Exercises
The problems in this chapter follow the sequence in a standard statics text, and include problems from the
following topics.
(1)
(2)
(3)
(4)
(5)
(6)
(7)
Forces on a Particle
Rigid Bodies and Equivalent Force Systems
Distributed Forces: Centroids and Centers of Gravity
Equilibrium of Rigid Bodies
Truss Analysis
Beam and Frame Analysis
Friction
Each of these topics has two or more example problems that have been solved using MATLAB. Every problem
is usually divided into two parts (1) the MATLAB solution to the problem, and (2) suggested further
exercises. In (2), additional questions are posed and you are required to modify the .m file to find the numerical
(or, even symbolic) solution.
Note that the MATLAB solution is not unique. The computer statements can usually be structured in a variety
of ways. However, the answers in almost all cases, are unique.
Problem Title
Forces on a barge
Crate on an inclined plane
Equilibrium of a suspended lamp
A barge is pulled by two tugboats as shown in the Figure P2.11. To move the
barge along in the water properly, the tugboats must exert a resultant force of
5000 lb along the direction of motion of the barge. First determine the tension in
each rope if the position of tug b is such that = 45. Second, suppose that tug b
can move anywhere such that 0 90 . Determine the angle at which
the angle in the Tug Bs rope is maximum, and again, at which the tension has
minimum value, still maintaining the resultant of 5000 lb along the x-direction.
o
MATLAB File
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
1
2
3
4
5
6
7
--------------------------------------------------------------------------AUTHOR:
Dhaval Shah
LAST UPDATE: August 4, 2000
REFERENCE: Problem 2-11 on pg. 39 in Engineering Mechanics Statics by Soutas.
PROBLEM OVERVIEW: This problem deals with finding out the force "Tb" in the
rope between the tug B and the barge when the angle Beta
= 45 and the resultant force is 5000 lb. The second part of
the problem deals with finding out the maximum and minimum
force Tb while 'Beta' varies between 0 and 90 degrees.
CONCEPT KEYWORDS: Free-body diagrams, Equilibrium equations
VARIABLE DICTIONARY:
Variable
Remarks
Status
------------------Tb
Force in rope connecting barge to tug B
To be computed
Ta
Force in rope connecting barge to tug A
To be computed
Beta
Angle between horizontal and rope
connecting barge to tug B
Given
Alpha
Angle between horizontal and rope
connecting barge to tug A
Given
FResultant Resultant force
Given
AInc
Angular increment to be used with angle Beta
To be defined
TbMax
Max. force in rope to tug B
To be computed
AngleMax
Corresponding value of angle beta
To be computed
TbMin
Min. force in rope to tug B
To be computed
AngleMin
Corresponding value of angle beta
To be computed
---------------------------------------------------------------------------Set default values
FResultant = 5000;
Alpha = 30;
Beta = 45;
AInc = 10;
%
% Convert angles to radians
AngleToRadians = pi/180;
BetaR = Beta * AngleToRadians;
==============================================================================
FURTHER EXERCISES
(1) Get a better answer for part 2 by changing the value of AInc.
What is your conclusion?
(2) Do the orientation of the maximum and minimum forces depend
on the resultant force?
MATLAB File
%
%
%
%
%
%
%
%
%
%
%
----------------------------------------------------------------------------AUTHOR:
Dhaval Shah
LAST UPDATE: August 4, 2000
%
%
%
%
%
%
%
%
%
%
%
%
%
VARIABLE DICTIONARY:
Variable
Remarks
-------------T
Force in cable connecting crate to wall
Theta Angle between inclined plane and horizontal
M
Mass of crate
W
Weight of crate
AInc
Angular increment to be used with angle theta
N
Normal Component of weight of crate
(90deg. to inclined plane)
g
Acceleration due to gravity = 9.81 m/s^2
Status
-----To be computed
Given
Given
To be computed
To be defined
To be computed
Given
% Using the equilibrium equations along the axis of the inclined plane:
T = W * sin(ThetaR);
% equation (A)
% Display results
fprintf('The force in the cable is T = %g N\n', T);
% Normal reaction
N = W * cos(ThetaR);
% equation (B)
fprintf('The normal force N = %g N\n', N);
%=====================part b===================================================
% Theta is now stored in a vector (ThetaV) with Theta varying from 0 to 90 degrees
% in increments of AInc.
% ThetaV is now a vector of 18 elements (with Ainc = 5) from 0 to 90.
ThetaV = (0:AInc:90);
% Reuse Eqns. (A) and (B) and store the force values in vector TV and NV
TV = W * sin(ThetaV * AngleToRadians);
NV = W * cos(ThetaV * AngleToRadians);
% Find for what value of Theta, T = N
AngleEquals = -1; TOL = 0.1;
I = 0;
for Angle = 0:AInc:90
I = I + 1;
% check whether the T and N are almost equal
if (abs(TV(I)-NV(I)) <= TOL)
AngleEquals = Angle;
break;
end
% check whether the (T-N) has changed sign
if ((Angle ~= 0 & Angle ~= 90) & (TV(I-1) <= NV(I-1) & TV(I) >= NV(I)))
AngleEquals = Angle;
break;
end
end
fprintf('The normal force N = T when theta=%g\n', AngleEquals);
% The plot function plots the different values of T against its corresponding
% value of Theta varying from 0 to 90 degrees.
plot (ThetaV, TV);
grid;
Xlabel ('Theta (degrees)');
Ylabel ('T (N)');
%
%
%
%
%
%
%
%
%
==============================================================================
FURTHER EXERCISES
(1) If the cable connecting the crate to the wall is replaced by a spring system
whose stiffness is known (say k=1000 N/m), what would be the displacement
in the spring?
(2) How would you solve the problem if the cable is not parallel to the inclined
plane but is at an angle of 20 degrees clockwise from the plane, i.e. the
point of attachment of the cable to the wall is 20 degrees higher than the
point of attachment of the cable to the crate?
MATLAB File
%
%
%
%
%
%
%
%
%
%
%
-----------------------------------------------------------------------------AUTHOR:
Dhaval Shah
LAST UPDATE: August 4, 2000
REFERENCE:
PROBLEM OVERVIEW: This problem deals with computing the tension in the 4 cords
that hold the lamp hanging vertically along the "z axis" from
the ceiling as a function of the connection point with respect
to the ceiling.
Status
-----Given
Given
Given
Given
To be computed
To be computed
To be computed
To be computed
To be computed
To be computed
To be computed
Given
10
%
%
%
HInc
T1Max, T2Max
T3Max
To be defined
To be computed
Form the
T1lxac +
T1lyac +
T1lzac +
linear
T2lxoc
T2lyoc
T2lzoc
T1 = %g lb\n', x(1));
T2 = %g lb\n', x(2));
T3 = %g lb\n', x(3));
T4 = %g lb\n', T4);
cords
(Cx-Ax)/Lac; Lyac = (Cy-Ay)/Lac;
(Cx-Bx)/Lbc; Lybc = (Cy-By)/Lbc;
(Cx-Ox)/Loc; Lyoc = (Cy-Oy)/Loc;
11
==============================================================================
FURTHER EXERCISES
(1) What conclusion(s) can you draw from the graph?
(2) Does the change in length of one cord affect the forces in all the cords?
(3) When is the system in unstable equilibrium? Is this physically possible?
12
Problem Title
Automobile towing bar
Calculation of a torque
Calculation of resultant force and
moment
13
90 .
MATLAB File
%
% -----------------------------------------------------------------------------
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
AUTHOR:
LAST UPDATE:
REFERENCE:
Dhaval Shah
August 4, 2000
Problem 3-24 on pg. 130 in Engineering Mechanics Statics by Soutas.
PROBLEM OVERVIEW: This problem deals with finding out the moment caused by a
4000 N force applied to the trailer hitch as a function
of the angle of application, Theta, of the 4000 N force.
CONCEPT KEYWORDS: Rigid Bodies, Equivalent Force Systems.
VARIABLE DICTIONARY:
Variable
Remarks
-------------P
Force of 4000N applied at an angle Theta
Px
Component of force P along X axis
Py
Component of force P along X axis
C
Point of application of force P
B
Point about which the moment of force P is
required
M
Moment of Force P about point B
Lbc
Distance between points B and C
Alpha
Angle that Lbc makes with the Y axis
Theta
Angle at which the force is applied
Status
-----Given
To be computed
To be computed
Given
Given
To be computed
Given
Given
14
%
with respect to the X axis
Given
% Lx
Lever arm of the component of force P
%
along X axis
To be computed
% Ly
Lever arm of the component of force P
%
along Y axis
To be computed
% AInc
Angular increment to be used with angle Beta
To be defined
% -----------------------------------------------------------------------------------% Set default values
P = 4000;
Alpha = 60;
Lbc = 1;
AInc = 1;
AngleToRadians = pi/180;
Theta = 45;
%=============================part1==========================================
% Given
ThetaR = Theta*AngleToRadians;
Px = P*cos(ThetaR);
Py = P*sin(ThetaR);
% Calculate the lever arm of the force P components
AlphaR = Alpha*AngleToRadians;
Lx = Lbc * sin(AlphaR);
Ly = Lbc * cos(AlphaR);
% Calculate the moment about point B at theta = 45 degrees
M = Px * Ly - Py * Lx;
fprintf ('The moment about point B at theta 45 degrees is %g N-m\n',M);
%====================part 2=================================================
% Now loop through all possible values of Theta
I = 0; Index0=1; Index45=1; Index90=1;
for Angle = 0:AInc:90
% ThetaV is a vector holding values from 0 to 90 degrees, the MV is a
% moment vector of the same size as Theta and so are the components
% Px and Py of the force P.
I = I + 1;
ThetaV(I) = Angle;
Px = P*cos(ThetaV(I) * AngleToRadians);
Py = P*sin(ThetaV(I) * AngleToRadians);
MV(I) = Px * Ly - Py * Lx;
if (Angle == 0) Index0 = I; end;
if (Angle == 45) Index45 = I; end;
if (Angle == 90) Index90 = I; end;
end
% Plot the moment about point B for different values of theta
plot (ThetaV,MV)
text(ThetaV(Index0),MV(Index0),'M@0'),
text (ThetaV(Index90),MV(Index90),'M@90'),
text (ThetaV(Index45),MV(Index45),'M@45'),
grid on
xlabel ('Theta (degrees)');
ylabel ('Moment (N-m)');
% ==============================================================================
% FURTHER EXERCISES
15
% (1) What would be the forces acting at point A and B if the force P
%
acts at Theta = 0 degrees?
% (2) At what angle should the force be placed with the positive X
%
axis such that the moment about point A is 0?
16
M o = 20i$ + 10 $j + 5k$ and F = 10i$ 10 $j 5k$ kN, where M o . F = 0 , calculate the value of the moment arm r that
1
2
3
4
5
6
7
--------------------------------------------------------------------------AUTHOR:
Dhaval Shah
LAST UPDATE: August 4, 2000
REFERENCE: Problem 3-42 on pg. 133 in Engineering Mechanics Statics by Soutas.
PROBLEM OVERVIEW: This problem deals with computing a moment vector 'r'
required to produce a known moment by a known force.
CONCEPT KEYWORDS: Rigid Bodies, Varignon's Theorem
VARIABLE DICTIONARY:
Variable
Remarks
Status
------------------Mx,My,Mz
Moment components
Given
Fx,Fy,Fz
Force components
Given
Rx,Ry,Rz
Components of relative position vector
To be computed
---------------------------------------------------------------------------Set default values
Define M = (Mx)i +
Define F = (Fx)i +
M(1) = 20; M(2) =
F(1) = 10; F(2) =
(My)j + (Mz)k
(Fy)j + (Fz)k
10; M(3) = 5;
-10; F(3) = -20;
==============================================================================
FURTHER EXERCISES
(1) What magnitude of force is required to produce a moment vector of
M = 20i - 30k lb.ft for a position vector r = 3i + 2k.
(2) Given a force vector F = 2i + 3j, find out what would be the force
vector along a position vector r = 8j -3k.
17
MATLAB File
%
% ---------------------------------------------------------------------------
% AUTHOR:
Dhaval Shah
% LAST UPDATE:
August 4, 2000
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
Status
-----Given
Given
To be computed
18
%
%
%
%
%
%
%
%
%
C()
D()
E()
F()
M()
Rda()
Rea()
Rca()
Roa()
Given
Given
Given
Given
Given
Intermediate
Intermediate
Intermediate
Intermediate
qty.
qty.
qty.
qty.
points
A(3) =
C(3) =
D(3) =
E(3) =
O(3) =
A, D, E, F, O
0;
0;
0;
0;
0;
=
=
=
=
=
=
=
=
D
E
C
O
A;
A;
A;
A;
19
for BX = 0:BINC:0.6
B(1) = BX;
Rdb = D - B;
Reb = E - B;
Rcb = C - B;
Rob = O - B;
M = cross (Rdb, F4) + cross (Reb, F3) + cross (Rcb, F2) + ...
cross (Rob, F1);
if (abs(M(3)) < TOL)
fprintf ('The coordinates of point B are (%g, %g) m\n', B(1), B(2));
break;
end
end
%
%
%
%
%
%
==============================================================================
FURTHER EXERCISES
(1) Calculate the resultant force and moment about point O.
(2) Compute a position vector from 'O' to 'A'. Use the resultant
force vector obtained above to compute a force vector along the
given position vector, Ro/a.
20
Problem Title
Centroid of a quadrant of an ellipse
Centroid of a jetway
Equivalent force in an automobile
21
FG x IJ + FG y IJ
H aK H bK
2
=1
%0
1
2
3
4
5
6
7
% --------------------------------------------------------------------------% AUTHOR:
Dhaval Shah
% LAST UPDATE: August 4, 2000
%
% REFERENCE: Problem 4-15 on pg. 190 in Engineering Mechanics Statics by Soutas.
%
% PROBLEM OVERVIEW: This problem deals with computing the centroid of the area
%
formed by a quadrant of an ellipse whose equation is:
%
(x/a)^2 + (y/b)^2 = 1.
Status
-----Given
Given
Given
To be computed
To be computed
To be computed
% ----------------------------------------------------------------------------
%
%
%
%
%
22
dy = diff(y,theta);
% A = integral (xdy)
dA = x*dy;
A = int(dA,0,pi/2);
% To obtain the centroid of the given ellipse: Yc = [integral (ydA)]/A
% Xc = [integral (xdA1)]/A1
dA1 = y*dx;
A1 = int(dA1,0,pi/2);
cgy = y*dA;
cgx = x*dA1;
Yc = int(cgy,0,pi/2)/A;
Xc = int(cgx,0,pi/2)/A1;
% Display the results
fprintf('The Area formed by the quadrant of the ellipse is: ');pretty(A)
fprintf ('The X coordinate of the centroid is: '); pretty(Xc)
fprintf ('The Y coordinate of the centroid is: '); pretty(Yc)
%
%
%
%
%
%
FURTHER EXERCISES
(1) How would you modify the above program to obtain the area, and the centroid
of the semi ellipse.
(2) If we form a rectangle of dimension (a X b), then write a code to calculate
the area obtaind by deducting the quadrant of the ellipse from the rectangle.
(3) Solve the above problem for a special case when a = b.
23
MATLAB File
%
%
%
%
%
%
%
%
%
%
%
--------------------------------------------------------------------------AUTHOR:
Dhaval Shah
LAST UPDATE: August 4, 2000
REFERENCE: Problem 4-51 on pg. 205 in Engineering Mechanics Statics by Soutas.
PROBLEM OVERVIEW: To obtain the centre of gravity of the jetway leading to an
aircraft at each position as it telescopes out along the
x-axis. Given the length of each rectangular parallelepiped
is 20ft.and the walls are 3in. thick. The first section is
20ft X 10ft X 10ft
24
==============================================================================
FURTHER EXERCISES
(1) Would the centroid of the entire section change, if the breadth and the height
of the parallelopiped is changed?
(2) If one of the walls of the parallelopiped is kept open such that the jetway is
is open on one of its sides, what would be the new centroid of the entire
section for Lj = 10ft?
25
MATLAB File
% ---------------------------------------------------------------------------
% AUTHOR:
Dhaval Shah
% LAST UPDATE:
August 4, 2000
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
26
a = 2;
wc = 100;
%
%
%
%
%
27
Problem Title
Overhanging roof
Tow truck mechanism
Folding platform
Power-line pole
28
MATLAB File
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
--------------------------------------------------------------------------AUTHOR:
Dhaval Shah
LAST UPDATE: August 4, 2000
REFERENCE: Problem 5-31 on pg. 250 in Engineering Mechanics Statics by Soutas.
PROBLEM OVERVIEW: This problem deals with finding out an appropriate
the beam of mass 100kg to attach the cable so that
in the cable and the reaction force at the pin are
The cable is connected between point A on the wall
on the beam.
length on
the tension
the smallest.
and point B
Status
-----To be computed
To be computed
Given
Given
Given
To be defined
To be computed
To be computed
29
==============================================================================
FURTHER EXERCISES
(1) Compute the minimum tension in the cable by varying the height 'h'
and keeping the length 'L' at 'LMin' obtained above.
(2) If the beam cross section varies such that for first 2.5m from the
hinge, the cross-sectional area is twice as much as the rest of the
beam, calculate the minimum tension in the beam for M = 100 kg, L = 4m.
30
forces and the tension in the cable for values of from 0 to 60 in increments of 5 .
Incrementing in this manner corresponds to changing the position of the motor used to
hoist an object (usually an automobile) relative to the truck frame. Such information is
useful in the design of the hoist system. Is there a preferred position , where the
magnitude of the reaction force at A is a minimum?
MATLAB File
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
--------------------------------------------------------------------------AUTHOR:
Dhaval Shah
LAST UPDATE: August 4, 2000
REFERENCE: Problem 5-35 on pg. 251 in Engineering Mechanics Statics by Soutas.
PROBLEM OVERVIEW: This problem deals with computing the value of the reaction
forces and the tension in the cable for different values of
'Theta' from 0 to 60 degrees in increments of 5 degrees.
Calculate the value of 'Theta' at which the reaction is minimum.
CONCEPT KEYWORDS: Equilibrium, Rigid bodies.
VARIABLE DICTIONARY:
Variable
Remarks
-------------T
Force in the supporting cable
Tac
Force in the hoist cable
Lac
Length at bar AC
Theta
Angle between hoist cable and the lift bar
AC
Beta
Angle between supporting cable and the
lift bar AC
Alpha
Angle between lift bar AC and horizontal
Rp, Rt
Reaction components at A
AInc
Increment to be used with angle Theta
TMin
Min. force in cable
Status
-----To be computed
To be computed
Given
Given
Given
Given
To be computed
To be defined
To be computed
31
W = 1500;
AInc = 5;
Lac = 8;
Beta = 20;
Alpha = 60;
AngleToRadians = pi/180;
BetaR = Beta * AngleToRadians;
AlphaR = Alpha * AngleToRadians;
% ===== Part 1 of the problem ================================================
% Force in the hoist cable is equal to the supported weight
Tac = W;
% Resolving the tension in the cable into its 2 components.
% Tacp is the component perpendicular to the lift bar and
% Tact is along the bar.
% Tt = Tac*cos(Theta);
% Tp = Tac*sin(Theta);
% Taking moments about point A, we can obtain T.
% T*sin(Beta) * (2/3)Lac = Lac*W*cos(Alpha) - Lac*Tp
(eqn. (A))
% Now using the equilibrium equations along X and Y direction:
% Angle Theta is varying from 5 to 60 and is stored in array ThetaV.
J = 0;
% array increment
for I = 0:AInc:60
J = J + 1;
ThetaX = I;
ThetaR(J) = ThetaX * AngleToRadians;
Tacp = Tac*sin(ThetaR(J));
Tact = Tac*cos(ThetaR(J));
% Using the equation(A) as shown above, we can compute the value of T
TX = (W*cos(AlphaR)*Lac - Tacp*Lac)/(sin(BetaR)*(2/3)*Lac);
% Ensure that cable is always in tension
if (TX < 0)
J = J-1;
break;
end;
T(J) = TX;
ThetaV(J) = ThetaX;
% Compute the two components of T (along and perpendicular to the bar)
Tt = T(J)* cos(BetaR);
Tp = T(J)* sin(BetaR);
% Compute the two components of reaction R at A
Rp(J) = W*cos(AlphaR) - Tacp - Tp;
Rt(J) = W*sin(AlphaR) + Tact + Tt;
% Compute the resultant
R(J) = sqrt((Rp(J))^2 + (Rt(J))^2);
end
% Now we will plot the force in cable 'T' and reaction 'R' versus the angle 'Theta'
plot (ThetaV, T),hold on, plot(ThetaV, R),
text (ThetaV(2),T(2),'Tension'), text(ThetaV(5),R(5),'Reaction'),
grid
xlabel ('Theta (degrees)')
ylabel ('T (lb)')
TMin = min(T);
RMin = min(R);
% Compute the angles at which the reaction and the tension in the cable are minimum
32
for I = 1:1:J
if T(I) == TMin
AngleMinT = ThetaV(I);
end
if R(I) == RMin
AngleMinR = ThetaV(I);
end
end
% Display the result
fprintf ('The minimum reaction at point A is Rmin=')
fprintf ('%g N when Theta = %g degrees\n', RMin, AngleMinR);
fprintf ('The minimum force in the cable is Tmin=');
fprintf ('%g N when Theta=%g degrees.\n', TMin, AngleMinT);
%
%
%
%
%
%
%
==============================================================================
FURTHER EXERCISES
(1) Compute the minimum tension in the cable by varying the length of lift bar Ac
from 2ft to 10ft.
(2) If the supporting cable was connected at point C at one end and maintaining its
other end at hinge, compute the maximum tension in the cable for different values
'Theta' varying from 20 to 60 degrees.
33
MATLAB File
% ---------------------------------------------------------------------------
% AUTHOR:
Dhaval Shah
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
August 4, 2000
LAST UPDATE:
Status
-----Given
Given
Given
34
% X
Reactions at A,B,C
To be computed
%==================================================================================
% Set default values
P(1) = 0;
P(2) = -3000;
A(1) = 0;
A(2) = 0;
B(1) = 1;
B(2) = 0;
C(1) = 0.5; C(2) = 0;
D(1) = 0.5; D(2) = 0;
Ra(1) = 0; Ra(2) = 1;
Rb(1) = 0; Rb(2) = 1;
Rc(1) = 1; Rc(2) = 1;
P(3) = 0;
A(3) = 1.2;
B(3) = 1.2;
C(3) = 0;
D(3) = 0.4;
Ra(3) = 1;
Rb(3) = 0;
Rc(3) = 1;
% There are six unknowns (Ray, Raz, Rby, Rcx, Rcy, Rcz)
% and six equations of equilibrium that we can write as
%
S X = Q
for i=1:1:6
Q(i) = 0;
for j=1:1:6
S(i,j) = 0;
end;
end;
% Force equilibrium equations
S(1,4) = 1;
S(2,1) = 1; S(2,3) = 1; S(2,5) = 1;
S(3,2) = 1; S(3,6) = 1;
% Take moments about the hinge C
S(4,1) = -1.2; S(4,3) = -1.2;
S(5,2) = 0.5;
S(6,1) = -0.5; S(6,3) = 0.5;
Rdc = D - C;
M = cross (Rdc, P);
% Generate the right-hand side vector
Q = [-P(1); -P(2); -P(3); -M(1); -M(2); -M(3)];
% Solve
X = inv(S)*Q;
% Display the results
fprintf ('The (y,z) reactions at point A are ');
fprintf ('%g N and %g N\n', X(1), X(2));
fprintf ('The (y) reaction at point B is ');
fprintf ('%g N\n', X(3));
fprintf ('The (x,y,z) reactions at point C are ');
fprintf ('%g N, %g N and %g N\n', X(4), X(5), X(6));
35
MATLAB File
%0
1
2
3
4
5
6
7
% -----------------------------------------------------------------------------% AUTHOR:
Dhaval Shah
% LAST UPDATE: August 4, 2000
%
% REFERENCE: Problem 5-80 on pg. 281 in Engineering Mechanics Statics by Soutas.
%
% PROBLEM OVERVIEW: This problem deals with computing the tensions T1, T2, R
%
in order to compute the reaction forces at A, D, C and B.
% CONCEPT KEYWORDS: Free-body diagrams, Equilibrium
%
% VARIABLE DICTIONARY:
% Variable
Remarks
% -------------% O
Point O is the origin
% Ax,Ay,Az
The x, y, z coordinates of point
% Bx,By,Bz
The x, y, z coordinates of point
% Cx,Cy,Cz
The x, y, z coordinates of point
% Dx,Dy,Dz
The x, y, z coordinates of point
% Ex,Ey,Ez
The x, y, z coordinates of point
% Fx,Fy,Fz
The x, y, z coordinates of point
equations
A
B
C
D
E
F
Status
-----Given
Given
Given
Given
Given
Given
Given
36
%
%
%
%
%
%
%
%
%
%
%
%
Gx,Gy,Gz
T1,T2,R
Lzcg,Lxcg,Lycg
Lzdf,Lxdf,Lydf
Lzbe,Lxbe,Lybe
Lgc
Ldf
Lbe
F
Rxa
Rya
Rza
Given
To be
To be
To be
To be
To be
To be
To be
Given
To be
To be
To be
computed
computed
computed
computed
computed
computed
computed
computed
computed
computed
(a) ===========================================
+ (Cz-Gz)^2);
+ (Ez-Bz)^2);
+ (Dz-Fz)^2);
= (-Cy+Gy)/Lgc;
(Ey-By)/Lbe;
(Dy-Fy)/Ldf;
R:
37
M3 = cross(Rda,RV);
% Compute the moments due to the given force F:
Rx = 0; Ry = 0; Rz = 10;
R = [Rx; Ry; Rz];
F = [Fx; Fy; Fz];
Mf = cross(R,F);
% Solve the linear equations [A][x] = [B]
% A = [ Ax Ay Az T1 T2 T3 ]
a = [1 0 0 Lxcg Lxbe Lxdf]; b = [0 1 0 Lycg Lybe Lydf];
c = [0 0 1 Lzcg Lzbe Lzdf]; d = [0 0 0 M1(1) M2(1) M2(1)];
e = [0 0 0 M1(2) M2(2) M3(2)]; f = [0 0 0 M1(3) M2(3) M3(3)];
A = [d;e;f;a;b;c];
B = [-Mf(1);-Mf(2);-Mf(3);-FFx;0;0];
X = inv(A)*B;
% Display results
fprintf('The reaction at A in x direction is Xa = %g\n',X(1));
fprintf('The reaction at A in x direction is Ya = %g\n',X(2));
fprintf('The reaction at A in x direction is Za = %g\n',X(3));
% FURTHER EXERCISES
% (1) Solve the above problem for F =50j + 20k.
% (2) If the connection at A is not a ball and socket type and if
%
Ma = 25i + 45j + 50k for F = 60i + 30K, calculate the tension in the
%
cables T1, T2, R.
38
Problem 2.5.4
Problem 2.5.5
Problem Title
Cantilevered truss analysis
Truss analysis of a joack support stand
Space frames supporting windowwashing scaffold
Lever system
Plow mechanism
39
MATLAB File
%
%
%
%
%
%
%
%
%
%
-----------------------------------------------------------------------------AUTHOR:
Dhaval Shah
LAST UPDATE: August 4, 2000
REFERENCE:
PROBLEM OVERVIEW: This problem deals with computing the internal forces in the
members and the reactions in the truss subjected to a wind load
of 1000KN at joint D. Given L2 = 500N and L1 = 1000N are the
forces acting joints C and E respectively.
Status
-----To
To
To
To
To
To
To
To
To
To
To
be
be
be
be
be
be
be
be
be
be
be
computed
computed
computed
computed
computed
computed
computed
computed
computed
computed
computed
40
%
%
%
%
%
==============================================================================
FURTHER EXERCISES
(1) Compute the force in member CD if the force L3 = 1000N.
(2) Vary the length of AB from 1 to 10ft and calculate the corresponding force in
member CD.
41
MATLAB File
% -----------------------------------------------------------------------------%
%
%
%
%
%
%
%
%
%
AUTHOR:
LAST UPDATE:
REFERENCE:
Dhaval Shah
August 4, 2000
Problem 6-20 on pg. 302 in Engineering Mechanics Statics by Soutas.
PROBLEM OVERVIEW: This problem deals with computing the smallest value of force
in each member by choosing the angle 'Theta'.
Given that the stand BD must be 0.15m high and the width of the
stand AC must be less than 0.4 m. The maximum load on the stand
is 1500N.
Status
-----Given
Given
To be computed
To be computed
To be computed
To be computed
To be computed
42
==============================================================================
FURTHER EXERCISES
(1) Keeping the angle 'Theta' constant at 25 degrees, vary the height of
member DB between 0.1 m and 0.3 m and plot the forces in each member
against the height DB.
(2) Reformulate the design problem statement to obtain a more meaningful
43
design result.
44
MATLAB File
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
--------------------------------------------------------------------------AUTHOR:
Dhaval Shah
LAST UPDATE: August 4, 2000
REFERENCE: Problem 6-60 on pg. 316 in Engineering Mechanics Statics by Soutas.
PROBLEM OVERVIEW: This problem deals with computing a the reaction forces
and the force in each member of a window-washing
scaffold supported by 2 space trusses.
Status
-----Given
Given
Given
Given
Given
Given
To be computed
To be computed
To be computed
To be computed
To be computed
To be computed
To be computed
To be computed
To be computed
To be computed
% ----------------------------------------------------------------------------
45
46
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%g
%g
%g
%g
%g
%g
%g
%g
%g
%g
%g
%g
%g
%g
%g
kN\n',x(1));
kN\n',x(2));
kN\n',x(3));
kN\n',x(4));
kN\n',x(5));
kN\n',x(6));
kN\n',x(7));
kN\n',x(8));
kN\n',x(9));
kN\n',x(10));
kN\n',x(11));
kN\n',x(12));
kN\n',x(13));
kN\n',x(14));
kN\n',x(15));
47
%
%
%
%
%
%
==============================================================================
FURTHER EXERCISES
(1) Solve the above problem, if C has a pin restraint in the y-direction
instead of x-direction.
(2) Is the structure statically determinate if C has a pin restraint in both
x and y directions?
48
MATLAB File
% ------------------------------------------------------------------------------
% AUTHOR:
Dhaval Shah
% LAST UPDATE:
August 4, 2000
Status
-----To be computed
Given
Given
To be computed
To be computed
To be computed
% --------------------------------------------------------------------------------% Define variables or parameters that are to needed to compute the unknown quantities
syms a b c d F P
49
% Display results:
fprintf('The reactions at the joints are:\n');
fprintf('Va:'); pretty(Va)
fprintf('Vb:'); pretty(Vb)
fprintf('Vc:'); pretty(Vc)
fprintf('The force F = '); pretty(F)
50
MATLAB File
% ---------------------------------------------------------------------------
% AUTHOR:
Dhaval Shah
51
% Fx,Fy
Reaction at F along X, Y axis
To be computed
% Cx,Cy
Reaction at C along X, Y axis
To be computed
% ---------------------------------------------------------------------------% Set default values:
P = 10; W = 1.5;
% From the geometry of figure, the angle CF makes with the horizontal is:
Alpha = atan(0.1/0.3);
%
%
%
%
Consider the equilibrium of the body 'FDC'. Forces 'Fx', 'Fy' are the pin
forces acting at 'F'. Fde acts at 'D' at an angle 'Beta'. 'Cx', 'Cy' are the
the pin forces at 'C'.
Sum Fx = Cx - Fx + Fdecos(Beta) = 0
....(A)
Sum Fy = Cy + Fy - Fdesin(Beta) = 0
....(B)
Md = Cy(0.05) + Cx(0.2) - Fy(0.45) = 0
....(C)
The angle that FB makes with the horizontal is 'Theta':
Theta = atan(0.3/0.1);
Consider the equilibrium of the bar 'AFE'. Forces 'Fx', 'Fy' are the pin
forces acting at 'F'. Fde acts at 'E' at an angle 'Beta'. Ffb acts at
'F' at an angle 'Theta'.
Sum Fx = Fx - Fdecos(Beta) - Fgfcos(Alpha) - Fbfcos(Theta) - Ax = 0 ...(D)
Sum Fy = -Fy + Fdesin(Beta) - Fgfsin(Alpha) + Fbfsin(Theta) - Ay = 0 ...(E)
Mf = Fdesin(Beta)(0.2) + Fdecos(Beta)(0.2) + Ay(0.3) - Ax(0.4) = 0
From Mf = 0, we get:
Fde = (Ax*(0.4) - Ay*(0.3))/(sin(Beta)*0.2 + cos(Beta)*0.2);
at A
= %g
= %g
at C
at F
= %g
are Ax
kN\n',
kN\n',
are Cx
are Fx
kN\n',
52
Problem 2.6.2
Problem Title
Airplane wing acting as a cantilevered
beam
Computations of tension in cable
segments
53
MATLAB File: This is the main m-file which calls FV731.m and FB731.m files to plot the shear and bending functions.
% ---------------------------------------------------------------------------
% AUTHOR:
Dhaval Shah
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
August 4, 2000
LAST UPDATE:
To calculate the total force acting on the beam we need to integrate the
distributed load w(x) along the length of the beam. The total load is the
area under the curve of the load w(x). Consider a vertical strip of
infinitesimally small thickness 'dx' at any 'x' having length of 'w(x)'.
Let the area of this strip be dA = w(x)dx. As this strip moves along
the x axis from '0' to 'L', we need to integrate the above equation dA
54
% ==============================================================================
% FURTHER EXERCISES
% (1) Solve the same problem by taking a vertical strip moving along the w(x) axis.
55
MATLAB FILE: This is the main m-file. The equations are defined in m- file sp759_fcn.m and the nonlinear equation solver is in
file mnewt.m.
% ---------------------------------------------------------------------------
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
AUTHOR:
LAST UPDATE:
Dhaval Shah
August 4, 2000
56
alpha3
25];
57
2.7 Friction
Two problems are solved in this section.
This Guides Problem
ID
Problem 2.7.1
Problem 2.7.2
Problem Title
Wedge on an inclined plane
Leveling of a refrigerator by using a
wedge
58
MATLAB File
% ---------------------------------------------------------------------------
% AUTHOR:
Dhaval Shah
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
August 4, 2000
LAST UPDATE:
Status
-----Given
Given
To be varied
% Nus
Coefficient of Static Friction
Given
% Nuk
Coefficient of Kinetic Friction
Given
% Fs
Static frictional force
To be computed
% Fk
Kinetic frictional force
To be computed
% N
Normal force perpendicular to
%
the inclined plane
Intermediate qty
% AInc
Increments to change the angle 'Beta'
Given
% ---------------------------------------------------------------------------% Set default values
W = 40;
P = 10;
Nus = 0.75; Nuk = 0.65;
AInc = 5;
AngletoRadians = pi/180;
59
% Now run through the for loop to get the different values of Beta
% from 0 to 65 degrees.
J = 0;
for I = 0:5:65
J = J + 1;
Beta(J) = I;
BetaR(J) = I * AngletoRadians;
% Define equilbrium equations to obtain the unknowns.
% Components perpendicular to the inclined plane are equated.
N = W*cos(BetaR(J));
Fs = Nus * N;
% Components along the plane are equated.
Fact = (W*sin(BetaR(J)) + P);
if Fs < Fact
fprintf ('The block will slide for angle %g degrees.\n',...
Beta(J));
Fk = Nuk * N;
fprintf ('Now that the block slides, the frictional');
fprintf (' force is %g lb\n', Fk);
else
fprintf (' The block will not slide for angle %g degrees.\n',...
Beta(J));
end
end
%
%
%
%
%
%
==============================================================================
FURTHER EXERCISES
(1) Resolve the above problem if the force P as shown in the figure is at an
inclination of 20 degrees with the inclined plane.
(2) Compute the force P in the above problem such that the block stays at rest
for all the cases of Beta varying from 0 to 65 degrees.
60
MATLAB FILE:
% ---------------------------------------------------------------------------
% AUTHOR:
Dhaval Shah
% LAST UPDATE:
August 4, 2000
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
Status
-----Given
To be computed
Given
Given
To be computed
To be computed
To be computed
61
% N
Normal force perpendicular to
%
the inclined plane of the wedge
Intermediate qty
% ---------------------------------------------------------------------------% Set absolute values:
W = 800;
W1 = W/4;
% weight on each foot of the refrigerator
Nus1 = 0.8; Nus2 = 0.2; Nus3 = 0.4;
Beta = 10;
AngletoRadians = pi/180;
BetaR = Beta * AngletoRadians;
% Consider the foot of the refrigerator in equilibrium and compute the force
% normal to its foot
N1 = W1;
% Compute the frictional force
Fs1 = N1*Nus1;
% Consider the equilibrium of the wedge on which 'P' is applied.
% Equating all the forces along the vertical:
N2 = W1/(cos(BetaR) - Nus2*sin(BetaR));
% Equating all the forces along the horizontal:
Fs2 = Nus2*N2;
P = Fs1 + N2*sin(BetaR) + Fs2*cos(BetaR);
% Display results:
fprintf ('The minimum force P required to level the refrigerator');
fprintf (' is: %g lb\n', P);
% ==============================================================================
% FURTHER EXERCISES
% (1) Solve the above problem for Beta = 5 degrees.
62