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

ThermoCycle Library

Hello,

I'm quite new to this software. I'm having some dificulties understanding the components of the HeatPump_R407c from the ThermoCycle library. For example, if I'm using a MixedAiir room model from the Buildings library and I want the heating to be provided by this heat pump. What are the sinks and sources, that connect to the evaporator and the condenser ? These sinks and sources have some connectors for T (temperature), h( entalpy) and p (pressure). What exaclty are the inputs to these connectors, in this case ?

Any help would be honestly appreciated.

Regards,
Tomás Pimentel

Re: ThermoCycle Library

How can you instal the Thermocycle by OpenModelica?

Re: ThermoCycle Library

You just need to download the library from github (https://github.com/modelica-3rdparty/Th … e-library) and manually fix the errors in the packaging of the library (remove package.order files since the shipped ones are broken).

Re: ThermoCycle Library

I have downloaded  this library, than I have extracted it. But when I try to open package.mo the OpenModelica doesn't load this library. Nothing happened. I note that I often see a similar issue when I try to open files. For example OM could open files from one folder but couldn't open from another folder.

Edited by: Ascold - Sep-23-14 10:30:06

Re: ThermoCycle Library

And second question is:
When I have successfully loaded this library (with a CoolProp library) I have seen this problem:


Code:

[C:/Users/savin/Downloads/ThermoCycle/Components/FluidFlow/Pipes/MultiFlow1D.mo:40:5-40:77] Warning: 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.

Edited by: Ascold - Sep-23-14 10:44:40

Re: ThermoCycle Library

Code:

[martin@mega Thermocycle-library]$ git checkout master

Already on 'master'
Your branch is up-to-date with 'origin/master'.
[martin@mega Thermocycle-library]$ OMShell-terminal
OMShell Copyright 1997-2014, Open Source Modelica Consortium (OSMC)
Distributed under OMSC-PL and GPL, see www.openmodelica.org

To get help on using OMShell and OpenModelica, type "help()" and press enter
Started server using:omc +d=interactive > /tmp/omshell.log 2>&1 &
>>> loadFile("ThermoCycle/package.mo")
false
>>> getErrorString()
"[/home/martin/dev/Thermocycle-library/ThermoCycle/Obsolete/package.mo:6:32-6:104:writable] Warning: 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.
[/home/martin/dev/Thermocycle-library/ThermoCycle/Media/package.mo:6:32-6:104:writable] Warning: 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.
[/home/martin/dev/Thermocycle-library/ThermoCycle/Interfaces/package.mo:6:32-6:104:writable] Warning: 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.
[/home/martin/dev/Thermocycle-library/ThermoCycle/Interfaces/Fluid/Flange.mo:16:17-16:58:writable] Warning: 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.
[/home/martin/dev/Thermocycle-library/ThermoCycle/Icons/package.mo:6:32-6:104:writable] Warning: 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.
[/home/martin/dev/Thermocycle-library/ThermoCycle/Functions/package.mo:12:32-12:104:writable] Warning: 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.
[/home/martin/dev/Thermocycle-library/ThermoCycle/Examples/package.mo:6:32-6:104:writable] Warning: 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.
[/home/martin/dev/Thermocycle-library/ThermoCycle/Examples/TestFunctions/package.mo:6:32-6:104:writable] Warning: 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.
[/home/martin/dev/Thermocycle-library/ThermoCycle/Examples/TestFluid/package.mo:6:32-6:104:writable] Warning: 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.
[/home/martin/dev/Thermocycle-library/ThermoCycle/Examples/TestComponents/package.mo:6:32-6:104:writable] Warning: 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.
[/home/martin/dev/Thermocycle-library/ThermoCycle/Examples/TestComponents/package.mo:2:1-18:19:writable] Error: Test_Flow1Dinc_CP was referenced in the package.order file, but was not found in package.mo, Test_Flow1Dinc_CP/package.mo or Test_Flow1Dinc_CP.mo.
"

Fix by following instructions in https://trac.openmodelica.org/OpenModel … tLibraries

Code:

find . -name package.order -exec rm {} ";"

Then it works:

Code:

[martin@mega Thermocycle-library]$ OMShell-terminal 

OMShell Copyright 1997-2014, Open Source Modelica Consortium (OSMC)
Distributed under OMSC-PL and GPL, see www.openmodelica.org

To get help on using OMShell and OpenModelica, type "help()" and press enter
Started server using:omc +d=interactive > /tmp/omshell.log 2>&1 &
>>> loadFile("ThermoCycle/package.mo")
true

Edited by: sjoelund.se - Sep-23-14 10:50:39

Re: ThermoCycle Library

Re: ThermoCycle Library

Stupid forums think : is part of the URL current/sad

Re: ThermoCycle Library

sjoelund.se, I want to confirm what do I do wrong.
For example I got this message:

Code:

[C:/Users/savin/Downloads/TCnew/Thermocycle-library-master/ThermoCycle/UsersGuide/Contacts.mo:4:34-4:106] Warning: 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.

Then I found this file(Contacts.mo), opened it by Notepad and selected "Save as" chosed "UTF-8". But when I try to load again this library I got this message about UTF-8 again.

Re: ThermoCycle Library

You are not doing anything wrong. The library is wrong, but it works fine anyway (except some documentation strings will show question marks). You could also add a file package.encoding to silence it:

Code:

[martin@mega Thermocycle-library]$ echo ISO-8859-1 > ThermoCycle/package.encoding

[martin@mega Thermocycle-library]$ OMShell-terminal
OMShell Copyright 1997-2014, Open Source Modelica Consortium (OSMC)
Distributed under OMSC-PL and GPL, see www.openmodelica.org

To get help on using OMShell and OpenModelica, type "help()" and press enter
Started server using:omc +d=interactive > /tmp/omshell.log 2>&1 &
>>> loadFile("ThermoCycle/package.mo")
true
>>> getErrorString()
""

Re: ThermoCycle Library

Sorry but I didn't understand what did you mean.
1) Where should I add a file package.encoding? In the ThermoCycle folder?
2) What should I write in this file?
3) You told that the TC works anyway, but I couldn't simulate any examples.
P.S. Thank you for your help!

Re: ThermoCycle Library

Hello,
          I'm quite new to this software. I'm having some dificulties understanding the components of the ORC_245fa from the ThermoCycle library. When I simulate the step 0,step 1,...,step9,it meets some errors and I can`t understand why it happens.Who can help me?
          Any help would be honestly appreciated.
Many thanks,
Hao Hu

Re: ThermoCycle Library

Hello,
I know that this thread has been silent for a long time, but did anyone happen to find a working solution for the HeatPump_R407c example from the Thermocycle library?
The Thermocycle library is now at version 2.2 and uses the (stand alone?) ExternalMedia Library 3.2.1 instead of the CoolProp2Modelica Library.

If anyone has an update on the issue, please contact me.
Thanks.

Edited by: Violidakis - Sep-25-18 16:36:26
There are 0 guests and 0 other users also viewing this topic