You are on page 1of 12

MICROCOMPUTER APPLICATIONS IN STRUCTURAL

ENGINEERING

Other Macmillan titles of related interest


P. E. Gosling, Beginning BASIC
P. E. Gosling, Continuing BASIC
P. E. Gosling, Practical BASIC Programming
P. E. Gosling, Program your Microcomputer in BASIC
W. H. Mosley and J. H. Bungey, Reinforced Concrete Design, second edition
S. S. J. Moy, Plastic Methods for Steel and Concrete Structures
J.D. Todd, Structural Theory and Analysis, second edition

Microcomputer Applications
in Structural Engineering
W. H. Mosley
Department of Civil Engineering
University of Liverpool

and

Nanyang Technological Institute


Singapore

W. J. Spencer
Department of Civil Engineering
Chisholm Institute of Technology
Caulfield East
Victoria, Australia

MACMILLAN PRESS
LONOON

W. H. Mosley and W. J. Spencer 1984


All rights reserved. No part of this publication may be
reproduced or transmitted, in any form or by any means,
without permission.

Published by

THE MACMILLAN PRESS LTD

London and Basingstoke


Companies and representatives
throughout the world

Typeset in 10/12pt Press Roman by

RDL Artset Ltd, Sutton Surrey

British Library Cataloguing in Publication Data


Mosley, W. H.
Microcomputer applications in structural
engineering.
1. Structural engineering-Data processing
I. Title
II. Spencer, W. J.
624.1 '028'5404
TA641
ISBN 978-0-333-34090-5
ISBN 978-1-349-17550-5 (eBook)
DOI 10.1007/978-1-349-17550-5

To Wendy and Judi

Contents

Preface

xiii

1 An Introduction to Microcomputers

1.1 Introduction
1.2 The Microcomputer System
1 .2 .1 The Microprocessor
1.2.2 Computer Memory
1.3 Program and Variable Storage in a Microcomputer
1.3 .1 Off-line Storage
1.4 Programming the Microcomputer
1.4.1 Machine-code programming
1.4.2 The Use of a Monitor
1.5 Selecting a Microcomputer
Further Reading

2 BASIC Programming on a Microcomputer


2.1 The Elements of Programming in BASIC
2.1.1 A BASIC Program
2.1.2 An Introduction to the Operating System
2.2 Variables, Operators and the Assignment Statement
2.2.1 Numeric Variables and Numeric Constants
2.2.2 Integer Variables
2.2.3 String Variables and String Constants
2.2.4 Operators
2.2.5 The Assignment Statement
2.3 Input and Output of Data
2.3.1 READ-DATA Statements
2.3.2 The INPUT Statement
2.3 .3 The PRINT Statement

vii

1
2

3
3
7
7
8

9
15
17
19

20
22
22
23
24
25
25
25

26
26
27
27
27
28

viii

CONTENTS

2.4 Control Statements


2.4.1 The GOTO and ON GOTO Statements
2.4.2 The IF Statement
2.4.3 FOR-NEXT loops
2.4.4 Subroutines and the GOSUB, RETURN Statements
2.5 Functions
2.5 .1 Arithmetic and Trigonometric Functions
2.5 .2 String Functions
2.5.3 User-defined Functions
2.6 Arrays and Advanced Features
2.6.1 Subscripted Variables and the DIMension Statement
2.6.2 Application Examples using Subscripted Variables
2.7 Programming Concepts
2.7 .1 Principles of Programming
2.7.2 Editing, Checking and Debugging Programs
2.7 .3 Elements of Modular Programming
2.7 .4 Improving Storage Efficiency and Speed
2.7 .5 Other Features of BASIC
Further Reading
3 Organisation of a Personal Computer System

3.1 File Concepts and File Storage


3.1.1 FileTypes
3.1.2 Disk Operating Systems and Initialising Disks
3.1.3 Data Files
3.2 Further File-handling Commands
3.3 The Use of Files on a Microcomputer System
3.4 Documentation of Programs
3.4.1 Program Documentation
3.4.2 Using the Microcomputer to Store the Documentation
3.5 Maintaining a Personal Computer System
3.5.1 Backing-up Files
3.5.2 Test Routines and Memory Checks
3.5.3 Using a Log Book
3.6 Extended Use of a Microcomputer System
3.6.1 Alternative Operating Systems
3.6.2 Input/Output Peripherals
Further Reading
4 Simple Programming Applications in Analysis and Design

