About / Overview
Explore the Spatio–Flux test suite
This page is a catalog of executable compositions built with the Process Bigraph protocol. Each entry below is a self-contained simulation that demonstrates how distinct modeling concerns—metabolism, spatial transport, particle dynamics, and structural change—can be composed through explicit interfaces and shared state.
Rather than presenting biological conclusions, the goal of this test suite is to make model structure visible and inspectable. Clicking into a simulation lets you see how it is built: which processes are present, how they are wired to state, and how different process families combine to form more complex behaviors.
Bigraph structure
Inspect a rendered process–bigraph showing state variables, processes, and their read/write dependencies.
Interactive state
Browse serialized state trees to explore spatial fields, particles, and intermediate variables.
Dynamics & behavior
View plots and animations illustrating spatial gradients, particle motion, growth, and division.
Composition documents
Download the machine-readable process–bigraph documents that define each simulation.
Scroll down to explore individual compositions, or use the Contents section to jump to a simulation.
Spatio–Flux process families
Think of these as lego bricks for multiscale simulation. Each family does one thing well—metabolism, transport, motion, coupling, or structural change— and complex behaviors emerge by composing families rather than extending any single process.
| Family | Color | Processes | Role |
|---|---|---|---|
|
Metabolic processes
|
Metabolism | DynamicFBA MonodKinetics SpatialDFBA |
Turns nutrients into growth. Computes uptake, secretion, and biomass production either at individual sites or across spatial grids by operating on substrate fields and biomass variables. |
|
Field transport
|
Transport | DiffusionAdvection |
Makes space matter. Updates dissolved species fields via diffusion and advection, so local metabolic activity can influence distant regions over time. |
|
Particle movement
|
Movement | BrownianMovement PymunkParticleMovement |
Moves agents through continuous space. Brownian motion provides stochastic movement; Newtonian motion adds mass, velocity, inertia, friction, and elastic interactions. |
|
Particle–field coupling
|
Coupling | ParticleExchange |
Bridges discrete and continuous. Mediates bidirectional exchange between particle-local state and spatial fields, syncing internal particle chemistry with nearby lattice values. |
|
Structural and boundary processes
|
Rewrite | ParticleDivision ManageBoundaries |
Changes the population. Rewrites the particle store by creating, removing, or relocating particles in response to conditions like growth thresholds or boundary crossings. |
Vivarium 2.0 ecosystem
Spatio–Flux is a reference application in the Vivarium 2.0 software suite: an open-source ecosystem for building, executing, and visualizing Process–Bigraph compositions.
bigraph-schema— Defines a compositional type system and hierarchical data structures using JSON-based schemas. Provides the type engine, schema compilation, state validation, and type-specific update operators used in process–bigraph delta semantics.process-bigraph— The dynamic core. Defines typed Process and Composite abstractions, event scheduling, global time management, and orchestration logic for executing process–bigraph documents.bigraph-viz— Parses process–bigraph documents and renders their structure as inspectable graphs.spatio-flux— A domain-specific application repository implementing concrete process families for metabolism, spatial fields, particle dynamics, and particle–field coupling, with an extended test suite of executable compositions.
References
How to read the bigraph visualization
Each diagram is a map of a composite simulation: what state exists, what processes run, and how data flows between them.
1) Nodes
Circles are state (variables or structured stores). Boxes are processes (update rules that run on a schedule).
2) Edges
Edges show read/write dependency: a process reads state to compute updates, and writes deltas back into state.
3) Hierarchy
Big nodes often contain nested nodes. That nesting reflects the hierarchical state tree (e.g., collections, sub-stores, or typed substructures).
4) A quick way to scan
Start by locating the main stores (large circles), then follow edges into the processes that touch them. The “story” is the loop: state → process → state.
Tip: If a diagram feels busy, focus on one store (fields or particles), then trace only the processes connected to it. The report sections below let you compare structure (bigraph), serialized state (JSON viewer), and behavior (plots/GIFs) side-by-side.
monod_kinetics
Field-only baseline: Monod uptake/growth on a well-mixed substrate pool (no spatial lattice, no particles). Use to sanity-check kinetics + mass balance.
Runtime: 0.56 seconds
monod_kinetics_state.json
View full JSONmonod_kinetics_viz.png
monod_kinetics.png

