toolIn progress

Neutron Modelica

Bring physical systems into your application. Model and simulate with Python, connect numerical tools through Julia and FMI, and work with simulation results through Nucleus.

Simulation belongs in the application.

A thermal model, electrical circuit, or mechanical system can inform a dashboard, an experiment, or a control service. Neutron Modelica is the simulation component that connects that work to the wider Neutron ecosystem.

Today’s implementation is Python tooling in neutron_sim, with a modeling API, SciPy solvers, domain components, and optional integrations. Modelica-language models require an external compiler and an appropriate interchange path; Neutron does not ship a general Modelica compiler.

Model and solve
Variables, parameters, equations, components, and connections, with electrical, mechanical, thermal, and fluid libraries. Numerical simulation runs through SciPy.
Connect specialist tools
Optional FMI tooling and a juliacall bridge to Julia’s ModelingToolkit and DifferentialEquations packages. Availability depends on the selected integrations and their runtimes.
Work with results
Nucleus storage helpers, plots, MCP tool wrappers, and optional scikit-learn surrogate models. Compose these capabilities into your own application workflow.

Clear boundaries make simulations portable.

The existing FMU export writes model-description metadata and a serialized Python model for Neutron round trips. It does not produce the native FMI implementation needed for a generally portable executable FMU.

The source tree also contains neutron_modelica runtime and circuit helpers, but the current wheel configuration packages only neutron_sim. Packaging and external-tool interoperability need further work before the broader integration can be treated as complete.

Python orchestrates. Julia computes. Nucleus stores.

The intended workflow keeps each component focused: Python describes and coordinates an experiment; numerical backends solve it; Nucleus stores results; TypeScript presents them. Services in other Neutron languages can consume those results through explicit data contracts.

A common project workflow, versioned simulation artifacts, and validated interoperability across these boundaries are the next steps. Read the proposed integration architecture.

Simulation and verification work together.

Simulation estimates a model’s behavior numerically under chosen parameters and solver tolerances. Quint explores protocol state transitions; Lean checks deductive proofs. Combining their results requires explicit assumptions about the physical model and its connection to the software.