Giter Club home page Giter Club logo

coolprop.jl'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

coolprop.jl's People

Contributors

alblaz avatar barche avatar chris-hampel-ca avatar dana-laboratory avatar ederag avatar ibell avatar longemen3000 avatar simulkade avatar vimalaad avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coolprop.jl's Issues

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Building Error

I tryed to install CoolProp following this steps:
Julia> Pkg.clone("https://github.com/vimalaad/CoolProp.jl.git")
%with the following message:

┌ Warning: Pkg.clone is only kept for legacy CI script reasons, please use add
└ @ Pkg.API ~/julia/usr/share/julia/stdlib/v1.1/Pkg/src/API.jl:460
Updating registry at ~/.julia/registries/General
Updating git-repo https://github.com/JuliaRegistries/General.git
Updating git-repo https://github.com/vimalaad/CoolProp.jl.git
[ Info: Assigning UUID e084ae63-2819-5025-826e-f8e611a84251 to CoolProp
[ Info: Path /home/prado/.julia/dev/CoolProp exists and looks like the correct package, using existing path instead of cloning
Resolving package versions...
Updating ~/.julia/environments/v1.1/Project.toml
[no changes]
Updating ~/.julia/environments/v1.1/Manifest.toml

Then I tried:
Julia> Pkg.Build("CoolProp")
%with the following message:

Building CoolProp → ~/.julia/dev/CoolProp/deps/build.log
Resolving package versions...
┌ Error: Error building CoolProp:
│ ERROR: LoadError: ArgumentError: isdefined: too few arguments (expected 2)
│ Stacktrace:
│ [1] top-level scope at /home/prado/.julia/dev/CoolProp/deps/build.jl:6
│ [2] include at ./boot.jl:317 [inlined]
│ [3] include_relative(::Module, ::String) at ./loading.jl:1041
│ [4] include(::Module, ::String) at ./sysimg.jl:29
│ [5] include(::String) at ./client.jl:388
│ [6] top-level scope at none:0
│ in expression starting at /home/prado/.julia/dev/CoolProp/deps/build.jl:5

I also tried add CoolProp directly using Pkg:
Julia> Pkg.add("CoolProp")
%with the following message:

Resolving package versions...
Updating ~/.julia/environments/v1.1/Project.toml
[no changes]
Updating ~/.julia/environments/v1.1/Manifest.toml

Then I tried:
Julia> using CoolProp
%with the following message:

[ Info: Precompiling CoolProp [e084ae63-2819-5025-826e-f8e611a84251]
ERROR: LoadError: UndefVarError: Libdl not defined
Stacktrace:
[1] top-level scope at none:0
[2] include at ./boot.jl:317 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1041
[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:389
[8] top-level scope at ./none:3
in expression starting at /home/prado/.julia/dev/CoolProp/src/CoolProp.jl:1
ERROR: Failed to precompile CoolProp [e084ae63-2819-5025-826e-f8e611a84251] to /home/prado/.julia/compiled/v1.1/CoolProp/TgXq7.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] macro expansion at ./logging.jl:313 [inlined]
[3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1187
[4] macro expansion at ./logging.jl:311 [inlined]
[5] _require(::Base.PkgId) at ./loading.jl:944
[6] require(::Base.PkgId) at ./loading.jl:855
[7] macro expansion at ./logging.jl:311 [inlined]
[8] require(::Module, ::Symbol) at ./loading.jl:837

Tag a release?

Hi, it would be nice if this package could get a release in the Julia general registry, that way it will work nicely with the new Pluto notebook integrated package manager.

Does not work for Julia 1.6.0 on Windows

           _

_ _ ()_ | Documentation: https://docs.julialang.org
() | () () |
_ _ | | __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ ` | |
| | |
| | | | (
| | | Version 1.6.0 (2021-03-24)
/ |_'|||_'_| | Official https://julialang.org/ release
|__/ |

julia> using Pkg

julia> Pkg.clone("https://github.com/vimalaad/CoolProp.jl.git")
ERROR: UndefVarError: clone not defined
Stacktrace:
[1] getproperty(x::Module, f::Symbol)
@ Base .\Base.jl:26
[2] top-level scope
@ REPL[2]:1

julia> Pkg.add("https://github.com/vimalaad/CoolProp.jl.git")
ERROR: https://github.com/vimalaad/CoolProp.jl.git is not a valid package name
The argument appears to be a URL or path, perhaps you meant Pkg.add(url="...") or Pkg.add(path="...").
Stacktrace:
[1] pkgerror(msg::String)
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:55
[2] check_package_name(x::String, mode::Symbol)
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:56
[3] #94
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:149 [inlined]
[4] foreach
@ .\abstractarray.jl:2141 [inlined]
[5] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:149
[6] add
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:148 [inlined]
[7] add(pkgs::Vector{Pkg.Types.PackageSpec}; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:73
[8] add
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:72 [inlined]
[9] #add#21
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:70 [inlined]
[10] add
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:70 [inlined]
[11] #add#20
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:69 [inlined]
[12] add(pkg::String)
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:69
[13] top-level scope
@ REPL[3]:1

(@v1.6) pkg> add https://github.com/vimalaad/CoolProp.jl.git
Cloning git-repo https://github.com/vimalaad/CoolProp.jl.git
Updating git-repo https://github.com/vimalaad/CoolProp.jl.git
ERROR: could not find project file in package at https://github.com/vimalaad/CoolProp.jl.git maybe subdir needs to be specified

(@v1.6) pkg> build CoolProp
ERROR: The following package names could not be resolved:

  • CoolProp (not found in project or manifest)

Where is libcoolprop defined?

I've looked through pretty much every source file here and don't seem to see how this package actually downloads the CoolProp shared library and then creates the Global Variable libcoolprop that each ccall() accepts.

Putting a breakpoint in a function clearly shows that CoolProp.jl has the library copied into the package folder, and that the Global libcoolprop is defined, but I'm wondering how this actually gets set during the package install process.

Create PropsSImulti()

I think we should look into adding this call to this package to leverage single AbstractState setup if a user wants to pull lots of combinations of input parameters.

Currently the options are to use the low level interface and loop over AbstractState updates or to loop (or dot syntax) over PropsSI() which instantiates a new AbstractState each time. For things like REFPROP, this is a painful performance hit.

LoadError after building package

I installed the CoolProp package with:

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

Then tried:

using CoolProp

I received the following error:

LoadError: LoadError: syntax: "<" is not a unary operator
while loading C:\Users\craig\AppData\Local\JuliaPro-0.6.2.1\pkgs-0.6.2.1\v0.6\CoolProp\src../deps/lib/CoolProp.jl, in expression starting on line 1
while loading C:\Users\craig\AppData\Local\JuliaPro-0.6.2.1\pkgs-0.6.2.1\v0.6\CoolProp\src\CoolProp.jl, in expression starting on line 12
in require at base\loading.jl:405
in _require at base\loading.jl:490
in eval at base\boot.jl:235
in include_from_node1 at base\loading.jl:576
in include at base\sysimg.jl:14
in include_from_node1 at base\loading.jl:576

`AbstractState_get_mole_fractions_satState` is not available as a julia-wrapped function

AbstractState_get_mole_fractions_satState is not currently available in this repository, while it is available through the python interface. See the definition of the function here link

Without this, you cannot find vapor and liquid fractions of a mixture. I have done this successfullyalready in Julia using Pycall; however, I have found it is significantly slower when comparing other existing CoolProp.jl calls to their python analogs. This has become problematic with my work which requires iterative solving. Making this function available in CoolProp.jl will be helpful for my issue, specifically, and for others that might run into the same issue down the road.

Unable to return `fugacity` lookups using the julia wrapper

CoolProp.jl is missing functions that allow for returning fugacity and fugacity coefficients. It was found that when trying to create the julia wrapper functions, seen below, that they errored out because the current CoolProp_jll pkg does not have proper functions that are compatible to wrap for use in Julia (it does work when using Pycall however); therefore, enabling this will first require a change in CoolProp_jll and then a change here in this repository.

For example,

AbstractState_keyed_output(handle, CoolProp.get_param_index("fugacity"))

Expected behavior: fugacity (or fugacity vector) returned

Actual behavior: CoolProp: Unknown parameter: fugacity

or

AbstractState_get_fugacity(handle, i)

Expected behavior: fugacity of species i returned

Actual behavior: ERROR: UndefVarError: AbstractState_get_fugacity not defined

We have created an issue within the CoolProp repo here

Does not work on Julia 1.8?

On Julia 1.8 on an m1 mac I get the following error

   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.8.0 (2022-08-17)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using CoolProp
[ Info: Precompiling CoolProp [e084ae63-2819-5025-826e-f8e611a84251]
ERROR: LoadError: UndefVarError: libcoolprop not defined
Stacktrace:
 [1] get_global_param_string(key::String)
   @ CoolProp ~/.julia/packages/CoolProp/nFTC5/src/CoolProp.jl:448
 [2] top-level scope
   @ ~/.julia/packages/CoolProp/nFTC5/src/CoolProp.jl:612
 [3] include
   @ ./Base.jl:419 [inlined]
 [4] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
   @ Base ./loading.jl:1554
 [5] top-level scope
   @ stdin:1
in expression starting at /Users/jt52/.julia/packages/CoolProp/nFTC5/src/CoolProp.jl:2
in expression starting at stdin:1
ERROR: Failed to precompile CoolProp [e084ae63-2819-5025-826e-f8e611a84251] to /Users/jt52/.julia/compiled/v1.8/CoolProp/jl_O6gkfS.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
   @ Base ./loading.jl:1705
 [3] compilecache
   @ ./loading.jl:1649 [inlined]
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1337
 [5] _require_prelocked(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1200
 [6] macro expansion
   @ ./loading.jl:1180 [inlined]
 [7] macro expansion
   @ ./lock.jl:223 [inlined]
 [8] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1144

My versioninfo is

julia> versioninfo()
Julia Version 1.8.0
Commit 5544a0fab76 (2022-08-17 13:38 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.3.0)
  CPU: 10 × Apple M1 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
  Threads: 1 on 8 virtual cores

It works fine on Julia 1.7 on the same system.

CoolProp does not load on Julia 0.7

Loading CoolProp on Julia 0.7 return

"ERROR: LoadError: UndefVarError: include not defined".

Substituting Base.include instead of include at "~.julia\dev\CoolProp\src\CoolProp.jl:12" fixes this error (although a new warning is introduced) but the following new error pops up:

ERROR: KeyError: key CoolProp [e084ae63-2819-5025-826e-f8e611a84251] not found

I am stuck at this point. Do you have any insights to fix this?

Mixing Fluids

Is it possible to get the CP wrapper around mixing fluids cases as well? As of now the CoolProp.jl can only handle pure fluids.

I have tried this reference Link in Julia but

apply_simple_mixing_rule()

is not defined.

Installing CoolProp for Julia 1.6.3 on a Windows 11 operating system

Hi,

I am trying to load the CoolProp package for windows for Julia 1.6.3 as below but get an error, as below. Could someone guide me through the steps.

Thanks,

Peter

# Test CoolProp
import Pkg
Pkg.clone("https://github.com/vimalaad/CoolProp.jl.git")
Pkg.build("CoolProp") # to download the latest binaries

ERROR: LoadError: UndefVarError: clone not defined
Stacktrace:
 [1] getproperty(x::Module, f::Symbol)
   @ Base .\Base.jl:26
 [2] top-level scope
   @ c:\Users\peter\Documents\Julia_Code\GH_Model_Final\Test CoolProp.jl:3
in expression starting at c:\Users\peter\Documents\Julia_Code\GH_Model_Final\Test CoolProp.jl:3

Change GitHub "About" descriptor for better discoverability

At the moment, CoolProp.jl is described as "About: Julia package", and the README.md doesn't describe much about what the package does (besides referring to CoolProp). As a result, the package doesn't appear in any related searches on JuliaHub.

Does not work for Julia 1.3 on Windows

I tried to install it on Windows 64 bit machine, using Julia 1.3 and it fails:

Error: Error building `CoolProp`:
ERROR: LoadError: ArgumentError: isdefined: too few arguments (expected 2)
Stacktrace:
 [1] top-level scope at C:\Users\Sam M\.julia\dev\CoolProp\deps\build.jl:6
 [2] include at .\boot.jl:328 [inlined]
 [3] include_relative(::Module, ::String) at .\loading.jl:1105
 [4] include(::Module, ::String) at .\Base.jl:31
 [5] include(::String) at .\client.jl:424
 [6] top-level scope at none:5
in expression starting at C:\Users\Sam\.julia\dev\CoolProp\deps\build.jl:5
@ Pkg.Operations D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib
1.3\Pkg\src\backwards_compatible_isolation.jl:649

Any way this can be solved?

Thanks in advance!

`AbstractState` struct

when using PropsSI, a new abstract state is created with each call. one option would be to do something like:

mutable struct AbstractState #mutable, to register finalizers
  handle::Clong
  function AbstractState(x::Integer)
    res = new(Clong(x))
    finalizer(AbstractState_free,res) #register finalizer, to free up memory when `AbstractState` goes out of scope
    return res
  end
end

function AbstractState_free(x::AbstractState)
  return AbstractState_free(x.handle)
end

function PropsSI(val1,prop1,val2,prop2,fluid::AbstractState)
  # do low level call, fluid is mutated
end

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.