While I was talking to my civil engineer friend about increasing his skill sets as Civil Engineer using programming languages like Python, I tried to listen to his requirements and use cases when he may need to use Python. My understanding of the requirements is to replace the task done manually or by Excel and later do some advanced visualization. So I took some time to understand more uses of Python in civil engineering and found some resources to start with. This story will be updated with the latest resources I come across while helping my friend start learning Python for his specific need in Civil & Structural Engineering.
Learning the language basics of Python
The first thing should be learning the language basics of Python. One must learn the language fundamentals before applying them to their real-world need. Language basics will never change whatever the purpose of using the language. However, a strong understanding of Python shall be surely useful to learn the applied side of Python for a Civil and Structural Engineer. Below, resources can be used to learn Python fundamentals.
Python official Tutorial: This will put a road map in front of you. You may not find it beginners friendly.
A beginner-friendly Python tutorial Python Land: This will put a road map in front of you. You may not find it beginners friendly.
Real Python: is an excellent resource to learn Python. But as beginners, you may find it is not easy to know from where you shall start.
W3schools: too beginner-friendly.
Civil and Structural Engineering associated resource
Many a time, great learning starts with reading a comprehensive book. I went over the contents of a book named Python for Civil and Structural Engineers, By Vittorio Lora (Author). You can find this book on Amazon, or you can find a PDF copy of the book. The book will allow you to know the contents that need to be covered to do your day-to-day jobs. Not a bad place to start with. I have gone over the book and taken the content list for your easy understanding.
Python Basics:
Setting up the environment
Python syntax
Numpy:
The NumPy library
EXAMPLE: calculating the internal forces of a beam using NumPy
Sympy:
Computer Algebra Systems
Importing the library
Symbols
The subs() command and numerical evaluation
Calculus
Solvers
Pandas:
Dataframes
Working with external data
EXAMPLE: load cases for a two-span beam
Matplotlib:
Loading the library and importing the data
How Matplotlib works
Modifying the appearance of a plot
Plotting multiple plots
Modifying the tick marks
Scatter plots
Bar plots
Calculating section properties:
Section properties of a steel beam
Conclusions
M-N interaction in a concrete section:
Ultimate Limit States (ULS)
Materials and geometry
Strain domains
Python code
Plotting the results
Designing a concrete beam:
Dimensions and loads
Importing the necessary libraries
Calculating the envelope of the distributions
Bending moment resistance of the sections
Section verifications
Shear verification
Designing a steel column:
Materials Cross-section
Column buckling
Member Verification
Exporting in Latex:
Installing nbextensions
Formatting the output of cells in LaTeX
Formatting the output of cells in LaTeX
Calculating the deflection of a steel beam
Learning a programming language is crucial in many job fields. However, it’s time to put the fear of learning a programming language of your need out of the way. Instead, create your roadmap and proceed toward achieving your goal.
Thank you for reading. Your feedback and suggestions shall be much appreciated. Accept the fact that I am not a Civil Engineer, but I know how to start learning a programming language and use it for real-world uses. Whatever field a programming language has used, the fundamentals remain the same. I am here to encourage Civil Engineers to learn to program and utilize it in their real-world problems. No matter what, you can learn the programming language of your need.