blob: 061d048aeee10802a422fd6bafabf40b90a72ba4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
clc
//
//Bar with Square Cross Section
//Variable declaration
tALL=40 // Stress(MPa)
//Calculation
// Bar with square cross section
a=0.040 // Length(m)
b=0.040 // Length(m)
temp=(a/b)
c1=0.208 // Coefficient
tmax=tALL // Maximum stress(MPa)
T1=(40)*((10**6))*(0.208)*((0.040**3)) // Torque(N.m)
// Bar with Rectangular Cross Section.
a=0.064 // Length(m)
b=0.025 // Length(m)
temp2=(a/b)
T2=(40)*((10**6))*(0.259)*(0.064)*((0.025**2)) // Torque(N.m)
//Square Tube
A=(0.034)*(0.034) // Area bounded by the center line of the cross section(m**2)
T3=((40)*((10**6))*(2)*(0.006)*(1.156)*((10**-3))**0) // Torque(N.m)
// Result
printf("\n Largest torque on bar with square cross section = %1f N.m' ,T1)
printf("\n Largest torque on bar with rectangular cross section = %1f N.m' ,T2)
printf("\n Largest torque on square tube = %1f N.m' ,T3)
|