An open Python toolkit that gives a quick, traceable first-pass sizing of an LNG liquefaction train and related terminals, with every stage on one feed basis, before you commit to a licensed simulator.
Open-source tools · How-to · LNG Plant & Terminal Engineering
How to use lng-design-opensource: size an LNG train with open tools
Revised
· v1.0.0 · what changed
Code: github.com/herrrickshaw/lng-design-opensource
Watch the walkthrough
Watch on YouTube: youtu.be/kBvs-dEobvc
What it is for
Before a licensed simulator run, engineers need a fast, auditable estimate of a liquefaction train. Natural gas must be cleaned, pre-cooled and liquefied to about minus 160 C. Each stage has a size, a duty and a power cost that must agree on one feed basis.
This toolkit sizes those stages from public correlations: inlet separator, amine absorber, molecular sieve, air cooler, propane pre-cool, main heat exchanger, end flash, storage and refrigerant make-up. It also has LPG import and regasification terminal examples.
Who it is for
- Process engineers and students who want a transparent first pass
- Analysts comparing project scale or technology options
- Non-programmers who want an AI assistant to run and explain the examples
- Detailed engineering design. The README calls it a screening tool and says to validate in HYSYS, PRO/II or IDAES.
- Sizing very large single trains without checking limits (a 4 mtpa sweep stopped with an error).
- Sub-cooling design. That section needs a loop this module does not size.
What you need
| Requirement | Why | How to get it |
|---|---|---|
| Python 3.10 or newer | required by pyproject.toml | python.org or brew install python |
| pip packages | CoolProp, pymoo, scipy, numpy, streamlit, plotly, pandas | pip install -r requirements.txt |
| Patience for tests | the full test suite took 5 min 28 s in the demo | run single test files while exploring |
| Optional: pyomo and idaes-pse | heavier optimization extension, not needed for the sizing app | pip install -e ".[advanced]" |
| Not needed | no API key, no paid simulator, no database, no GPU | the app has no external services or secrets |
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/lng-design-opensource.git
cd lng-design-opensource
claude # or: gemini
Install
- Get the code
git clone https://github.com/herrrickshaw/lng-design-opensource.git cd lng-design-opensource - Create an environment and install requirements
python -m venv .venv && source .venv/bin/activate pip install -r requirements.txt - Optional: install in editable mode with test tools
pip install -e ".[dev]"
Quick start: commands and what you should see
Run the tests
pytest -q tests
279 passed in 328.90s (0:05:28).
Size a 2 mtpa full train
python examples/full_train_worked_example.py
Feed 63.4 kg/s. Propane pre-cool duty 12,168 kW at minus 43.0 C; main exchanger duty 11,027 kW; end-flash 4.63%; LNG out 60.4 kg/s at minus 164.7 C; storage 63,827 m3; total compressor power 36,549 kW. The note says sub-cooling (10,844 kW) needs a dedicated loop outside this module.
Sweep the train size (the demo called size_liquefaction_train in Python)
size_liquefaction_train(capacity=1, 2, 3, 4) # mtpa
Total compressor power 18,436 kW at 1 mtpa, 36,871 kW at 2 and 55,307 kW at 3. At 4 mtpa it raised a ValueError: the molecular sieve exceeds the largest standard size, so parallel units are needed.
Size an LPG import terminal
python examples/lpg_import_terminal_worked_example.py
Two tanks of 59,747 m3, design-case boil-off gas 23.6 t/h, re-liquefaction in 3 stages, send-out heater 3,218 kW. Notes warn that holding-mode boil-off is 35% of machine rating, below an assumed 60% stable minimum.
Start the interactive app
streamlit run streamlit_app.py
A browser app for the sizing modules (from the README; not shown in the demo).
Ways to use it
| Method | How it works |
|---|---|
| Command line | Run scripts in examples/, such as the full train, dual mixed refrigerant, LPG import and regasification examples. |
| Library import | Import functions from the lng_design package, for example size_liquefaction_train. |
| Streamlit app | streamlit run streamlit_app.py. It can also be deployed to Streamlit Community Cloud as is. |
| Through an AI assistant | Open the folder in Claude Code or Gemini CLI, or upload the README and docs, and ask for runs and explanations in plain language. |
Sample prompts for your AI assistant
Copy, paste and edit the parts in [brackets].
- Explain this repo in plain English. What stages turn pipeline gas into LNG, and which does this code size?
- Run examples/full_train_worked_example.py and explain each line of the output.
- Size a [capacity] mtpa train for my feed gas with [composition] and tell me which stages hit limits.
- Why did the 4 mtpa case fail, and how would I split it into parallel trains?
- Where do the docs (METHODOLOGY, VALIDATION, EOS_SENSITIVITY) say these results should be checked in a licensed simulator?
- Which modules would I need to add to size sub-cooling?
Limits and honest caveats
- Conceptual sizing, not detailed engineering design. The README calls it a screening tool, not a rate-based simulator; validate in HYSYS, PRO/II or IDAES.
- The 4 mtpa sweep raised a ValueError because one molecular sieve vessel exceeds the largest standard size; parallel units are needed.
- The 2 mtpa sub-cooling duty of 10,844 kW needs a dedicated loop that this module does not size.
- In the LPG terminal example, holding-mode boil-off is 35% of machine rating, below an assumed 60% stable minimum.
- The full test suite is slow (5 min 28 s). The Streamlit app was not run in the demo.
Sources: the repository README and docs (herrrickshaw/lng-design-opensource), requirements.txt, pyproject.toml and the 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.