Code Monkey home page Code Monkey logo

externalmedia's Introduction

Welcome to CoolProp

CoolProp is a thermophysical property database and wrappers for a selection of programming environments. It offers similar functionality to REFPROP, but CoolProp is open-source and free. It was originally developed by Ian Bell, at the time a post-doc at the University of Liege, in Liege, Belgium.

  • CoolProp has flexible licensing terms: Commercial - ok! Academic? - ok! license
  • For Python, get the latest release via pip install coolprop PyPI downloads PyPI version
  • ... other binaries are available from SourceForge sourceforge downloads CoolProp version tag
  • There is also a bleeding edge nightly build of the development version .
  • The documentation is available for the latest release and the development version
  • For any kind of question regarding CoolProp and its usage, you can ask the CoolProp Discussions
  • ... you might also find answers in our FAQ
  • If you found a bug or have an issue that requires the developers to become active, please file an issue in our issue tracker
  • Contributions to this project are welcomed and encouraged! If you wish to contribute bug fixes, patches, or new features, wrappers, or material properties, please submit a Pull Request with your code.
  • If you are new to Git and Github, please see the CoolProp Wiki for guidance on becoming a contributor to the project.
  • Accelerate development of things you really need implemented by posting at Bountysource
  • Check Travis CI for build failures Travis CI builds and have a look at the coverity stats Coverity Scan Build Status

externalmedia's People

Contributors

casella avatar jonwel avatar jowr avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

externalmedia's Issues

Release of new ExternalMedia

Francesco would like to release a new version of ExternalMedia soon. Do you @JonWel, @squoilin and @ibell think that we should push for including CoolProp5 in it?

I think the remaining tasks of #4 should be fixed before we include a new CoolProp. If we provide a binary, we cannot expect everyone to help us debugging and the software should work somewhat reliably. How well tested is the current code base? Do we feel comfortable releasing it?

Debugging

We should have a CMake file or something similar to create portable projects that help us to debug the cpp files. @JonWel: Can you share your debugging code? I can make the CMake projects.

fatal error when compiling

Greetings Dears,
Many thanks for such great effort. I am new to externalmedia library and using it with Dymola 2018 FD01. on windows 10 with all wrapper prerequisites installed and tested.
when I compile the library ( using BuildLib-Dymola-VS2015) i get an error:

fatal error C1083: Cannot open include file : 'AbstractState.h'

then the code continue git process successfully till it find python interpreter then the following results:

CMake Error at CMakeLists.txt:420 (target_link_libraries):
Object library target "CoolProp" may not link to anything.

**-- Configuring incomplete, errors occurred!
See also "C:/Users/hp/Documents/Dymola/ExternalMedia-master/externals/CoolProp.build.msvc/CMakeFiles/CMakeOutput.log".
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist.
Switch: ALL_BUILD.vcxproj
The system cannot find the path specified.
Microsoft (R) Library Manager Version 14.00.24215.1
Copyright (C) Microsoft Corporation. All rights reserved.

"Copying files to External Media 3.2.1"
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
"All done"**

What could be the issue

rho_smoothed

Related to point 6 of issue #4 .

The rho_smoothed function was built in CoolProp 4's CoolPropStateClassSI: here.
It is needed in ExternalMedia in the file coolpropsolver.cpp: see here.
In the new AbstractState of CoolProp 5, there are protected variables: _rhospline, _dsplinedp, _dsplinedh see here, but I couldn't found a definition for theses values (grep -r "rhospline" did not gave much).

Functions like #3 (comment) can help to define a new rho_smoothed function.
Some ancillary values may too: link

But I'm blocked when I need to calculate the derivatives along the saturation lines: see here
There are functions to calculate partial derivatives along the saturation curve, but I do not know how to specify that it is on the liquid of vapour side.

(The function in CoolProp 4 starts a new instance of the AbstractState to calculates the required properties. This allows to not change the current state, but has some overheads and would need to have informations about the backend to use).

For the two derived values; is it equivalent to:

dsplinedp = state->first_two_phase_deriv_splined(CoolProp::iDmass, CoolProp::iHmass, CoolProp::iP, xend);
dsplinedh = state->first_two_phase_deriv_splined(CoolProp::iDmass, CoolProp::iP, CoolProp::iHmass, xend);

Table generation too slow

When the tables are generated, the output is redirected to the standard output, that makes the table generation quite slow (at least under Windows).

