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

Thermocycle library compatible with Openmodelica?

Thermocycle library compatible with Openmodelica?

I am getting the below errors:

[40] 22:27:19 Translation Error
Cannot instantiate BCycle due to class specialization PACKAGE.

[41] 22:27:19 Translation Error
[ThermoCycle.Media.R245fa_CP: 3:3-5:43]: Base class ExternalMedia.Media.CoolPropMedium not found in scope ThermoCycle.Media.R245fa_CP.

[42] 22:27:19 Translation Error
[ThermoCycle.Components.FluidFlow.Pipes.Cell1Dim: 3:13-3:59]: Class SpecificEnthalpy not found in scope ThermoCycle.Components.FluidFlow.Pipes.Cell1Dim.Medium.

[43] 22:27:19 Translation Error
[ThermoCycle.Components.FluidFlow.Pipes.Cell1Dim: 35:3-36:46]: Class Medium.SpecificEnthalpy not found in scope ThermoCycle.Components.FluidFlow.Pipes.Cell1Dim.

[44] 22:27:19 Translation Error
[ThermoCycle.Media.DummyFluid: 3:3-3:45]: Base class ExternalMedia.Media.CoolPropMedium not found in scope ThermoCycle.Media.DummyFluid.

[45] 22:27:19 Translation Error
[ThermoCycle.Components.FluidFlow.Pipes.Flow1Dim: 4:13-4:59]: Class Temperature not found in scope ThermoCycle.Components.FluidFlow.Pipes.Flow1Dim.Medium.

[46] 22:27:19 Translation Error
[ThermoCycle.Components.FluidFlow.Pipes.Flow1Dim: 55:3-56:47]: Class Medium.Temperature not found in scope ThermoCycle.Components.FluidFlow.Pipes.Flow1Dim.

[47] 22:27:19 Translation Error
Error occurred while flattening model BCyle


Can someone help or advice?

Re: Thermocycle library compatible with Openmodelica?

We have not tried this library with OpenModelica yet so it might not work.
As to your errors, in general you cannot compile packages, only models inside them.
See if there is an Examples package in the library and see if you can simulate the models in it.

Edited by: adrpo - Aug-25-15 01:05:37

Re: Thermocycle library compatible with Openmodelica?

Hi adrpo.
Thank for the reply.

I may have missed a useful piece of info.
While loading the library i got the following errors:


[25] 12:03:32 Syntax Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/Components/FluidFlow/Pipes/MultiFlow1D.mo: 40:5-40:77]: The file was not encoded in UTF-8:
  "Valve throat area for quadratic pressure drop (dp = 1/A?*M_dot?/(2*rho))".
  Defaulting to 7-bit ASCII with unknown characters replaced by '?'.
  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.
  Note: The Modelica Language Specification only allows files encoded in UTF-8.

[26] 12:03:32 Syntax Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/Components/FluidFlow/package.mo: 6:32-6:104]: The file was not encoded in UTF-8:
  "<HTML> <p><big> This package contains the basic fluid flow model, pressu...".
  Defaulting to 7-bit ASCII with unknown characters replaced by '?'.
  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.
  Note: The Modelica Language Specification only allows files encoded in UTF-8.

[27] 12:03:32 Syntax Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/Components/HeatFlow/HeatTransfer/SinglePhaseCorrelations/DittusBoelter1930.mo: 50:31-50:247]: Lexer treating \ as \\, since \< is not a valid Modelica escape sequence.

[28] 12:03:32 Syntax Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/Components/HeatFlow/package.mo: 6:32-6:104]: The file was not encoded in UTF-8:
  "<HTML> <p><big> This package contains model for thermal storage in solid...".
  Defaulting to 7-bit ASCII with unknown characters replaced by '?'.
  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.
  Note: The Modelica Language Specification only allows files encoded in UTF-8.

[29] 12:03:33 Syntax Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/Components/Units/HeatExchangers/CrossHX.mo: 58:5-58:77]: The file was not encoded in UTF-8:
  "Valve throat area for quadratic pressure drop (dp = 1/A?*M_dot?/(2*rho))".
  Defaulting to 7-bit ASCII with unknown characters replaced by '?'.
  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.
  Note: The Modelica Language Specification only allows files encoded in UTF-8.

