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

Regarding adding Thermopower library

Regarding adding Thermopower library

Hi,

I have a question regarding installing thermopower library in openmodelica (OMEdit). I was browsing through the older topics and found this

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Well, as a workaround you can trick OMC to think your library is part of the Modelica library.
Add your library (directory or just Library.mo) to:
c:\OpenModelica1.6.0\lib\omc\omlibrary\msl31\Modelica
Also, add in the your library top package:
within Modelica;
package YourLibrary
end YourLibrary;


Cheers,
Adrian Pop/

%%%%%%%%%%%%%%%%%%

I think this work around is not valid any more. The paths are not what suggested in there. Can somebody help me? I have the latest version on OMEdit on a Mac OS X.

Thanks
Jadoogar

Re: Regarding adding Thermopower library

If you want to change the library path (you can then store your libraries where you like and enable/disable some depending on taste)...

Put one of the following depending on what the library looks like:

Code:

/opt/local/openmodelica/lib/omlibrary/ThermoPower X.X/package.mo (Binary package)

/opt/local/lib/omlibrary/ThermoPower X.X/package.mo (Default MacPorts path)
/opt/local/lib/omlibrary/ThermoPower X.X.mo
/opt/local/lib/omlibrary/ThermoPower.mo

Of course, copy all files that come with the library, but keep put either the .mo or package.mo in the correct path and the rest relative that current/smile

Re: Regarding adding Thermopower library

Hi,

Add your library to the libraries list of OMEdit. Tools->Options->libraries. Restart OMEdit. Now OMEdit always load your library automatically.

Adeel.

Re: Regarding adding Thermopower library

Hi Adeel,
Do I still do the following change?
%%%%%%%%%%%
Also, add in the your library top package:
within Modelica;
package YourLibrary
end YourLibrary;

%%%%%%%%%%%%%%

Moreover, thermopower uses Modelica.Media and as far as I understand that is not suported .. SO do you think it would work?

Thanks
Jadoogar

Re: Regarding adding Thermopower library

Hi,

No Its not needed. Just put your library in some appropriate path as mentioned by Martin. For example, if you put your library in,

Code:

/opt/local/lib/omlibrary/ThermoPower/package.mo

then in OMEdit you add a new library in libraries list under Tools->options with name ThermoPower and value default.

Adeel.

Re: Regarding adding Thermopower library

Thanks, Adeel. That worked. I can see the library appearing in the library pane. however, I get all these messages...As I am just one day baby in terms of OM, I am hoping this is something that is not source of major problem and can be avoided..

Thanks
Jadoogar
.................................................


Translation    20:53:20    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/PowerPlants.mo

    17074:9-17077:26    connect(Shaft_b, Shaft_b) connects the same connector instance! The connect equation will be ignored.

Scripting    20:53:20        0:0-0:0    Requested package Modelica of version 2.2.2, but this package was already loaded with version 3.1. You might experience problems if these versions are incompatible.

Syntax    20:53:20    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    6321:17-6321:19    Treating .5 as 0.5. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.

Syntax    20:53:20    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    6317:17-6317:19    Treating .5 as 0.5. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.

Syntax    20:53:20    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    6285:17-6285:19    Treating .6 as 0.6. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.

Syntax    20:53:20    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    6280:17-6280:19    Treating .3 as 0.3. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.

Syntax    20:53:20    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    6259:17-6259:19    Treating .5 as 0.5. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.

Syntax    20:53:20    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    6170:17-6170:19    Treating .3 as 0.3. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.

Syntax    20:53:20    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    6168:17-6168:19    Treating .8 as 0.8. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.

Syntax    20:53:20    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    6164:16-6164:18    Treating .4 as 0.4. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.

Syntax    20:53:20    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    6139:17-6139:19    Treating .3 as 0.3. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.

Syntax    20:53:20    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    6137:17-6137:19    Treating .5 as 0.5. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.

Syntax    20:53:21    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    6133:16-6133:18    Treating .4 as 0.4. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.
Syntax    20:53:21    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    6010:17-6010:19    Treating .3 as 0.3. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.

Syntax    20:53:21    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    5972:17-5972:19    Treating .3 as 0.3. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.
Syntax    20:53:21    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    5819:17-5819:19    Treating .2 as 0.2. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.
Syntax    20:53:21    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    5738:17-5738:19    Treating .3 as 0.3. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.
Syntax    20:53:21    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    5643:17-5643:19    Treating .3 as 0.3. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.
Syntax    20:53:21    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    5519:38-5519:41    Treating .05 as 0.05. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.
Syntax    20:53:21    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    5519:33-5519:36    Treating .05 as 0.05. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.
Syntax    20:53:21    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    1147:17-1147:19    Treating .5 as 0.5. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.
Syntax    20:53:21    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    117:17-117:19    Treating .2 as 0.2. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.
Syntax    20:53:21    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    42:17-42:19    Treating .2 as 0.2. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.
Syntax    20:53:21    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Examples.mo    1965:19-1965:21    Treating .1 as 0.1. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.
Syntax    20:53:21    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Examples.mo    1921:19-1921:21    Treating .1 as 0.1. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.
Syntax    20:53:21    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Examples.mo    1799:19-1799:21    Treating .1 as 0.1. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.
Syntax    20:53:21    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Examples.mo    929:16-929:19    Treating .06 as 0.06. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.
Syntax    20:53:21    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Examples.mo    195:16-195:19    Treating .06 as 0.06. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.
Syntax    20:53:20    C:/OpenModelica1.8.1/lib/omlibrary/ThermoPower/Test.mo    6304:17-6304:19    Treating .3 as 0.3. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.

Re: Regarding adding Thermopower library

jadoogar wrote:

Scripting    20:53:20        0:0-0:0    Requested package Modelica of version 2.2.2, but this package was already loaded with version 3.1. You might experience problems if these versions are incompatible.

This is a major problem if ThermoPower uses something in MSL that changed between 2.2.2 and 3.1. Many packages did, some did not. YMMV.

Re: Regarding adding Thermopower library

On another note, there is no display of an example provided by ThermoPower. I think this is related to the fact that THermoPower is built with M 2.2.2.


Which version of OM implemented Modelica 2.2.2? May be I would install that? Just curious, can I have two seperate versions of OM on my windows machine?

Thanks
JG

Re: Regarding adding Thermopower library

No version of OMEdit implemented Modelica 2.2 annotations. You may have some luck using SimForge, or converting the library to Modelica3 using Dymola (maybe).
Yes, you can have several version of OM installed. You need to set OPENMODELICAHOME environment variable before calling each client though.

Re: Regarding adding Thermopower library

Hi,
This is not the appropriate forum, but can I misuse the liberty to ask "how add a modelica library in Dymola demo 7?"
Thanks
JG

Re: Regarding adding Thermopower library

Simply open the package.mo and the rest will follow.

Re: Regarding adding Thermopower library

hello,
thermopower lib added but i am not able to see the example of thermopower lib. what should i do??  i am using open modelica 1.9.1

Edited by: santhu - Dec-18-14 09:39:04

Re: Regarding adding Thermopower library

You do not say which OpenModelica client you are using. If it is OMEdit, you just open the library and navigate to ThermoPower.Examples and select something to simulate.

Re: Regarding adding Thermopower library

ys i am using OMEdit......some examples are not wrkng....

Edited by: santhu - Dec-18-14 11:17:33
There are 0 guests and 0 other users also viewing this topic
You are here: