GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - codesphere-u/microhydro-opt: Zero-dependency run-of-river micro-hydro engineering toolkit: Flow-Duration Curve (Q75/Q90), Darcy-Weisbach penstock sizing, Joukowsky water-hammer surge pressure, turbine selection, and village LCOE.

BranchesTags
Open more actions menu

Latest commit

 

History

1 Commit
1 Commit

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
src/microhydro_opt
src/microhydro_opt
 
 
tests
tests
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
ROADMAP.md
ROADMAP.md
 
 
SECURITY.md
SECURITY.md
 
 
pyproject.toml
pyproject.toml
 
 
uv.lock
uv.lock
 
 

Repository files navigation

microhydro-opt

CI License: MIT Python 3.11+ Zero Dependencies

Zero-dependency run-of-river micro-hydro engineering toolkit: Flow-Duration Curve (Q75/Q90), Darcy-Weisbach penstock sizing, Joukowsky water-hammer surge pressure, turbine selection, and village LCOE.

  • Mission Domain: Renewable Energy & Rural Micro-Hydro Engineering
  • Stack: Pure Python 3.11+ (zero runtime third-party dependencies, mypy --strict, ruff, pytest)
  • Maintainer: Codesphere Innovations (U) Limited (codesphere-u)

Problem Solved

Rural highland micro-hydro schemes fail when penstocks burst from uncalculated water-hammer pressure surges or lose 25%+ head to undersized pipes during peak flows.

Key Features

  • Weibull Flow-Duration Curve analyzer (analyze_flow_duration_curve) computing Q50, Q75, Q90, Q95 and mandatory river environmental reserve flows.
  • Darcy-Weisbach + Swamee-Jain penstock head loss and Joukowsky water-hammer surge pressure check (analyze_penstock) with PN6–PN25 pipe class selection and rapid-valve-closure warnings.
  • Automatic turbine runner selector (Pelton, Turgo, Banki-Michell Crossflow, Kaplan), annual energy kWh, electrified household count, and 20-year village LCOE (design_micro_hydro).

Architecture Overview

flowchart LR
  Q[River Stream Flows] --> F[analyze_flow_duration_curve<br/>Q75/Q90 & Env Flow]
  F --> P[analyze_penstock<br/>Friction Loss + Joukowsky Surge]
  P --> T[design_micro_hydro<br/>Turbine Runner, kW & Village LCOE]
Loading

See docs/architecture.md for module-level design details.

Installation

git clone https://github.com/codesphere-u/microhydro-opt.git
cd microhydro-opt
uv sync --extra dev

Or install in editable mode with standard pip:

pip install -e ".[dev]"

Quick Start (CLI)

microhydro-opt --head-m 45 --flow-m3s 0.20 --penstock-m 220 --diameter-mm 315

Quick Start (Python API)

from microhydro_opt import SiteSpec, design_micro_hydro

res = design_micro_hydro(SiteSpec('KISORO-1', gross_head_m=65.0, design_flow_m3_s=0.15, penstock_length_m=260.0, penstock_diameter_mm=315.0))
assert res.turbine_type == 'Pelton' and res.electrical_power_kw > 50.0

Testing & Quality Gates

uv run ruff check src tests
uv run mypy src
uv run pytest -v

Security, Contributing & Roadmap

  • Security: See SECURITY.md for responsible disclosure procedures.
  • Contributing: See CONTRIBUTING.md and CODE_OF_CONDUCT.md.
  • Changelog & Roadmap: See CHANGELOG.md and ROADMAP.md.

License

MIT License — see LICENSE.

Support & Contact

Open an issue on GitHub Issues or contact [email protected].

About

Zero-dependency run-of-river micro-hydro engineering toolkit: Flow-Duration Curve (Q75/Q90), Darcy-Weisbach penstock sizing, Joukowsky water-hammer surge pressure, turbine selection, and village LCOE.

Topics

africahydropowermicro-hydropenstockpythonrenewable-energyrural-electrificationwater-hammer

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.