Skip to content

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 ​

  1. 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.
  2. Find the example in the Libraries panel. Search finds it by name.
  3. 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 ​

ExampleLibraryWhat it shows
OpenIPSL.Examples.IEEE9.IEEE_9_BusesOpenIPSL 3.1.0The WSCC 9-bus, 3-machine test system through a 100 ms three-phase fault
OpenIPSL.Examples.IEEE14.IEEE_14_BusesOpenIPSL 3.1.0The IEEE 14-bus, 5-machine test system through a 200 ms three-phase fault
OpenIPSL.Examples.KundurSMIB.SMIB_AVR_PSSOpenIPSL 3.1.0A generator on an infinite bus, with a voltage regulator and a power system stabilizer
PhotoVoltaics.Examples.SimpleModuleMP3PhotoVoltaics 2.1.0A PV module with maximum power point tracking, feeding a three-phase AC grid

Power electronics and drives ​

ExampleLibraryWhat it shows
Modelica.Electrical.PowerConverters.Examples.DCDC.ChopperStepDown.ChopperStepDown_RLModelica 4.1.0A step-down chopper switching into an R-L load
Modelica.Electrical.Machines.Examples.InductionMachines.IMC_DOLModelica 4.1.0A squirrel-cage induction motor started direct on line
Modelica.Electrical.Machines.Examples.ControlledDCDrives.SpeedControlledDCPMModelica 4.1.0A speed-controlled permanent-magnet DC drive, fed from a battery through an H-bridge
Modelica.Electrical.Batteries.Examples.CCCVchargingModelica 4.1.0A battery charged at constant current, then constant voltage

Control ​

ExampleLibraryWhat it shows
Modelica.Blocks.Examples.PID_ControllerModelica 4.1.0A drive train held to a speed profile by a PI controller with anti-windup, against a load torque step
Modelica.Clocked.Examples.CascadeControlledDrive.SubClockedModelica 4.1.0A drive under a sampled-data cascade controller, its clocks derived by sub- and super-sampling

Energy and buildings ​

ExampleLibraryWhat it shows
Buildings.Examples.Tutorial.Boiler.System7Buildings 13.0.0A boiler, pumps and a radiator heating a room, switched on and off by a state machine
ThermofluidStream.Examples.HeatPumpThermofluidStream 1.4.0A vapour-compression heat pump running on R1234yf, under PI control
Modelica.Fluid.Examples.DrumBoiler.DrumBoilerModelica 4.1.0A drum boiler raising steam from a furnace heat profile, its drum level held by a PI controller on the feedwater

Mechanics ​

ExampleLibraryWhat it shows
Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulumModelica 4.1.0A double pendulum: two bodies on two revolute joints
PlanarMechanics.Examples.ControlledCraneCrabPlanarMechanics 1.7.0A crane crab whose trolley force is set by a PID controller from the load's swing angle

Libraries and licences ​

LibraryLicenceSource
Modelica Standard LibraryBSD 3-Clausemodelica/ModelicaStandardLibrary
OpenIPSLBSD 3-ClauseOpenIPSL/OpenIPSL
PhotoVoltaicsBSD 3-Clausechristiankral/PhotoVoltaics
Modelica Buildings LibraryBSD 3-Clause, with an added paragraphlbl-srg/modelica-buildings
ThermofluidStreamBSD 3-ClauseDLR-SR/ThermofluidStream
PlanarMechanicsBSD 3-Clausedzimmer/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.