ecoli_core_dfba
Single-cell metabolism baseline: dynamic FBA for E. coli core with external glucose/acetate and biomass over time (no space, no particles).
Runtime: 0.31 seconds
ecoli_core_dfba_state.json
View full JSONecoli_core_dfba_viz.png
ecoli_core_dfba.png

ecoli_dfba
Single-cell metabolism (large model): dynamic FBA using iAF1260 with tracked extracellular fields (e.g., glucose/formate) and biomass. Stress-tests solver + exchange wiring.
Runtime: 4.61 seconds
ecoli_dfba_state.json
View full JSONecoli_dfba_viz.png
ecoli_dfba.png

yeast_dfba
Single-cell metabolism (yeast): dynamic FBA using iMM904 with extracellular glucose and biomass. Cross-model check of the dFBA pipeline.
Runtime: 3.48 seconds
yeast_dfba_state.json
View full JSONyeast_dfba_viz.png
yeast_dfba.png

community_dfba
Multi-agent well-mixed community: several independent dFBA instances share the same extracellular pools, creating competition/cross-feeding dynamics without space.
Runtime: 13.66 seconds
community_dfba_state.json
View full JSONcommunity_dfba_viz.png
community_dfba.png

dfba_kinetics_community
Hybrid community (well-mixed): mixes Monod-kinetic agents with dFBA agents in a shared environment. Demonstrates heterogeneous process composition under one schema.
Runtime: 0.37 seconds
dfba_kinetics_community_state.json
View full JSONdfba_kinetics_community_viz.png
dfba_kinetics_community.png

spatial_many_dfba
Spatial microenvironment (sitewise dFBA): a lattice where each site runs its own dFBA instance. Useful for validating lattice indexing + per-site state isolation.
Runtime: 1.87 seconds
spatial_many_dfba_state.json
View full JSONspatial_many_dfba_viz.png
spatial_many_dfba_timeseries.png

spatial_many_dfba_video.gif

spatial_dfba_process
Spatial microenvironment (vectorized dFBA): one spatial dFBA process updates all lattice sites as a single structured state. Demonstrates batched execution + field coupling.
Runtime: 44.14 seconds
spatial_dfba_process_state.json
View full JSONspatial_dfba_process_viz.png
spatial_dfba_process_model_grid.png

spatial_dfba_process_timeseries.png

spatial_dfba_process_video.gif

diffusion_process
Field transport primitive: finite-volume diffusion/advection on a 2D lattice. Use to validate boundary conditions, stability, and transport timescales.
Runtime: 0.21 seconds
diffusion_process_state.json
View full JSONdiffusion_process_viz.png
diffusion_process_video.gif

brownian_particles
Particle-only baseline: Brownian motion of agents with mass in continuous space (no fields, no metabolism). Checks integrator + particle state schema.
Runtime: 3.46 seconds
brownian_particles_state.json
View full JSONbrownian_particles_viz.png
brownian_particles_mass.png

brownian_particles_particles_traces.png

brownian_particles_snapshots.png

brownian_particles_video.gif

br_particles_kinetics
Particle–field coupling (kinetics): Brownian agents sample local lattice concentrations and apply Monod-style exchange, modifying both particle mass and fields.
Runtime: 7.82 seconds
br_particles_kinetics_state.json
View full JSONbr_particles_kinetics_viz.png
br_particles_kinetics_mass.png

br_particles_kinetics_particles_traces.png

br_particles_kinetics_snapshots.png

br_particles_kinetics_video.gif

