You are on page 1of 23

Computer Methods in

Civil Engineering

Course Teacher:
Dr. Sayeed Ahmed
Consulting Engineer
MD and CEO of Bayside Analytix and SR Consulting
CE 6004 - Week 1 1
About Me
Academic background:
• BSc Eng from BUET in 1984
• MEng from AIT in 1987
• PhD from Strathclyde University, UK, 2001

Professional experience:
• CEO, Bayside Consulting and SR Consulting
• SMEC Australia (2001-2021) in Bangladesh, Pakistan, Afghanistan, Sri Lanka, Nepal, PNG,
Central Asia, UK, and Australia
• Strathclyde University, UK – researcher and teaching assistant

Last term I offered GIS and Remote Sensing Course for MSc students

CE 6004 - Week 1 2
About the Course
• We will cover Numerical Methods with Computer Programming
• Advanced programming techniques related to civil engineering problems
• Computational aspects of matrix algebra relaxation methods, various reduction
and elimination schemes
• Eigenvalue problems, storage of and computation with large and space matrices
• Numerical differentiation and integration
• Interpolation and curve fitting
• Linear and non-linear programming algorithms
• Programming in Python
• 14 weeks – 3 hrs per week
• Presence in all the classes is encouraged
• I can be consulted through phone and email also
CE 6004 - Week 1 3
Prerequisites
• Familiarity with computer use such as basic data manipulation
with Excel, file management, Windows 10, software installation
and management
• Home computer with Windows 10 or higher
• Proficiency in undergraduate level numerical methods
• Some idea in computer programming in any standard language
(C++, Java, Python, MATLAB, or similar)
• Analytical thinking and eagerness to learn new things

CE 6004 - Week 1 4
Engineers Do a lot of Computing
• As engineers, we need a lot of computing.
• Some of these computing works small enough for carrying out manually.
• However, for most, manual methods are not practical because of the
volume of calculations and repetitive nature of the works.
• That’s why computer methods are useful.
• Some analysis methods in engineering have been developed only for
computer applications. It’s not practical to implement them manually.
• Examples: Finite Element Method, Numerical Modelling, GIS, hydrodynamic
modelling.
• There are standard software packages for most of the routine
engineering applications.
CE 6004 - Week 1 5
Common Usage of Software Packages
• Structural analysis
• RCC design
• Hydrological analysis
• Transport system analysis
• Transport network modelling
• Water supply network modelling
• And many others
Some requires advanced mathematics and not possible manually.
Some are simpler
• Only automation of the manual process with a software or a computer program.

CE 6004 - Week 1 6
Pen and Paper Mathematics – Important
• Initially, these software packages were complex in nature and required
advanced skills.
• These days, graphical user interfaces have made them easier.
• However, none of these software packages can replace engineering
judgement.
• An experienced engineer must check the validity of the output of a
software package using his expert knowledge and judgement.
• That means, a combination of the two is essential.
• Software package or computer programs
• Engineering judgement
• Engineers must know their pen and paper mathematics.
CE 6004 - Week 1 7
Civil Engineers Need Computer Literacy
• Most civil, structural and environmental engineering analysis is computer
modelling
• Some models are complex and not easy to uinderstand
• An engineer must know whether a particular model is scientifically
• appropriate, validated, verified, and gives sensible results, before applying the model
outputs.
• The models have also become easier to use through graphical user
interfaces
• Many engineers use models without detailed understanding
• Uncritical and uninformed reliance on analysis software may be detrimental
in terms of safety, cost and best practice
• May lead to failures with disastrous consequences
CE 6004 - Week 1 8
Poor Understanding of Computer Models
Almost a Tragedy: The
Collapse of the Hartford Civic
Center, January 1978
• The roof was a space frame
that collapsed one night after
heavy snowfall, fortunately
without any fatalities or
injuries.
• https://connecticuthistory.org/almost-a-
tragedy-the-collapse-of-the-hartford-civic-
center/

CE 6004 - Week 1 9
Poor Understanding of Computer Models
Sleipner A, an offshore gravity platform failure in Norway in August 1991
A leak occurred in the cellular wall of the
base of the platform when it was
undergoing controlled ballasting as part
of the deck mating procedure during
installation.
The finite element model was not
adequate to analyse the stress.

https://journals.library.mun.ca/ojs/index.
php/prototype/article/
download/422/567

CE 6004 - Week 1 10
Poor Understanding of Computer Models
A civil engineering failure of an
excavation at Nicoll Highway,
Singapore, in 2004

