- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Errors in OMEdit examples! Please help
Errors in OMEdit examples! Please help
Errors in OMEdit examples! Please help
Hi!
I just installed openmodelica stable version on debian-linux platform. I'm trying to run examples given OMEdit, but I'm encountering lots and lots of errors.
(About menu saying - OpenModelica 1.9.1+dev (r22383) (RML version) )
Don't know what happened. I'll give you few samples here -
1. When trying to simulate DoublePendulum example in mechanics - elementary examples I'm facing these errors-
[:0:0-0:0] Error: Error occurred while flattening model Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum
[/usr/lib/omlibrary/Modelica 3.2.1/Mechanics/MultiBody/Parts.mo:894:5-895:13] Error: Class world__gravityAcceleration not found in scope Modelica.Mechanics.MultiBody.Parts.Body (looking for a function or record).
2. Rotational 3D effects - Gyroscopic effects - Errors -
[:0:0-0:0] Error: Error occurred while flattening model Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.GyroscopicEffects
[/usr/lib/omlibrary/Modelica 3.2.1/Mechanics/MultiBody/Parts.mo:894:5-895:13] Error: Class world__gravityAcceleration not found in scope Modelica.Mechanics.MultiBody.Parts.Body (looking for a function or record).
3. DCPM - DC Machines Start in Electrical Examples - Errors:
[:0:0-0:0] Error: Duplicate modification of element = (typed)dcpm.ViNominal, type:
DAE.PROP(Real(quantity = "ElectricPotential", unit = "V"), C_PARAM) and = (typed)95.0 DAE.PROP(Real(min = 1e-60, quantity = "ElectricPotential", unit = "V"), C_CONST), value: 95.0 on component VRef.
[/usr/lib/omlibrary/Modelica 3.2.1/Electrical/Machines.mo:13496:7-13499:80] Error: Variable dcpm.coreParameters: Duplicate modification of element final = (typed)1 DAE.PROP(Integer, C_CONST), value: 1 and = (typed)1 DAE.PROP(Integer, C_CONST), value: 1 on component m.
[/usr/lib/omlibrary/Modelica 3.2.1/Electrical/Machines.mo:13496:7-13499:80] Error: Variable dcpm.coreParameters: Duplicate modification of element = (typed)dcpm.ViNominal, type:
DAE.PROP(Real(quantity = "ElectricPotential", unit = "V"), C_PARAM) and = (typed)95.0 DAE.PROP(Real(min = 1e-60, quantity = "ElectricPotential", unit = "V"), C_CONST), value: 95.0 on component VRef.
4. Solenoid Actuator- in magnetic Flux tubes examples -
[:0:0-0:0] Error: Cannot instantiate Modelica.Magnetic.FluxTubes.Examples.SolenoidActuator due to class specialization PACKAGE.
5. AIMC - DOC in Basic Machines in Fundamental Wave in Magnetic -
[:0:0-0:0] Error: Duplicate modification of element = (typed)6.283185307179586 * aimcM.fsNominal / /*Real*/(aimcM.p) DAE.PROP(Real, C_PARAM), value: 157.0796326794897 and = (typed)314.1592653589793 DAE.PROP(Real(min = 1e-60, quantity = "AngularVelocity", unit = "rad/s"), C_CONST), value: 314.1592653589793 on component wRef.
[/usr/lib/omlibrary/Modelica 3.2.1/Magnetic/FundamentalWave.mo:6689:7-6695:42] Error: Variable aimcM.statorCoreParameters: Duplicate modification of element final = (typed)3 DAE.PROP(Integer, C_CONST), value: 3 and = (typed)3 DAE.PROP(Integer, C_CONST), value: 3 on component m.
[/usr/lib/omlibrary/Modelica 3.2.1/Magnetic/FundamentalWave.mo:6689:7-6695:42] Error: Variable aimcM.statorCoreParameters: Duplicate modification of element = (typed)6.283185307179586 * aimcM.fsNominal / /*Real*/(aimcM.p) DAE.PROP(Real, C_PARAM), value: 157.0796326794897 and = (typed)314.1592653589793 DAE.PROP(Real(min = 1e-60, quantity = "AngularVelocity", unit = "rad/s"), C_CONST), value: 314.1592653589793 on component wRef.
[/usr/lib/omlibrary/Modelica 3.2.1/Magnetic/FundamentalWave.mo:6689:7-6695:42] Error: Variable aimcM.statorCoreParameters: Duplicate modification of element {start = (typed)100 DAE.PROP(Integer, C_CONST), value: 100} and = (typed)100.0 DAE.PROP(Real(min = 1e-60, quantity = "ElectricPotential", unit = "V"), C_CONST), value: 100.0 on component VRef.
I just gave some examples here. Please help me here, I'm new to OMEdit, though I've some experience in Dr Modelica notebook. I am about give workshop on OpenModelica to collge students. I don't want to disappoint them. Please help me here.
Just want to tell you that, I'd first installed "nightly" build, which was giving much more problems, and then I removed it and installed stable version. This is comparitely better. But I still want to know if the problem is only with examples or with open modelica itself.
What should I do? Is there any library(of examples) i should replace? Is there any way I can check to see if at least compiler and library of components is installed fine?
Sorry. This has been a lengthy post, but I hope you understand.
Thank you!
Re: Errors in OMEdit examples! Please help
Some of the errors are not really errors (even if they are reported as such), the model works to simulate.
What problems did you had with nightly builds? I think they are far better than the stable releases.
Cheers,
Adrian Pop/
- adrpo
- 885 Posts
Re: Errors in OMEdit examples! Please help
I think you would be better off with the nightly build since you need a patched version of MSL 3.2.1 in order to run the older stable releases. This mainly affects MultiBody.World, which previously has been patched in OpenModelica.
For DCPM/AIMC it generates errors but still works.
The Solenoid actuator is not an example. It is an example package (contains examples).
- sjoelund.se
- 1700 Posts
Re: Errors in OMEdit examples! Please help
Hey, thanks so much for the response. I don't have record of errors as of now, but remember seeing many examples not running (in nightly build)...
But as both of you are suggesting the nightly build, I'll re-install with nightly build, and get back to you.
Re: Errors in OMEdit examples! Please help
Hi!
I've installed nightly build. I'm running the double pendulum example in mechanics. I"m getting this error -
[:0:0-0:0] Error: Error occurred while flattening model Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum
[/usr/lib/omlibrary/Modelica 3.2.1/Mechanics/MultiBody/Parts.mo:894:5-895:13] Error: Class world__gravityAcceleration not found in scope Modelica.Mechanics.MultiBody.Parts.Body (looking for a function or record).
[:0:0-0:0] Notification: Instantiation of DoublePendulum failed.
Similar Problem when running Mechanics -> Systems- RobotR3 -> Full Robot -
[:0:0-0:0] Error: Error occurred while flattening model Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.fullRobot
[/usr/lib/omlibrary/Modelica 3.2.1/Mechanics/MultiBody/Parts.mo:894:5-895:13] Error: Class world__gravityAcceleration not found in scope Modelica.Mechanics.MultiBody.Parts.Body (looking for a function or record).
[:0:0-0:0] Notification: Instantiation of fullRobot failed.
Good thing is some errors are not being generated. For example, when I last time ran examples in Fluid systems, there were some errors in nightly build. I'm not seeing them in fresh installation of nightly build. But I have this problem repeatedly appear in mechanical problems - Error: Class world__gravityAcceleration not found
How do I resolve this??
Re: Errors in OMEdit examples! Please help
What is the output of:
Code:
$ dpkg -l omc omlib-modelica-3.2.1 omlib-complex-3.2.1 omlib-modelicaservices-3.2.1
- sjoelund.se
- 1700 Posts
Re: Errors in OMEdit examples! Please help
I'm seeing the old problems I used to see in the nightly build. I think that happened because I did software update in available in Debian, which I think installed newer versionf of openmodelica codes. I'll first show the errors that are being generated -
When try to simulate double pendulum - mechanics multibody example
[:0:0-0:0] Error: Internal error Transformation Module PFPlusExt index Reduction Method Pantelides failed!
[:0:0-0:0] Error: Internal error - IndexReduction.pantelidesIndexReduction failed!
[:0:0-0:0] Error: Internal error IndexReduction.pantelidesIndexReduction failed! Found empty set of continues equations. Use +d=bltdump to get more information.
When I try to simulate Fluid -> Examples -> Pumping System -
[:0:0-0:0] Error: Error occurred while flattening model Modelica.Fluid.Examples.PumpingSystem
[/usr/lib/omlibrary/Modelica 3.2.1/Fluid/Examples/PumpingSystem.mo:52:5-54:75] Error: Failed to elaborate expression: {Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.3), Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.3), Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter = 0.01)}.
When I tried to do heat exchange simulation in fluids -
43 warnings and 4 errors generated.
make: *** [Modelica.Fluid.Examples.HeatExchanger.HeatExchangerSimulation.o] Error 1
Compilation process exited with code 2
And this is what I got when I ran dpkg command ->
dpkg -l omc omlib-modelica-3.2.1 omlib-complex-3.2.1 omlib-modelicaservices-3.2.1
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===============================-====================-====================-====================================================================
ii omc 22602-1 i386 The OpenModelica Compiler
ii omlib-complex-3.2.1 6931-om1-1 all Complex 3.2.1 is a Modelica library
ii omlib-modelica-3.2.1 7867-om1-1 all Modelica 3.2.1 is a Modelica library
ii omlib-modelicaservices-3.2.1 6931-om1-1 all ModelicaServices 3.2.1 is a Modelica library
Thank you for your time and support!
Re: Errors in OMEdit examples! Please help
Can you run the following in a mos-script? (Put in file a.mos, in some working directory you can easily clean)
Code:
loadModel(Modelica);getErrorString();
buildModel(Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum);getErrorString();
Then run command omc a.mos.
You could also do the same with OMShell and see if it works. If it does, it is OMEdit that is broken (it does not seem to work for me either; must be a regression).
- sjoelund.se
- 1700 Posts
Re: Errors in OMEdit examples! Please help
Ha ha. I've not used omc at terminal before....
But I just did what you asked. (created a folder called "mod".
This is the output I got at terminal...
vi a.mos
omc a.mos
true
""
{"/home/xxxxxxxxx/mod/Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum","Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum_init.xml"}
""
And I've got so many files created. So how do I check if the results are okay?
Re: Errors in OMEdit examples! Please help
Hi,
This is a bug that needs to be fixed. Somehow simulation works fine in command line but it fails in OMEdit.
I added a ticket for it and I started looking into it:
https://trac.openmodelica.org/OpenModelica/ticket/2871
Cheers,
Adrian Pop/
- adrpo
- 885 Posts
Re: Errors in OMEdit examples! Please help
Hi again,
I now fixed the bug and if you get the nightly builds tomorrow, they should work fine.
Cheers,
Adrian Pop/
- adrpo
- 885 Posts
Re: Errors in OMEdit examples! Please help
Thank you!!! Apologize I could not reply earlier.
I ran updates and I could run pendulum problem smoothly.
For Heat exchanger simulation I saw some message like this -->
/tmp/OpenModelica_xxxxxxxxxxx/OMEdit/Modelica.Fluid.Examples.HeatExchanger.HeatExchangerSimulation -port=35128 -logFormat=xml -w -lv=LOG_STATS
Simulation process exited with code 255
And for Fluid -> Examples -> Pumping System -
/tmp/OpenModelica_xxxxxxx/OMEdit/Modelica.Fluid.Examples.PumpingSystem -port=55007 -logFormat=xml -w -lv=LOG_STATS
stdout | warning | While solving non-linear system an assertion failed during initialization.
| | | | | The non-linear solver tries to solve the problem that could take some time.
| | | | | It could help to provide better start-values for the iteration variables.
| | | | | For more information simulate with -lv LOG_NLS
LOG_NLS | warning | nonlinear system 92 fails: at t=0 Debug more
| | | | | proper start-values for some of the following iteration variables might help
| | | | | [1] Real reservoir.s[1](start=3, nominal=1)
| | | | | [2] Real pipe.flowModel.states[2].p(start=100000, nominal=100000)
assert | debug | Solving non-linear system failed at time=0.
For more information please use -lv LOG_NLS. Debug more
assert | info | simulation terminated by an assertion at initialization
Simulation process exited with code 255
Both are exiting with code 255... Is this something I've to worry about?
Thank you!
Re: Errors in OMEdit examples! Please help
Hi,
Unfortunately not all the models can currently be simulated.
There are still some issues in the back-end and the runtime system but we're working on fixing them.
You can always see the current status of the library coverage (what compiles and what simulates ) here:
https://test.openmodelica.org/libraries/trend.html
so you know what to expect.
You can click on any image to get to an overview of the library coverage run.
Cheers,
Adrian Pop/
- adrpo
- 885 Posts
Re: Errors in OMEdit examples! Please help
Thank your for reply.. And it's good that you told me about status of library coverage.
I think openmodelica is a really great tool, and I feel that I should also contribute in any way I can.
I'm just learning OpenModelica, and I've some experience in programming. If there is some work I can take up, I'll be happy to do so.
Can you let me know what are the ways I can contribute? [Coding/Writing Tutorials/ etc]. One thing I'm already doing is writing tutorials for an absolute beginner (say, for engineering students, and conducting workshops on it..)
Another thing I'm thinking is writing libraries..
Best Wishes
Re: Errors in OMEdit examples! Please help
I've been thinking about this a bit. Documentation in OpenModelica is lacking a bit (some old, unsupported things are documented, and new things are not).
But one thing that really would help is to update old libraries. Every now and then someone will try to use an old Modelica 1.x or 2.x library with OpenModelica and it will just fail. Because so many things are just wrong in the old libraries. This is a lot of work in some cases (there are "Modelica" libraries out there that should not even pass a Modelica lexer).
- sjoelund.se
- 1700 Posts
Re: Errors in OMEdit examples! Please help
Do you know that there exist an official modelica tutorial by the modelica association?
It is in theory very well done, but VERY old: it refers to Modelica 1.4 and was written in December 2000
There is a ticket open on the Modelica association site about volunteers wanting to update that tutorial:
https://trac.modelica.org/Modelica/ticket/106
Maybe you are the right volunteer?
MC
- ceraolo
- 147 Posts
Re: Errors in OMEdit examples! Please help
There is a more recent (short) Modelica tutorial here: http://tour.xogeny.com
- sjoelund.se
- 1700 Posts
Re: Errors in OMEdit examples! Please help
sjoelund.se,
Sorry, for delayed response. i would definitely be interested in doing that. But I will need some guidance. I learn on my own, but small help here and there would be really great. So what I should do next?
Re: Errors in OMEdit examples! Please help
ceraolo
Sounds really interesting work. I'll look into it.
sjoelund.se
The link you provided isn't working.. at least for me. Even if it's working, as you said, it's short one. So do you think it would be appropriate if I write an detailed tutorial?
Re: Errors in OMEdit examples! Please help
For fixing old libraries, most of them are hosted on https://github.com/modelica-3rdParty so fixing them is as easy as making a pull request in some cases. I know a lot of people who say some library is working in OpenModelica, but will not even go through the parser (loadFile). So a lot of libraries you don't even need to know the domain in order to fix...
As for larger tutorials, http://book.xogeny.com/ is not really a tutorial, but it does teach you most things you should know about Modelica
- sjoelund.se
- 1700 Posts
Re: Errors in OMEdit examples! Please help
The link you provided isn't working.. at least for me. Even if it's working, as you said, it's short one. So do you think it would be appropriate if I write an detailed tutorial?
I had no problems in connecting to tour.xogeny.com
I liked the xogeny tutorial, that is much more than a pdf, contains chapters and lessons in a structure way, examples and exercises.
However, answering to the Modelica.org ticket that I mentioned in my previous message would have the additional benefit of working on a tn "official" tutorial, i.e. one that has been discussed and validated by the association.
Consider, for instance, that Dymola still includes in its distribution that old tutorial.
- ceraolo
- 147 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Errors in OMEdit examples! Please help