br_particles_dfba
Particle-embedded metabolism: Brownian agents carry internal dFBA; uptake/secretion couples to fields and biomass accumulates into particle mass/size.
Runtime: 7.66 seconds
br_particles_dfba_state.json
View full JSONbr_particles_dfba_viz.png
br_particles_dfba_mass.png

br_particles_dfba_snapshots.png

br_particles_dfba_timeseries.png

br_particles_dfba_video.gif

comets_diffusion
COMETS-style spatial dFBA: per-site dFBA coupled to diffusion/advection, yielding spatiotemporal nutrient gradients and growth fronts on the lattice.
Runtime: 44.22 seconds
comets_diffusion_state.json
View full JSONcomets_diffusion_viz.png
comets_diffusion_snapshots.png

comets_diffusion_timeseries.png

comets_diffusion_video.gif

comets_br_particles_kinetics
COMETS + motile kinetic agents: adds Brownian particles with internal kinetics that exchange with COMETS fields. Demonstrates moving agents on a diffusing chemical landscape.
Runtime: 17.59 seconds
comets_br_particles_kinetics_state.json
View full JSONcomets_br_particles_kinetics_viz.png
comets_br_particles_kinetics_mass.png

comets_br_particles_kinetics_snapshots.png

comets_br_particles_kinetics_timeseries.png

comets_br_particles_kinetics_video.gif

comets_br_particles_dfba
COMETS + motile metabolic agents: Brownian particles carry dFBA and exchange with diffusing fields. Look for gradient-following effects and spatially structured growth.
Runtime: 59.39 seconds
comets_br_particles_dfba_state.json
View full JSONcomets_br_particles_dfba_viz.png
comets_br_particles_dfba_mass.png

comets_br_particles_dfba_snapshots.png

comets_br_particles_dfba_timeseries.png

comets_br_particles_dfba_video.gif

newtonian_particles
Physics-only baseline (Pymunk): rigid-body particles with collisions/crowding in continuous space. Use to validate contact dynamics + boundary enforcement.
Runtime: 1.84 seconds
newtonian_particles_state.json
View full JSONnewtonian_particles_viz.png
newtonian_particles_mass.png

newtonian_particles_particles_traces.png

newtonian_particles_video.gif

comets_nt_particles_dfba
Mechanochemical + metabolic coupling: Pymunk particles move/collide while COMETS fields diffuse; particles run metabolism (via exchange) against local concentrations.
Runtime: 40.12 seconds
comets_nt_particles_dfba_state.json
View full JSONcomets_nt_particles_dfba_viz.png
comets_nt_particles_dfba_mass.png

comets_nt_particles_dfba_mass_submasses.png

comets_nt_particles_dfba_snapshots.png

comets_nt_particles_dfba_timeseries.png

comets_nt_particles_dfba_video.gif

spatioflux_reference_demo
SpatioFlux demonstration reference composite: Newtonian motile particles + particle–field exchange + internal multi-dFBA (e.g., glucose vs acetate strategies) + Monod/diffusion fields + mass-aggregated division.
Runtime: 36.46 seconds
spatioflux_reference_demo_state.json
View full JSONspatioflux_reference_demo_viz.png
spatioflux_reference_demo_mass.png

spatioflux_reference_demo_mass_submasses.png

spatioflux_reference_demo_snapshots.png

spatioflux_reference_demo_timeseries.png

spatioflux_reference_demo_video.gif

reference_demo_x2y2
Different resolution for the spatio-flux reference demo
Runtime: 167.18 seconds
reference_demo_x2y2_state.json
View full JSONreference_demo_x2y2_viz.png
reference_demo_x2y2_mass.png

reference_demo_x2y2_mass_submasses.png

reference_demo_x2y2_snapshots.png

reference_demo_x2y2_timeseries.png

reference_demo_x2y2_video.gif

Total Simulation Time
454.96 seconds