4.1 Program for the Analysis of a Single Span Beam


4.1.1 listing of the Beam Analysis Program
4.1.2 Application Example of the Beam Analysis Program

29
29
29
30
31
33
33
33
34
35
35
36
40
41
42
44
SO

52
54
SS

56
56
57
58
63
65
69
69
71
75
75
76
77
77
78
79
79
80
80
86
88

CONTENTS
4.2 Program for Stiffness and Carry-over Factors for a Member of
Variable Cross-section
4.2.1 Listing of the Stiffness and Carry-over Factor Program
4.2.2 Application Example of the Stiffness and Carry-over Program
4.3 Program for General Section Properties Calculation
4.3.1 Listing of the Section Properties Program
4.3 .2 Application Example of the Section Properties Program
4.4 Program for the Solution of Simultaneous Equations
4.4.1 Listing of the Simultaneous Equations Program
4.4.2 Application Example of the Simultaneous Equations Program
4.5 Program for the Analysis of a Pile Group
4.5.1 Listing of the Pile Group Analysis Program
4.5 .2 Application Example of the Pile Group Analysis Program
Further Reading
S Programs for Structural Analysis
5.1 Details of the Stiffness Method
5 .2 Analysis of a Plane Frame
5.2.1 Stages of the Plane Frame Program
5.2.2 Sign Convention for the Plane Frame Program
5.2.3 Listing of the Plane Frame Program and its Variables
5.2.4 Details of an Example using the Plane Frame Program
5 .2.5 Further Development of the Plane Frame Program
5.3 Analysis of a Grillage
5.3.1 Modifying the Plane Frame Program to Form the
Grillage Program
5.3.2 Listing of the Revised Lines for the Grillage Program
5.3 .3 Details of an Example Using the Grillage Program
5.4 Members of Variable Cross-section
Further Reading
6 Programs for Steelwork Design
6.1 Steel Column Design
6.1.1 Flow Diagram for the Design of a Steel Column
6.1.2 Stages of the Steel Column Design Program
6.1.3 Additional Options of the Steel Column Design Program
6.1.4 Listing of the Steel Column Design Program and its Variables
6.1.5 Details of Examples Using the Steel Column Design Program
6.2 Steel Beam Design
6.2.1 Flow Diagram for the Design of a Steel Beam
6.2.2 Stages of the Steel Beam Design Program
6.2.3 Listing of the Steel Beam Design Program and its Variables
6.2.4 Details of an Example Using the Steel Beam Design Program
Further Reading

89
92
94
95
97
99
100
102
102
103
105
107
108
109
111
112
113
120
120
129
131
132
134
135
136
138
141
142
142
144
146
152
153
158
160
162
164
167
172
174

CONTENTS

7 Programs for Reinforced Concrete Design


7.1 Analysis of the Structure
7 .1.1 Flow Diagram for the Analysis of a Substitute Frame
7 .1.2 Details of the Stages of the Substitute Frame Analysis
Program
7 .1.3 Further Development of the Substitute Frame Analysis
Program
7 .1.4 Listing of the Substitute Frame Analysis Program and
its Variables
7 .1.5 Details of an Example Using the Substitute Frame Program
7.2 Reinforced Concrete Beam Design
7.2.1 Design of Bending Reinforcement for a Rectangular Beam
Section
7 .2.2 Design of Reinforcement for a Flanged Beam Section
7.2.3 Listing of the R.C. Beam Design Program and its Variables
7.3 Selection of Bar Sizes
7.3 .1 Listing of the Bar Selection Program
7.4 Reinforced Concrete Column Design
7.5 Symmetrical Arrangement of Column Reinforcement
7.5 .1 Flow Diagram for the Design of a Column with a Symmetrical
Arrangement of Reinforcement
7.5 .2 Details of the Stages of the Column Design with
Symmetrical Reinforcement Program
7.5 .3 Listing of the Program to Design a Column with
Symmetrical Reinforcement and its Variables
7.6 Unsymmetrical Arrangement of Column Reinforcement
7 .6.1 Listing of the Program to Design a Column with
Unsymmetrical Reinforcement
Further Reading

