CoolProp fluid property database reinforces its availability for Julia users

announcement

#1

CoolProp, Is an open-source, cross-platform, reference-quality fluid property database that mirrors many of the functionalities of REFPROP. The codebase is written in C++ and wrappers are available for Python and C#. A DLL is also available for calling from other languages. It is currently the only open-source package that implements the extended corresponding states model for transport properties.


I’m pleased to announce that CoolProp is currently preparing itself to be a Julia registered package, [discussion here] (https://github.com/CoolProp/CoolProp/issues/1293#). Most recent works is pushed here (Need your contribution).

Any advice and suggestions will be greatly appreciated
Regards
Reza Afzalan


CoolProp Papers:


#2

This is awesome! Thanks. Coolprop is one of the things I’ve been missing most
since switching mostly away from python.

@DANA-Laboratory, did you mean to link to
https://github.com/vimalaad/CoolProp.jl rather than
https://github.com/coolprop/CoolProp.jl ? What still needs to happen before
you’re comfortable registering the package?


#3

We discussed it to some extent here.


#4

Yep, I saw that discussion. Still not entirely clear to me what needs to be done
before its ready to be registered. I want to know if there’s something I can do
to help.


#5

For me it was ready at the time, the only thing was I do not have enough free time to support this kind of works, although I love it.


#6

In Julia 0.7, I had no problems with installing CoolProp, but in 1.0.1 I cannot make it work. This is the output when I do, in the REPL (see below), Pkg.Clone(“https://github.com/vimalaad/CoolProp.jl.git”)

Can you help?

Thanks!

julia> Pkg.clone(“https://github.com/vimalaad/CoolProp.jl.git”)
┌ Warning: Pkg.clone is only kept for legacy CI script reasons, please use add
└ @ Pkg.API /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:463
Updating git-repo https://github.com/vimalaad/CoolProp.jl.git
[ Info: Assigning UUID e084ae63-2819-5025-826e-f8e611a84251 to CoolProp
ERROR: Path /Users/mrohde/.julia/dev/CoolProp exists but it does not contain `src/CoolProp.jl
Stacktrace:
[1] pkgerror(::String) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Types.jl:120
[2] (::getfield(Pkg.Types, Symbol("##26#29")){Bool,Pkg.Types.Context,Array{Pkg.Types.PackageSpec,1}})(::LibGit2.CachedCredentials) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Types.jl:584
[3] shred!(::getfield(Pkg.Types, Symbol("##26#29")){Bool,Pkg.Types.Context,Array{Pkg.Types.PackageSpec,1}}, ::LibGit2.CachedCredentials) at ./secretbuffer.jl:184
[4] #handle_repos_develop!#25 at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Types.jl:511 [inlined]
[5] #handle_repos_develop! at ./none:0 [inlined]
[6] #add_or_develop#13(::Symbol, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:52
[7] #add_or_develop at ./none:0 [inlined]
[8] #develop#19 at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:70 [inlined]
[9] develop at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:70 [inlined]
[10] macro expansion at ./logging.jl:310 [inlined]
[11] clone(::String, ::String) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:463 (repeats 2 times)
[12] top-level scope at none:0


#7

Thanks (https://github.com/alblaz) for contribution, With (https://github.com/CoolProp/CoolProp.jl/commit/fe6cc86699520a4efb153e5c8c6a009a12f2889d) the amazing CoolProp thermodynamic is ready for Julia1.0


#8

Thanks a lot, I’ll try the new version out!! :+1::clap:


#9

If I use the standard route as above I now get errors during precompiling:

julia> using CoolProp
[ Info: Precompiling CoolProp [e084ae63-2819-5025-826e-f8e611a84251]
┌ Warning: Package CoolProp does not have Compat in its dependencies:
│ - If you have CoolProp checked out for development and have
│ added Compat as a dependency but haven’t updated your primary
│ environment’s manifest file, try Pkg.resolve().
│ - Otherwise you may need to report an issue with CoolProp
└ Loading Compat into CoolProp from project dependency, future warnings for CoolProp are suppressed.
ERROR: LoadError: MethodError: no method matching Array(::Type{UInt8}, ::Int64)
Closest candidates are:
Array(::LinearAlgebra.UniformScaling, ::Integer, ::Integer) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/LinearAlgebra/src/uniformscaling.jl:330
Stacktrace:
[1] top-level scope at none:0
[2] include at ./boot.jl:317 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1044
[4] include(::Module, ::String) at ./sysimg.jl:29
[5] top-level scope at none:2
[6] eval at ./boot.jl:319 [inlined]
[7] eval(::Expr) at ./client.jl:393
[8] top-level scope at ./none:3
in expression starting at /Users/mrohde/.julia/dev/CoolProp/src/CoolProp.jl:7
ERROR: Failed to precompile CoolProp [e084ae63-2819-5025-826e-f8e611a84251] to /Users/mrohde/.julia/compiled/v1.0/CoolProp/TgXq7.ji.
Stacktrace:
[1] macro expansion at ./logging.jl:311 [inlined]
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1190
[3] macro expansion at ./logging.jl:309 [inlined]
[4] _require(::Base.PkgId) at ./loading.jl:947
[5] require(::Base.PkgId) at ./loading.jl:858
[6] macro expansion at ./logging.jl:309 [inlined]
[7] require(::Module, ::Symbol) at ./loading.jl:840


#10

I also had difficulty installing CoolProp. Not the same error you have. After much trial and error, I think the following got it working for me.

delete all previous attempts to install
delete .julia/registries/General
dev https://github.com/CoolProp/CoolProp.jl.git
use git GUI to switch to origin/master branch and create tracking branch
]build CoolProp
using CoolProp

This still throws a warning about Libdl not being listed in CoopProp’s dependencies, but it runs anyway. It does not pass it’s own tests. ]test CoolProp fails, but the examples provided in the docstrings work.


#11

I got it to install just fine by adding

  • DataStructures
  • Compat
  • Libdl
  • JSON

Then,

Pkg.clone("https://github.com/CoolProp/CoolProp.jl.git")
Pkg.build("CoolProp")

It installed with no problems on 1.0.2 and 1.2.0-DEV.21


#12

I still get the same errors when typing “using CoolProp”. Adding and building goes fine. It is the precompiling of CoolProp where I get the error messages.