Utilities for sizing, evaluating, and visualizing common process vessels.
The repository contains:
- A Python library (
src/models/) with shape-specific subclasses that compute volumes, wetted areas, surge time, and more. - An interactive CLI (
main.py) that guides you through configuring a vessel and can export SVG drawings. - A Next.js front-end (
web-app/) that reuses the same design rules for a browser-based experience.
src/models/ Core Python package with vessel definitions and drawing helpers
main.py Interactive CLI entry point
tests/ Pytest coverage for core calculations
web-app/ Next.js UI that wraps the Python logic via an API layer
- Python 3.10+ (project developed and tested on 3.12)
pipandvirtualenv(recommended)
Install the dependencies with the editable src/ layout enabled:
python -m venv .venv
source .venv/bin/activate
pip install -e .Include the optional test dependencies when you plan to run pytest:
pip install -e .[test]Run the helper with optional flags or interactively:
python main.py --list # show available vessel types
python main.py -t vertical-flat-vessel \
-d 3.5 -l 10 \
--high-level 8 --low-level 2 \
--output vessel.svgIf any required argument is omitted, the CLI prompts for it (unless running non-interactively).
When drawing is enabled the SVG output is saved to the provided path (default vessel.svg).
source .venv/bin/activate
pytestThe web-app/ directory is a standard Next.js project.
cd web-app
npm install
npm run devVisit http://localhost:3000 to interact with the UI.
- Make sure new Python code includes tests (
tests/). - Run
pytest(and, when relevant,npm testinsideweb-app/). - Keep SVG outputs and README examples up-to-date when you add new vessel capabilities.
Chemical Engineering Design Library license terms apply (MIT-style, see LICENSE.txt).