Skip to content

Conversation

@erwanp
Copy link
Contributor

@erwanp erwanp commented Aug 15, 2025

Introducing Boulder Plugins :

Allows other packages so define entry points in Boulder, extending the Cantera classes with custom classes that will be imported and solved in Boulder GUI.

  • BoulderPlugins container and get_plugins() to discover entry-point and env (BOULDER_PLUGINS) plugins once.
    No global registries; converters accept a plugins object.
  • Converter enhancements:
    • Single converter: unchanged behavior, but coerces numeric props (MFC/Valve) to float.
      DualCanteraConverter:
      • Now uses plugin builders for custom reactors/connections.
      • Supports Wall connections; tracks walls; exposes reactor_meta.
      • Fail-fast on Cantera advance errors and non-finite states; raises RuntimeError for GUI surfacing.
  • GUI robustness:
    • Simulation callback always clears “Simulating…” overlay (sets simulation-running False) and shows red error banner.
    • Error path returns a payload so client callbacks unstick even after failures.
  • Housekeeping:
    Removed fragile “force-load” imports and global converter instance.
    Kept single/Dual parity for network assembly and results.

Still Todo:

  • Write doc on how to set up your own pluggins

Reformatted Stone format (variation of #7 )

  • Updated Boulder's internal configuration format to use "nodes" instead of "components" for better semantic consistency, while maintaining STONE format compatibility.
  • Uses settings and phases instead of simulation

New 🪨 Stone format ::

metadata:
  name: "Basic Reactor Configuration"
  description: "Simple configuration with one reactor and one reservoir"
  version: "1.0"

phases:
  gas:
    mechanism: "gri30.yaml"

settings:
  time_step: 0.001  # s
  max_time: 10.0    # s
  solver: "CVODE_BDF"
  relative_tolerance: 1.0e-6
  absolute_tolerance: 1.0e-9

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

- id: res1
  Reservoir:
    temperature: 300         # K
    composition: "O2:1,N2:3.76"

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

@erwanp erwanp force-pushed the add/new-stone-format branch from 7a18f95 to 1bdba30 Compare August 15, 2025 07:23
@erwanp erwanp force-pushed the add/new-stone-format branch from 6d639ee to 526f194 Compare August 15, 2025 08:52
@erwanp erwanp merged commit d456e95 into main Aug 17, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants