Examples
Ready-made models from open-source Modelica libraries, to open and run in Modex. Modex did not write them: each one belongs to the library named beside it and comes under that library's licence.
Each example was checked on 3 October 2026: built and simulated to its stop time with OpenModelica 1.26.9, Modex's default compiler, from the library version listed.
Run an example
- Install the library. Settings → Libraries installs it from the OpenModelica package index, together with the libraries it depends on. The Modelica Standard Library needs no install in Desktop; in VS Code, Modex offers it the first time a model needs it.
- Find the example in the Libraries panel. Search finds it by name.
- Right-click it → Simulate, or Open Class to see its diagram first.
With an AI agent, give it the library version and the example's full name, for instance install OpenIPSL 3.1.0 and simulate OpenIPSL.Examples.IEEE9.IEEE_9_Buses. Modex's library tools install from the same index.
Power systems
| Example | Library | What it shows |
|---|---|---|
OpenIPSL.Examples.IEEE9.IEEE_9_Buses | OpenIPSL 3.1.0 | The WSCC 9-bus, 3-machine test system through a 100 ms three-phase fault |
OpenIPSL.Examples.IEEE14.IEEE_14_Buses | OpenIPSL 3.1.0 | The IEEE 14-bus, 5-machine test system through a 200 ms three-phase fault |
OpenIPSL.Examples.KundurSMIB.SMIB_AVR_PSS | OpenIPSL 3.1.0 | A generator on an infinite bus, with a voltage regulator and a power system stabilizer |
PhotoVoltaics.Examples.SimpleModuleMP3 | PhotoVoltaics 2.1.0 | A PV module with maximum power point tracking, feeding a three-phase AC grid |
Power electronics and drives
| Example | Library | What it shows |
|---|---|---|
Modelica.Electrical.PowerConverters.Examples.DCDC.ChopperStepDown.ChopperStepDown_RL | Modelica 4.1.0 | A step-down chopper switching into an R-L load |
Modelica.Electrical.Machines.Examples.InductionMachines.IMC_DOL | Modelica 4.1.0 | A squirrel-cage induction motor started direct on line |
Modelica.Electrical.Machines.Examples.ControlledDCDrives.SpeedControlledDCPM | Modelica 4.1.0 | A speed-controlled permanent-magnet DC drive, fed from a battery through an H-bridge |
Modelica.Electrical.Batteries.Examples.CCCVcharging | Modelica 4.1.0 | A battery charged at constant current, then constant voltage |
Control
| Example | Library | What it shows |
|---|---|---|
Modelica.Blocks.Examples.PID_Controller | Modelica 4.1.0 | A drive train held to a speed profile by a PI controller with anti-windup, against a load torque step |
Modelica.Clocked.Examples.CascadeControlledDrive.SubClocked | Modelica 4.1.0 | A drive under a sampled-data cascade controller, its clocks derived by sub- and super-sampling |
Energy and buildings
| Example | Library | What it shows |
|---|---|---|
Buildings.Examples.Tutorial.Boiler.System7 | Buildings 13.0.0 | A boiler, pumps and a radiator heating a room, switched on and off by a state machine |
ThermofluidStream.Examples.HeatPump | ThermofluidStream 1.4.0 | A vapour-compression heat pump running on R1234yf, under PI control |
Modelica.Fluid.Examples.DrumBoiler.DrumBoiler | Modelica 4.1.0 | A drum boiler raising steam from a furnace heat profile, its drum level held by a PI controller on the feedwater |
Mechanics
| Example | Library | What it shows |
|---|---|---|
Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum | Modelica 4.1.0 | A double pendulum: two bodies on two revolute joints |
PlanarMechanics.Examples.ControlledCraneCrab | PlanarMechanics 1.7.0 | A crane crab whose trolley force is set by a PID controller from the load's swing angle |
Libraries and licences
| Library | Licence | Source |
|---|---|---|
| Modelica Standard Library | BSD 3-Clause | modelica/ModelicaStandardLibrary |
| OpenIPSL | BSD 3-Clause | OpenIPSL/OpenIPSL |
| PhotoVoltaics | BSD 3-Clause | christiankral/PhotoVoltaics |
| Modelica Buildings Library | BSD 3-Clause, with an added paragraph | lbl-srg/modelica-buildings |
| ThermofluidStream | BSD 3-Clause | DLR-SR/ThermofluidStream |
| PlanarMechanics | BSD 3-Clause | dzimmer/PlanarMechanics |
The licence that governs each library is the one in its own repository. Modex is not affiliated with, and not endorsed by, the authors of these libraries. Modelica® is a registered trademark of the Modelica Association.