Top Open-Source Civil Engineering Repositories on GitHub

Must read

Civil Engineering Materials
Civil Engineering Materialshttps://civilmat.com
I’m Haseeb, a civil engineer and silver medalist graduate from BZU with a focus on structural engineering. Passionate about designing safe, efficient, and sustainable structures, I share insights, research, and practical knowledge to help engineers and students strengthen their technical foundation and professional growth.
🛠 Tools & Open-Source Software

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.

30+Repositories Reviewed
6Engineering Domains
100K+Combined GitHub Stars
FreeAll Open-Source

The most-starred civil engineering GitHub repositories include OpenSees (nonlinear FEM for earthquake engineering), IfcOpenShell (BIM/IFC parsing in Python), SWMM5 (stormwater modeling), anastruct (2D structural frames), and handcalcs (engineering calculations as LaTeX). These tools replace expensive commercial software for analysis, design verification, BIM automation, and hydraulic modeling — and they run inside Python.

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.

🔍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:

Open-Source vs. Commercial Software — Key Metrics

$0costMost repo licenses (MIT/GPL)
100%scriptablePython / API access to results
Gitversion controlTrack every design change
CI/CDtestedUnit-tested engineering code
24/7communityIssues, forks, pull requests
ResearchvalidatedPeer-reviewed benchmarks

💡

Why this matters for practising engineersCommercial FEM packages can cost $5,000–$25,000/year per seat. For feasibility studies, parametric design, or student projects, open-source Python tools run the same governing equations at zero cost — with full transparency of implementation.

🏗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.

🧱
anastruct
by ritchie46 · Python · ⭐ 3.2k

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.

Frame AnalysisStiffness MethodPythonMatplotlib
Real use case: Run 100 parametric beam analyses in a loop — change span, section, loading — and plot governing cases automatically. Replaces repetitive spreadsheet checks.
⭐ 3,200🍴 580📦 pip install anastruct

→ View on GitHub

📐
section-properties
by robbievanleeuwen · Python · ⭐ 1.1k

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.

Section PropertiesTorsionWarpingComposite Sections
Real use case: Compute Ixx for a fabricated built-up steel section or check the plastic neutral axis of a composite slab-beam without manual integration.

→ View on GitHub

⚙️
PyNite
by JWock82 · Python · ⭐ 1.4k

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.

3D FEMPlate/ShellP-DeltaDynamic
Real use case: Model a 3D steel frame with semi-rigid connections and check sway under wind load, including geometric nonlinearity via P-Delta iteration.

→ View on GitHub

🌉
openseespy
by zhuminjie · Python · ⭐ 900+

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.

Nonlinear FEMEarthquakeFiber SectionsTime-History
Real use case: Perform pushover analysis on a reinforced concrete moment frame, defining fiber-based cross-sections and concrete/steel material models.

→ View on GitHub

🧮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.

FEM Global Equilibrium[K] {u} = {F}

/* 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 */

🔬
FEniCSx (dolfinx)
by FEniCS Project · Python/C++ · ⭐ 700+

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.

PDE SolverParallelUFLResearch-Grade
Real use case: Solve 3D linear elasticity for a concrete dam cross-section under hydrostatic pressure and self-weight, with automatic mesh refinement.

→ View on GitHub

📊
sfepy
by sfepy · Python · ⭐ 800+

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.

ConsolidationBiotThermoelasticEducational
Real use case: Model Terzaghi consolidation of a saturated clay layer under a flexible footing, validating against classical analytical solutions.

→ View on GitHub

🏢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.

🔗
IfcOpenShell
by IfcOpenShell · C++/Python · ⭐ 2.8k

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.

IFCBIMGeometryAutomation
Real use case: Extract all structural columns from an IFC model, filter by material, and automatically generate a schedule with dimensions and quantities — in 10 lines of Python.
⭐ 2,800🍴 840

→ View on GitHub

🔵
BlenderBIM
by IfcOpenShell · Python · ⭐ 2.5k

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.

BlenderIFC4Clash DetectionQTO
Real use case: Model a reinforced concrete building in BlenderBIM, export structural members to IFC, and import into anastruct for frame analysis — fully open-source BIM-to-analysis workflow.

→ View on GitHub

💧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.

🌊
pyswmm
by OpenWaterAnalytics · Python · ⭐ 550+

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.

SWMM5StormwaterUrban DrainageEPA
Real use case: Run 1,000 Monte Carlo rainfall simulations on a drainage network to determine the probability of surcharge at critical manholes — automated in Python.

→ View on GitHub

🏔
PyGeoNet
by passaH2O · Python · ⭐ 300+

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.

DEMWatershedGeomorphologyGIS
Real use case: Delineate the catchment contributing to a culvert from a 1m LiDAR DEM to size the hydraulic opening under design storm conditions.

→ View on GitHub

🌡
OpenGeoSys
by ufz · C++/Python · ⭐ 500+

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.

THMCPorous MediaGeothermalResearch
Real use case: Simulate coupled heat and pore pressure evolution around a deep borehole heat exchanger in fractured rock.

→ View on GitHub

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.

🏔
pyslope
by JesseBonanno · Python · ⭐ 250+

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.

