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.
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.
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;| Aspect | Hand-written ODE code | Modelica |
|---|---|---|
| Workflow | Derive equations, pick solver, code it | Declare components, connect them, simulate |
| Physics domains | One at a time | Electrical + mechanical + thermal in one |
| Reuse | Copy and adapt | Hierarchical component libraries |
| Symbolic simplification | Manual | Automatic (index reduction, causalization) |
| Tool interoperability | None | FMI 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.