Top Open-Source Civil Engineering Repositories on GitHub
Structural analysis, BIM, geotechnics, hydrology, and automation — the engineer’s guide to the best free tools you can use today.
Civil engineers have traditionally paid tens of thousands of dollars per year for structural, geotechnical, and hydraulic software licenses. That paradigm is breaking down. A growing ecosystem of open-source tools on GitHub now covers everything from nonlinear finite element analysis to IFC file manipulation, reinforced concrete design, groundwater modeling, and automated drawing generation — all free, all version-controlled, all scriptable.
This guide goes beyond star counts. For each repository, you’ll see what it actually does, a realistic use case, skill level required, and how it fits into a modern engineering workflow. Whether you’re checking beam deflections in Python or building a BIM automation pipeline, there is a GitHub project for you.
GitHub’s civil-engineering topic hosts hundreds of repositories ranging from solo weekend projects to tools used by national research institutes. This article surfaces the ones with the highest quality, maintenance activity, and real engineering utility — organized by discipline so you can jump directly to what you need.
📋 Table of Contents
2Structural Analysis Tools
3Finite Element Method (FEM) Solvers
4BIM & IFC Tools
5Hydrology & Water Resources
6Geotechnical & Soil Engineering
7Engineering Calculations in Python
8CAD Automation & Drawing Tools
9RC & Steel Design Tools
10Comparison: Tool vs. Commercial Software
11Interactive: Beam Deflection Calculator
12Engineer’s Setup Checklist
13FAQ – Engineers Ask
14References & Further Reading
🔍Why GitHub for Civil Engineering?
GitHub is no longer just a developer’s tool. It’s become the repository of choice for research-grade engineering software developed at institutions like UC Berkeley, MIT, ETH Zürich, and the US Army Corps of Engineers. The advantages for civil engineers are concrete:
🏗Structural Analysis Repositories
The following repositories handle 2D/3D frame analysis, beam-column interactions, truss solving, and section property calculation — the daily bread of a structural engineer’s workflow.
A lightweight 2D structural analysis library for frames and trusses. Uses the direct stiffness method with support for distributed loads, point loads, moments, hinges, and spring supports. Outputs shear/moment/deflection diagrams.
Calculates cross-sectional properties — area, centroid, second moment of area (Ixx, Iyy, Ixy), section modulus, torsion constant, warping constant, and plastic section modulus — for arbitrary shapes using finite element discretisation.
A 3D finite element library for structural engineers. Supports beams, columns, plates/shells, springs, and cables. Handles thermal loads, P-Delta effects, and dynamic modes. Results include reactions, member forces, and deflections.
Python bindings for OpenSees — the UC Berkeley nonlinear FEM platform used worldwide for earthquake engineering research. Supports material nonlinearity, geometric nonlinearity, and time-history analysis.
🧮Finite Element Method (FEM) Solvers
FEM is the mathematical engine behind every major structural, geotechnical, and fluid analysis software. These GitHub repositories implement FEM engines from scratch or expose well-validated solvers via Python APIs.
/* K = Global stiffness matrix (assembled from element stiffness matrices) */
/* u = Nodal displacement vector (unknowns) */
/* F = External force/load vector */
Element stiffness:
ke = ∫ Bᵀ D B dV
/* B = Strain-displacement matrix (from shape function derivatives) */
/* D = Constitutive (material) matrix */
The next-generation finite element computing platform. Write PDE formulations in UFL (Unified Form Language), generate optimized C++ solvers automatically, and solve problems in parallel. Used for structural, heat transfer, fluid, and coupled problems.
Simple Finite Elements in Python. Solves systems of PDEs (linear/nonlinear) in 1D, 2D, 3D. Excellent for education and research. Supports Biot’s consolidation (geomechanics), thermoelasticity, Navier-Stokes, and acoustic problems.
🏢BIM & IFC Tools
Building Information Modelling (BIM) is mandatory on most public infrastructure projects in the UK, EU, Singapore, and increasingly the Middle East. These tools let engineers read, write, query, and automate IFC models — without buying Revit API licenses.
The definitive open-source IFC geometry engine. Parse, query, and generate IFC files. Extract geometry for visualization or analysis. Integrates with BlenderBIM for full BIM authoring. Used by hundreds of construction technology companies.
A full BIM authoring environment built on Blender and powered by IfcOpenShell. Supports IFC4 and IFC4X3, clash detection, quantity takeoff, structural analysis export, and 4D construction scheduling. A genuine free alternative to Revit.
💧Hydrology & Water Resources
Water infrastructure — drainage networks, flood modeling, reservoir routing, groundwater management — now has a strong open-source ecosystem on GitHub. These tools interface with real geospatial data and produce publishable outputs.
Python wrapper around the EPA’s SWMM5 stormwater management model. Run simulations programmatically, read/write .inp files, and extract real-time node/link results during simulation for control system testing and optimization.
DEM-based geomorphological network analysis. Delineates watersheds, stream networks, drainage basins, and ridge lines from digital elevation models. Uses TauDEM and scikit-image for terrain processing.
Developed by Helmholtz Centre for Environmental Research. Solves thermo-hydro-mechanical-chemical (THMC) processes in porous media. Used for nuclear waste repository design, CO₂ storage, and deep geothermal engineering.
⛏Geotechnical & Soil Engineering
Foundation design, slope stability, consolidation settlement, and pile capacity — geotechnical engineering has traditionally relied on commercial software like PLAXIS or GeoStudio. These GitHub tools cover significant portions of that scope.
Slope stability analysis using Bishop’s Simplified and Janbu’s Simplified methods. Defines slope geometry, soil layers, surcharges, and water tables. Calculates factor of safety (FoS) and critical failure circle automatically.
/* mα = cosα + (sinα tanφ’)/FoS */
Geotechnical analysis tools in Python. Covers 1D consolidation (Terzaghi and Biot), vertical drains with smear zone effects, spectral methods for layered soils, and radial drainage. Includes verification against published solutions.
📝Engineering Calculations in Python
The engineering calculation sheet — traditionally a Word doc or PDF of hand calcs — is being replaced by Python notebooks that are reproducible, version-controlled, and unit-aware. These repositories make that transition practical.
The most-starred engineering calculation tool on GitHub. Renders Python calculations as LaTeX-formatted equations in Jupyter notebooks, showing variable substitution and results — exactly like a hand calculation sheet, but computed.
SI unit environment for Python. Every number carries its units and dimensional analysis is automatic. Prevents the class of engineering errors caused by unit mismatches. Works seamlessly with handcalcs for dimensionally-consistent calculation sheets.
L = 6.0 * m and load as w = 15.0 * kN/m; moment M = w*L²/8 automatically returns a result in kN·m.A framework for writing structured, report-generating engineering calculations. Figures, tables, and callout boxes are embedded. Output is an HTML report suitable for client delivery or code submission with a checker engineer.
“Open-source calculation tools like handcalcs change the quality assurance process fundamentally. When your calculation sheet IS the code, it can be diff-checked, peer-reviewed via pull request, and re-run on any machine — not just the one where the Excel file lives.”— Common observation in structural engineering tech communities (r/civilengineering, SEstructural forum)
🖊CAD Automation & Drawing Tools
A powerful Python library for reading and writing DXF (AutoCAD) files, supporting DXF versions from R12 to 2018. Create drawings programmatically: lines, arcs, polylines, hatch patterns, dimensions, text, blocks, and xrefs. No AutoCAD license required.
Parametric 3D CAD scripting in Python, powered by OCCT (same geometry kernel as FreeCAD). Create complex 3D solid models — connections, brackets, concrete formwork — programmatically. Export to STEP, IGES, STL, or DXF.
🏛Reinforced Concrete & Steel Design Tools
Nonlinear analysis of reinforced and prestressed concrete cross-sections. Generates moment-curvature diagrams, interaction diagrams (M-N), neutral axis depth for any strain distribution, and ultimate moment capacity. Supports cracked and uncracked sections.
Continuous Beam Analysis in Python. Solves multi-span continuous beams with varying section properties, elastic supports, and moving loads (influence lines). Used for bridge girder design checks and grillage model component analysis.
Structural Engineering Services
M. Haseeb — Graduate Structural Engineer
Looking for structural design support — RC/steel analysis, section design checks, or BIM coordination? Connect for remote engineering consultations and project collaboration.
⚖️Open-Source vs. Commercial Software — Full Comparison
| Tool / Software | Domain | Cost | Scripting | GUI | Code Validated | Best For |
|---|---|---|---|---|---|---|
| anastruct | 2D Frame Analysis | Free (MIT) | ✓ Full Python | No GUI | ⚡ Research | Parametric design / education |
| SAP2000 | 3D Frame/FEM | $3,500–$8,000/yr | ⚡ OAPI (.NET) | ✓ Full GUI | ✓ ETABS/SAP codes | Production design deliverables |
| PyNite | 3D Frame Analysis | Free (MIT) | ✓ Full Python | Matplotlib only | ⚡ Manual | Education / feasibility checks |
| ETABS | Building Analysis | $5,000–$12,000/yr | ⚡ OAPI | ✓ Full GUI | ✓ ACI / EC2 / BS8110 | High-rise RC building design |
| IfcOpenShell | BIM / IFC | Free (LGPL) | ✓ Full Python | ⚡ BlenderBIM | ⚡ IFC schema | BIM automation, coordination |
| Revit + API | BIM Authoring | $2,900/yr | ⚡ .NET API | ✓ Full GUI | ✓ LOD standards | Full design team BIM workflow |
| pyswmm | Hydrology / Drainage | Free (BSD) | ✓ Full Python | Text/Plot only | ✓ EPA SWMM5 | Urban drainage optimization |
| pyslope | Geotechnical | Free (MIT) | ✓ Full Python | Plotly charts | ⚡ Manual | Quick slope stability screening |
| GeoStudio | Geotechnical | $2,200–$4,500/yr | No scripting | ✓ Full GUI | ✓ Extensive validation | Certified slope stability reports |
Open-Source Civil Engineering Tool Ecosystem
🔢Interactive: Simply Supported Beam Deflection Calculator
Try the math that anastruct automates. Enter your beam parameters below and get instant deflection results — with the governing formula shown.
⚡ Beam Deflection Calculator
Simply supported beam under uniform distributed load (UDL) — Euler-Bernoulli beam theory
✅Engineer’s GitHub Setup Checklist
Before diving into these repositories, make sure your local environment is ready:
- Install Python 3.10+ via Anaconda or official python.org installer
- Set up a virtual environment:
python -m venv eng-envand activate it - Install Jupyter:
pip install jupyterlabfor interactive calculation notebooks - Install core libraries:
pip install numpy scipy matplotlib pandas - Install engineering stack:
pip install anastruct PyNite handcalcs forallpeople - For BIM work:
pip install ifcopenshell(or install via conda-forge) - For hydrology:
pip install pyswmm - Create a GitHub account and fork repositories you intend to use
- Set up VS Code with the Python and Jupyter extensions for the best workflow
- Bookmark the GitHub civil-engineering topic page for new discoveries
conda env export > environment.yml to lock your setup for reproducibility.Browse by Engineering Discipline
❓FAQ — Engineers Ask
Can I use open-source FEM results in a professional design submission?
This depends on your jurisdiction and project type. In most countries, design responsibility rests with the engineer of record, not the software. You can use any tool — commercial or open-source — provided you can demonstrate validation against known solutions, document assumptions, and sign off on results. Many engineers use open-source tools for feasibility and parametric studies, then verify critical outputs with commercial software before submission. Eurocode guidance on software validation applies regardless of licensing.
What is the difference between OpenSees and OpenSeesPy?
OpenSees is the original Tcl-based nonlinear FEM platform developed at UC Berkeley since 1997. OpenSeesPy provides Python bindings to the same underlying C++ engine, letting engineers define models in Python rather than Tcl scripts. All the material models, element formulations, and analysis procedures are identical — only the scripting language differs. For new users, OpenSeesPy is strongly recommended due to Python’s better ecosystem (NumPy, Matplotlib, Pandas for post-processing).
How does handcalcs compare to writing equations in Word or Mathcad?
Handcalcs renders Python variable assignments as LaTeX-formatted equations in Jupyter notebooks — showing symbolic form, substituted values, and result simultaneously. Unlike Word equations (static, error-prone), handcalcs calculates live. Unlike Mathcad ($2,000+/yr), it’s free and version-controllable via Git. The trade-off is that it requires basic Python knowledge.
Is IfcOpenShell compatible with Revit IFC exports?
Yes. IfcOpenShell reads IFC2x3 and IFC4 files, which are the standard export formats from Revit, ArchiCAD, and Bentley applications. IFC4 exports from Revit 2020+ are generally well-supported. For standard rectangular building geometry, IfcOpenShell handles Revit exports reliably.
📚Related Articles on CivilMat
GitHub Civil Engineering Topic · OpenSees Official (UC Berkeley) · IfcOpenShell Documentation · EPA SWMM5 · FEniCS Project · handcalcs Documentation
References & Sources
- McKenna, F. (1997). OpenSees: A Framework for Earthquake Engineering Simulation. UC Berkeley. opensees.berkeley.edu
- van Leeuwen, R. (2020). section-properties: A Python Package for Computing Cross-Section Properties. GitHub
- Ferster, C. (2019). handcalcs: A Library for Automatic LaTeX-formatted Engineering Calculations. GitHub
- IfcOpenShell Contributors. IfcOpenShell: Open Source IFC Library and Geometry Engine. ifcopenshell.org
- EPA Office of Research. Storm Water Management Model (SWMM5) User Manual. epa.gov
- FEniCS Project. DOLFINx: Next Generation FEniCS Problem Solving Environment. fenicsproject.org
- Kolditz, O. et al. (2012). OpenGeoSys: An Open-Source Initiative for Numerical Simulation of THMC Processes in Porous Media. Environmental Earth Sciences.
- Bonanno, J. (2020). PySlope: A Python Package for 2D Slope Stability Analysis. GitHub. MIT License.
The open-source civil engineering ecosystem on GitHub has matured significantly. For parametric design studies, feasibility calculations, BIM automation, and educational purposes, these tools are production-ready. The key shift happening now is engineers treating their calculations and models as code — version-controlled, testable, and reproducible — rather than opaque black-box files.
Start with handcalcs if you want to replace Excel calculation sheets. Move to anastruct or PyNite for frame analysis. Add IfcOpenShell when BIM coordination becomes part of your workflow. And when earthquake engineering or soil-structure interaction problems arise, openseespy is ready.
All the tools in this guide are free. The only investment required is time — and every hour spent learning Python-based engineering tools is an hour that compounds into faster, better, more transparent engineering practice.
