Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

How can i make a library similar to open modelica library

How can i make a library similar to open modelica library

Hi Friends
       I am now working with open modelica 1.6 to make a simulator for thermal power plants. Its woking fine. I would like to make a component library for that. The components should be able to drag and drop into the package and connections can be made through OMEdit. But unfortunately i am not able to do so. Somebody please help me immediately to sort this problem out.

Re: How can i make a library similar to open modelica library

Hello Jainabrm,

To go for a new library is a hard task wich need a deep knowledge of physic and modelica. Here are my obervsation about the subject:

   1) To generate a new library package::

You can't do it with OMEdit and need to use another software. In OpenModelica documentation they say to use the software Eclipse with some pluggins (MDT, Papyrus...). Unfortunately, even if the installion is well describe, there is no tutorial to explain how to generate the package-file and use it with OMEdit. So my solution is to create the new library and build the package with Dymola (quite easy). 


   2) To use the new library with OMEdit::

If you want to use the new package, you'll have to put it in the main modelica library. To do so:

    - Prepare a new folder wich name is the name of your new library (say "Devellop") and put your new package file (devellop.om) into it.
    - Change the name of the package file and call it "package"
    - Copy your new folder and its content to the modelica standart library folder:  C:\OpenModelica1.6.0\lib\omc\omlibrary\msl31\Modelica  (you'll see all the other library)
    - modify the order file called package in the the same folder to include the name of your library.
    - Launch OMedit and look if it works!


This manipulation is also true for some already prepare package  https://www.modelica.org/libraries  (TecThermo should interest you...).  Unfortunately there is some compatibility problem and you'll have to explore each specific case (for example with ThermoBondLib you have to deleted the two first lines...). But the most important you have to know for your application (thermodynamic as I understood) is that  all libraries that rely on modelica.fluid don't work with OMEdit  (Thermopower for example); but it will change in few months!

Tell me if my english is not understandable and good luck!

For all, don't hesitate to give your tips and opinion because i am a new user.

Re: How can i make a library similar to open modelica library

Hi Friends,
Hi Friends
       I am now working with open modelica 1.9.1 to make a simulator for power flow for the electrical system. Am learning the modelica laguage to for my project work. I would like to make a component library for that. The components should be able to drag and drop into the package and connections can be made through OMEdit. But unfortunately i am not able to do so. Somebody please help me immediately to sort this problem out.

There are 0 guests and 0 other users also viewing this topic
You are here: