Git Product home page Git Product logo

coolprop / coolprop Goto Github PK

View Code? Open in Web Editor NEW
742.0 48.0 299.0 28.77 MB

Thermophysical properties for the masses

Home Page: http://coolprop.org/

License: MIT License

Shell 0.55% Makefile 0.49% Python 25.66% CSS 0.15% HTML 0.19% C++ 56.74% Pascal 0.73% Scilab 0.03% CMake 2.35% C 5.64% Fortran 0.13% Lua 0.17% MATLAB 0.28% Mathematica 0.08% C# 1.14% Julia 1.16% TeX 2.39% Batchfile 0.06% Jupyter Notebook 1.99% Dockerfile 0.07%
fluid-properties thermodynamics

coolprop'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's People

Contributors

arnab-mahanti avatar bru32 avatar bungle avatar dana-laboratory avatar dcprojects avatar friederikeboehm avatar fsonnino avatar henningjp avatar hishamhm avatar howardcheung avatar ianhbell avatar ibell avatar jfcoronel avatar jjfpcsi1 avatar jmarrec avatar jonwel avatar jowr avatar mikekaganski avatar msaitta-mpr avatar portyanikhin avatar postmath avatar rod-persky avatar scls19fr avatar spinnau avatar squoilin avatar thorade avatar tobias-loew avatar wandadars avatar whunter7 avatar zmeri 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  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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coolprop's Issues

Working code in Python of v5

Issue by ibell
Tuesday May 06, 2014 at 11:22 GMT
Originally opened as CoolProp/CoolProp-museum#8


@jowr - check it out!

This is based on SWIG since I can't get xdress+cython working so far on windows:

import CoolProp

for backend,fluid in [("REFPROP","Ethane&Propane"), ("HEOS","Ethane&Propane")]:
    S = CoolProp.AbstractState_factory(backend, fluid)
    S.set_mole_fractions([0.5,0.5])
    S.update(CoolProp.PT_INPUTS, 1e5, 300)
    print S.rhomolar()

[CLOSED] High level API for CoolProp

Issue by ibell
Monday May 05, 2014 at 21:52 GMT
Originally opened as CoolProp/CoolProp-museum#5


@jowr, @squoilin etc.

I have fixed and added almost all the flash routines for pure and pseudo-pure fluids - see the v5 branch. The first set of rough consistency tests all pass for REFPROP. CoolProp still has a few cases that fail, and I need to add a few more flashes yet. I'm currently revisiting the high-level interface, and I don't know what the best way to handle the high level interface is. A couple of options:

double r0 = PropsSI("Dmass","T",298,"P",101325,"REFPROP-Propane[0.5],Ethane[0.5]");
std::vector<double> z(2,0.5);
double r1 = PropsSI("Dmass","T",298,"P",101325,"REFPROP-Propane,Ethane", z);
// and/or
double r2 = PropsSIZ("Dmass","T",298,"P",101325,"REFPROP-Propane,Ethane", z);

Basically the options are some combination of
a) Encode the mole fractions in the string (definitely will be supported), need to decide on the delimiters though. Perhaps we just stick with what we did before. I like '-' between backend and fluids, but some fluids ('n-Propane', etc.) have a '-' in the name. Or we could use "::" to get something like "REFPROP::Water". Would be kind of like C++, which has some appeal. I am less sure about the delimiters for mole fractions.
b) Overload (?) the PropsSI function with a form where you pass molar(!) fractions as the last parameter
c) Another function name entirely that takes mole fractions

Fit "melting" line

The "end" of the equation of state in the solid/liquid domain can be approximated by seeing where the EOS starts having wonky behavior, some sort of deviation from the bulk behavior perhaps as a rough estimation of the melting line. Maybe finding the point where dpdrho is negative, or something like that.

Or at least this method could be used in order to yield sensible limits for the equation of state.

JSON_to_CPP.py

Trying to build the header files with JSON_to_CPP.py fails with python 3.3:

2>  C:/Users/Rodney Persky/Downloads/CoolProp-master/CoolProp-master/dev/JSON_to_CPP.py
2>  *** Injecting saturation ancillary curves
2>  *** Injecting surface tension curves from Mulero
2>  C:\Users\Rodney Persky\Downloads\CoolProp-master\CoolProp-master\dev\fluids\Decafluorobutane.json does not exist
2>  C:\Users\Rodney Persky\Downloads\CoolProp-master\CoolProp-master\dev\fluids\D2O.json does not exist
2>  C:\Users\Rodney Persky\Downloads\CoolProp-master\CoolProp-master\dev\fluids\Perfluoropentane.json does not exist
2>  C:\Users\Rodney Persky\Downloads\CoolProp-master\CoolProp-master\dev\fluids\R115.json does not exist
2>  C:\Users\Rodney Persky\Downloads\CoolProp-master\CoolProp-master\dev\fluids\R245ca.json does not exist
2>  C:\Users\Rodney Persky\Downloads\CoolProp-master\CoolProp-master\dev\fluids\Trifluoroiodomethane.json does not exist
2>  *** Injecting environmental data from DTU
2>  {'115-07-1': {'GWP20': -1.0, 'ASHRAE34': 'A3', 'HH': 1, 'Name': 'Propylene', 'ODP': -1.0, 'FH': 4, 'GWP100': 3.1, 'PH': 1, 'GWP500': -1.0}, '463-58-1': {'GWP20': 97.0, 'ASHRAE34': 'UNKNOWN', 'HH': 3, 'Name': 'CarbonylSulfide', 'ODP': -1.0, 'FH': 4, 'GWP100': 27.0, 'PH': 1, 'GWP500': -1.0}, '306-83-2': {'GWP20': 273.0, 'ASHRAE34': 'B1', 'HH': 2, 'Name': 'R123', 'ODP': 0.02, 'FH': 1, 'GWP100': 77.0, 'PH': 0, 'GWP500': 24.0}, '75-10-5': {'GWP20': 2330.0, 'ASHRAE34': 'A2', 'HH': 1, 'Name': 'R32', 'ODP': -1.0, 'FH': 4, 'GWP100': 675.0, 'PH': 1, 'GWP500': 205.0}, '75-68-3': {'GWP20': 5490.0, 'ASHRAE34': 'A2', 'HH': 1, 'Name': 'R142b', 'ODP': 0.07, 'FH': 1, 'GWP100': 2310.0, 'PH': 0, 'GWP500': 705.0}, '141-63-9': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 1, 'Name': 'MD3M', 'ODP': -1.0, 'FH': 2, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '1333-74-0p': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': -1, 'Name': 'ParaHydrogen', 'ODP': -1.0, 'FH': -1, 'GWP100': -1.0, 'PH': -1, 'GWP500': -1.0}, '353-36-6': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': -1, 'Name': 'R161', 'ODP': -1.0, 'FH': -1, 'GWP100': 10.0, 'PH': -1, 'GWP500': -1.0}, '616-38-6': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 2, 'Name': 'DimethylCarbonate', 'ODP': -1.0, 'FH': 3, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '112-39-0': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 1, 'Name': 'MethylPalmitate', 'ODP': -1.0, 'FH': 0, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '75-69-4': {'GWP20': 6730.0, 'ASHRAE34': 'A1', 'HH': 1, 'Name': 'R11', 'ODP': 1.0, 'FH': 1, 'GWP100': 4750.0, 'PH': 0, 'GWP500': 1620.0}, '1333-74-0o': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': -1, 'Name': 'OrthoHydrogen', 'ODP': -1.0, 'FH': -1, 'GWP100': -1.0, 'PH': -1, 'GWP500': -1.0}, '75-43-4': {'GWP20': 530.0, 'ASHRAE34': 'B1', 'HH': -1, 'Name': 'R21', 'ODP': -1.0, 'FH': -1, 'GWP100': 151.0, 'PH': -1, 'GWP500': 46.0}, '110-82-7': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 1, 'Name': 'CycloHexane', 'ODP': -1.0, 'FH': 3, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '10024-97-2': {'GWP20': 290.0, 'ASHRAE34': 'UNKNOWN', 'HH': 1, 'Name': 'NitrousOxide', 'ODP': -1.0, 'FH': 0, 'GWP100': 320.0, 'PH': 0, 'GWP500': 180.0}, '7664-41-7': {'GWP20': -1.0, 'ASHRAE34': 'B2', 'HH': 3, 'Name': 'Ammonia', 'ODP': -1.0, 'FH': 1, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, 'R407C.PPF': {'GWP20': -1.0, 'ASHRAE34': 'A1', 'HH': 1, 'Name': 'R407C', 'ODP': -1.0, 'FH': 1, 'GWP100': 1800.0, 'PH': 0, 'GWP500': -1.0}, '75-45-6': {'GWP20': 5160.0, 'ASHRAE34': 'A1', 'HH': 1, 'Name': 'R22', 'ODP': 0.05, 'FH': 1, 'GWP100': 1810.0, 'PH': 0, 'GWP500': 549.0}, '74-98-6': {'GWP20': -1.0, 'ASHRAE34': 'A3', 'HH': 1, 'Name': 'n-Propane', 'ODP': -1.0, 'FH': 4, 'GWP100': 3.0, 'PH': 0, 'GWP500': -1.0}, '67-56-1': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 2, 'Name': 'Methanol', 'ODP': -1.0, 'FH': 3, 'GWP100': 2.8, 'PH': 0, 'GWP500': -1.0}, '107-51-7': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 1, 'Name': 'MDM', 'ODP': -1.0, 'FH': 2, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '115-11-7': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 1, 'Name': 'Isobutene', 'ODP': -1.0, 'FH': 4, 'GWP100': -1.0, 'PH': 2, 'GWP500': -1.0}, '7789-20-0': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': -1, 'Name': 'DeuteriumOxide', 'ODP': -1.0, 'FH': -1, 'GWP100': -1.0, 'PH': -1, 'GWP500': -1.0}, '115-25-3': {'GWP20': 7310.0, 'ASHRAE34': 'A1', 'HH': 1, 'Name': 'RC318', 'ODP': -1.0, 'FH': 0, 'GWP100': 10300.0, 'PH': 2, 'GWP500': 14700.0}, '142-82-5': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 1, 'Name': 'n-Heptane', 'ODP': -1.0, 'FH': 3, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '108-88-3': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 2, 'Name': 'Toluene', 'ODP': -1.0, 'FH': 3, 'GWP100': 3.3, 'PH': 0, 'GWP500': -1.0}, '420-46-2': {'GWP20': 5890.0, 'ASHRAE34': 'A2', 'HH': 1, 'Name': 'R143a', 'ODP': -1.0, 'FH': 1, 'GWP100': 4470.0, 'PH': 0, 'GWP500': 1590.0}, '75-46-7': {'GWP20': 12000.0, 'ASHRAE34': 'A1', 'HH': 1, 'Name': 'R23', 'ODP': -1.0, 'FH': 1, 'GWP100': 14800.0, 'PH': 0, 'GWP500': 12200.0}, '7439-90-9': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 0, 'Name': 'Krypton', 'ODP': -1.0, 'FH': 0, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '679-86-7': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': -1, 'Name': 'R245CA', 'ODP': -1.0, 'FH': -1, 'GWP100': -1.0, 'PH': -1, 'GWP500': -1.0}, '75-19-4': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 2, 'Name': 'CycloPropane', 'ODP': -1.0, 'FH': 2, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '110-54-3': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 2, 'Name': 'n-Hexane', 'ODP': -1.0, 'FH': 3, 'GWP100': 3.1, 'PH': 0, 'GWP500': -1.0}, '74-99-7': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 1, 'Name': 'Propyne', 'ODP': -1.0, 'FH': 4, 'GWP100': -1.0, 'PH': 1, 'GWP500': -1.0}, '1717-00-6': {'GWP20': 2250.0, 'ASHRAE34': 'UNKNOWN', 'HH': 1, 'Name': 'R141b', 'ODP': 0.12, 'FH': 1, 'GWP100': 725.0, 'PH': 0, 'GWP500': 220.0}, '109-66-0': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 2, 'Name': 'n-Pentane', 'ODP': -1.0, 'FH': 4, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '78-78-4': {'GWP20': -1.0, 'ASHRAE34': 'A3', 'HH': 1, 'Name': 'Isopentane', 'ODP': -1.0, 'FH': 4, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '67-64-1': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 2, 'Name': 'Acetone', 'ODP': -1.0, 'FH': 3, 'GWP100': 0.5, 'PH': 0, 'GWP500': -1.0}, '111-84-2': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 2, 'Name': 'n-Nonane', 'ODP': -1.0, 'FH': 3, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '593-53-3': {'GWP20': 323.0, 'ASHRAE34': 'UNKNOWN', 'HH': 2, 'Name': 'R41', 'ODP': -1.0, 'FH': 3, 'GWP100': 92.0, 'PH': 2, 'GWP500': 28.0}, '2837-89-0': {'GWP20': 2070.0, 'ASHRAE34': 'A1', 'HH': 1, 'Name': 'R124', 'ODP': 0.022, 'FH': 1, 'GWP100': 609.0, 'PH': 0, 'GWP500': 185.0}, '76-19-7': {'GWP20': 6310.0, 'ASHRAE34': 'A1', 'HH': 2, 'Name': 'R218', 'ODP': -1.0, 'FH': 1, 'GWP100': 8830.0, 'PH': 1, 'GWP500': 12500.0}, '7783-54-2': {'GWP20': 12300.0, 'ASHRAE34': 'UNKNOWN', 'HH': 1, 'Name': 'NitrogenTrifluoride', 'ODP': -1.0, 'FH': 0, 'GWP100': 17200.0, 'PH': 3, 'GWP500': 20700.0}, '107-46-0': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 2, 'Name': 'MM', 'ODP': -1.0, 'FH': 3, 'GWP100': -1.0, 'PH': 1, 'GWP500': -1.0}, '431-89-0': {'GWP20': 5310.0, 'ASHRAE34': 'A1', 'HH': 1, 'Name': 'R227EA', 'ODP': -1.0, 'FH': 0, 'GWP100': 3220.0, 'PH': 0, 'GWP500': 1040.0}, '630-08-0': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 1, 'Name': 'CarbonMonoxide', 'ODP': -1.0, 'FH': 4, 'GWP100': -1.0, 'PH': 3, 'GWP500': -1.0}, '7440-01-9': {'GWP20': -1.0, 'ASHRAE34': 'A1', 'HH': 0, 'Name': 'Neon', 'ODP': -1.0, 'FH': 0, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '124-38-9': {'GWP20': 1.0, 'ASHRAE34': 'A1', 'HH': 1, 'Name': 'CarbonDioxide', 'ODP': -1.0, 'FH': 0, 'GWP100': 1.0, 'PH': 0, 'GWP500': 1.0}, '406-58-6': {'GWP20': 2520.0, 'ASHRAE34': 'UNKNOWN', 'HH': -1, 'Name': 'R365MFC', 'ODP': -1.0, 'FH': -1, 'GWP100': 794.0, 'PH': -1, 'GWP500': 241.0}, '112-62-9': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 2, 'Name': 'MethylOleate', 'ODP': -1.0, 'FH': 1, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '75-73-0': {'GWP20': 5210.0, 'ASHRAE34': 'UNKNOWN', 'HH': -1, 'Name': 'R14', 'ODP': -1.0, 'FH': -1, 'GWP100': 7390.0, 'PH': -1, 'GWP500': 11200.0}, '7440-63-3': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 0, 'Name': 'Xenon', 'ODP': -1.0, 'FH': 0, 'GWP100': -1.0, 'PH': 3, 'GWP500': -1.0}, '75-72-9': {'GWP20': 10800.0, 'ASHRAE34': 'A1', 'HH': -1, 'Name': 'R13', 'ODP': -1.0, 'FH': -1, 'GWP100': 14400.0, 'PH': -1, 'GWP500': 16400.0}, '754-12-1': {'GWP20': -1.0, 'ASHRAE34': 'A2L', 'HH': 1, 'Name': 'R1234yf', 'ODP': -1.0, 'FH': 2, 'GWP100': 4.0, 'PH': 0, 'GWP500': -1.0}, '64-17-5': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 2, 'Name': 'Ethanol', 'ODP': -1.0, 'FH': 3, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '112-61-8': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 0, 'Name': 'MethylStearate', 'ODP': -1.0, 'FH': 1, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '463-82-1': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 1, 'Name': 'Neopentane', 'ODP': -1.0, 'FH': 4, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '75-71-8': {'GWP20': 11000.0, 'ASHRAE34': 'A1', 'HH': 1, 'Name': 'R12', 'ODP': 1.0, 'FH': 1, 'GWP100': 10900.0, 'PH': 0, 'GWP500': 5200.0}, '556-67-2': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': -1, 'Name': 'D4', 'ODP': -1.0, 'FH': -1, 'GWP100': -1.0, 'PH': -1, 'GWP500': -1.0}, 'R507A.PPF': {'GWP20': -1.0, 'ASHRAE34': 'A1', 'HH': 1, 'Name': 'R507A', 'ODP': -1.0, 'FH': 1, 'GWP100': 3985.0, 'PH': 0, 'GWP500': -1.0}, '76-16-4': {'GWP20': -1.0, 'ASHRAE34': 'A1', 'HH': 1, 'Name': 'R116', 'ODP': -1.0, 'FH': 0, 'GWP100': -1.0, 'PH': 1, 'GWP500': -1.0}, 'R404A.PPF': {'GWP20': -1.0, 'ASHRAE34': 'A1', 'HH': 1, 'Name': 'R404A', 'ODP': 0.0, 'FH': 1, 'GWP100': 3900.0, 'PH': 0, 'GWP500': -1.0}, '7782-44-7': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 0, 'Name': 'Oxygen', 'ODP': -1.0, 'FH': 0, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '106-97-8': {'GWP20': -1.0, 'ASHRAE34': 'A3', 'HH': 1, 'Name': 'n-Butane', 'ODP': -1.0, 'FH': 4, 'GWP100': 3.0, 'PH': 0, 'GWP500': -1.0}, '75-28-5': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 1, 'Name': 'IsoButane', 'ODP': -1.0, 'FH': 4, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '7732-18-5': {'GWP20': -1.0, 'ASHRAE34': 'A1', 'HH': 0, 'Name': 'Water', 'ODP': -1.0, 'FH': 0, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '7727-37-9': {'GWP20': -1.0, 'ASHRAE34': 'A1', 'HH': 0, 'Name': 'Nitrogen', 'ODP': -1.0, 'FH': 0, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '107-83-5': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 2, 'Name': 'Isohexane', 'ODP': -1.0, 'FH': 3, 'GWP100': -1.0, 'PH': 1, 'GWP500': -1.0}, '29118-24-9': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 1, 'Name': 'R1234ze(E)', 'ODP': -1.0, 'FH': 2, 'GWP100': 6.0, 'PH': 0, 'GWP500': -1.0}, '112-40-3': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 2, 'Name': 'n-Dodecane', 'ODP': -1.0, 'FH': 2, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '7446-09-5': {'GWP20': -1.0, 'ASHRAE34': 'B1', 'HH': 3, 'Name': 'SulfurDioxide', 'ODP': -1.0, 'FH': 0, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '7782-41-4': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 4, 'Name': 'Fluorine', 'ODP': -1.0, 'FH': 3, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '141-62-8': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 1, 'Name': 'MD2M', 'ODP': -1.0, 'FH': 2, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '124-18-5': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 2, 'Name': 'n-Decane', 'ODP': -1.0, 'FH': 2, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '1333-74-0': {'GWP20': -1.0, 'ASHRAE34': 'A3', 'HH': 0, 'Name': 'Hydrogen', 'ODP': -1.0, 'FH': 4, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '811-97-2': {'GWP20': 3830.0, 'ASHRAE34': 'A1', 'HH': 1, 'Name': 'R134a', 'ODP': -1.0, 'FH': 1, 'GWP100': 1430.0, 'PH': 0, 'GWP500': 435.0}, '287-92-3': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 2, 'Name': 'Cyclopentane', 'ODP': -1.0, 'FH': 3, 'GWP100': -1.0, 'PH': 1, 'GWP500': -1.0}, 'R410A.PPF': {'GWP20': -1.0, 'ASHRAE34': 'A1', 'HH': 1, 'Name': 'R410A', 'ODP': -1.0, 'FH': 1, 'GWP100': 2088.0, 'PH': 0, 'GWP500': -1.0}, '460-73-1': {'GWP20': 3380.0, 'ASHRAE34': 'B1', 'HH': 2, 'Name': 'R245fa', 'ODP': -1.0, 'FH': 0, 'GWP100': 1030.0, 'PH': 1, 'GWP500': 314.0}, '624-64-6': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 0, 'Name': 'trans-2-Butene', 'ODP': -1.0, 'FH': 4, 'GWP100': -1.0, 'PH': 1, 'GWP500': -1.0}, '590-18-1': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 0, 'Name': 'cis-2-Butene', 'ODP': -1.0, 'FH': 4, 'GWP100': -1.0, 'PH': 1, 'GWP500': -1.0}, '690-39-1': {'GWP20': 8100.0, 'ASHRAE34': 'A1', 'HH': 1, 'Name': 'R236FA', 'ODP': -1.0, 'FH': 0, 'GWP100': 9810.0, 'PH': 1, 'GWP500': 7660.0}, '76-14-2': {'GWP20': 8040.0, 'ASHRAE34': 'A1', 'HH': 1, 'Name': 'R114', 'ODP': 1.0, 'FH': 0, 'GWP100': 10000.0, 'PH': 0, 'GWP500': 8730.0}, 'AIR.PPF': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 0, 'Name': 'Air', 'ODP': -1.0, 'FH': 0, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '354-33-6': {'GWP20': 6350.0, 'ASHRAE34': 'UNKNOWN', 'HH': 1, 'Name': 'R125', 'ODP': -1.0, 'FH': 1, 'GWP100': 3500.0, 'PH': 0, 'GWP500': 1100.0}, '7440-59-7': {'GWP20': -1.0, 'ASHRAE34': 'A1', 'HH': 0, 'Name': 'Helium', 'ODP': -1.0, 'FH': 0, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '7440-37-1': {'GWP20': 0.0, 'ASHRAE34': 'A1', 'HH': 0, 'Name': 'Argon', 'ODP': -1.0, 'FH': 0, 'GWP100': 0.0, 'PH': 0, 'GWP500': 0.0}, '75-37-6': {'GWP20': 437.0, 'ASHRAE34': 'A2', 'HH': 1, 'Name': 'R152A', 'ODP': -1.0, 'FH': 4, 'GWP100': 124.0, 'PH': 1, 'GWP500': 38.0}, '7783-06-4': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 4, 'Name': 'HydrogenSulfide', 'ODP': -1.0, 'FH': 4, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '76-15-3': {'GWP20': 5310.0, 'ASHRAE34': 'A1', 'HH': 1, 'Name': 'R115', 'ODP': 0.44, 'FH': 0, 'GWP100': 7370.0, 'PH': 1, 'GWP500': 9990.0}, '301-00-8': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': -1, 'Name': 'MethylLinolenate', 'ODP': -1.0, 'FH': -1, 'GWP100': -1.0, 'PH': -1, 'GWP500': -1.0}, '540-97-6': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': -1, 'Name': 'D6', 'ODP': -1.0, 'FH': -1, 'GWP100': -1.0, 'PH': -1, 'GWP500': -1.0}, '541-02-6': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': -1, 'Name': 'D5', 'ODP': -1.0, 'FH': -1, 'GWP100': -1.0, 'PH': -1, 'GWP500': -1.0}, '431-63-0': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': -1, 'Name': 'R236EA', 'ODP': -1.0, 'FH': -1, 'GWP100': 1200.0, 'PH': -1, 'GWP500': -1.0}, '2551-62-4': {'GWP20': 16300.0, 'ASHRAE34': 'UNKNOWN', 'HH': 1, 'Name': 'SulfurHexafluoride', 'ODP': -1.0, 'FH': 0, 'GWP100': 22800.0, 'PH': 0, 'GWP500': 32600.0}, '111-65-9': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 2, 'Name': 'n-Octane', 'ODP': -1.0, 'FH': 3, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '115-10-6': {'GWP20': 1.0, 'ASHRAE34': 'A3', 'HH': 1, 'Name': 'DimethylEther', 'ODP': -1.0, 'FH': 4, 'GWP100': 1.0, 'PH': 2, 'GWP500': -1.0}, '76-13-1': {'GWP20': 6540.0, 'ASHRAE34': 'A1', 'HH': 1, 'Name': 'R113', 'ODP': 1.0, 'FH': 0, 'GWP100': 6130.0, 'PH': 0, 'GWP500': 2700.0}, '112-63-0': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': -1, 'Name': 'MethylLinoleate', 'ODP': -1.0, 'FH': -1, 'GWP100': -1.0, 'PH': -1, 'GWP500': -1.0}, '74-82-8': {'GWP20': 72.0, 'ASHRAE34': 'A3', 'HH': 0, 'Name': 'Methane', 'ODP': -1.0, 'FH': 4, 'GWP100': 25.0, 'PH': 0, 'GWP500': 7.6}, '74-84-0': {'GWP20': -1.0, 'ASHRAE34': 'A3', 'HH': 1, 'Name': 'Ethane', 'ODP': -1.0, 'FH': 4, 'GWP100': 2.9, 'PH': 0, 'GWP500': -1.0}, '106-98-9': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 0, 'Name': '1-Butene', 'ODP': -1.0, 'FH': 4, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}, '74-85-1': {'GWP20': -1.0, 'ASHRAE34': 'A3', 'HH': 2, 'Name': 'Ethylene', 'ODP': -1.0, 'FH': 4, 'GWP100': 6.8, 'PH': 2, 'GWP500': -1.0}, '7782-39-0': {'GWP20': 0.0, 'ASHRAE34': 'UNKNOWN', 'HH': -1, 'Name': 'Deuterium', 'ODP': -1.0, 'FH': -1, 'GWP100': 0.0, 'PH': -1, 'GWP500': 0.0}, '71-43-2': {'GWP20': -1.0, 'ASHRAE34': 'UNKNOWN', 'HH': 2, 'Name': 'Benzene', 'ODP': -1.0, 'FH': 3, 'GWP100': -1.0, 'PH': 0, 'GWP500': -1.0}}
2>  Traceback (most recent call last):
2>    File "C:/Users/Rodney Persky/Downloads/CoolProp-master/CoolProp-master/dev/JSON_to_CPP.py", line 66, in <module>
2>      TO_CPP(args.path)
2>    File "C:/Users/Rodney Persky/Downloads/CoolProp-master/CoolProp-master/dev/JSON_to_CPP.py", line 26, in TO_CPP
2>      package_json.package_json(root_dir)
2>    File "C:\Users\Rodney Persky\Downloads\CoolProp-master\CoolProp-master\dev\package_json.py", line 250, in package_json
2>      inject_environmental_data(root_dir)
2>    File "C:\Users\Rodney Persky\Downloads\CoolProp-master\CoolProp-master\dev\package_json.py", line 216, in inject_environmental_data
2>      for CAS, data in j.iteritems():
2>  AttributeError: 'dict' object has no attribute 'iteritems'

Generate header files

Compare hashes before writing new header files in order to prevent us from forcing people to rebuild the whole software.

ExternalMedia

Issue by jowr
Saturday Mar 15, 2014 at 09:10 GMT
Originally opened as CoolProp/CoolProp-museum#2


  • Port the state wrapper functions to the base class.
  • Replace setSat_p and setSat_T with setDew_p, setDew_T and setBubble_p, setBubble_T
  • Make a new interface for the incompressible fluids
  • Use Modelica to solve the ph-functions for incompressibles
  • Test the new classes on all platforms (Windows, Linux for Dymola and Windows, Linux, Mac for OpenModelica)
  • Commit code to Modelica.org SVN server
  • Update ThermoCycle to use ExternalMedia instead of CoolProp2Modelica.
  • Determine speed of static and dynamic libraries

Don't evaluate NonAnalytic terms if contribution is less than numerical precision

We can avoid the slowdowns caused by the non-analytic derivative by determining how far away from the critical point you need to be for its contribution to be less than numerical precision, and only calculating when it is above numerical precision. If contribution is less than numerical precision it will literally disappear.

coolprop.org links don't redirect

Hey @Rod-Persky I noticed a couple of problems with coolprop.org some time back but never emailed you.

It seems that any links outside of the website (sourceforge downloads for instance), are not getting redirected and they take me to a blank page. Any idea why that might be the case?