[30] 12:03:33 Syntax Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/Components/Units/PdropAndValves/DP.mo: 20:5-20:77]: The file was not encoded in UTF-8:
  "Valve throat area for quadratic pressure drop (dp = 1/A?*M_dot?/(2*rho))...".
  Defaulting to 7-bit ASCII with unknown characters replaced by '?'.
  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.
  Note: The Modelica Language Specification only allows files encoded in UTF-8.

[31] 12:03:33 Syntax Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/Components/Units/Solar/SolarField_Soltigua.mo: 257:53-257:125]: The file was not encoded in UTF-8:
  "<HTML>  <p><big>The <b>SolarField_Soltigua</b> model is based on the sam...".
  Defaulting to 7-bit ASCII with unknown characters replaced by '?'.
  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.
  Note: The Modelica Language Specification only allows files encoded in UTF-8.

[32] 12:03:33 Syntax Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/Components/Units/package.mo: 6:32-6:104]: The file was not encoded in UTF-8:
  "<HTML> <p><big> This package contains the common components used to buil...".
  Defaulting to 7-bit ASCII with unknown characters replaced by '?'.
  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.
  Note: The Modelica Language Specification only allows files encoded in UTF-8.

[33] 12:03:33 Syntax Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/Components/Units/Tanks/Deaerator.mo: 177:29-177:101]: The file was not encoded in UTF-8:
  "<html> <p><big>Model <b>Deareator</b> is a variation of the  <a href=\"m...".
  Defaulting to 7-bit ASCII with unknown characters replaced by '?'.
  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.
  Note: The Modelica Language Specification only allows files encoded in UTF-8.

[34] 12:03:33 Syntax Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/Examples/Simulations/package.mo: 6:32-6:104]: The file was not encoded in UTF-8:
  "<HTML> <p><big><dl><dt><b>Main Authors:</b> <br/></dt> <dd>Sylvain Quoil...".
  Defaulting to 7-bit ASCII with unknown characters replaced by '?'.
  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.
  Note: The Modelica Language Specification only allows files encoded in UTF-8.

[35] 12:03:33 Syntax Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/Examples/TestComponents/package.mo: 6:32-6:104]: The file was not encoded in UTF-8:
  "<HTML> <p><big><dl><dt><b>Main Authors:</b> <br/></dt> <dd>Sylvain Quoil...".
  Defaulting to 7-bit ASCII with unknown characters replaced by '?'.
  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.
  Note: The Modelica Language Specification only allows files encoded in UTF-8.

[36] 12:03:33 Syntax Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/Examples/TestFluid/package.mo: 6:32-6:104]: The file was not encoded in UTF-8:
  "<HTML> <p><big><dl><dt><b>Main Authors:</b> <br/></dt> <dd>Sylvain Quoil...".
  Defaulting to 7-bit ASCII with unknown characters replaced by '?'.
  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.
  Note: The Modelica Language Specification only allows files encoded in UTF-8.

[37] 12:03:33 Syntax Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/Examples/TestFunctions/package.mo: 6:32-6:104]: The file was not encoded in UTF-8:
  "<HTML> <p><big><dl><dt><b>Main Authors:</b> <br/></dt> <dd>Sylvain Quoil...".
  Defaulting to 7-bit ASCII with unknown characters replaced by '?'.
  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.
  Note: The Modelica Language Specification only allows files encoded in UTF-8.

[38] 12:03:33 Syntax Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/Examples/package.mo: 6:32-6:104]: The file was not encoded in UTF-8:
  "<HTML> <p><big><dl><dt><b>Main Authors:</b> <br/></dt> <dd>Sylvain Quoil...".
  Defaulting to 7-bit ASCII with unknown characters replaced by '?'.
  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.
  Note: The Modelica Language Specification only allows files encoded in UTF-8.

[39] 12:03:33 Syntax Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/Functions/package.mo: 12:32-12:104]: The file was not encoded in UTF-8:
  "<HTML> <p><big><dl><dt><b>Main Authors:</b> <br/></dt> <dd>Sylvain Quoil...".
  Defaulting to 7-bit ASCII with unknown characters replaced by '?'.
  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.
  Note: The Modelica Language Specification only allows files encoded in UTF-8.

