Thinking global, living local

How to use lng-design-opensource: size an LNG train with open tools

October 29, 2026

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

Skip to article content
Text Size

Revised · v1.0.0 · what changed

279tests passed in 5 min 28 s
2 mtpatrain sized end to end in the main example
36,549 kWtotal compressor power for that train
8worked example scripts

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
Not for.
  • 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

RequirementWhyHow to get it
Python 3.10 or newerrequired by pyproject.tomlpython.org or brew install python
pip packagesCoolProp, pymoo, scipy, numpy, streamlit, plotly, pandaspip install -r requirements.txt
Patience for teststhe full test suite took 5 min 28 s in the demorun single test files while exploring
Optional: pyomo and idaes-pseheavier optimization extension, not needed for the sizing apppip install -e ".[advanced]"
Not neededno API key, no paid simulator, no database, no GPUthe 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:

ToolWhat you needBest for
GitHubFree account to fork or star; git to clone, or the green Code button, then Download ZIP, or open in CodespacesGetting the code and keeping up with updates
Claude CodeClaude subscription or API key; run claude inside the cloned folderLetting the AI read and run the whole repo
Gemini CLIGoogle account; run gemini inside the cloned folderThe same hands-on workflow with Gemini
Claude.ai, Gemini or ChatGPT in the browserA 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 firstEditing and extending the code
git clone https://github.com/herrrickshaw/lng-design-opensource.git
cd lng-design-opensource
claude      # or: gemini

Install

  1. Get the code
    git clone https://github.com/herrrickshaw/lng-design-opensource.git
    cd lng-design-opensource
  2. Create an environment and install requirements
    python -m venv .venv && source .venv/bin/activate
    pip install -r requirements.txt
  3. 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

MethodHow it works
Command lineRun scripts in examples/, such as the full train, dual mixed refrigerant, LPG import and regasification examples.
Library importImport functions from the lng_design package, for example size_liquefaction_train.
Streamlit appstreamlit run streamlit_app.py. It can also be deployed to Streamlit Community Cloud as is.
Through an AI assistantOpen 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.

Revision history.
  • 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.

Umashankar Triplicane Dwarakanathan
Contact Us
Umashankar Triplicane Dwarakanathan
Investment Promotion & Energy-Sector Leader · Chennai, Tamil Nadu, India
LinkedIn → GitHub → Email +91 78273 81696
How this site works

Data-led analysis of India's trade, currency and industrial policy. Every article is built from primary official sources, and every figure links back to the release, table or filing it came from.

Sources. DGCI&S TradeStat (imports/exports, HSN-wise) · PIB (government press releases, January 2017 to today, refreshed daily) · RBI (circulars, balance of payments) · MoSPI (CPI/WPI, IIP) · PARIVESH (environmental clearances) · CCIL (bond yields) · BIS (policy rates) · SEBI, NSE/BSE and SEC filings for company data.

Interpretation. Figures carry their vintage and retrieval date; estimates and press-reported numbers are labelled as such; where sources disagree, both are shown. Corrections are made visibly, never silently. Articles are written with AI assistance from the cited sources — AI-generated text can misstate figures even when working from real material, so verify any number that matters to a decision against the linked primary source.

footer

Browse all articles by topic

Every piece on this blog, grouped. Or read the full index.

Agriculture & FertilisersAI ToolsChemicalsClimate & CarbonEnergy & FuelsGas & LNGImport SubstitutionIndustrial PolicyMarkets & FinanceMobility & EVPrices & InflationTextilesTrade & Tariffs

Each topic is a live archive page that updates itself as pieces are labelled. It replaces a hand-kept list that had fallen 18 articles behind.