Hacker News new | ask | show | jobs
by nativeit 543 days ago
The first link for “Modelica Language” includes tutorials and examples. Five seconds of clicking around got me to:

> Let us consider an extremely simple differential equation:

x = (1-X)

Looking at this equation, we see there is only one variable, x

This equation can be represented in Modelica as follows:

  model FirstOrder
    Real x;
  equation
    der(x) = 1-x;
  end FirstOrder;
This code starts with the keyword model which is used to indicate the start of the model definition.

The model keyword is followed by the model name, FirstOrder. This, in turn, is followed by a declaration of all the variables we are interested in.

[et cetera]