Size a first-generation fuel-ethanol distillery, from molasses or grain through fermentation, distillation and sieve dehydration to spent wash or DDGS.
Open-source tools · How-to · Fuel ethanol (1G)
How to use ethanol-design-opensource: size a fuel-ethanol distillery
Revised
· v1.0.0 · what changed
Code: github.com/herrrickshaw/ethanol-design-opensource
Watch the walkthrough
Watch on YouTube: youtu.be/FrFTXLsQeR0
What it is for
This toolkit sizes a first-generation fuel-ethanol distillery for E20-style blending. It covers feedstock (cane molasses or milled grain), starch hydrolysis, batch fermentation, a shortcut distillation column (Fenske-Underwood-Gilliland), 3A molecular-sieve dehydration to anhydrous ethanol and the co-product stream (spent wash or DDGS).
It checks results against published figures and the BIS anhydrous ethanol specification.
Who it is for
- Students and analysts learning how a distillery is sized
- Developers doing an early feasibility sketch
- Engineers wanting a transparent literature-based baseline
- Detailed engineering design or equipment purchase
- Anything that needs vendor data; none is used
What you need
| Requirement | Why | How to get it |
|---|---|---|
| Python 3.10 or newer | The package declares requires-python >= 3.10 | python.org, or brew install python on macOS |
| Python packages: CoolProp, streamlit, plotly, pandas | Property correlations, calculations, tables and the web app | Installed automatically by pip install -e ".[dev]" |
| A terminal and git | To clone the repo and run the commands | Terminal on macOS/Linux, or WSL/Git Bash on Windows; or use GitHub Codespaces |
| Internet for the first install only | pip downloads the packages | No internet is needed to run the sizing code afterwards |
| API keys, accounts, licences | None required | No database, server, GPU, model download or API key is needed. The demo used none. |
Get the code and an AI assistant
You do not have to be a programmer. Get the repository, give it to an AI assistant, and ask in plain language. Any of these routes works:
| Tool | What you need | Best for |
|---|---|---|
| GitHub | Free account to fork or star; git to clone, or the green Code button, then Download ZIP, or open in Codespaces | Getting the code and keeping up with updates |
| Claude Code | Claude subscription or API key; run claude inside the cloned folder | Letting the AI read and run the whole repo |
| Gemini CLI | Google account; run gemini inside the cloned folder | The same hands-on workflow with Gemini |
| Claude.ai, Gemini or ChatGPT in the browser | A chat account; upload README.md and the files you care about (or paste the output of git ls-files) | Understanding the project and asking questions without installing anything |
| Other tools (Copilot Chat, Cursor, Codex CLI) | Open the cloned folder in the tool and point it at README.md first | Editing and extending the code |
git clone https://github.com/herrrickshaw/ethanol-design-opensource.git
cd ethanol-design-opensource
claude # or: gemini
Install
- Make sure Python 3.10 or newer is installed
python3 --version - Create and activate a virtual environment (keeps the install tidy)
python3 -m venv .venv && source .venv/bin/activate - Install the package with the test tools. The dependencies (CoolProp, pandas, plotly, streamlit or scipy/numpy) come in automatically from pyproject.toml.
pip install -e ".[dev]"
Quick start: commands and what you should see
Run the test suite to confirm everything works on your machine
pytest -q
A row of dots ending in 44 passed (about 6 seconds in the demo).
Molasses route at 1000 t/day of cane
python examples/full_chain_worked_example.py
72.5 t/day of B-heavy molasses gives 21,751 L/day ethanol, 21.75 L per tonne of cane, matching the published 21.75. Then a 512 m3 fermenter, 15 distillation stages to 94.0% w/w, a sieve section that meets BIS IS 15464, and 261 m3/day of spent wash that meets the CPCB cap.
Grain route (rice and maize) at 500 t/day
python examples/grain_worked_example.py
Model yields of 506.7 L/t (milled and broken rice) and 459.2 L/t (maize), against published 450, 440 and 380 L/t, plus the DDGS co-product (about 171 to 207 t/day).
Optional: interactive app
streamlit run streamlit_app.py
A local web page opens. From the README; not part of the captured demo.
Ways to use it
| Method | How it works |
|---|---|
| Command line (example scripts) | Run the worked example in examples/ and read the printed numbers. |
| Python library | Import the modules from the package in your own script or notebook and call them with your own feed and plant size. |
| Interactive web app | Run streamlit run streamlit_app.py from the repo folder for a browser-based version with sliders and charts. |
| Through an AI assistant | Open the cloned folder in Claude Code or Gemini CLI and ask it to run the example, change the inputs, or explain a result. Or upload README.md and docs/VALIDATION.md to a chat assistant. |
Sample prompts for your AI assistant
Copy, paste and edit the parts in [brackets].
- Explain this repository in plain English: what does it size, what goes in and what comes out?
- Run the tests and the worked example, then summarise the results in a short table.
- Compare the molasses and grain routes for a [number] tonnes per day plant and tell me which numbers I should trust least.
- Open docs/VALIDATION.md and tell me where this model matches published figures and where it does not.
- What would I need from a vendor or a licensed simulator before I could rely on these numbers?
- Change the plant size to [your tonnes per day] and show me which outputs change most.
Limits and honest caveats
- Conceptual sizing, not detailed engineering design.
- The model consistently overshoots published grain yields by 13 to 21 percent (ratios 1.126, 1.152, 1.208). Cause: a lab-optimised 95% hydrolysis efficiency combined with a molasses-calibrated fermentation efficiency.
- The molasses route matches its published figure because it was calibrated on it, so that match is not independent proof.
- One sieve-bed result came out with a height-to-diameter ratio of 35.9. The tool itself advises splitting it across parallel vessels.
- Literature correlations only; no vendor data.
Sources: the ethanol-design-opensource README, docs/VALIDATION.md and examples/ folder, and the video demo run of 18 October 2026.
- v1.0.0 — 18 October 2026 — first published.
About this article: Researched, written and edited by Umashankar Triplicane Dwarakanathan, with AI research assistance; every figure is meant to trace to the primary source cited. See the Editorial Policy for how sourcing, AI use and corrections work.