Reputation: 61289
I know I can define parameter units like so:
parameter Modelica.SIunits.Mass m0 = 2 "Mass";
And the units of state variables like so:
Real m(start=m0, fixed=true, min=0, max=100, unit="kg");
But how can I define the units of a derivative? (Or are these generated automatically? It may be that JModelica, which I am using, simply does not check units.)
der(m) = m*u;
Upvotes: 1
Views: 85
Reputation: 927
Dymola does this automatically for you. OpenModelica does not. So I guess it's probably something also missing in JModelica.org.
Upvotes: 2