Slope StabilityBishop MethodFoSPython
Bishop SimplifiedFoS = Σ [c’b + (W – ub)tanφ’] / mα ÷ Σ W sinα
/* mα = cosα + (sinα tanφ’)/FoS */
Real use case: Check embankment stability during rapid drawdown by varying water table elevation and finding the minimum FoS automatically.

→ View on GitHub

🔩
geotecha
by RohanGeo · Python · ⭐ 180+

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.

ConsolidationVertical DrainsSettlementSpectral
Real use case: Predict time-settlement curve for a highway embankment over soft marine clay with PVD at 1.5m triangular spacing.

→ View on GitHub

📝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.

🧾
handcalcs
by connorferster · Python · ⭐ 6.5k

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.

LaTeX RenderingJupyterCalculationsDocumentation
Real use case: Write a beam bending calculation in Python, use @handcalc decorator, and the output is a client-presentable PDF with all substitutions shown — instantly peer-reviewable.
⭐ 6,500🍴 330

→ View on GitHub

📏
forallpeople
by connorferster · Python · ⭐ 450+

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.

SI UnitsDimensional AnalysisUnit Safety
Real use case: Define beam span as L = 6.0 * m and load as w = 15.0 * kN/m; moment M = w*L²/8 automatically returns a result in kN·m.

→ View on GitHub

📒
efficalc
by youandvern · Python · ⭐ 180+

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.

Calc ReportsHTML OutputStructured
Real use case: Write a complete foundation design calculation — bearing capacity, settlement, punching shear — and generate a formatted PDF report from the same Python script.

→ View on GitHub

“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

📐
ezdxf
by mozman · Python · ⭐ 2.2k

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.

DXFAutoCADDrawing GenerationPython
Real use case: Generate rebar bending schedules as DXF drawings automatically from a Python reinforcement design script — no manual CAD drafting.
⭐ 2,200🍴 230

→ View on GitHub

🎯
cadquery
by CadQuery · Python · ⭐ 3.3k

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.

3D CADParametricOCCTSTEP Export
Real use case: Model a parametric steel connection plate — given bolt diameter, pitch, and edge distance — and export to DXF for fabrication automatically.

→ View on GitHub

🏛Reinforced Concrete & Steel Design Tools

concreteproperties
by robbievanleeuwen · Python · ⭐ 300+

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.

RC DesignM-N InteractionPrestressedMoment-Curvature
Real use case: Generate the M-N interaction diagram for a circular concrete column with 12 bars, and check whether combined axial load and biaxial bending falls inside the envelope.

→ View on GitHub

🔧
pycba
by ccaprani · Python · ⭐ 200+

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.

Continuous BeamInfluence LinesMoving LoadBridge
Real use case: Compute influence lines for moment at midspan of a 3-span bridge deck, then apply HA/HB loading to find the critical load case per BD 37/01.

→ View on GitHub

👷

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

Python Skill Level Required by Repository Category

handcalcs / forallpeopleBeginner
anastruct / pyslopeBeginner–Intermediate
PyNite / section-propertiesIntermediate
IfcOpenShell / ezdxfIntermediate–Advanced
openseespy / FEniCSxAdvanced (FEM Theory Required)
OpenGeoSysExpert (THMC Theory)

Open-Source Civil Engineering Tool Ecosystem

Python Ecosystem Structural anastruct · PyNite FEM Solvers FEniCSx · sfepy BIM / IFC IfcOpenShell · BlenderBIM Hydrology pyswmm · PyGeoNet Calc Tools handcalcs · efficalc Geotechnical pyslope · geotecha

🔢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

Second Moment of Area (I)
Elastic Modulus (E)
EI (Flexural Rigidity)
Max Moment (wL²/8)
Allowable Deflection (L/limit)
Actual Max Deflection (5wL⁴/384EI)
Status

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-env and activate it
  • Install Jupyter: pip install jupyterlab for 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
🎯

Pro Tip: Use Conda environments per projectDifferent repos have different dependency requirements. Keep FEM analysis tools in one environment and BIM tools in another to avoid version conflicts. Use conda env export > environment.yml to lock your setup for reproducibility.

Browse by Engineering Discipline

🏗Structural
🧮FEM Solvers
🏢BIM / IFC
💧Hydrology
Geotechnical
📝Calc Tools
🖊CAD / DXF
🏛RC & Steel

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

References & Sources

  1. McKenna, F. (1997). OpenSees: A Framework for Earthquake Engineering Simulation. UC Berkeley. opensees.berkeley.edu
  2. van Leeuwen, R. (2020). section-properties: A Python Package for Computing Cross-Section Properties. GitHub
  3. Ferster, C. (2019). handcalcs: A Library for Automatic LaTeX-formatted Engineering Calculations. GitHub
  4. IfcOpenShell Contributors. IfcOpenShell: Open Source IFC Library and Geometry Engine. ifcopenshell.org
  5. EPA Office of Research. Storm Water Management Model (SWMM5) User Manual. epa.gov
  6. FEniCS Project. DOLFINx: Next Generation FEniCS Problem Solving Environment. fenicsproject.org
  7. Kolditz, O. et al. (2012). OpenGeoSys: An Open-Source Initiative for Numerical Simulation of THMC Processes in Porous Media. Environmental Earth Sciences.
  8. 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.

Have Feedback?

Feel free to drop your comments below. I usually reply within 8 to 24 hours.

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here
Captcha verification failed!
CAPTCHA user score failed. Please contact us!

Latest article

spot_img