language

Neutron Modelica

Equation-based simulation of physical systems. FMI 2.0 and 3.0 model exchange, modified nodal analysis for electrical networks, and a Julia bridge for heavy numerics.

Describe physics. The solver does the rest.

Available
FMI 3.0Model Exchange
MNAKirchhoff's Law Solver
JuliaNumerics Bridge
OpenStandard

Physics as code, not as a C++ project.

Modelica describes systems as equations. You write what a resistor, a motor, a heat exchanger is — and the compiler symbolically transforms your hierarchy of components into a solvable system. Neutron Modelica gives you a working pipeline: FMI import/export, a modified-nodal-analysis solver for electrical circuits, and a Julia bridge to DifferentialEquations.jl for when the numerics get heavy.

models/rlc.mo
model SeriesRLC
  import Modelica.Electrical.Analog.Basic.{Resistor, Inductor, Capacitor, Ground};
  import Modelica.Electrical.Analog.Sources.StepVoltage;

  Resistor  R(R=100);
  Inductor  L(L=0.01);
  Capacitor C(C=1e-6);
  StepVoltage V(V=5);
  Ground gnd;
equation
  connect(V.p, R.p);
  connect(R.n, L.p);
  connect(L.n, C.p);
  connect(C.n, V.n);
  connect(V.n, gnd.p);
end SeriesRLC;
Series RLC circuit. Modelica compiles this into ODEs automatically.
FMI 2.0 & 3.0
Functional Mockup Interface for model exchange and co-simulation. Import FMUs from Simulink, Dymola, OpenModelica; export FMUs for other tools.
Equation-based
Declare what the system is, not how to integrate it. The compiler flattens the hierarchy, simplifies symbolically, and hands a sparse system to the solver.
Multi-domain physics
Electrical, mechanical, thermal, hydraulic, chemical — connected in one model. Cross-domain conservation laws handled automatically.
MNA solver
Modified nodal analysis for electrical circuits. Kirchhoff's laws become linear algebra; SPICE-level behavior with a real programming language on top.
Julia bridge
For stiff systems or GPU-accelerated integration, dispatch into Julia's DifferentialEquations.jl via Neutron Julia. Same process, shared memory.
Nucleus sink
Pipe simulation trajectories straight into Nucleus time-series. Persisted, queryable, ready to visualize with Neutron TypeScript or Studio.
AspectHand-written ODE codeModelica
WorkflowDerive equations, pick solver, code itDeclare components, connect them, simulate
Physics domainsOne at a timeElectrical + mechanical + thermal in one
ReuseCopy and adaptHierarchical component libraries
Symbolic simplificationManualAutomatic (index reduction, causalization)
Tool interoperabilityNoneFMI 2.0 / 3.0 across 50+ tools

What it's for

Control-system design where the plant and the controller are modeled together. Digital twins of real assets pulling live sensor data from Nucleus. Battery pack, motor-drive, HVAC, and power-electronics simulations. Anywhere you'd reach for Simulink but would rather have an open standard and a real database.

Why Modelica?

Because thirty years of industrial engineering has already answered how to model physics correctly — aerospace, automotive, and energy companies built it. Because FMI means your model talks to every other simulation tool in the world. Because equation-based modeling lets you change physics by editing an equation, not rewriting a solver.

Part of a bigger system

Simulate in Neutron Modelica. Solve stiff systems in Neutron Julia. Persist trajectories in Nucleus time-series. Expose live dashboards from Neutron TypeScript. Train surrogate models in Neutron Mojo. The simulation is another process in the stack, not a silo.