Professional Documents
Culture Documents
Report Template
Report Template
Section
(insert section here)
Submitted to:
Engr. Jaydee N. Lucero, RCE
Date Submitted:
(insert date submitted here)
Statics of Rigid Bodies (insert all your surnames here)
Design Project
1 INTRODUCTION
The shear stress across the cross section of a prismatic member can be determined by using
the Prandtl Stress function. It is observe that the farthest perimeter from the center carries the greatest,
at the same time constant, shear stress and zero on the free surface. This is true only for all smooth
perimeters but for the case of rectangular cross sections with abrupt change of direction of the shear
flow, the stress on the perimeter is not constant. In such cases, we can compute for the shear stress at
specific points across the cross section by using numerical methods like Finite Difference Method or
Finite Element Method.
In this machine problem the group is tasked to compute for the shear stress on any grid point
across the cross section of a circular shaft member.
This executive report aims to answer the problem statement and explain the methods and
solutions used in computing the stresses across the cross section of the member.
2 THEORETICAL BACKGROUND
Certain assumptions are made in the derivation of the Prandtl stress equation. These are [2]
(1) The shaft is homogeneous and prismatic.
(2) Only the effects of surface forces will be considered. The effects of body forces are neglected.
Hence it can be assumed thatσ x =σ y =τ xy =0, and thus no traction on the shaft.
(3) The projection of a cross-section moves as a rigid body about the center of twist.
(4) The rotation of projection of the cross-section is a linear function of the axial coordinate
which in this case is the z -axis.
(5) Plane sections do not remain plane after twisting.
{
'
u=−θ zy
v=θ' zx
w=w ( x , y )
(Equation 1)
∂w
σ z =E ε z=E =0
∂z
2
Statics of Rigid Bodies (insert all your surnames here)
Design Project
(Equation 2)
Therefore
∂ τ xz ∂ τ yz
[( )( )]
2 2
∂ w ' ∂ w ' '
− =G −θ − +θ = −2G θ
∂y ∂x ∂ y ∂x ∂x ∂ y
(Equation 3)
∂ϕ ∂ϕ
τ xz = ;τ yz =−
∂y ∂x
(Equation 4)
( )
∂ ∂ϕ
−
∂
∂ y ∂ y ∂x
−
∂x ( )
∂ ϕ ∂2 ϕ ∂ 2 ϕ
= 2 + 2 =− 2Gθ '
∂x ∂ y
(Equation 5)
For the boundary conditions, we consider first the lateral surface S of the shaft. If z -axis is the
longitudinal axis of the shaft, then we have n=0. Then from the general theorem again [1]
∂ϕ ∂ϕ
Z=σ z n+τ xz l+τ yz m=τ xz l+τ yz m= l− m=0
∂y ∂x
(Equation 6)
dy dx dx dy
l= = ;m=− =
ds dn ds dn
(Equation 7)
Simplifying,
∂ ϕ dy
⋅ + −
∂ y ds
∂ϕ
∂x( )( )
−
dx ∂ ϕ
ds
= =0⟹ ϕ =C ≔0
∂s
(Equation 8)
Next , we take the end surface, where loads and couples are applied. The direction cosines are
l=0 ,m=0 ,n=1. Hence [1]
∂ϕ
X =σ x l+ τ xy m+ τ xz n=
∂y
∂ϕ
Y =τ yx l+ σ y m+ τ yz n=−
∂x
3
Statics of Rigid Bodies (insert all your surnames here)
Design Project
(Equation 9)
Now, equating the applied torques with the resultant of the internal torques, we obtain
M z =T =∬ ( x Y − y X ) dA=∬ x
R R
( ∂ϕ
∂x
+y
∂ϕ
∂y )
dA
(Equation 10)
T =2∬ ϕdA
R
(Equation 11)
Now Equations 4, 5 and 11, can be rewritten for numerical analysis. Let ϕ =Gθ' Φ, so that
∂2 Φ ∂2 Φ
+ =− 2
∂ x2 ∂ y2
(Equation 5a)
T
T =2 Gθ ∬ Φ dA ⟹ θ =
' '
R 2G ∬ Φ dA
R
(Equation 11a)
∂Φ ∂Φ
τ xz =Gθ ' ; τ =−G θ'
∂ y yz ∂x
(Equation 4a)
τ =√ τ 2xz +τ 2yz
(Equation 12)
Consider a solid circular shaft of length L and radius r . Setting the origin of xy -axis at the
center, we have f ( x , y )=x 2+ y 2 −r 2=0. We seek a Prandtl stress function of the form
ϕ ( x , y )=Kf ( x , y )=K ( x + y − r )
2 2 2
∂x 2
∂y 2
Hence
ϕ (x , y ) 1 2 2 2
Φ ( x , y )= =− ( x + y −r )
Gθ
'
2
(Equation 13)
4
Statics of Rigid Bodies (insert all your surnames here)
Design Project
' T
Therefore, θ = , as desired.
JG
( )
'
∂ Gθ ( ) T Ty
K ( x + y − r )=−
2 2 2
τ xz = 2 y =− G y=−
∂y 2 JG J
τ yz=−
∂
∂x
K ( x + y − r )=
2 2 2 Gθ '
2
( 2 x )=G T x= Tx
JG J ( )
So from Equation 12,
τ =√ τ +τ =
2
xz
2
yz
√( −
J
+ )( )
Ty 2 Tx 2 T
J
= √ x 2+ y 2 =
J
Tρ
J
which agrees with the standard torsional shear stress formula for circular shafts.
We will obtain a form of the finite difference formula for Equation 5a which accounts for the
irregular boundary of the circular surface S. Figure 1 below shows an arbitrary surface S, current point
Φ i , j , and neighbour points Φ i− 1 , j , Φ i+1 , j, Φ i , j − 1 and Φ i , j +1. Distances from Φ i , j to neighbour points
are aℎ, bℎ, pk and qk , respectively, where a , b , p , q ∈ [ 0,1 ] and ℎ , k are step sizes in horizontal and
vertical directions, respectively. Taylor expansions [4] give
Figure 1
5
Statics of Rigid Bodies (insert all your surnames here)
Design Project
2
∂ Φi , j 1 ∂ Φi , j
Φ i− 1 , j =Φi , j −aℎ + ( aℎ )2 +…
∂x 2 ∂x
2
(Equation 14)
2
∂ Φi , j 1 2 ∂ Φi , j
Φ i+1 , j=Φi , j +bℎ + ( bℎ ) +…
∂x 2 ∂x
2
(Equation 15)
∂Φ i , j
Remove from both equations by b × (14) + a × (15), giving
∂x
1 2 ∂2 Φi , j
b Φ i− 1 , j+ a Φi+1 , j= ( a+b ) Φ i , j + ab ℎ ( a+ b )
2 ∂ x2
or
2
( )
∂ Φi , j 2 1 1 1
= Φi − 1 , j − Φi , j + Φ
∂x
2 2
ℎ a ( a+b ) ab b ( a+b ) i +1, j
(Equation 16)
( )
∂ Φi , j 2 1 1 1
= Φ i , j− 1 − Φi , j + Φi , j+1
∂y
2 2
k p ( p+ q ) pq p ( p+q )
(Equation 17)
2
(1
ℎ a ( a+b )
2
1
Φ i −1 , j − Φ i , j +
ab
1
b ( a+ b )
2
Φ i+1 , j + 2
1
) (
k p ( p+q )
Φi , j − 1 −
1
pq
Φ i , j+
1
p ( p+ q )
Φ i , j+1 =−2
)
Finally, solving for Φ i , j ,
2 2 2
bpq k apq k abq ℎ
Φi , j = Φi −1 , j + Φ i+1 , j+ Φ i , j− 1
( ab ℎ + pq k ) ( a+b )
2 2
( ab ℎ + pq k ) ( a+ b )
2 2
( ab ℎ + pq k 2 ) ( p+ q )
2
+abp ℎ2 abpq ℎ2 k 2
Φ +
( ab ℎ 2+ pq k 2 ) ( p+ q ) i , j +1 ab ℎ2+ pq k 2
(Equation 18)
Equation 18 is the five-point finite difference formula that will be used in the machine
problem. If all neighbour points of the current point are inside the surface, then a=b= p=q=1.
Equations 4a and 11a, being required in further numerical analysis, can be computed
numerically. Stefan, et al [3] suggested the use of Simpson’s rule to evaluate the double integral,
obtaining
6
Statics of Rigid Bodies (insert all your surnames here)
Design Project
' T
θ= m− 2 n −2
Φi . j+ Φi , j+1 +Φ i+1 , j+ Φi+ 1, j +1
2 Gℎk ∑ ∑
i=0 j =0 4
(Equation 11b)1
Equation 4a can be rewritten using difference formulas for first derivatives. However, it is
subjected to the location of current point and neighbour points. Fortunately, it is just required to
follow Figure 1 and Equations 14 and 15 up to the first derivatives. We have
∂ Φi , j
Φ i− 1 , j =Φi , j −aℎ +…
∂x
(Equation 14a)
∂ Φi , j
Φ i+1 , j=Φi , j +bℎ +…
∂x
(Equation 15a)
∂Φ i , j
(15a) – (14a) and then solving for yields
∂x
∂Φ i , j Φ i , j+1 − Φi , j −1 Φ −Φ i , j − 1
= ⟹ ( τ xz )i , j=Gθ ' i , j+1
∂y ( p+q ) k ( p+q ) k
(Equation 20)
Equations 19 and 20 applies provided that Φ i , j − 1, Φ i , j +1, Φ i− 1 , j and Φ i+1 , j are neighbour
points of an interior current point. Otherwise (if the current point is on the boundary), only the
modified forward and backward difference formulas must be used. These formulas are obtained by
∂Φ i , j
solving Equations 14a and 15a (and similar equations for vertical direction) separately for and
∂x
∂Φ i , j
. This gives
∂y
m −1 n − 1
T Φ +Φ i+1 , j+Φ i , j+1 +Φi +1 , j+1
1
Stefan, et al [3] erroneously wrote θ =
'
∑ ∑
2 G i=1 j=1
( y i+1 − y i ) ( z j+1 − z j ) i , j
4
.
7
Statics of Rigid Bodies (insert all your surnames here)
Design Project
As before, if the neighbour points are inside the circle, then a=b= p=q=1.
3 METHODOLOGY
The group created a C program that asks for the radius of the circular shaft (in m ), modulus of
N
rigidity (in Pa= ), length of the shaft (in m ) and internal torque (in N ⋅m). The program also
m2
requests for the step sizes ℎ and k in horizontal and vertical directions, respectively. The final output
of the program is the total shear stress distribution of the shaft.
Throughout the entire program, the group stick to the Cartesian coordinate system. First, a
square is made to enclose the circular surface. The square is cut into grids according to the input
values of ℎ and k and to which the finite difference analysis will be based.
The origin is first set at the center of the circle. The surface is then defined in ** section,
where each element pointed to by this pointer corresponds to a grid point. If the point lies in the circle,
i.e. x 2+ y 2 ≤ R2, the corresponding array element is then marked as 1, otherwise it is marked as 0. This
step is done to all grid points, and after which the origin will be transferred to the lower left corner of
the square. It is written in the .csv file SECTION.
The next step is to calculate the reduced Prandtl stress function Φ . Beforehand, the initial
value of Φ at each point is set as 0. Then the Gauss-Seidel iteration method is used to calculate the
current iteration value of Φ i , j by Equation 18, considering all cases, whether the point of Φ i , j is near
boundary or not, whether the point is inside the surface or not.
If the point is outside the surface, then it is skipped. Otherwise, if the point is within the
surface, that point is checked for its neighbour points. If at least one of the points around Φ i , j of
interest is outside the surface, the values of a , b , p and q will be computed for use in Equation 18.
This depends upon the locations of the point of interest and the location of neighbour points inside
and outside the surface. Of course, if all neighbour points are inside the circle, then a=b= p=q=1.
Else, by geometry as shown in Figure 2,
8
Statics of Rigid Bodies (insert all your surnames here)
Design Project
Figure 2
|√ ( ) ( )|
2
m− 1 n −1
R 2 −ℎ 2 I − +k J −
2 2
a=
k
|√ ( ) ( )|
2
2 2 m− 1 n −1
R −ℎ I − −k J −
2 2
b=
k
|√ ( ) ( )|
2
2 2 n −1 m −1
R −k J − +ℎ I −
2 2
p=
ℎ
|√ ( ) ( )|
2
2 2 n −1 m− 1
R −k J− −ℎ I −
2 2
q=
ℎ
(Equation 23)
Regression analysis made by the group revealed that the number of Gauss-Seidel iterations to
achieve a certain level of accuracy is directly proportional to the number of data points. Thus, the
group decided to take the number of iterations equal to the number of data points.
9
Statics of Rigid Bodies (insert all your surnames here)
Design Project
The angle of twist per unit length θ' is then computed from Equation 11b, and the percent
error is also computed. The precision of θ' after N iterations as deemed by Equation 24 is at least six
decimal places. The data for Prandtl stress Φ i , j for all points is written in a comma-separated value
Excel file PRANDTL STRESS.
The shear stresses τ xz and τ yz is then computed using first derivative difference formulas, the
type of formula being dependent on the current point of interest, as with computing Prandtl stress. If
the point is outside the surface, i.e. section[I][J] = 0, computation is ignored, otherwise it must be
computed.
In the computation of τ xz , if the point is on the left edge, i.e. I = 0, use the forward difference
formula, and if the point is on the right edge, i.e. I = m – 1, use the backward difference formula.
Otherwise, use the central difference formula.
However, care must be taken in using the central difference formula for near-boundary points,
as before. If at least one of the neighbour points of Φ i , j is outside the surface, corresponding values of
a , b , pand or q must be calculated first from Equation 23 before using the difference formulas from
Equations 21 and 22.
section[I-1][J] = 0
Φ i+1 , j −Φ i −1 , j ' Φ i , j −Φ i −1 , j
( τ xz )i , j=−G θ' ; ( τ xz )i −1 , j=−G θ
( a+1 ) ℎ aℎ
section[I+1][J] = 0
section[I][J-1] = 0
section[I][J+1] = 0
Φ i , j+1 − Φi , j −1 Φ −Φ i , j
( τ yz )i , j=G θ' ; ( τ yz )i , j +1=G θ' i , j +1
( q+1 ) k qk
The values of τ xz and τ yz for all points are divided by 106 before writing in two separate .csv files,
SHEAR STRESS XZ and SHEAR STRESS YZ, respectively, so that the values will be in MPa.
Finally, the total shear stress for each point is computed from Equation 12, and is written in the .csv
file SHEAR STRESS TOTAL.
10
Statics of Rigid Bodies (insert all your surnames here)
Design Project
11
Statics of Rigid Bodies (insert all your surnames here)
Design Project
Figure 5. Calculating the angle of twist θ and θ' and shear stresses τ xz , τ yz and τ .
ALGORITHM-PSEUDOCODE PROBLEM 1
BEGIN
Input parameters R , G , L, T .
Input step sizes ℎ, k .
12
Statics of Rigid Bodies (insert all your surnames here)
Design Project
circle
Transfer data on section[m][n] to .csv file SECTION.
|√ ( ) ( )|
2
2 m− 1
2 n −1
R −ℎ I − +k J −
2 2 // left neighbor
a=
k
If section[I+1][J] = 0,
|√ ( ) ( )|
2
2 2 m− 1 n −1
R −ℎ I − −k J −
2 2 // right neighbor
b=
k
If section[I][J-1] = 0,
|√ ( ) ( )|
2
n −1 m −1
R2 −k 2 J − +ℎ I −
2 2 // lower neighbor
p=
ℎ
If section[I][J+1] = 0,
|√ ( ) ( )|
2
n −1 m− 1
R 2 − k2 J − −ℎ I −
2 2 // upper neighbor
q=
ℎ
' T
θ=
Calculate
m− 2 n −2
Φi . j+ Φi , j+1 +Φ i+1 , j+ Φi+ 1, j +1 .
2 Gℎk ∑ ∑
i=0 j =0 4
' T
Calculate θtheoretical = .
JG
13
Statics of Rigid Bodies (insert all your surnames here)
Design Project
Transfer values of tau_xz, tau_yz and tau to.csv files SHEAR STRESS XZ, SHEAR STRESS
YZ and SHEAR STRESS TOTAL, respectively.
END
14
Statics of Rigid Bodies (insert all your surnames here)
Design Project
Figure 6. User inputs the required parameters. The program calculates the required values.
Figure 7. Program displays the number of points and iterations, angle of twist, and error percentange.
3.32 (a) For the solid steel shaft shown [diameter = 30 mm, length = 1.8 m, applied
torque at free end = 220 N-m] (G = 77 GPa), determine the angle of twist at A.
15
Statics of Rigid Bodies (insert all your surnames here)
Design Project
Figure 10. Shear stress τ xz distribution. Negative τ xz means horizontal component of τ to the left. Positive τ xz means
horizontal component of τ to the right. Values are in MPa.
16
Statics of Rigid Bodies (insert all your surnames here)
Design Project
Figure 11. Shear stress τ yz distribution. Positive τ yz means vertical component of τ upward. Negative τ yz means
vertical component of τ downward. Values are in MPa.
Several observations have been made by the group regarding the program. First, notice the
roughness of the circumference in the contour plots in Figures 8 to 12. This is inherent to the use of
Cartesian coordinate system all throughout the analysis. One can see that the smaller the step sizes,
the more the number of data points, and hence the smoother the boundary, as shown in Figure 13.
Figure 13. Contour plot of Prandtl stress distribution at increasing number of data points. The more the number of
data points, the smoother the plot.
17
Statics of Rigid Bodies (insert all your surnames here)
Design Project
The second is that the more the number of data points, the more accurate the data. The
accuracy can be checked by the comparing the numerical value of Φ i , j , θ' and τ i , j with those
' T Tρ
produced by Equations 13, θ = and τ = , respectively. This is depicted in Table 1.
JG J
Table 1. Comparing numerical values of Φ max, θ' and τ max at various values of h and k to the analytical values.
1 2 2 T 2T TR 2 T
Φ max ❑=− ( x + y − R )
2 '
θ= = τ max❑= =
2 JG π R4 G J π R3
Exact value 0.0001125 0.035929 41.498178
(analytical)
At 0.000112499855 0.035996 38.110242
ℎ=k =0.0025
At 0.000112499468 0.035942 40.129356
ℎ=k =0.001
At 0.000112499347 0.035935 40.467117
ℎ=k =0.00075
At 0.000112499202 0.035932 40.809203
ℎ=k =0.0005
At 0.000112499065 0.035930 41.083763
ℎ=k =0.0003
Note that the accuracy Equations 18, 11b, 19, 20, 21 and 22 all depend on the accuracy in the
value of Φ . Thus, Φ is the important parameter in this problem. While from Table 1, the numerical
maximum value of Φ i , j (which is at the center of the circle) is correct to 9 decimal places, its value,
however, deviates from the exact value even if the step size becomes smaller and smaller. This is
perhaps because the number of iterations should have been greater than mn to achieve a more
accurate value. Furthermore, Equation 18, with which the values are computed must have been slowly
convergent. Nevertheless, the error produced at any step size is almost zero.
Furthermore, notice that the value of θ' and the maximum value of τ approaches the analytical
as the step size becomes smaller and smaller. Even though Φ becomes less and less accurate, it is
being compensated by the increasing number of data points being considered, hence the two other
parameters to find approach the exact value. It must be noted, however that at ℎ=k =0.0003, where
there are 10201 data points, the maximum value of τ still deviates from the exact value by as much as
≥ 0.1 MPa, and hence smaller data points are needed to achieve greater accuracy. Furthermore, since
N=mn, the number of iterations, along with the number of data points, becomes greater at smaller
step sizes, and thus more time to do the processes.
The group was able to make a program in c language that can compute for the shear stress in
any grid point across the cross section of the circular shaft member, thus, the group accomplished the
problem 1 of the machine problem 1. In addition to that, the group was also able to derive and
18
Statics of Rigid Bodies (insert all your surnames here)
Design Project
perform the analytical solution to prove the effectiveness and efficiency of the numerical method used
in solving the given problem.
From the recorded observations, the group recommends users to provide and input more data
points in order to have a smoother boundary which is apparent from Figure 13. By doing this, the
error that accumulates in the program approaches zero.
6 BIBLIOGRAPHY
19