• The engineer did not understand


the software, the constitutive
model, and the local ground
conditions.

CE 6004 - Week 1 11
Engineers Also Need Programming –
Why
1 - Ready-made software is limited to handling certain standard problems.
• What do you do when the problem at hand is not covered by the software you
bought?
• Many modern software systems are extensible via programming.
• Some advanced software packages need the input data to be specified by
computer code.
2 - With programming skills, you may extend the flexibility of existing
software packages by combining them.
• For example, you may integrate packages that do not speak to each other from
the outset.
• This makes the workflow simpler, more efficient, and more reliable, and it puts
you in position to attack new problems.

CE 6004 - Week 1 12
What are Numerical Methods
• The Mathematics branch for designing effective ways to find
numerical solutions to complex Mathematical problems
• Most Mathematical problems from science and engineering are
very complex and sometimes cannot be solved directly.
• Numerical methods are techniques to approximate
Mathematical procedures.
• We need approximations because we either cannot solve the
procedure analytically, or
• because the analytical method is intractable (an example is solving a
set of a thousand simultaneous linear equations for a thousand
unknowns).
CE 6004 - Week 1 13
Numerical Methods – Approximate
Solutions
• Numerical solutions are always approximate
• But errors are within tolerable limits
• Exact solution:
• Not possible – some methods are designed for numerical implementation
• Possible but not practical – takes too much time and effort
• Numerical methods
• Always solved with a computer program

Reference on Numerical Analysis:


https://www.vedantu.com/maths/numerical-analysis
https://www.codesansar.com/numerical-methods/ (includes Python code
examples)

CE 6004 - Week 1 14
Mathematical Background

CE 6004 - Week 1 15
Mathematical Background

CE 6004 - Week 1 16
Numerical Methods – Examples
• Numerical integration and differentiation
• Finite element method
• Hydrodynamic modelling
• Environmental modeling
• Solving algebraic equations and matrix problems

CE 6004 - Week 1 17
Engineers Also Need Programming –
Why
3 - It is easy to use excellent ready-made software the wrong way.
• Insight in programming and the mathematics behind is fundamental for
understanding complex software, avoiding pitfalls, and become a safe
user.
4 - Bugs (errors in computer code) are present in most larger
computer programs
• What do you do when your ready-made software gives unexpected
results? Is it a bug, is it wrong use, or is it the mathematically correct
result? Experience with programming of mathematics gives you a good
background for answering these questions. The one who can program,
can also make tailored code for a simplified problem setting and use
that to verify the computations done with off-the-shelf software.
CE 6004 - Week 1 18
Engineers Also Need Programming –
Why
5 - Lots of skilled people around the world solve computational
problems by writing their own code and offer their code for free
on the Internet.
• To take advantage of this truly great source of software in a reliable
way, one must normally be able to understand and possibly modify
computer code offered by others.
6 - The algorithmic thinking that comes with the process of
writing a program for a computational problem enforces a
thorough understanding of both the problem and solution method.
• “Programming is understanding”.

CE 6004 - Week 1 19
Python for Programming
• We will use Python language for programming – but why
• Versatile and powerful programming language.
• Open source and free for everybody, and has a huge community
who constantly adds new features in the form of libraries.
• Offers a vast set of tools that is constantly being updated and
kept bug-free
• Easy to use
• The syntax is quick and efficient, so you need few lines of code
to achieve complex tasks

CE 6004 - Week 1 20
You Will Learn Python Yourself
• This course is on computer and numerical methods – not
python
• We will go through the numerical methods and program them
using Python
• In the process, you will learn Python

CE 6004 - Week 1 21
Reference Books
• Numerical Methods for Engineers 8th Edition by Steven Chapra, Raymond
Canale, McGraw Hill
• Qingkai Kong, Timmy Siauw, Alexandre Bayen, Python Programming and
Numerical Methods: A Guide for Engineers and Scientists (available online
at https://pythonnumericalmethods.berkeley.edu/)
• Svein Linge and Hans Petter Langtangen, Programming for Computations
– Python: A Gentle Introduction to Numerical Simulations with Python,
(https://link.springer.com/book/10.1007/978-3-319-32428-9)
• Autar Kaw, Numerical Methods with Applications (available online at https:
//nm.mathforcollege.com/textbook-numerical-methods-with-applications/)

CE 6004 - Week 1 22
End of Week 1

CE 6004 - Week 1 23

You might also like