Also, in the browser web address, its always coolprop.org even as you navigate around the site. This also isn't ideal, any way we can change it?

HS reference state and humid air properties

When you change the reference state for water, it changes the enthalpies calculated for water and air, and thus the enthalpies for humid air. What to do? Some humid air tests fail now. Unit testing is essential.

calculate derivatives of residual helmholtz in parallel

Can re-use much of the derivative information about the terms - perhaps cache intermediate parts of the calculations for delta^d_k*tau^t_ketc. This term repeats in all of the derivatives. See derivative derivations for generalized power/exponential term.

Or allow user to select which derivatives are calculated in one shot, allowing for as much re-use as possible. At least the common terms could be cached.

Try to avoid any conditionals, they slow down the code and cause branch prediction failures.

CMake

Issue by jowr
Saturday Mar 15, 2014 at 08:56 GMT
Originally opened as CoolProp/CoolProp-museum#1


  • Integrate the OLD code with CMake and try to run builds on all platforms.
  • Integrate tests with CMake and try to run builds on all platforms.
  • Make a proper decision about which generated files to commit to the repository. It has to be possible to build CoolProp without CMake...

Select partial derivative based on string

Issue by ibell
Tuesday May 06, 2014 at 06:27 GMT
Originally opened as CoolProp/CoolProp-museum#6


