Why Modelica and OpenModelica are already ready for artificial intelligence — and what this means for fluid power system designers
Artificial intelligence is changing the way many engineers work. But not all tools are ready to embrace it the same way: those working with closed graphical interfaces or proprietary binary formats can only tap into AI on the surface. Those working with Modelica, on the other hand, start from a structural advantage that few modeling languages have.
Why AI already "speaks" Modelica
There are three reasons why Modelica and artificial intelligence fit together naturally.
It’s an equation-based language. The latest AI models are increasingly capable of reasoning about mathematics, symbolic relationships, and physical constraints. A language built around equations, modular components, and cause-and-effect relationships is exactly the kind of structure these systems reason best with.
It’s a textual language, not a graphical one. A Modelica model isn’t a drawing locked inside a proprietary interface — it’s readable code, just like Python or JSON. That makes it understandable to both the engineer and the AI, with no need for any intermediate translation.
It’s an open ecosystem. The language specification is public, the standard library is public, thousands of examples and technical papers are public. It’s highly likely that much of this material was already part of the training data behind today’s most widely used language models: in practice, general-purpose AI already “speaks” Modelica, with no dedicated training required.
It isn't a future promise — it's already usable today
This is the point that’s often underrated: you don’t need to wait for a dedicated tool to start putting AI to work on Modelica.
A .mo file is plain text. That means it can be pasted into any chat with a general-purpose AI assistant, extended, fixed, documented, or explained — exactly as you would with a script. It also means a Modelica model can be version-controlled with Git, diffed, and code-reviewed: established software practices, applicable right away to a physics-and-math domain.
To make this concrete, here’s a small hydraulic circuit — source, throttle valve, tank — written in plain OpenModelica code:
model simple_circuit
//parameters
parameter Real slope = 1e-4 "flow-rate ramp slope (m^3/s^2)";
parameter Modelica.Units.SI.Length diameter = 0.005 "orifice diameter";
parameter Real cq = 0.7 "discharge coefficient";
parameter Modelica.Units.SI.Density rho = 865 "fluid density";
parameter Modelica.Units.SI.Pressure p_tank = 1e5 "tank pressure";
//variables
Modelica.Units.SI.VolumeFlowRate flow_rate "flow rate in the circuit";
Modelica.Units.SI.Area area "orifice cross-sectional area";
Modelica.Units.SI.Pressure p_1 "pressure upstream of the orifice";
Modelica.Units.SI.Pressure p_2 "pressure downstream of the orifice";
Modelica.Units.SI.Pressure delta_p "pressure drop across the orifice";
equation
flow_rate = slope * time; //flow rate increases linearly over time
area = Modelica.Constants.pi * diameter^2/4; //computed orifice area
flow_rate = cq * area * sqrt(2*abs(delta_p)/rho); // turbulent orifice flow law
delta_p = p_1 - p_2; //pressure drop calculation
p_2 = p_tank; //the downstream point is connected to the tank
annotation(
experiment(StartTime = 0, StopTime = 5, Tolerance = 1e-06, Interval = 0.01));
end simple_circuit;
This is exactly the kind of text a general-purpose AI assistant can read, comment on, or extend, with no dedicated integration whatsoever. Try it yourself: paste it into ChatGPT, Gemini, or Claude and ask it to add a second valve in series, or to make the diameter time-varying.
If you’d rather get hands-on without writing anything, below you’ll find the same physical law in interactive form: change the parameters of each set and compare the results.
For OpenModelica specifically, this advantage runs even deeper: being an open-source environment, its source code, libraries, and documentation are all publicly available. It’s an ecosystem built to be “read” — by a person, or by an AI.
AI explores, validated libraries guarantee
Asked to build a model from scratch, an AI assistant can quickly generate a coherent code structure, with plausible components, connections, and documentation. It’s a great starting point for conceptual analysis, but plausible isn’t the same as validated: without tested components, AI can introduce physical simplifications that aren’t always correct.
The real leap in quality happens when AI doesn’t invent the physics but instead assembles and configures it from libraries of components already validated against experimental data. In that case, AI’s contribution shifts toward configuration, debugging, parametric studies, and reporting — tasks that eat up a lot of engineering time but add little value when done by hand.
It’s the same principle behind our work on SFPLibDyn: a library only becomes useful once it has been validated and checked against experimental and CFD data, not simply once it’s syntactically correct.
ρ computed for ISO VG46 mineral oil.
Linear approximation.
What changes in day-to-day work with OpenModelica
In concrete terms, an AI assistant can already help with:
- turning a natural-language request into a draft model structure;
- writing or fixing equations and connectors, cutting down time spent on boilerplate;
- interpreting compilation errors and proposing fixes;
- generating documentation, comments, and reports from existing code;
- setting up parametric or sensitivity studies on existing models.
This also lowers the barrier to Modelica modeling for those who don’t work with it every day, freeing engineers to focus on what really matters: interpreting the results and validating them physically.
What we're working on at SmartFluidPower
Building on exactly this foundation, our team is working on an AI-powered tool designed for OpenModelica users and our proprietary library, aimed at making the path from idea to simulation-ready model simpler and faster, by weaving AI assistance directly into the modeling and simulation workflow for fluid power systems.
More details coming soon. If you’d like to be among the first to know more, get in touch: we’re curious to connect with anyone who, like us, believes the future of physical simulation lies in open, transparent tools that are now also smarter.
