Size a coal-gasification-to-urea complex in which six units share one mass basis, and compare the result with the real Talcher plant.
Open-source tools · How-to · Coal to urea
How to use coal-to-urea-design-opensource: size a coal-to-urea complex
Revised
· v1.0.0 · what changed
Code: github.com/herrrickshaw/coal-to-urea-design-opensource
Watch the walkthrough
Watch on YouTube: youtu.be/eZTXoPpBlOQ
What it is for
Urea needs ammonia (from hydrogen and nitrogen) and CO2, and a coal-to-urea complex gets both from one gasification block. This toolkit sizes the chain: gasifier, water-gas shift, acid gas removal, air separation, ammonia synthesis and urea synthesis, all on one consistent mass basis.
The demo uses 145 kg/s of Indian high-ash coal and compares the result with Talcher Fertilizers Limited, a real public project.
Who it is for
- Students and analysts who want to see how the units of a coal-to-urea complex link together
- Early-stage feasibility teams who need a ballpark and a traceable method
- Engineers wanting a transparent baseline before using a licensed simulator
- Detailed engineering design
- Claims of accuracy beyond ballpark
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, scipy, numpy, streamlit, 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/coal-to-urea-design-opensource.git
cd coal-to-urea-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 tests
pytest -q tests
37 passed in about 3.5 seconds in the demo.
Run the whole chain and the Talcher comparison
python examples/full_chain_worked_example.py
A gasifier giving 8,584 mol/s of syngas at 64.1% cold gas efficiency, shift conversion of 79.7% (high temperature) and 85.9% cumulative, 190.2 kg/s of CO2 captured, 59.1 kg/s of ammonia, and 34.8 kg/s of urea (1.10 mtpa). It ends with the comparison: 1.10 vs Talcher's 1.27 mtpa, a difference of -13.6%.
Optional: interactive app
streamlit run streamlit_app.py
A local web page opens. Present in the repo; 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 77% of the captured CO2 is surplus after urea is made, and what a developer could do about it.
- 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 result is 13.6% below Talcher's 1.27 mtpa. Accuracy beyond ballpark is not claimed.
- 3,330 mol/s of captured CO2 (77%) is surplus after urea. That is a venting or carbon capture question the model flags but does not solve.
- Not modelled: methanation polishing before the ammonia loop, and recycle and stripping duty for unconverted CO2 and ammonia.
- Simplified single-pass conversions. Validate against a licensed simulator and vendor data.
- The repo as checked has no LICENSE file; check the repo page before reusing the code.
Sources: the coal-to-urea-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.