Rumoca logo

Modelica as a
Universal Symbolic Frontend

Rumoca turns Modelica package trees into modern symbolic systems. Open source. Written in Rust. Runs in your browser.

Modelica → Rumoca →

supported backends

CasADi logo
CasADi
SymPy logo
SymPy
JAX logo
JAX
Julia logo
Julia
FMI logo
FMI
Embedded C logo
Embedded C

Your model belongs to you, not your toolchain.

Write physics once, use it everywhere.

There is a large ecosystem of useful engineering models already written in Modelica, but many modern workflows live elsewhere — Julia / SciML, Python / JAX / CasADi / PyTorch, embedded targets, and browser workflows via WASM.

Rumoca bridges that gap by treating Modelica as a semantic frontend and compiling models into rich intermediate forms suitable for robust simulation, symbolic analysis, optimization, differentiable workflows, and multi-backend code generation.

Modelica
model MassSpringDamper
  Real x(start = 1);
  Real v(start = 0);
  parameter Real k = 1, c = 0.1, m = 1;
equation
  der(x) = v;
  m * der(v) = -k * x - c * v;
end MassSpringDamper;
CasADi (Python)
x = ca.MX.sym('x', 2)
p = ca.MX.sym('p', 3)
ode = ca.vertcat(x[1],
  (-p[0]*x[0] - p[1]*x[1]) / p[2])
f = ca.Function('f', [x, p], [ode])

Compiler Pipeline

From Modelica source to any symbolic backend in a single pass.

.mo Source ↓
Parse
Source to AST / class tree
↓
Resolve
Scope setup & name resolution
↓
Typecheck
Types, dimensions, parameters
↓
Instantiate
Extends & modifier application
↓
Flatten
Hierarchy & connection expansion
↓
DAE
Variable classification & DAE
↓
Structural
BLT, matching, IC planning
↓
Codegen
Template-driven generation
CasADi SymPy JAX Julia/MTK FMU Embedded C Custom Jinja

Features

Everything you need to bridge Modelica and modern scientific computing.

Full Compiler Pipeline

Parse, resolve, typecheck, instantiate, flatten, and lower Modelica models into robust canonical DAE forms.

Multi-Backend Export

Generate equation systems and code targeting symbolic, numerical, learned, and embedded workflows across Julia, Python, and beyond.

Robust DAE Simulation

Rust-native simulation with exact AD Jacobians, structural preparation, IC planning, and solver fallbacks.

Modern Tooling

LSP server, formatter, linter, Python bindings, WASM support, and VS Code extension.

Open Source

Apache-2.0. Native binary, Python wheel, and WebAssembly. Distributed from GitHub Releases.

Built For

Researchers & Students

Write your dynamics in standard Modelica. Export to SymPy for symbolic analysis, CasADi for trajectory optimization, or JAX for differentiable simulation.

Industry Engineers

Maintain models in a vendor-neutral, version-controllable format. Integrate into Python-based CI/CD pipelines. Export FMUs for downstream tool interoperability.

Binary installer
curl --proto '=https' --tlsv1.2 -LsSf https://raw.githubusercontent.com/cognipilot/rumoca/main/install/install.sh | bash
Python
pip install rumoca
Try instantly
Open Playground →

Cite Rumoca

Modelica Conference 2025 paper

BibTeX
@inproceedings{condie2025rumoca,
  title={Rumoca: Towards a Translator from Modelica
         to Algebraic Modeling Languages},
  author={Condie, Micah and Woodbury, Abigaile
          and Goppert, James and Andersson, Joel},
  booktitle={Modelica Conferences},
  pages={1009--1016},
  year={2025}
}