I propose, at least for first partial derivatives, something like

"d(X)/d(Y)|Z"

which will call the correct partial derivative using the generic routine. It's not quite as nice as hard coding variables for each derivative, but then there are 6_5_4 = 120 possible triples of the 6 thermodynamic variables T,D,S,H,U,P

And for second partials, we could do something like

"d2(X)/d2(Y)|Z"

Higher order partials

Issue by ibell
Tuesday May 06, 2014 at 07:35 GMT
Originally opened as CoolProp/CoolProp-museum#7


So what do we do about the API for higher order partial derivatives? It starts to get really messy. Ideally we could support up to third partials, but second partials are already nasty enough.

See #6 for first partials.

We can express all second partials in terms of tau and delta, after a bit of math. In that way we could use a generic routine that we could easily test.

Brine properties

Should brine properties smooth into water properties? Any comments?

Move MatrixMath.h to Eigen

I added an external dependency on the Eigen framewrork and started using it in MatrixMath and PolyMath. However, we still need to convert our linear algebra solvers to make use of Eigen's features.

Use Google Test for tests

There are a few tests in the code (SpeedTest.cpp, Tests.cpp) it might be easy to split these out into their own directory Tests/ and then build them with gtest (which is easy to maintain)

Another example with DLL in python

Issue by ibell
Tuesday May 06, 2014 at 13:09 GMT
Originally opened as CoolProp/CoolProp-museum#9


