0% found this document useful (0 votes)
512 views10 pages

Excel Visual Basic Application VBA' For Beam Problems Calculation

This document describes a VBA program developed in Excel to analyze beam problems. The program divides the beam into 100 segments and calculates the shear force, bending moment, slope, and deflection at each point. Users input parameters like load, span length, material properties. The VBA code then automatically calculates and displays the results in a table and graphs. It is a powerful way to solve complex beam problems using the programming capabilities of Excel VBA.

Uploaded by

Dhiraj Shakya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
512 views10 pages

Excel Visual Basic Application VBA' For Beam Problems Calculation

This document describes a VBA program developed in Excel to analyze beam problems. The program divides the beam into 100 segments and calculates the shear force, bending moment, slope, and deflection at each point. Users input parameters like load, span length, material properties. The VBA code then automatically calculates and displays the results in a table and graphs. It is a powerful way to solve complex beam problems using the programming capabilities of Excel VBA.

Uploaded by

Dhiraj Shakya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Red sea university Journal of Basic and Applied Science ISSN: 1858 -7690 (Online)

Vol. 2 Special Issue (1) - March 2017 ISSN: 1858 -7658 (Print)

Excel Visual Basic Application ‘VBA’ for Beam problems


Calculation

Abdalla Eissa Abdelkarim 1 *, Department of Civil Engineering Red Sea University


* [email protected]

Abstract
VBA “Visual Basic Application” program run on EXCEL was written to solve the simple beam
problem which was divided into 100 segment to find shear, moment, slope and deflection at
each point. User inputs information into program: span load, span length, material properties,
concrete and steel strength. VBA program automatically calculates information and shows
results in a table and graphs.

Keywords: Excel VBA ,beam Bending,shear,slope deflection

1.Introduction are characterised by arrays of cells in


In the past few years, spreadsheets which data is input either as numbers
have become a popular or text or as formulae. Comments on
computational tool and a powerful data in the cells can also be input and
platform for performing engineering hidden if desirable. Because of the
calculations. Simplified program mathematical nature of engineering
development and debugging,the studies, the use in which spreadsheet
use of named ranges and labels that allows for numerical computations
enhance readability of formulas and for creation of good charts makes
and ability to manipulate matrices it the favourite tool for engineers [2].
aided this heightened popularity The It is, therefore, not surprising that
specific engineering programs are it has become useful and inevitable
licensed and hard to be installed in tool in engineering education. Many
every computer. But there is EXCEL studies have been performed to show
in every computer [1]. Spreadsheets the applications of spreadsheets in

159
Red sea university Journal of Basic and Applied Science ISSN: 1858 -7690 (Online)
Vol. 2 Special Issue (1) - March 2017 ISSN: 1858 -7658 (Print)

engineering. A special issue of the the Visual Basic Editor. To access the
International Journal of Engineering Visual Basic Editor in Excel 2013,
Education published in 2004 was we will go to file, options,customize
dedicated fully to different forms ribbon and then select developer
of application of spreadsheets after that we click Visual Basic
in engineering education. A Editor from the submenu. The Visual
comprehensive and instructive Basic Editor screen usually contains
review was done by S.A. Oke of three important windows: the Project
the University of Lagos in 2004 [3]. Explorer window, the Properties
He credits electrical engineers for window and the Code window,
pioneering the use of spreadsheets as shown in Figure 1.a,1.b,and
in engineering education. Examples 1.c rispectivly. The Code window
of researchers and practitioners in displays the active module sheet;
electromagnetism, logic networks, each module sheet can contain one
antenna design, microprocessor or several VBA procedures. To insert
systems, Fourier series for a module sheet, choose Module
harmonics analysis, etc, are given. from the Insert menu. A folder icon
In general engineering, numerical labeled Modules will be inserted; if
analysis, differentiation, integration you click on this icon, the module
and solution of partial differential sheet Module1 will be displayed.
equations are highlighted. To insert a module sheet, choose
In addition to the features and Module from the Insert menu. A
functions of Excel, its programming folder icon labeled Modules will be
capabilities, called visual basic for inserted; if you click on this icon,
applications (VBA) are very powerful the module sheet Module1 will be
and can be used to solve complex displayed. The Properties window
civil engineering problems [4]. To will also displayed.
create VBA code, or to examine
existing code, you will need to use