[40] 12:03:33 Syntax Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/Interfaces/Fluid/Flange_pT.mo: 20:17-20:58]: The file was not encoded in UTF-8:
  "<html> University of Li?ge, November 2012".
  Defaulting to 7-bit ASCII with unknown characters replaced by '?'.
  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.
  Note: The Modelica Language Specification only allows files encoded in UTF-8.

[41] 12:03:33 Syntax Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/Interfaces/Fluid/Flange.mo: 16:17-16:58]: The file was not encoded in UTF-8:
  "<html> University of Li?ge, November 2012".
  Defaulting to 7-bit ASCII with unknown characters replaced by '?'.
  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.
  Note: The Modelica Language Specification only allows files encoded in UTF-8.

[42] 12:03:33 Syntax Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/Interfaces/package.mo: 6:32-6:104]: The file was not encoded in UTF-8:
  "<HTML> <p><big><dl><dt><b>Main Authors:</b> <br/></dt> <dd>Sylvain Quoil...".
  Defaulting to 7-bit ASCII with unknown characters replaced by '?'.
  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.
  Note: The Modelica Language Specification only allows files encoded in UTF-8.

[43] 12:03:33 Syntax Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/Media/package.mo: 6:32-6:104]: The file was not encoded in UTF-8:
  "<HTML> <p><big><dl><dt><b>Main Authors:</b> <br/></dt> <dd>Sylvain Quoil...".
  Defaulting to 7-bit ASCII with unknown characters replaced by '?'.
  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.
  Note: The Modelica Language Specification only allows files encoded in UTF-8.

[44] 12:03:33 Syntax Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/Obsolete/package.mo: 6:32-6:104]: The file was not encoded in UTF-8:
  "<HTML> <p><big><dl><dt><b>Main Authors:</b> <br/></dt> <dd>Sylvain Quoil...".
  Defaulting to 7-bit ASCII with unknown characters replaced by '?'.
  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.
  Note: The Modelica Language Specification only allows files encoded in UTF-8.

[45] 12:03:33 Syntax Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/UsersGuide/Contacts.mo: 4:34-4:106]: The file was not encoded in UTF-8:
  "<html> <p> <br/><b>The library is available at</b><br> <a href=\"http://...".
  Defaulting to 7-bit ASCII with unknown characters replaced by '?'.
  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.
  Note: The Modelica Language Specification only allows files encoded in UTF-8.

[46] 12:03:33 Scripting Warning
[C:/Users/Jeet/Desktop/Project Work/ThermoCycle/package.mo: 7:20-7:33]: Uses-annotation is missing version for library ExternalMedia. Assuming the tool-specific version="default".

[47] 12:03:33 Scripting Notification
Skipped loading package ExternalMedia (default) using MODELICAPATH C:\Users\Jeet\Desktop\Project Work\;C:/OpenModelica1.9.3Nightly/lib/omlibrary (uses-annotation may be wrong).




I understand you mentioned thermocycle may not be compatible with Openmodelica, is there any other recommendations?

Thanks

Re: Thermocycle library compatible with Openmodelica?

The warnings are just because the library .mo files are not encoded in UTF8. They do not prevent the loading of the library files.
You can open the wrongly encoded files in NotePad++ and go Encoding->UTF without BOM and press save.

As far as I can tell this library depends on ExternalMedia so you need to have that library present also.
You can put the library in any of these directories:
C:\Users\Jeet\Desktop\Project Work\
or
C:/OpenModelica1.9.3Nightly/lib/omlibrary

You can download the library from the same place where you downloaded ThermoCycle library:
http://www.thermocycle.net/download/externalmedia/
or from github:
https://github.com/modelica/ExternalMedia
Also see here:
https://github.com/modelica/ExternalMed … lation.txt
Note that external media depends on other external software like CoolProp.

Cheers,
Adrian Pop/

Re: Thermocycle library compatible with Openmodelica?

Thanks Adrian,

Certain things are making sense to me now. Il go and try apply your suggestions.

Cheers!

Re: Thermocycle library compatible with Openmodelica?

Hi Adrian,

So I am beginning to understand how all this works. I am currently drafting a Brayton Cycle using a thermopower library. I am stuck at drafting a heat exchanger in the model(Cant find a heat exchanger component) can you help me in this?

