Computer Programs: Appendix
Computer Programs: Appendix
Computer Programs
Introduction
With the advent of computers and software packages, it is now possible to analyse
any structure for any geometry and given loading conditions quickly. Though several
standard software packages are available for the linear, non-linear, buckling or
dynamic analysis of structures, very few design packages are available. Nonetheless,
some analysis software packages do have some design routines, which are based
on specific codes. Two computer programs written in Visual Basic are provided in
this appendix, which can be run on any standard personal computer under the
Windows environment. Visual Basic has been chosen because it uses an interactive
approach to the development of computer programs. Visual Basic interprets the
code as we enter it, catching and highlighting syntax or spelling errors. It also
partly compiles the code as it is entered. While compiling the whole code, if the
compiler finds an error, it is highlighted in the code. We can fix the error and
continue compiling without having to start all over. Visual Basic also provides a
variety of user interfaces in the form of text boxes, labels, radio button, pictures,
etc. Visual Basic version 6.0 is used in this example, because it is simple and
popular though VB.NET is the most recent version. More details about Visual
Basic may be found in the Microsoft web site http://msdn.microsoft.com/library/
default.asp?url=/library/en-us/vbcon98/html/vbconpart1visualbasicbasics.asp.
Computer Programs
A.E.3
Computer Programs
A.E.5
Md As Double
Vd As Double
Deltab As Double
DeltaAll As Double
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
b1 As Double
n1 As Double
Ab As Double
I As Double
A As Double
rmin As Double
Lamda As Double
LamdaEff As Double
Phi1 As Double
Phi2 As Double
fcd As Double
SWB As Double
n2 As Double
Fw As Double
Computer Programs
A.E.7
Computer Programs
A.E.9
=
=
=
=
Computer Programs
A.E.11
rmin
2 * E)) ^ 0.5
- 0.2) + LamdaEff ^ 2)
^ 2) ^ 0.5
#1,
#1,
#1,
#1,
#1,
Computer Programs
A.E.13
In order to show the use of this program, the data given in Example 10.9 was used
and the resulting output is as follows:
Beam Design
---------Structure Data
------------Youngs Modulus <N/sq. mm>
Poisson's Ratio
Eff.Length factor
200000.0
0.3
1.0
250.0
1.5
1.5
30.0
20.0
0.0
0.0
Sectional Properties
------------------Depth <mm>
Width of flange <mm>
Thickness of flange <mm>
Thickness of web <mm>
Root radius <mm>
Moment of inertia of Major axis <mm^4>
Moment of inertia of Minor axis <mm^4>
Palstic section modulus <cu.mm>
Elastic modulus about major axis <cu.mm>
Imperfection factor
Partial safety factor for material
175.0
90.0
8.6
5.5
10.0
12706000.0
851000.0
161650.0
145200.0
0.21
1.1
Output
----Maximum bending moment for design <kNm>
Maximum shear force for design <kN>
Torsional constant <mm^4>
Warping constant <mm^6>
Moment capacity of the section <kNm>
Moment capacity of Trial section is adequate
Shear
Shear
Shear
Delta
Delta
Trial
capacity <kN>
force <kN>
capacity of Trial section is adequate
allowable <mm>
actual <mm>
section is adequate for deflection check
Strength against
Shear force <kN>
Safe against web
Strength against
Shear force <kN>
Safe against web
web buckling<kN>
buckling
web bearing <kN>
bearing
21.094
56.25
47391.627
5890826240.0
31.044
75.777
56.25
5.0
1.297
119.165
56.25
110.938
56.25
Computer Programs
A.E.15
positive for moments applied clockwise and negative for moments applied anticlockwise.
Hot rolled I- or H- plastic, compact, or semi-compact sections can be designed
using this program. There are two sets of input data in this program, as in the case
of the beam program. The first is the structural data consisting of the following:
factored axial force (N), factored bending moment at the top and bottom about the
major axis (MZ1, MZ2), factored bending moment at the top and bottom about the
minor axis (MY1, MY2), length in major and minor axis (Lz, Ly), effective length
factors (Kz, Ky), Youngs modulus (E), and Poissons ratio (m). The second set of
data is the member data consisting of the following: depth of the section (D), Area
(A), breadth of flange (bf), thickness of flange and web (tf and tw), root radius (R),
radius of gyration in the major and minor axis (rz, ry) moment of inertia about
minor axis (Iy), elastic modulus about major and minor axis (Zz and Zy), yield
strength of material (fy) and partial factor of safety of material (g m0,) and type of
section (plastic, compact, or semi-compact).
Based on the preceding data, the plastic modulus about the major and minor
axis (Zpz, Zpy) and the warping and torsional rigidity (Iw, It) are calculated. The
member buckling resistance in compression about the major axis and minor axis
(Pdz and Pdy) are calculated based on clause 7.1.2 of the code. The member buckling
resistance in bending is computed based on clause 8.2.2, about both the axes (Mdz
and Mdy).
Using these values, the strength of the cross section is checked based on the
interaction equations given in clause 9.3.1 of the code. Finally, the overall member
strength is checked as per the interaction equation given in clause 9.3.2 of the
code. If any one of the checks is not satisfied, the user has to change the trial
section properties and run the program again. The program written in Visual Basic
and typical input screens are given below:
Computer Programs
Public
Public
Public
Public
Const
Const
Const
Const
PLASTIC As Integer = 1
COMPACT As Integer = 2
SEMI_COMPACT As Integer = 3
PI As Double = 3.14159
Mcr As Double
LambdaLT As Double
alphaLT As Double
PhiLT As Double
ChiLT As Double
fbd As Double
Dim
Dim
Dim
Dim
Md As Double
Vd As Double
Deltab As Double
DeltaAll As Double
Dim b1 As Double
Dim n1 As Double
Dim Ab As Double
A.E.17
I As Double
A As Double
rmin As Double
Lamda As Double
LamdaEff As Double
Phi1 As Double
Phi2 As Double
fcd As Double
SWB As Double
n2 As Double
Fw As Double
Mz As Double
Mzm As Double
My As Double
Mym As Double
Nd As Double
Mdz, Mdz1 As Double
Mdy As Double
StressRatio As Double
StressRatio1 As Double
Lrz As Double
Lry As Double
AlphaZ As Double
AlphaY As Double
Betab As Double
LambdaZ As Double
LambdaY As Double
Pdz As Double
Pdy As Double
blnSafe As Boolean
Computer Programs
Private Sub cmdDesign_Click()
FileName = App.Path + \BeamColumn.out
Open FileName For Output As 1
blnSafe = True
Call UpdateSectionalProperties
Call Design
End Sub
Private Sub LoadSectionalProperties()
If blnLoaded Then
frmSectionalProperties.txtDepth = Str(D)
frmSectionalProperties.txtWidthOfFlange = Str(Bf)
frmSectionalProperties.txtThickOfFlange = Str(tf)
frmSectionalProperties.txtThickWeb = Str(tw)
frmSectionalProperties.txtR = Str(R)
frmSectionalProperties.txtRZ = Str(rz)
frmSectionalProperties.txtRY = Str(ry)
frmSectionalProperties.txtA = Str(A)
frmSectionalProperties.txtZZ = Str(Zz)
frmSectionalProperties.txtZY = Str(Zy)
frmSectionalProperties.txtSafetyFactor = Str(GamaM)
frmSectionalProperties.txtIy = Str(Iy)
If sectionType = PLASTIC Then
optPlastic = True
ElseIf sectionType = COMPACT Then
optCompact = True
ElseIf sectionType = SEMI_COMPACT Then
optSemiCompact = True
End If
End If
End Sub
Private Sub UpdateSectionalProperties()
D = Val(txtDepth)
Bf = Val(txtWidthOfFlange)
tf = Val(txtThickOfFlange)
tw = Val(txtThickWeb)
R = Val(txtR)
rz = Val(txtRZ)
ry = Val(txtRY)
A = Val(txtA)
Zz = Val(txtZZ)
Zy = Val(txtZY)
GamaM = Val(txtSafetyFactor)
Iy = Val(txtIy)
If optPlastic Then
sectionType = PLASTIC
ElseIf optCompact Then
sectionType = COMPACT
ElseIf optSemiCompact Then
sectionType = SEMI_COMPACT
End If
End Sub
A.E.19
Computer Programs
A.E.21
Computer Programs
A.E.23
Else
Mndy = 1.56 * Mdy * (1 - Nr) * (Nr + 0.6)
End If
Alpha1 = 5 * Nr
If Alpha1 < 1 Then
Alpha1 = 1
End If
Alpha2 = 2
section strength interaction equation
StressRatio = (My / Mndy) ^ Alpha1 + (Mz / Mndz) ^ Alpha2
End If
If StressRatio < 1# Then
MsgBox Interaction equation value = + Str(StressRatio) +
vbCrLf + Section is safe
Print #1, Tab(5); Interaction equation (section strength
value ; Tab(60); Format(StressRatio, #######0.0##);
Section is safe
Print #1,
Else
MsgBox Interaction equation value = + Str(StressRatio) +
vbCrLf + Section unsafe due to member capacity check +
vbCrLf + Revise the section
blnSafe = False
Unload Me
frmBeamColumnDesign1.Show
End If
End Sub
Private Sub DesignCompressionResisMajor()
Dim Fcrz, Fcdz, Phiz, Phiz1 As Double
Compression resistance - Major Axis
Lz = Kz * Lz
Ly = Ky * Ly
Lrz = Lz / rz
Lry = Ly / ry
If (D / Bf) > 1.2 And tf <= 40 Then
AlphaZ = 0.21
AlphaY = 0.34
ElseIf (D / Bf) > 1.2 And tf < 100 Then
AlphaZ = 0.34
AlphaY = 0.49
ElseIf (D / Bf) <= 1.2 And tf <= 100 Then
AlphaZ = 0.34
AlphaY = 0.49
Else
AlphaZ = 0.76
AlphaY = 0.76
End If
Fcrz = PI * PI * E / (Lrz * Lrz)
LambdaZ = (Fy / Fcrz) ^ 0.5
Phiz = 0.5 * (1 + AlphaZ * (LambdaZ - 0.2) + LambdaZ ^ 2)
Computer Programs
A.E.25
Computer Programs
A.E.27
To illustrate the use of the program, a trial run of the program was conducted for
example 13.1 and the resulting output is as follows:
Beam-Column Design
----------------Structure Data
------------Youngs Modulus <N/sq.mm>
Poisson's Ratio
Yield Stress <N/sq.mm>
Major axis Length <mm>
Minor axis Length <mm>
Eff.Length factor - Major axis
Eff.Length factor - Minor axis
Factored axial load <kN>
Major axis factored moment at top <kNm>
Major axis factored moment at bottom <kNm>
Minor axis factored moment at top <kNm>
Minor axis factored moment at bottom <kNm>
200000.0
0.3
250.0
4000.0
4000.0
0.8
0.8
500.0
27.0
45.0
0.0
0.0
Computer Programs
Sectional Properties
------------------Depth <mm>
Width of flange <mm>
Thickness of flange <mm>
Thickness of web <mm>
Root radius <mm>
Radius of Gyration major axis <mm>
Radius of Gyration minor axis <mm>
Elastic modulus about major axis <cu.mm>
Elastic modulus about minor axis <cu.mm>
Partial safety factor for material
Area <sq.mm>
Moment of intertia about minor axis <mm^4>
Output
----Plastic modulus about Major axis <cu.mm>
Plastic modulus about Minor axis <cu.mm>
Torsional constant <mm^4>
Warping constant <mm^6>
Design Resistance in Bending about
Minor Axis <kNm>
Applied Moment about Minor Axis <kNm>
Compression resistance about Major Axis <kN>
Compression resistance about Minor Axis <kN>
Compression Resistance <kN>
Compressive Force <kN>
Buckling Resistance in Bending about
Major Axis <kNm>
Applied Moment about Major axis <kNm>
Buckling Resistance in Bending about
Major Axis is safe
A.E.29
250.0
250.0
9.7
6.9
10.0
109.0
54.9
619000.0
156000.0
1.1
6500.0
19600000.0
674456.721
305869.717
178425.738
282946041000.0
35.455
0.0
1407.624 Section
is safe
1110.522 Section
is safe
1110.522
500.0
128.525
45.0
0.658 Section is
safe
226.348
5.625