160
Red sea university Journal of Basic and Applied Science ISSN: 1858 -7690 (Online)
Vol. 2 Special Issue (1) - March 2017 ISSN: 1858 -7658 (Print)

Figure: 1.a. The Visual Basic Editor window.

Figure: 1.b The VBE Project Explorer window.

161
Red sea university Journal of Basic and Applied Science ISSN: 1858 -7690 (Online)
Vol. 2 Special Issue (1) - March 2017 ISSN: 1858 -7658 (Print)

Figure: 1.c The Properties window.

2.Method and procedure beam overall depth “H” in mm ,


First of all in the workbook sheet the reinforcement cover “C” in mm
(Fig. 2), user input the distributive , the conctrte strength “fcu” in N/
load “w” in KN, span length in “m”, mm2,the reinforcement strength “fy”
the beam breadth “B” in mm , the in N/mm2.

162
Red sea university Journal of Basic and Applied Science ISSN: 1858 -7690 (Online)
Vol. 2 Special Issue (1) - March 2017 ISSN: 1858 -7658 (Print)

Figure: .2 Beam input informations and table form


The VBA program figure (3) will use from start point “x” which is “0” to
this information to calculate forces, the end point which is “L” and internal
deformations and reinforcement area points in between “98” points.

Figure: 3.a VBA program part 1


163
Red sea university Journal of Basic and Applied Science ISSN: 1858 -7690 (Online)
Vol. 2 Special Issue (1) - March 2017 ISSN: 1858 -7658 (Print)

Figure: 3.b VBA program part 2


The user click the calculate informations about the program as
button to run the VBA program or shown in figure 4
information button to get more

Figure: 4 Information and calculated buttons


The calculated values of shear Y(x) are then tabulated as shown in
force V(x) , bending moment M(x) figure 5.a, 5.b
,beam slope ϴ(x) and deflection

164
Red sea university Journal of Basic and Applied Science ISSN: 1858 -7690 (Online)
Vol. 2 Special Issue (1) - March 2017 ISSN: 1858 -7658 (Print)

Figure: 5.a Tabulated results after depugging start from 0

Figure: 5.b Tabulated results after depugging end at L

The program also show the result in graphical state as shown in figures
6.a,6.b.6.c,6.d and 6.e

165
Red sea university Journal of Basic and Applied Science ISSN: 1858 -7690 (Online)
Vol. 2 Special Issue (1) - March 2017 ISSN: 1858 -7658 (Print)

Figure: 6.a shear force diagram

Figure: 6.b bending moment diagram

166
Red sea university Journal of Basic and Applied Science ISSN: 1858 -7690 (Online)
Vol. 2 Special Issue (1) - March 2017 ISSN: 1858 -7658 (Print)

Figure: 6.c beam slope diagram

Figure: 6.d beam deflection diagram

Conclusion calculating steel reinforcement


Program shows the beam bending according to BS8110 -97 along the
calculation procedure of simply beam and compare it by minimum
supported problem very well. It area of steel that provided by the code
shows how to calculate beam forces to get the maximum one .
and deformations at 100 points beside

167
Red sea university Journal of Basic and Applied Science ISSN: 1858 -7690 (Online)
Vol. 2 Special Issue (1) - March 2017 ISSN: 1858 -7658 (Print)

References
[1] Krudtong,S: Moaveni, S (2015)Teaching Tool: Finite Element Analysis of 2D Truss
Problem by VBA Program IJC, Vol.23 No.3 , pp. 89-91 90
[2]Bloch, S.C., EXCEL for Engineers and Scientists. John Wiley & Sons, Inc. (2003).
[3]Oke, S.A., Spreadsheet applications in engineering education: a review. Inter. J. of
Engng. Educ., 20, 6, 893-901(2004).
[4] E. Zaneldin, and B. El-Ariss, “Using Spreadsheets and VBA for Teaching Civil
Engineering Concepts,” J. Educat., Informatics and Cybernetics, Vol. 2, No. 1, 2011,
pp. 28-36.
[5] E. Joseph Billo, Excel for Scientists and Engineers Numerical Methods, John Wiley &
Sons,
2007.
[6] W.H.Mosley, J.H.Bungey. Reinforced concrete design, fourth edition , MACMILLAN
EDUCATION LTD,1990

168

You might also like