from ctypes import *

CoolProp = windll.LoadLibrary("CoolProp")

PropsSI = getattr(CoolProp, '_PropsSI@32')

PropsSI.argtypes = [c_char_p, c_char_p, c_double, c_char_p, c_double, c_char_p]
PropsSI.restype = c_double

print PropsSI("Dmolar", "T", 600, "P", 1e6, "REFPROP::Nitrogen[0.5]&Methane[0.5]")
print PropsSI("Dmolar", "T", 600, "P", 1e6, "HEOS::Nitrogen[0.5]&Methane[0.5]")

Yields

199.805701116
199.805701157

Truncation/EOS error and accuracy

Hello

I am interested in evaluating a few derivatives using Coolprop, some of which are not available by default, and I wanted to know how far I can go, particularly on MATLAB, without loss of precision by truncation error or EOS inaccuracy. I am currently using Richardson extrapolation to obtain precise derivatives as I am working near the critical point, and, theoretically, I can get infinitely precise first order derivatives as long as my EOS can give me accurate results for small variations in state functions.

Let a = abs(enthalpy(p, T) - enthalpy(p + dp, T)), I found that for dp ~ 1e-10, a = 0, so the derivative cannot be evaluated. I would like to know if there are other errors which would limit even more the interval from which I can evaluate those functions.

