Skip to main content

A visual interface for Cantera reactor networks

Project description

Cantera ReactorNet Visualizer

logo

A web-based tool for visually constructing and simulating Cantera ReactorNet systems.

Architecture: FastAPI (Python backend) + React (TypeScript frontend) with Vite, Tailwind CSS, Zustand, and TanStack Query.

Documentation

  • AGENTS.md — setup, verification commands, coding and testing conventions for contributors and agents.
  • ARCHITECTURE.md — system design, API, frontend, staged solve, and plugin extension points.
  • Sphinx — build with make docs-build; published from docs/ (see Contributing below).

Features

  • Interactive graph editor for creating reactor networks (Cytoscape.js)
  • Support for various reactor types (IdealGasReactor, Reservoir)
  • Support for flow devices (MassFlowController, Valve, Wall)
  • Real-time property editing with unit conversion (K/°C)
  • Simulation with SSE streaming and live-updating Plotly charts
  • Results tabs: Temperature/Pressure plots, Sankey, Thermo reports, Summary
  • Monaco YAML editor with syntax highlighting
  • Extensible plugin system (JSON-based API)
  • Light/dark theme with OS preference detection
  • YAML configuration files with 🪨 STONE standard (elegant format)

screenshot

Installation

As a user (recommended)

Released wheels ship with the React frontend prebuilt, so no Node/npm is required — just install into any Python (e.g. conda) environment:

pip install boulder            # from PyPI

Note: installing straight from a source checkout (pip install git+https://github.com/parks4/boulder.git@main) does not include the GUI: the frontend is only built and bundled when a release wheel is produced. Use the PyPI release (or a wheel from the Releases page) to get the interface without building it yourself.

As a developer (from source)

Clone the repository, create an isolated environment, and build the frontend:

git clone https://github.com/parks4/boulder.git
cd boulder
conda env create -n boulder -f environment.yml
conda activate boulder
pip install -e .         # install in editable mode

# Build the React frontend (emits into boulder/_frontend)
cd frontend
npm install
npm run build
cd ..

Usage

From the CLI

After installation, use the boulder command:

boulder                 # starts the FastAPI server & opens the interface
boulder some_file.yaml  # starts with a YAML preloaded

Optional flags:

boulder --host 0.0.0.0 --port 8050 --debug  # customize host/port, enable auto-reload
boulder some_file.yaml --no-open             # do not auto-open the browser
boulder config.yaml --headless --download output.py  # headless code generation
boulder --dev                                # run in development mode with Vite dev server

Development Mode

You can start both the backend and frontend development server with a single command:

boulder --dev

This will:

  • Start the FastAPI backend on port 8050
  • Automatically start the Vite dev server (frontend) with hot-reload
  • Install frontend dependencies if needed (npm install)

Alternatively, run them separately in two terminals:

# Terminal 1: Backend API
uvicorn boulder.api.main:app --reload --port 8000

# Terminal 2: Frontend dev server (auto-proxies /api to port 8000)
cd frontend
npm run dev

Open http://localhost:5173 in your browser.

From Python

import uvicorn
uvicorn.run("boulder.api.main:app", host="127.0.0.1", port=8000)

Notes:

  • Default address is http://127.0.0.1:8050.
  • The API documentation is available at http://127.0.0.1:8050/docs (Swagger UI).

Once running, use the interface to:

  • Upload existing configurations
  • Create new reactor networks
  • Edit properties
  • Run simulations
  • View results

YAML Configuration with 🪨 STONE Standard

Boulder uses YAML format with 🪨 STONE standard (Structured Type-Oriented Network Expressions) - an elegant configuration format where component types become keys containing their properties:

metadata:
  name: "Reactor Configuration"
  version: "1.0"

simulation:
  mechanism: "gri30.yaml"
  time_step: 0.001
  max_time: 10.0

nodes:
  - id: reactor1
    IdealGasReactor:
      temperature: 1000      # K
      pressure: 101325       # Pa
      composition: "CH4:1,O2:2,N2:7.52"

connections:
  - id: mfc1
    MassFlowController:
      mass_flow_rate: 0.1    # kg/s
    source: res1
    target: reactor1

See configs/README.md for comprehensive YAML with 🪨 STONE standard documentation and examples.

Supported Components

Reactors

  • IdealGasReactor
  • Reservoir

Flow Devices

  • MassFlowController
  • Valve

Contributing / Developers

Feel free to submit issues and enhancement requests! Before pushing to GitHub, run the following commands:

  1. Update conda environment: make conda-env-update
  2. Install this package in editable mode: pip install -e .
  3. (optional) Sync with the latest template : make template-update
  4. (optional) Run quality assurance checks (code linting): make qa
  5. (optional) Run tests: make unit-tests
  6. (optional) Run the static type checker: make type-check
  7. (optional) Build the documentation (see Sphinx tutorial): make docs-build

If using Windows, make is not available by default. Either install it (for instance with Chocolatey), or open the Makefile and execute the lines therein manually.

License

Boulder is released under the MIT License.

Copyright (c) 2025 Spark Cleantech SAS

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

boulder-0.6.2.tar.gz (4.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

boulder-0.6.2-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

File details

Details for the file boulder-0.6.2.tar.gz.

File metadata

  • Download URL: boulder-0.6.2.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for boulder-0.6.2.tar.gz
Algorithm Hash digest
SHA256 0ecbd3ca8b79167690e0c1aeacdf111e6cde2e9d038e734fb732dfe422e0adcc
MD5 b4578b24f3513510d1b3e3532ba0d928
BLAKE2b-256 13a8969406c60116dc2b586d9e402504cbe046dca28254f971a001ecfd76773a

See more details on using hashes here.

Provenance

The following attestation bundles were made for boulder-0.6.2.tar.gz:

Publisher: release.yml on parks4/boulder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file boulder-0.6.2-py3-none-any.whl.

File metadata

  • Download URL: boulder-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for boulder-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3e87f4c39014d3df5a65af1c021d21d96d1b21fb678b1b30d0bba4ca69f3fcba
MD5 103b27d05c75eafc5df85a5e2d3cf910
BLAKE2b-256 6329166fed4447ce3ca487bd2d27c1d5729718960e2825aa2e7e58636fc78d76

See more details on using hashes here.

Provenance

The following attestation bundles were made for boulder-0.6.2-py3-none-any.whl:

Publisher: release.yml on parks4/boulder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page