Awaiting for a reply...

Thanks

Re: Thermocycle library compatible with Openmodelica?

Hello,

Me too Im trying to make the Thermocycle library work with OpenModelica. I have version 1.9.3 of OM and
ThermoCycle-v2.1 + ExternalMedia-v3.2.1

I get to load both libraries o.k
However when trying to simulate any of the provided examples in OM Connection Editor it crashes while doing the "Translation"...
Would anyone have hints on this issue ? Or has anyone tried to successfully simulate any of the provided examples?

I appreciate your help,

Eric

Re: Thermocycle library compatible with Openmodelica?

Hi Erik,

I have been facing a similar issue, I get a distinct impression that Thermocycle may not be compatible with OM

Re: Thermocycle library compatible with Openmodelica?

Thx for your quick answer, prasanjitdas111 I was thinking to do adapt the library then to OM... starting from scratch. It might take a while
but it's a nice was to learn and gain some experience. If you are interested to have a look too, you're very welcome.

best,

eric

Re: Thermocycle library compatible with Openmodelica?

I think I get the same problem with ThermoSysPro.

[2] 16:46:07 Scripting Notification
2015-09-25 16:46:07.436 OMEdit[1224:68458] modalSession has been exited prematurely - check for a reentrant call to endModalSession:


[3] 16:46:16 Scripting Notification
[/opt/openmodelica/lib/omlibrary/ThermoSysPro 3.1/package.mo: 132:31-134:169]: ThermoSysPro is not yet fully operational with OpenModelica.
The authors suggest using Dymola for full benefit of the library, in particular if you are experiencing difficulties.
The current operational status with OpenModelica of the included examples can be found at https://test.openmodelica.org/libraries … rsive.html

[4] 16:46:35 Scripting Warning
Requested package Modelica of version 3.2, but this package was already loaded with version 3.2.1. You might experience problems if these versions are incompatible.

[5] 01:26:52 Translation Error
Cannot instantiate ThermoSysPro.Combustion due to class specialization PACKAGE.

l3oo321 We are ready collaborate to update or rewrite this library for OM.

Re: Thermocycle library compatible with Openmodelica?

Hello,
         Have you succeeded in adapting the thermocycle to OpenModelica?
Regards,
Hao Hu

Re: Thermocycle library compatible with Openmodelica?

We schedule this work on January 2016.
We'll keep you informed here.

Re: Thermocycle library compatible with Openmodelica?

Thank you very much.

Re: Thermocycle library compatible with Openmodelica?

Dear vserge, I am interested in testing ThermoCycle in OpenModelica.
When do you expect the "porting" to OpenModelica to be completed roughly?

Re: Thermocycle library compatible with Openmodelica?

Dear hrnck,
        I am glad that you are interested in testing ThermoCycle in OpenModelica. I have already tried to do this thing but failed.If you can succeed in testing Thermocycle in OpenModelica before March,2016, I will appreciate you.

Thanks,
hu94hao

Re: Thermocycle library compatible with Openmodelica?

Dear hu94hao, I think there has been a misunderstanding. I did not test it. I am interested in ThermoCycle in OpenModelica and have asked the developers about their plans or progress.

Re: Thermocycle library compatible with Openmodelica?

If you would like to setup Thermocycle library you need to install additional library ExternalMedia.
But it's not so simple.

I hope we can make a package for ALT Linux, but it's take a time.

Re: Thermocycle library compatible with Openmodelica?