8 Graphics on the Microcomputer


8.1 The Graphics Screen
8.2 The Visual Display Unit
8.3 Line Generation on a Graphics Screen
8.3.1 The Graphics Mode
8.3.2 Color Selection
8.3.3 The Line-drawing Command
8.4 The Graphics Software
8.4.1 Fundamental Operations in Graphics
8.4.2 Drawing a Two-dimensional Object-an Example of
Graphics Software
8.4.3 Text plus Graphics

175
176
179
181
187
188
195
199
200
205
208
211
211
212
213
215
216
217
220
221
222

223
224
225
225
227
227
228
228
229
231
235

CONTENTS

8.5 Peripheral Devices Used with Graphics


8.5.1 Hard Copy Units and Printers
8.5.2 Plotting Units
8.5.3 Graphics Tablets and Digitisers
8.5 .4 Other Input Devices
8.6 Organisation of Computer Graphics
8.7 Examples of Computer Graphics Programs
8.7 .1 A General Graph-plotting Program
8.7 .2 Drawing a Bending Moment Diagram
8.8 Computer Graphics Systems
Further Reading

236
236
237
237
239
239
241
241
247
248
248

Appendix: Decimal, Hexadecimal and Binary Number Systems

249

Index

256

Preface

This book has been written to provide a practical introduction to structural


analysis and design using a microcomputer. Particular emphasis is given to the
role of the microcomputer as a personal computer and the responsibilities that
this introduces are discussed in detail.
Although the text might appear to divide into two distinct parts, the book is
not intended as a definitive work on either microcomputer systems or structural
engineering. Rather, an attempt has been made to bridge the gap between conventional structural engineering and basic computer technology, so encouraging
the engineer to come to terms with the microcomputer and, if desired, to pursue
the subject further from other available textbooks (lists of Further Reading are
provided). There are many excellent books that deal with microcomputers,
structural analysis and computer-aided design, but all too frequently the engineer
does not have the necessary background and experience to combine these three
topics and so achieve the required results.
The BASIC programming language is presented in some detail and the
examples offered are also written in BASIC. At the present time this is the most
widely used language with microcomputers, although other languages are available and hence we have also attempted to express general principles and concepts as far as possible.
Chapter 1 provides a simple introduction to a microcomputer system and also
offers an introduction to machine-code programming. The BASIC programming
language is introduced in Chapter 2 although the more general techniques of
computer programming are also presented; however, the BASIC language is used
to give practical examples. Organisation of a personal computer system is discussed in Chapter 3 and the use of flies in programming is presented. After
studying Chapters 1 , 2 and 3, the reader should have a reasonable knowledge of
microcomputer systems and the use of programming languages. Subsequent
chapters apply this knowledge to specific structural engineering applications.
Chapter 4 is designed to provide a series of simple examples that relate to
structural analysis and design. These examples have been selected for their
xiii

xiv

PREFACE

simplicity and ease of application to microcomputer systems. Chapters 5, 6


and 7 explore more detailed applications of specific areas in analysis and
design. Although reference is made to British Codes of Practice in Chapters
6 and 7, parts of the work that are dependent on the requirements of these
codes are clearly identified so that appropriate modifications can easily be made
to suit other relevant codes.
The final chapter outlines the general principles of computer graphics. From
an engineering viewpoint, computer graphics can enhance the better-known
aspects of computer applications in analysis and design. For example, the input
or output to a frame analysis can be expressed graphically to some extent, and
this is best understood after considering the frame analysis problem in detail.
Programs listed in the book, for use on the Apple microcomputer, are available on a diskette direct from the publishers.
This book should be of interest to practising structural engineers and to
undergraduate students in structural engineering.

W.H.MOSLEY
W. J. SPENCER

You might also like