CoolProp fluid property database reinforces its availability for Julia users

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] (CoolProp.jl as a registered Julia package · Issue #1293 · CoolProp/CoolProp · GitHub). Most recent works is pushed here (Need your contribution).

Any advice and suggestions will be greatly appreciated
Regards
Reza Afzalan


CoolProp Papers:

8 Likes

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?

We discussed it to some extent here.

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.

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.

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

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

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

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

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.

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

1 Like

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.

Still not working and having Julia 1.1 now. Is there already a solution? thanks.

Is there any solution? I still get error messages when trying to install CoolProp for Julia. Thanks!

Building CoolProp → `~/.julia/dev/CoolProp/deps/build.log`
┌ Error: Error building `CoolProp`: 
│ ERROR: LoadError: ArgumentError: isdefined: too few arguments (expected 2)
│ Stacktrace:
│  [1] top-level scope at /Users/mrohde/.julia/dev/CoolProp/deps/build.jl:6
│  [2] include at ./boot.jl:326 [inlined]
│  [3] include_relative(::Module, ::String) at ./loading.jl:1038
│  [4] include(::Module, ::String) at ./sysimg.jl:29
│  [5] include(::String) at ./client.jl:403
│  [6] top-level scope at none:0
│ in expression starting at /Users/mrohde/.julia/dev/CoolProp/deps/build.jl:5
└ @ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

I’m facing the same issue. I’ve been trying to get CoolProp to work for a while now but haven’t been able to. Did you find a solution to the problem?

I’m a fan of this solo effort project(real preliminary)
https://github.com/longemen3000/LavoisierCore.jl

Looks like they are supporting thermodynamic properties of tertiary, and quaternary mixtures. I don’t think CoolProp does that?

The more the merrier though!

2 Likes

Are you are using
https://github.com/CoolProp/CoolProp.jl.git

not
https://github.com/vimalaad/CoolProp.jl.git
?

I’m using vimalaad/CoolProp.jl; Attached is the issue I am having.

CoolProp/CoolProp.jl works for me. Ignore the readme which still directs to vimalaad/CoolProp.jl. vimalaad/CoolProp.jl has not been updated for three years.

I tried Pkg.clone(“https://github.com/CoolProp/CoolProp.jl.git”) as well and I ran into the same error. Do you have any additional dependencies installed?