Ethane CP messed up in 4.2. Also a problem in 5.0?

>>> import CoolProp.CoolProp as CP
>>> CP.Props("C","T",298.15,"P",101.325,"Ethane")
1.7571575494389222
>>> CP.Props("C","T",298.15,"Q",0,"Ethane")
8.05251827757817
>>> CP.Props("C","T",298.15,"Q",1,"Ethane")
10.016902109406335

Check cross-compiled code on cRIO, see if it works

We are now using smart pointers, this functionality does not exist in GCC 3.4.4 used to build shared library for cRIO, need to experiment with more robust cross-compilation. See whether plus_one example works. If it does, everything should compile properly.

generate_headers.py no longer works

@Rod-Persky I don't understand your changes to generate_headers.py - it does nothing for me right now. It hits the sys.exit and quits

path = os.path.abspath(__file__)
    path = os.path.dirname(path)
    path = os.path.dirname(path)

    if os.path.exists(os.path.join(path, ".JSON_done")):
      sys.exit()

Are you trying to have it not regenerate the headers if it doesn't need to? Under what conditions do you want it to generate the headers? Building the headers is quite quick, so why don't we just do it every time?

[CLOSED] maxiter in solvers

Issue by jowr
Monday May 12, 2014 at 12:55 GMT
Originally opened as CoolProp/CoolProp-museum#18