Wouldn’t it be more convenient to have the output only when the debug level is active?
I think it should be a setting added in the CoolProp side as it can may be an issue also for the library. Reported: CoolProp/CoolProp#865

specificEnthalpy_pT gives inconsistent results

Try this simple test case:

package Test
package HeliumCoolProp
"Helium model from NIST RefProp database via ExternalMedia/CoolProp"
extends ExternalMedia.Media.CoolPropMedium(
mediumName = "Helium",
substanceNames = {"He"},
ThermoStates=Modelica.Media.Interfaces.Choices.IndependentVariables.ph);
end HeliumCoolProp;

model Test1
package Medium = HeliumCoolProp;
Medium.AbsolutePressure p = 4e5;
Medium.Temperature T = 4;
Medium.SpecificEnthalpy h = Medium.specificEnthalpy_pT(p,T);
Medium.ThermodynamicState state = Medium.setState_ph(p,h);
Medium.Temperature T2 = Medium.temperature(state);
end Test1;
end Test;

In principle, T should be equal to T2. Instead, T2 turns out to be 5.46 K instead of 4 K. It turns out that specificEnthalpy_pT(4e5,4) returns 7430 instead of 218. What is wrong with that function?

Saturation states sL vs. rhoL

Splitting several issues from CoolProp/CoolProp#263.

  • When saturation properties are calculated, for two phase fluids, some values are asked specifically for the Liquid or the Vapour phase (sV, sL ... but also parameters for density or enthalpy) . Where can I find some CoolProp 5 equivalents?

Call to the AbstractClass

Which is the preferred implementation to call the abstract class:

  • static allocation
  • dynamic allocation
  • shared pointer

With CoolProp 4, it was a dynamic allocation.
With CoolProp 5, the shared pointer are currently in use.

calc_first_two_phase_deriv_splined missing to tabular backend

When I enable the TTSE option e.g. in ExternalMedia.Test.CoolProp.RhoSmoothing it seems that the fluid does not "enter" the two-phase region. Instead the temperature rises until the solver crashes. The same thing happens with and without rho_smoothing.

Retiring CoolProp/ExternalMedia

There are multiple copies of ExternalMedia floating around and it seems difficult to streamline the development.

I have fixed the builds in the official modelica-3rdparty/ExternalMedia repository and I am going to issue a pull request very soon.

@ibell and @squoilin : Do you have any objections to retiring this repository?

Tabular backends don't work in twoPhase

The function calc_first_partial_derivof the TabularBackends does only work if using_single_phase_table is true.

And as discussed in #16 , calc_first_two_phase_deriv_splined is also missing (used instead of calc_first_partial_deriv when smoothing options are in use).

This means that tabular backend are for now not usable in two phase region (but should work in other conditions).

The values impacted are ddhp, ddph, and when rho_smoothing_xend is active, the smoothed d.

