Size a second-generation cellulosic ethanol plant that turns rice straw into fuel ethanol, and compare the result with real plants.
Open-source tools · How-to · Second-generation ethanol
How to use lignocellulosic-ethanol-opensource: size a 2G ethanol plant
Revised
· v1.0.0 · what changed
Code: github.com/herrrickshaw/lignocellulosic-ethanol-opensource
Watch the walkthrough
Watch on YouTube: youtu.be/UtXNH-Ekh_M
What it is for
This toolkit sizes a 2G cellulosic ethanol biorefinery: pretreatment, enzymatic hydrolysis, C5 and C6 co-fermentation, distillation and dehydration. It also reports how much lignin residue is available for process heat.
The demo runs rice straw at 425.7 t/day, the scale of IOCL Panipat, India's first commercial 2G plant, and compares with that plant and with Clariant's sunliquid plant in Romania.
Who it is for
- Students and analysts learning cellulosic ethanol
- Developers and policy staff who need a first-pass yield and sizing sketch
- Engineers wanting a traceable baseline
- Detailed engineering design
- Predicting real commissioning performance; the model does not do this
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/lignocellulosic-ethanol-opensource.git
cd lignocellulosic-ethanol-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 40 passed (about 6 seconds in the demo).
Rice straw to ethanol at Panipat scale (425.7 t/day)
python examples/full_chain_worked_example.py
72.6 t/day xylose and 124.2 t/day glucose, then 112,411 L/day ethanol (264.1 L/tonne, 64% from glucose and 36% from xylose), a 15-stage column at 94.0% w/w, a sieve section meeting the BIS spec, and 177.7 t/day of lignin residue at 14.1 MJ/kg. It ends with a validation line: 264.1 vs Panipat's published design figure of 234.9 L/tonne is 1.12x.
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.
- Explain why the model gives 264.1 L per tonne but Panipat's design figure is 234.9, and what that tells me.
- 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 overshoots Panipat's design figure by 1.12x. It is 1.04x Clariant Podari's achieved figure, but that plant uses wheat straw and a different pretreatment, so this is context, not a resolved discrepancy.
- Panipat itself ran at only 62% of design throughput in Nov-Dec 2025. The model does not predict or explain that, and it is not comparable to a per-tonne yield.
- Literature correlations only; no vendor data.
Sources: the lignocellulosic-ethanol-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.