The solver loops simply terminate when the max amount of iterations is reached. This seems to be undesired. There is an error message that will never be printed, the exception will never be thrown.

double Newton(...)
{
...
    while ((iter < 2 || fabs(fval) > ftol) && iter < maxiter)
    {
...
        if (iter>maxiter)
        {
            errstring= "reached maximum number of iterations";
            throw SolutionError(format("Newton reached maximum number of iterations"));
        }
        iter=iter+1;
    }
    return x;
}

The while loop terminates 2 iterations before the exception is thrown. What is the intended behaviour?

Travis maximum log size

Travis has a maximum log size of 10000, the test error output currently saturates this. Need to look into uploading the logs somewhere that makes it simpler to step through them.

I'll probably do this alongside another plan to save clang-analyse output somewhere

JSON incompressibles

@jowr - How's this for a general structure for the incompressible JSON file? I can spit out all the fluids like this with another few minutes of work:

{
  "desription": "TherminolD12", 
  "TminPsat": 188.14999999999998, 
  "name": "TD12", 
  "reference": "", 
  "density": {
    "coeffs": [
      983.5111272318547, 
      -0.9298087398902454, 
      0.0010537525196296729, 
      -1.549811353910902e-06
    ], 
    "type": "polynomial"
  }, 
  "viscosity": {
    "coeffs": [
      565.2105731379377, 
      -124.68431546541579, 
      10.064676596878991
    ], 
    "type": "polynomial"
  }, 
  "Tmax": 503.14999999999998, 
  "specific_heat": {
    "coeffs": [
      983.644765617263, 
      3.872605023080838, 
      -0.0009876630900524127, 
      2.343557599404606e-06
    ], 
    "type": "polynomial"
  }, 
  "saturation_pressure": {
    "coeffs": [
      -3457.535824313585, 
      -82.86065984311251, 
      -20.56989935190301
    ], 
    "type": "polynomial"
  }, 
  "Tmin": 188.14999999999998, 
  "conductivity": {
    "coeffs": [
      0.14137409273111642, 
      -5.998034881784928e-05, 
      -1.6084318906899513e-07
    ], 
    "type": "polynomial"
  }
}

Automated builds

We would like automated builds for distribution as well. Travis builds are fine for testing and for Linux machines.

However, we would like to support the Windows users with some binaries and include Mac as well.

Let us collect notes and ideas here.

For now, we favour a cron job running on a Mac to launch virtual Windows and to make nightly builds.

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.