- Index
- » Users
- » Angulo
- » Profile
Posts
Posts
Hello:
I discovered openmodelica recently, and I'm sincerely impressed by both the ambition and the current status of the project.
I have found around a wide array of examples of modelling, and a few nice resources for system optimization.
I'm not finding many examples of a system with unknown parameters, which are estimated a posteriori by minimization of mean squared error to some observations, for instance. Something like this:a Lotka-Volterra system with unknown growth rates and/or interaction terms:
https://docs.juliahub.com/DifferentialE … stimation/
How do people do this with openmodelica?
Regards
There you go, thanks a lot!
Code:
model FirstOrder annotation(uses(Modelica(version="3.2.3")));
Modelica.SIunits.Position x;
equation
der(x) = 1-x;
end FirstOrder;
I got a warning recently that I could upgrade to Modelica 4.0.0, but it turns out I didn't upgrade:
> dpkg -l | grep modelica
ii drmodelica 1.17.0-1 all An OMNotebook course in the Modelica language
ii omlib-modelica-3.2.3 3.2.3~20201118~124214~git~OM~maint~3.2.3-1 all Modelica 3.2.3 is a Modelica library
ii omlib-modelicabyexample-0.5.0 0.5.0~154~g6044b75-1 all ModelicaByExample 0.5.0 is a Modelica library
ii omlib-modelicareference 20201118~124214~git~OM~maint~3.2.3-1 all ModelicaReference is a Modelica library
ii omlib-modelicaservices-3.2.3 3.2.3~20201118~124214~git~OM~maint~3.2.3-1 all ModelicaServices 3.2.3 is a Modelica library
ii openmodelica 1.17.0-1 amd64 A complete Modelica environment
Hello everyone:
I started recently learning modelica, but there is a problem I avoided and I really need to solve.
I can import and simulate succesfully, both in OMEdit and through OMPython, models without units such as this:
Code:
model FirstOrder
Real x;
equation
der(x) = 1-x;
end FirstOrder;
But all of the following fail:
Code:
model FirstOrder
import Modelica.Units.SI;
SI.Position x;
equation
der(x) = 1-x;
end FirstOrder;
Code:
model FirstOrder
Modelica.Units.SI.Position x;
equation
der(x) = 1-x;
end FirstOrder;
Code:
model FirstOrder
import SI = Modelica.SIunits;
SI.Position x;
equation
der(x) = 1-x;
end FirstOrder;
I include both examples because of the recent change in notation in Modelica 4, since I'm not really sure if my system uses v4 or v3.2.3, since it says "Notification: Automatically loaded package Modelica 3.2.3 due to uses annotation."
I can import other libraries:
Code:
model exer
import Modelica.Electrical.Analog.Basic;
Basic.Resistor r(R = 10);
Basic.Capacitor c(C = 1e-4, v(start = 0));
Basic.Ground g;
Modelica.Blocks.Sources.Sine sine(amplitude = 10, freqHz = 10);
Modelica.Electrical.Analog.Sources.SignalVoltage signalVoltage1;
equation
connect(sine.y, signalVoltage1.v);
connect(signalVoltage1.p, r.p);
connect(r.n, c.p);
connect(c.n, g.p);
connect(signalVoltage1.n, g.p);
annotation(uses(Modelica(version="3.2.3")));
end exer;
Any idea?
Regards
- Index
- » Users
- » Angulo
- » Profile