- Index
- » Users
- » Violidakis
- » Profile
Posts
Posts
Hello!
What is your problem?
Have you tried the suggested solution I presented at the second post?
I needed to install a 32 bit version of Windows and use an older version of OpenModelica to make it work ...
I had a similar problem. But after a lot of time struggling with my partners, we finally managed to find a solution to make the library working.
First we had to set up a (virtual) machine with a Windows 32bit system and install a previous version of OpenModelica, in particular v.1.9.7.
Then you follow the instructions in the installation.txt for OpenModelica under windows, i.e.:
----------------------------------------------------------------------------------------------------------------------
## OpenModelica under Windows
- Go to the Modelica/ExternalMedia 3.2.1/Resources/Library/win32 directory
- Copy the libExternalMediaLib.OMC-gcc.a file to a new file named
libExternalMediaLib.a in the same directory
You can now load the library, by opening the Modelica/ExternalMedia 3.2.1/package.mo
file
----------------------------------------------------------------------------------------------------------------------
I hope this helps.
If anyone has found a way to run this library in a 64 bit system which would be faster as it supports more RAM and with a recent version of OpenModelica, it would be welcome!
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.
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.
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
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.
- Index
- » Users
- » Violidakis
- » Profile