





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A detailed explanation of how to calculate the centroids and center of mass of various shapes, including semicircles, quarter-circles, semi-elliptical regions, quarter-elliptical regions, and general spandrels, using MATLAB and its symbolic toolbox. The document also includes MATLAB code examples and output results.
Typology: Study notes
1 / 9
This page cannot be seen from the preview
Don't miss anything!
Spyros Andreou, Jonathan Lambright, Lemma Mulatu Department of Engineering Technology and Mathematics Savannah State University, Savannah, GA 31404
Abstract: The centroid or a center of gravity of any object is the point within that object from which the force of gravity appears to act. It is important for building bridges, dams and roofs of buildings which can be semi-elliptical or semi-circular. Let the coordinates
of the centroid be (^) x and (^) y in x, y direction. The calculation of these coordinates is done
by mathematical integration given by the formulas A
xdA
ydA
is the area of the object. In this project we will utilize MATLAB with its symbolic toolbox to do this mathematical integration for areas such as quarter and semicircular area, quarter and semielliptical area, parabolic spandrel and semi-parabolic area. In the beginning of this project a simple calculation is demonstrated without using the software.
Key Words: centroid, center of mass, distributed forces
Introduction
The purpose of this project is to understand the concept of distributed forces acting on as body or on an object and the necessity of calculating its centroid or center of mass. For example, consider the design of high-performance sail-boats where both air- pressure distributions on the sails and water-pressure distributions on the hull must be taken into account. Another example is huge dams where they are subjected to three different kinds of distributed forces such as the weights of their constituent elements, the pressure forces exerted by the water of their submerged face and the pressure forces exerted by the ground on their base. A precast section of roadway for a new interchange on interstates is an additional example where the location of the centroid and the behavior of the roadway under loading are established. Finally, the roofs of the buildings must be able to support not only the total weight of the snow but also the non-symmetric distributed loads resulting from drifting of the snow. A typical example of a three- dimensional body is the modified Boeing 747 transporting a space shuttle where the flight characteristics are predicted by determining the center of gravity of each craft. However, this is beyond the scope of this project. The aforementioned examples demonstrate how important is to know the location of the centroid for a civil engineer. Therefore, the main purpose of this project is to utilize the MATLAB software to locate the centroid of common shapes such as quarter and semicircular, quarter and semielliptical, parabolic spandrel and semi-parabolic. In doing so, the knowledge of calculus especially integration is necessary. These integrals are very difficult to be evaluated. We will be writing simple MATLAB code to do the integration for us and the results are provided. Our variables are algebraic and the reader can substitute any specific numerical values and the specific centroid. A composite plate is also demonstrated without the use of integration. We encourage the reader to do
Figure2. A Semicircle
The MATLAB code for the calculation is shown in figure 3.
syms r theta %defining the symbols r & theta for the integration. x=rcos(theta); % x in polar coordinates y=rsin(theta); % y in polar coordinates dx=diff(x,theta); dy=diff(y,theta); %taking derivative to obtain the area A of the circle dA=xdy; A=int(dA,0,pi); % To obtain the centroid of the circle Yc = (∫ydA)/A and Xc = (∫xdA1)/A dA1=ydx; A1=int(dA1,0,pi); cgy=ydA; cgx=xdA1; Yc=int(cgy,0,pi)/A; Xc=int(cgx,0,pi)/A1; fprintf('The Area formed by the semicircle is: ');pretty(A) fprintf('The X coordinate of the centroid is: ');pretty(Xc) fprintf('The Y coordinate of the centroid is: ');pretty(Yc)
Figure3. MATLAB code for the Centroid of a Semicircle
The MATLAB output is shown in figure 4
The Area formed by the semicircle is: 2 1/2 r pi The X coordinate of the centroid is: 0 The Y coordinate of the centroid is: r 4/3 ---- pi
Figure4. The X and Y coordinate of the Centroid of a Semicircle
For whatever numerical value of r, we can get the numerical values of the centroid.
For the quarter-circular region shown in figure 5, we simply change the limits of integration from 0 to π/2 and the result is shown in figure 6.
Figure5. A quarter-circular region
The Area formed by the quadrant of the circle is: 2 1/4 r pi The X coordinate of the centroid is: r 4/3 ---- pi The Y coordinate of the centroid is: r 4/3 ---- pi
Figure6. The X and Y coordinate of the Centroid of a Quarter-circular region
b) Semielliptical To calculate the centroid of the ellipse (very similar with the circle), we need to calculate its area A as follows: The equation of the ellipse is (x/a)^2 + (y/b)^2 = 1 where a and b are its x and y axes. Consider a vertical strip of infinitesimally small thickness ‘dx’ at any ‘x’ having height of ‘y’. Let the area of this strip be dA = ydx. As the strip moves along the x axis from ‘0’ to ‘a’, we need to integrate the dA equation from ‘0’ to ‘a’. The MATLAB code for the calculation is shown in figure 7.
syms a b theta % defining the symbols for integration x=acos(theta); y=bsin(theta);% both x and y converted to polar coordinates dx=diff(x,theta); dy=diff(y,theta);%taking the derivatives dA=xdy; % To obtain the centroid of the circle Yc = (∫ydA)/A and Xc = (∫xdA1)/A A=int(dA,0,pi); dA1=ydx;
Figure10. A general spandrel region
are constants. Consider a vertical strip of infinitesimally small thickness ‘dx’ at any ‘x’ having height of ‘y’. Let the area of this strip be dA = ydx. As the strip moves along the x axis from ‘0’ to ‘a’, we need to integrate the dA equation from ‘0’ to ‘a’. The MATLAB code for the calculation is shown in figure 11.
%general spandrel syms a h x n %symbols for integration y=(h./(a.^n)).x^n; % equation for the parabolic spandrel dx=diff(x); % differentiation dA=ydx; A=int(dA,0,a); %integration to find area A cgy=xdA; cgx=0.5y*dA; Xc=int(cgy,0,a)/A; Yc=int(cgx,0,a)/A; fprintf('The Area formed by the parabolic spandrel is: ');pretty(A) fprintf('The X coordinate of the centroid is: ');pretty(Xc) fprintf('The Y coordinate of the centroid is: ');pretty(Yc)
Figure11. MATLAB code for the Centroid of a general spandrel region.
The MATLAB output is shown in figure 12
The Area formed by the parabolic spandrel is: a h
n + 1
The X coordinate of the centroid is: a (n + 1)
n + 2
The Y coordinate of the centroid is: h (n + 1) 1/2 --------- 2 n + 1
Figure12. The X and Y coordinate of the Centroid of a general spandrel region
For the case of n =2 then we have a parabolic spandrel of the form y = (h/a^2 ) x^2. So, the output is shown in figure 13
The Area formed by the parabolic spandrel is: 1/3 h a The X coordinate of the centroid is: 3/4 a The Y coordinate of the centroid is: 3/10 h
Figure13. The X and Y coordinate of the Centroid of a Parabolic spandrel region
The above ideas can be extended to the semi-parabolic and parabolic areas shown in figure 14
Figure14. Semi-parabolic and parabolic areas
The MATLAB output for the semi-parabolic region is shown in figure 15
The Area formed by the semi-parabolic area is: 2/3 a h The X coordinate of the centroid is: 3/8 a The Y coordinate of the centroid is: 3/5 h
Figure15. The X and Y coordinate of the Centroid of a semi-parabolic region