I know ExternalMedia is necessary when using thermocycle library.As I know, Externalmedia is compatible well with Openmodelica recently.But thermocycle is not.
Do you decide to test it on Windows system or Linux system?(My English is so poor current/smile

Re: Thermocycle library compatible with Openmodelica?

we are working on unix/linux  systems, so we try only linux.

Re: Thermocycle library compatible with Openmodelica?

Dear vserge, we use ubuntu linux so that is no problem. Our partners could support us setting up ExternalMedia in Linux. We could help you by running some test cases of ThermoCycle if needed. I will wait for more news.

Edited by: hrnck - Jan-25-16 18:14:02

Re: Thermocycle library compatible with Openmodelica?

Dear hrnck,
       I'm building the ExternalMedia in my Linux box while there is still anything wrong, can you help me to solve it? There is my email:ytq11tao@163.com.

Thank you very much!!!

Re: Thermocycle library compatible with Openmodelica?

Hi Adrpo,

I am new to OpenModelica.I have installed OpenModelica version 1.11.0

I recently downloaded the libraries and added them with UTF-8 encoding. I also installed the ExternalMedia library as per your comment.I am getting following warning for adding ExternalMedia library:

[2] 15:40:43 Scripting Warning
Requested package Modelica of version 3.2.1, but this package was already loaded with version 3.2.2. You might experience problems if these versions are incompatible.

Also, after adding ExternalMedia Library I am not able to simulate the ThermoPower library  and am having the following error:

Cannot instantiate ExternalMedia due to class specialization PACKAGE.

Help me, please.

Edited by: Shinichi17 - May-19-17 10:44:02

Re: Thermocycle library compatible with Openmodelica?

Hi Shinichi17,

Regarding your second question. You are trying to instantiate a package.
instantiate = create an object (in the context of object-oriented programming).
If you're unfamiliar with these notions in a nutshell think of objects as components or part of components.
for example a heat-exchanger, or a tube or a spring or even a flange of a spring.
Modelica is built like this, by putting objects together to create more complex objects or even systems.

A class "A" is like a template that you use to create objects of type "A".
If you say I'd like a component of type A for my system S,
Then in S* you instantiate  the component A and the component is created with its default parameters.

Of course you can modifiy the parameters so you can instantiate components with their own characteristics (size, material...),
this is why you want a template in the first place.

A package is just something else. It is like a library where components, functions, etc are put together to create
an environment. So as you see, it does not really make sense to instantiate a package. you can however
take a class which is part of the package and instantiate it.

* It is not mandatory to previously declare your system S (which is a class as well) to be able to instantiate A, in OM you can
simply instantiate A for checking purposes

Best,



Re: Thermocycle library compatible with Openmodelica?

Hi  l3oo321,
First off,  thank You for your timely help. Secondly, the library I was talking about was "ThermoPower" library. But now, I actually have an issue with thermocycle library. Has a compatible version been released yet? Sorry for the confusion.

Here is the statement I am getting from OMEditor when i add Thermo/cycle library and restart the OMEditor:

[1] 22:20:47 Scripting Warning
Requested package Modelica of version 3.2.1, but this package was already loaded with version 3.2.2. You might experience problems if these versions are incompatible.

[2] 22:20:49 Scripting Warning
Requested package Modelica of version 3.2, but this package was already loaded with version 3.2.2. You might experience problems if these versions are incompatible.

[3] 22:20:52 Scripting Warning
Requested package Modelica of version 3.2, but this package was already loaded with version 3.2.2. You might experience problems if these versions are incompatible.

[4] 22:21:00 Grammar Warning
[C:/OpenModelica1.11.0-64bit/lib/omlibrary/Modelica_LinearSystems2 2.3.4/package.order: 0:0-0:0]: The package.order file does not list all .mo files and directories (containing package.mo) present in its directory.
Missing names are:
        WorkInProgress

[5] 22:21:00 Scripting Warning
Requested package Modelica of version 2.2.1, but this package was already loaded with version 3.2.2. You might experience problems if these versions are incompatible.

[6] 22:21:01 Scripting Warning
Requested package Modelica of version 3.2.1, but this package was already loaded with version 3.2.2. You might experience problems if these versions are incompatible.

[7] 22:21:02 Scripting Warning
Requested package Modelica of version 3.2.1, but this package was already loaded with version 3.2.2. You might experience problems if these versions are incompatible.

Thanks.

Edited by: Shinichi17 - May-23-17 17:25:16

Re: Thermocycle library compatible with Openmodelica?

Thx for your quick answer,  I was thinking to do adapt the library then to OM... starting from scratch. It might take a while
but it's a nice was to learn and gain some experience.

goldenslot

Re: Thermocycle library compatible with Openmodelica?

Hello,
have you made any progress on this?

I am trying to run a Thermocycle Heatpump example, (ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c) which uses the ExternalMedia Library.
All I have managed is to achieve partial functionality of the ExternalMedia Library in a Windows 7 32bit (virtual) system using the OpenModelica version 1.9.7.
(I think it is crucial to use the library in a 32 bit system and at an older version but I don't know why. All I know is that it didn't work at all in a 64bit system or at a later version of OpenModelica Editor).

Unfortunately the heatpump example still doesn't work, I suspect because of the ExternalMedia Library.
After all this time, has anyone managed to make the ExternalMedia Library work in Windows?

Any help would be appreciated.

Thanks

Edited by: Violidakis - Sep-25-18 16:36:07

Re: Thermocycle library compatible with Openmodelica?

ExternalLibrary does work on Windows. It seems in your case the problem is the 32/63 bit architecture. I suggest sending an email to info@asimptote.com

Re: Thermocycle library compatible with Openmodelica?

Thanks for the reply.


The email you suggest to contact (info@asimptote.com) is the email of the developers for the Fluid Prop database.
I don't know if this is suitable for the application I am interested. The Thermocycle Heatpump model uses CoolProp data I think. I have also tried to contact with the Thermocycle and External Library developers but I got no reply so far.

I have tried to run the model both in a 64x bit system and in a virtual 32 bit system, but with no success.
Does it matter that the 32 bit system is a virtual machine in VirtualBox?
Should it be a normal installation of Windows instead of virtual?

Have you managed to use this library at all?
I have already followed the instruction to copy the libExternalMediaLib.OMC-gcc.a file to a new file called libExternalMediaLib.a in the ExternalMedia 3.2.1\Resources\Library\win32 folder
Do I need to do anything else?
Can you post a detailed list of the steps you did to install it? Does the library need to be installed in a special folder/special path  to run properly?


Thanks again for your help.
Your assistance is valuable.

Edited by: Violidakis - Sep-28-18 08:14:06

Re: Thermocycle library compatible with Openmodelica?

In particular, I am getting the following error message in compilation, when trying to run the Thermocycle Heatpump example:


C:/OpenModelica1.9.7//share/omc/scripts/Compile.bat ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10 gcc parallel 5 0
PATH = "C:\OpenModelica1.9.7\MinGW\bin;C:\OpenModelica1.9.7\MinGW\bin\..\libexec\gcc\mingw32\4.4.0\;"
gcc -falign-functions -msse2 -mfpmath=sse "-IC:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include" -I"C:/OpenModelica1.9.7//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10.o ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10.c
gcc -falign-functions -msse2 -mfpmath=sse "-IC:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include" -I"C:/OpenModelica1.9.7//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.o ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c
gcc -falign-functions -msse2 -mfpmath=sse "-IC:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include" -I"C:/OpenModelica1.9.7//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_records.o ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_records.c
gcc -falign-functions -msse2 -mfpmath=sse "-IC:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include" -I"C:/OpenModelica1.9.7//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_01exo.o ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_01exo.c
gcc -falign-functions -msse2 -mfpmath=sse "-IC:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include" -I"C:/OpenModelica1.9.7//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_02nls.o ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_02nls.c
gcc -falign-functions -msse2 -mfpmath=sse "-IC:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include" -I"C:/OpenModelica1.9.7//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_03lsy.o ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_03lsy.c
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c: In function 'omc_ThermoCycle_Components_FluidFlow_Pipes_Cell1Dim$condenser$WorkingFluid$Cells_Medium_setState__ph':
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c:7462: warning: passing argument 4 of 'TwoPhaseMedium_setState_ph_C_impl' from incompatible pointer type
C:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include/externalmedialib.h:143: note: expected 'struct ExternalThermodynamicState *' but argument is of type 'struct ThermoCycle_Components_FluidFlow_Pipes_Cell1Dim$condenser$WorkingFluid$Cells_Medium_ThermodynamicState *'
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c: In function 'omc_ThermoCycle_Components_FluidFlow_Pipes_Cell1Dim$evaporator$WorkingFluid$Cells_Medium_setState__ph':
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c:7621: warning: passing argument 4 of 'TwoPhaseMedium_setState_ph_C_impl' from incompatible pointer type
C:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include/externalmedialib.h:143: note: expected 'struct ExternalThermodynamicState *' but argument is of type 'struct ThermoCycle_Components_FluidFlow_Pipes_Cell1Dim$evaporator$WorkingFluid$Cells_Medium_ThermodynamicState *'
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c: In function 'omc_ThermoCycle_Components_FluidFlow_Pipes_Flow1Dim$condenser$WorkingFluid_Medium_setSat__p':
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c:8153: warning: passing argument 2 of 'TwoPhaseMedium_setSat_p_C_impl' from incompatible pointer type
C:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include/externalmedialib.h:169: note: expected 'struct ExternalSaturationProperties *' but argument is of type 'struct ThermoCycle_Components_FluidFlow_Pipes_Flow1Dim$condenser$WorkingFluid_Medium_SaturationProperties *'
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c: In function 'omc_ThermoCycle_Components_FluidFlow_Pipes_Flow1Dim$condenser$WorkingFluid_Medium_setState__pT':
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c:8280: warning: passing argument 3 of 'TwoPhaseMedium_setState_pT_C_impl' from incompatible pointer type
C:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include/externalmedialib.h:144: note: expected 'struct ExternalThermodynamicState *' but argument is of type 'struct ThermoCycle_Components_FluidFlow_Pipes_Flow1Dim$condenser$WorkingFluid_Medium_ThermodynamicState *'
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c: In function 'omc_ThermoCycle_Components_FluidFlow_Pipes_Flow1Dim$evaporator$WorkingFluid_Medium_setState__pT':
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c:8545: warning: passing argument 3 of 'TwoPhaseMedium_setState_pT_C_impl' from incompatible pointer type
C:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include/externalmedialib.h:144: note: expected 'struct ExternalThermodynamicState *' but argument is of type 'struct ThermoCycle_Components_FluidFlow_Pipes_Flow1Dim$evaporator$WorkingFluid_Medium_ThermodynamicState *'
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c: In function 'omc_ThermoCycle_Components_FluidFlow_Pipes_Flow1Dim$evaporator$WorkingFluid_Medium_setSat__p':
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c:8588: warning: passing argument 2 of 'TwoPhaseMedium_setSat_p_C_impl' from incompatible pointer type
C:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include/externalmedialib.h:169: note: expected 'struct ExternalSaturationProperties *' but argument is of type 'struct ThermoCycle_Components_FluidFlow_Pipes_Flow1Dim$evaporator$WorkingFluid_Medium_SaturationProperties *'
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c: In function 'omc_ThermoCycle_Components_Units_ExpansionAndCompressionMachines_Compressor$compressor_Medium_setState__ph':
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c:9650: warning: passing argument 4 of 'TwoPhaseMedium_setState_ph_C_impl' from incompatible pointer type
C:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include/externalmedialib.h:143: note: expected 'struct ExternalThermodynamicState *' but argument is of type 'struct ThermoCycle_Components_Units_ExpansionAndCompressionMachines_Compressor$compressor_Medium_ThermodynamicState *'
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c: In function 'omc_ThermoCycle_Components_Units_ExpansionAndCompressionMachines_Compressor$compressor_Medium_setState__pT':
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c:9695: warning: passing argument 3 of 'TwoPhaseMedium_setState_pT_C_impl' from incompatible pointer type
C:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include/externalmedialib.h:144: note: expected 'struct ExternalThermodynamicState *' but argument is of type 'struct ThermoCycle_Components_Units_ExpansionAndCompressionMachines_Compressor$compressor_Medium_ThermodynamicState *'
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c: In function 'omc_ThermoCycle_Components_Units_ExpansionAndCompressionMachines_Compressor$compressor_Medium_setState__ps':
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c:9900: warning: passing argument 4 of 'TwoPhaseMedium_setState_ps_C_impl' from incompatible pointer type
C:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include/externalmedialib.h:146: note: expected 'struct ExternalThermodynamicState *' but argument is of type 'struct ThermoCycle_Components_Units_ExpansionAndCompressionMachines_Compressor$compressor_Medium_ThermodynamicState *'
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c: In function 'omc_ThermoCycle_Components_Units_PdropAndValves_DP$dp__cd_Medium_setState__ph':
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c:10297: warning: passing argument 4 of 'TwoPhaseMedium_setState_ph_C_impl' from incompatible pointer type
C:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include/externalmedialib.h:143: note: expected 'struct ExternalThermodynamicState *' but argument is of type 'struct ThermoCycle_Components_Units_PdropAndValves_DP$dp__cd_Medium_ThermodynamicState *'
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c: In function 'omc_ThermoCycle_Components_Units_PdropAndValves_DP$dp__cd_Medium_setState__pT':
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c:10342: warning: passing argument 3 of 'TwoPhaseMedium_setState_pT_C_impl' from incompatible pointer type
C:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include/externalmedialib.h:144: note: expected 'struct ExternalThermodynamicState *' but argument is of type 'struct ThermoCycle_Components_Units_PdropAndValves_DP$dp__cd_Medium_ThermodynamicState *'
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c: In function 'omc_ThermoCycle_Components_Units_PdropAndValves_DP$dp__ev_Medium_setState__ph':
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c:10477: warning: passing argument 4 of 'TwoPhaseMedium_setState_ph_C_impl' from incompatible pointer type
C:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include/externalmedialib.h:143: note: expected 'struct ExternalThermodynamicState *' but argument is of type 'struct ThermoCycle_Components_Units_PdropAndValves_DP$dp__ev_Medium_ThermodynamicState *'
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c: In function 'omc_ThermoCycle_Components_Units_PdropAndValves_DP$dp__ev_Medium_setState__pT':
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c:10624: warning: passing argument 3 of 'TwoPhaseMedium_setState_pT_C_impl' from incompatible pointer type
C:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include/externalmedialib.h:144: note: expected 'struct ExternalThermodynamicState *' but argument is of type 'struct ThermoCycle_Components_Units_PdropAndValves_DP$dp__ev_Medium_ThermodynamicState *'
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c: In function 'omc_ThermoCycle_Components_Units_PdropAndValves_Valve$valve_Medium_setState__pT':
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c:11017: warning: passing argument 3 of 'TwoPhaseMedium_setState_pT_C_impl' from incompatible pointer type
C:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include/externalmedialib.h:144: note: expected 'struct ExternalThermodynamicState *' but argument is of type 'struct ThermoCycle_Components_Units_PdropAndValves_Valve$valve_Medium_ThermodynamicState *'
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c: In function 'omc_ThermoCycle_Components_Units_PdropAndValves_Valve$valve_Medium_setState__ph':
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c:11064: warning: passing argument 4 of 'TwoPhaseMedium_setState_ph_C_impl' from incompatible pointer type
C:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include/externalmedialib.h:143: note: expected 'struct ExternalThermodynamicState *' but argument is of type 'struct ThermoCycle_Components_Units_PdropAndValves_Valve$valve_Medium_ThermodynamicState *'
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c: In function 'omc_ThermoCycle_Components_Units_Tanks_Tank__pL$tank__pL_Medium_setSat__p':
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_functions.c:11145: warning: passing argument 2 of 'TwoPhaseMedium_setSat_p_C_impl' from incompatible pointer type
C:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include/externalmedialib.h:169: note: expected 'struct ExternalSaturationProperties *' but argument is of type 'struct ThermoCycle_Components_Units_Tanks_Tank__pL$tank__pL_Medium_SaturationProperties *'
gcc -falign-functions -msse2 -mfpmath=sse "-IC:/Users/JV-VM/Desktop/ExternalMedia-master/Modelica/ExternalMedia 3.2.1/Resources/Include" -I"C:/OpenModelica1.9.7//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_04set.o ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_04set.c
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_02nls.c: In function 'initializeStaticNLSData2567':
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_02nls.c:7838: error: 'INTEGER_ATTRIBUTE' has no member named 'nominal'
ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_02nls.c:7874: error: 'INTEGER_ATTRIBUTE' has no member named 'nominal'
\MinGW\bin\mingw32-make: *** [ThermoCycle.Examples.Simulations.step_by_step.HeatPump_R407c.step10_02nls.o] Error 1
\MinGW\bin\mingw32-make: *** Waiting for unfinished jobs....
Compilation process failed. Exited with code 2.

Re: Thermocycle library compatible with Openmodelica?

Has anyone been able to work the external library in openmodelica for ThermoCycle?

Re: Thermocycle library compatible with Openmodelica?

Has anyone success with running simulation with ThermoCycle using OpenModelica. I have tried possible means but no it still does not work. I even tried following someone suggestion of using older  version of modelica 1.9.7 but yet it also failed.

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