The correction in CoolProp should not be too demanding (the code should be quite similar to the one of non tabular backend and to the one of CoolProp 4.

Work flow

@JonWel , could you please work in a new branch of the main repository and not in your own fork? That would make things much easier for me and I already granted you write access to this repository.

how to compile "ExternalMedia" for openmodelica using gcc

Hello, Dear Sir

I appreciate your work of developing and building "externalmedia" library

I have a problem in compiling with using gcc;
I followed up the guide to compile "ExternalMedia" for openmodelica with using gcc
but I got the a lot of error message
could you help me to understand how to compile with using gcc ?

thanks in advance, James

the error message ;
In file included from C:/OMC_Works/ExternalMedia_master/externals/coolprop.git/include/CoolPropTools.h:17,
from C:/OMC_Works/ExternalMedia_master/externals/coolprop.git/include/CachedElement.h:11,
from C:/OMC_Works/ExternalMedia_master/externals/coolprop.git/include/AbstractState.h:11,
from Sources/coolpropsolver.h:5,
from Sources/coolpropsolver.cpp:1:
C:/OMC_Works/ExternalMedia_master/externals/coolprop.git/include/CPfilepaths.h:36:7: warning: no newline at end of file
In file included from C:/OMC_Works/ExternalMedia_master/externals/coolprop.git/include/AbstractState.h:14,
from Sources/coolpropsolver.h:5,
from Sources/coolpropsolver.cpp:1:
C:/OMC_Works/ExternalMedia_master/externals/coolprop.git/include/PhaseEnvelope.h:137:7: warning: no newline at end of file
In file included from C:/OMC_Works/ExternalMedia_master/externals/coolprop.git/include/AbstractState.h:15,
from Sources/coolpropsolver.h:5,
from Sources/coolpropsolver.cpp:1:
C:/OMC_Works/ExternalMedia_master/externals/coolprop.git/include/crossplatform_shared_ptr.h:19: error: 'std::shared_ptr' has not been declared
In file included from Sources/coolpropsolver.h:5,
from Sources/coolpropsolver.cpp:1:
C:/OMC_Works/ExternalMedia_master/externals/coolprop.git/include/AbstractState.h:1186: error: 'shared_ptr' has not been declared
C:/OMC_Works/ExternalMedia_master/externals/coolprop.git/include/AbstractState.h:1186: error: expected ',' or '...' before '<' token
C:/OMC_Works/ExternalMedia_master/externals/coolprop.git/include/AbstractState.h: In constructor 'CoolProp::GeneratorInitializer::GeneratorInitializer(CoolProp::backend_families)':
C:/OMC_Works/ExternalMedia_master/externals/coolprop.git/include/AbstractState.h:1192: error: 'shared_ptr' was not declared in this scope
C:/OMC_Works/ExternalMedia_master/externals/coolprop.git/include/AbstractState.h:1192: error: expected primary-expression before '>' token
In file included from Sources/coolpropsolver.cpp:1:
Sources/coolpropsolver.h: At global scope:
Sources/coolpropsolver.h:31: error: ISO C++ forbids declaration of 'shared_ptr' with no type
Sources/coolpropsolver.h:31: error: expected ';' before '<' token
Sources/coolpropsolver.cpp: In constructor 'CoolPropSolver::CoolPropSolver(const std::string&, const std::string&, const std::string&)':
Sources/coolpropsolver.cpp:163: error: 'class CoolPropSolver' has no member named 'state'
Sources/coolpropsolver.cpp:164: error: 'class CoolPropSolver' has no member named 'state'
Sources/coolpropsolver.cpp:166: error: 'class CoolPropSolver' has no member named 'state'
Sources/coolpropsolver.cpp:167: error: 'class CoolPropSolver' has no member named 'state'
Sources/coolpropsolver.cpp:169: error: 'class CoolPropSolver' has no member named 'state'
Sources/coolpropsolver.cpp:170: error: 'class CoolPropSolver' has no member named 'state'
Sources/coolpropsolver.cpp:171: error: 'class CoolPropSolver' has no member named 'state'
Sources/coolpropsolver.cpp:172: error: 'class CoolPropSolver' has no member named 'state'
Sources/coolpropsolver.cpp:175: error: 'class CoolPropSolver' has no member named 'state'
Sources/coolpropsolver.cpp: In member function 'virtual void CoolPropSolver::setFluidConstants()':
Sources/coolpropsolver.cpp:192: error: 'state' was not declared in this scope
Sources/coolpropsolver.cpp: In member function 'virtual void CoolPropSolver::postStateChange(ExternalThermodynamicState*)':
Sources/coolpropsolver.cpp:218: error: 'state' was not declared in this scope
Sources/coolpropsolver.cpp:314: error: 'state' was not declared in this scope
Sources/coolpropsolver.cpp: In member function 'virtual void CoolPropSolver::setSat_p(double&, ExternalSaturationProperties*)':
Sources/coolpropsolver.cpp:390: error: 'state' was not declared in this scope
Sources/coolpropsolver.cpp: In member function 'virtual void CoolPropSolver::setSat_T(double&, ExternalSaturationProperties*)':
Sources/coolpropsolver.cpp:465: error: 'state' was not declared in this scope
Sources/coolpropsolver.cpp: In member function 'virtual void CoolPropSolver::setState_ph(double&, double&, int&, ExternalThermodynamicState*)':
Sources/coolpropsolver.cpp:529: error: 'state' was not declared in this scope
Sources/coolpropsolver.cpp: In member function 'virtual void CoolPropSolver::setState_pT(double&, double&, ExternalThermodynamicState*)':
Sources/coolpropsolver.cpp:554: error: 'state' was not declared in this scope
Sources/coolpropsolver.cpp: In member function 'virtual void CoolPropSolver::setState_dT(double&, double&, int&, ExternalThermodynamicState*)':
Sources/coolpropsolver.cpp:577: error: 'state' was not declared in this scope
Sources/coolpropsolver.cpp: In member function 'virtual void CoolPropSolver::setState_ps(double&, double&, int&, ExternalThermodynamicState*)':
Sources/coolpropsolver.cpp:598: error: 'state' was not declared in this scope
Sources/coolpropsolver.cpp: In member function 'virtual void CoolPropSolver::setState_hs(double&, double&, int&, ExternalThermodynamicState*)':
Sources/coolpropsolver.cpp:620: error: 'state' was not declared in this scope
Sources/coolpropsolver.cpp: In member function 'virtual double CoolPropSolver::partialDeriv_state(const std::string&, const std::string&, const std::string&, ExternalThermodynamicState*)':
Sources/coolpropsolver.cpp:640: error: 'state' was not declared in this scope
Sources/errorhandling.cpp:45:7: warning: no newline at end of file
In file included from Sources/FluidProp_IF.h:29,
from Sources/FluidProp_IF.cpp:21:
Sources/FluidProp_COM.h:22:21: error: comutil.h: No such file or directory
In file included from Sources/FluidProp_IF.h:29,
from Sources/FluidProp_IF.cpp:21:
Sources/FluidProp_COM.h:26: error: 'interface' does not name a type
In file included from Sources/FluidProp_IF.cpp:21:
Sources/FluidProp_IF.h:126: error: ISO C++ forbids declaration of 'IClassFactory' with no type
Sources/FluidProp_IF.h:126: error: expected ';' before '' token
Sources/FluidProp_IF.h:127: error: ISO C++ forbids declaration of 'IFluidProp_COM' with no type
Sources/FluidProp_IF.h:127: error: expected ';' before '
' token
Sources/FluidProp_IF.cpp: In function 'std::string ConvertBSTRToString(OLECHAR*)':
Sources/FluidProp_IF.cpp:30: error: '_com_util' has not been declared
Sources/FluidProp_IF.cpp: In function 'OLECHAR* ConvertStringToBSTR(std::string&)':
Sources/FluidProp_IF.cpp:38: error: '_com_util' has not been declared
Sources/FluidProp_IF.cpp: In constructor 'TFluidProp::TFluidProp()':
Sources/FluidProp_IF.cpp:53: error: class 'TFluidProp' does not have any field named 'FluidProp_COM'
Sources/FluidProp_IF.cpp:59: error: 'ClassFactory' was not declared in this scope
Sources/FluidProp_IF.cpp:63: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In destructor 'TFluidProp::~TFluidProp()':
Sources/FluidProp_IF.cpp:77: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'bool TFluidProp::IsValid()':
Sources/FluidProp_IF.cpp:86: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'void TFluidProp::CreateObject(std::string, std::string*)':
Sources/FluidProp_IF.cpp:94: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'void TFluidProp::ReleaseObjects()':
Sources/FluidProp_IF.cpp:103: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'void TFluidProp::SetFluid(std::string, int, std::string*, double*, std::string*)':
Sources/FluidProp_IF.cpp:126: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'void TFluidProp::GetFluid(std::string*, int*, std::string*, double*, bool)':
Sources/FluidProp_IF.cpp:164: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'void TFluidProp::GetFluidNames(std::string, std::string, int*, std::string*, std::string*)':
Sources/FluidProp_IF.cpp:204: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'void TFluidProp::GetCompSet(std::string, int*, std::string*, std::string*)':
Sources/FluidProp_IF.cpp:235: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'double TFluidProp::Pressure(std::string, double, double, std::string*)':
Sources/FluidProp_IF.cpp:259: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'double TFluidProp::Temperature(std::string, double, double, std::string*)':
Sources/FluidProp_IF.cpp:275: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'double TFluidProp::SpecVolume(std::string, double, double, std::string*)':
Sources/FluidProp_IF.cpp:291: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'double TFluidProp::Density(std::string, double, double, std::string*)':
Sources/FluidProp_IF.cpp:307: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'double TFluidProp::Enthalpy(std::string, double, double, std::string*)':
Sources/FluidProp_IF.cpp:323: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'double TFluidProp::Entropy(std::string, double, double, std::string*)':
Sources/FluidProp_IF.cpp:339: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'double TFluidProp::IntEnergy(std::string, double, double, std::string*)':
Sources/FluidProp_IF.cpp:355: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'double TFluidProp::VaporQual(std::string, double, double, std::string*)':
Sources/FluidProp_IF.cpp:371: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'double* TFluidProp::LiquidCmp(std::string, double, double, std::string*)':
Sources/FluidProp_IF.cpp:390: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'double* TFluidProp::VaporCmp(std::string, double, double, std::string*)':
Sources/FluidProp_IF.cpp:414: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'double TFluidProp::HeatCapV(std::string, double, double, std::string*)':
Sources/FluidProp_IF.cpp:435: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'double TFluidProp::HeatCapP(std::string, double, double, std::string*)':
Sources/FluidProp_IF.cpp:451: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'double TFluidProp::SoundSpeed(std::string, double, double, std::string*)':
Sources/FluidProp_IF.cpp:467: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'double TFluidProp::Alpha(std::string, double, double, std::string*)':
Sources/FluidProp_IF.cpp:483: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'double TFluidProp::Beta(std::string, double, double, std::string*)':
Sources/FluidProp_IF.cpp:499: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'double TFluidProp::Chi(std::string, double, double, std::string*)':
Sources/FluidProp_IF.cpp:515: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'double TFluidProp::Fi(std::string, double, double, std::string*)':
Sources/FluidProp_IF.cpp:531: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'double TFluidProp::Ksi(std::string, double, double, std::string*)':
Sources/FluidProp_IF.cpp:547: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'double TFluidProp::Psi(std::string, double, double, std::string*)':
Sources/FluidProp_IF.cpp:563: error: 'FluidProp_COM' was not declared in this scope
Sources/FluidProp_IF.cpp: In member function 'double TFluidProp::Zeta(std::string, double, doubl

`if` performance question

At the end of the function CoolPropSolver::postStateChange, there is 6 times the checking of the debug level:

if (debug_level > 50) std::cout << format("At the end of %s \n","postStateChange");
if (debug_level > 50) std::cout << format("Setting pressure to %f \n",properties->p);
if (debug_level > 50) std::cout << format("Setting temperature to %f \n",properties->T);
if (debug_level > 50) std::cout << format("Setting density to %f \n",properties->d);
if (debug_level > 50) std::cout << format("Setting enthalpy to %f \n",properties->h);
if (debug_level > 50) std::cout << format("Setting entropy to %f \n",properties->s);

As it is exactly the same debug_level check, wouldn't it be more efficient to make a single if and all the std::cout in the same bracket or the compilers notice it can optimise it (and there is no point modifying this)?
This is executed each time the state is updated.

This formulations seems more efficient to me:

if (debug_level > 50)
{
    std::cout << format("At the end of %s \n","postStateChange");
    std::cout << format("Setting pressure to %f \n",properties->p);
    std::cout << format("Setting temperature to %f \n",properties->T);
    std::cout << format("Setting density to %f \n",properties->d);
    std::cout << format("Setting enthalpy to %f \n",properties->h);
    std::cout << format("Setting entropy to %f \n",properties->s);
}

Compiling ExternalMedia with CoolProp in Linux

Hello,

I tried to compile CoolProp and ExternalMedia in Linux using the script "BuildLib-CMake.sh" in the Project directory. First, I set the environment for using the 32-bit compiler in a 64-bit Linux distribution by including the following line in the "ExternalMedia/Projects/CMakeLists.txt" file:

SET(FORCE_BITNESS_32 ON CACHE BOOL "Force a 32bit build regardless of the host")

And changing also the "ExternalMedia/Projects/makefile" file as:

CPPC = g++ -m32

However, the compilation gives the following error, where the "comutil.h" file cannot be found, I think this is an only Windows header and it should not be considered in the Linux version, but I am not sure about that.

**.................
.................
[ 77%] Building CXX object CoolProp/CMakeFiles/CoolProp.dir/src/SpeedTest.cpp.o
[ 79%] Building CXX object CoolProp/CMakeFiles/CoolProp.dir/src/Tests/TestObjects.cpp.o
[ 79%] Built target CoolProp
Scanning dependencies of target ExternalMediaLib
[ 81%] Building CXX object CMakeFiles/ExternalMediaLib.dir/Sources/FluidProp_IF.cpp.o
In file included from /home/javi/Documents/SFERAII/ExternalMedia/Projects/Sources/FluidProp_IF.h:29:0,
from /home/javi/Documents/SFERAII/ExternalMedia/Projects/Sources/FluidProp_IF.cpp:21:
/home/javi/Documents/SFERAII/ExternalMedia/Projects/Sources/FluidProp_COM.h:22:21: fatal error: comutil.h: No such file or directory
#include < comutil.h >
^
compilation terminated.
CMakeFiles/ExternalMediaLib.dir/build.make:62: recipe for target 'CMakeFiles/ExternalMediaLib.dir/Sources/FluidProp_IF.cpp.o' failed
gmake[2]: *** [CMakeFiles/ExternalMediaLib.dir/Sources/FluidProp_IF.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ExternalMediaLib.dir/all' failed
gmake[1]: *** [CMakeFiles/ExternalMediaLib.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
gmake: * [all] Error 2
~/Documents/SFERAII/ExternalMedia/Projects

Am I missing something in the compilation process?.

Regards,
Javier.

CoolProp compilation fails on Xubuntu, not linking to target library

Hello.

I am currently trying to compile the CoolProp library on a fresh Xubuntu intall (18.04) for use with OpenModelica but the CMake routine exits with the following error:

CMake Error at /home/christian/Dokumente/Git/ExternalMedia/externals/CoolProp.git CMakeLists.txt:422 (target_link_libraries):
Object library target "CoolProp" may not link to anything.

I have recursively cloned the ExternalMedia files from the respository https://github.com/CoolProp/ExternalMedia and have used the shell script "BuildLib-CMake.sh" from the Projects folder therein. I have also tried using "make -f makefile library" according to the "CompilationHowTwo.txt" instructions, but the result is the same.

I have no idea what is going wrong and would be very happy if you could give me a hint what else to try.

Best regards
Christian

Numerical methods

Splitting several issues from CoolProp/CoolProp#263.

What should be reimplemented:

  • calc_transport
  • enable_TTSE
  • enable_BICUBIC
  • extend_twophase (enable EXTTP)
  • twophase_derivsmoothing_xend
  • rho_smoothing_xend
  • tabular two phase derivatives
  • tabular two phase smoothed derivatives

... and make sure that there is a converter function to make it backwards compatible.

Fluid properties problems

Hello,

Let me start by saying that I appreciate the work done by you on the ExternalMedia library. I am a PhD student at Chalmers University and I am using ExternalMedia to couple my Modelica models to the CoolProp database, with purpose of calculating properties in organic Rankine cycles and similar power cycles for waste heat recovery in automotive applications. For some fluids this works perfectly, but for other fluids there are some issues that I am not able to solve, so maybe you can help me here.

Basically there are two main errors I get depending on the fluid, I will give two examples here. First example is the fluid D4, which gives the following error:
The following error was detected at time: 0
Viscosity model is not available for this fluid
The stack of functions is:
setState_ph_Unique6
setState_ph_Unique6(100000.0, 100000.0, 0)
Error: Failed to start model.

Another example is Methanol, which gives:
The following error was detected at time: 0
options.T is not valid in saturation_P_pure_1D_T
The stack of functions is:
getMolarMass_Unique2
getMolarMass_Unique2()
Error: Failed to start model.

I reproduced these errors in a very simple model:

   model TestEM

    package Medium = ExternalMedia.Media.CoolPropMedium (
        mediumName = "Methanol",
        ThermoStates = Modelica.Media.Interfaces.Choices.IndependentVariables.pT,
        AbsolutePressure(start=1e5),
        SpecificEnthalpy(start=1e5));
    Medium.BaseProperties props;

  equation 
    props.p = 1e5;
    props.h = 1e5;

    annotation (uses(Modelica(version="3.2.1")));
  end TestEM;

The weird thing is, that these fluids work in a Python script if I call CoolProp directly with the same input:

  import CoolProp.CoolProp as CP
  print("CoolProp version:", CP.get_global_param_string("version"))
  fluid = "D4"
  db = "HEOS"
  P = 1e5
  h = 1e5
  print CP.PropsSI("T", "P", P, "H", h, fluid)

I downloaded the latest version of ExternalMedia from github and compiled it using one of the bat files available. Do you have any suggestion what is going wrong here? If you need any more info regarding this or if something is unclear, please let me know.

Kind regards,

Jelmer Rijpkema

System info:
ExternalMedia version: 3.2.1
CoolProp version: 6.1.1dev
Environment: Dymola
OS: Windows 7

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.