690 Commits

Author SHA1 Message Date
Ian Bell
9a9e7ecc54 Fix path to which cppformat is copied 2016-08-30 18:38:55 -06:00
Ian Bell
fecff87a19 Another try at MathCAD 2016-08-28 16:44:46 -06:00
Ian Bell
6b18c4361e Try to fix MathCAD wrapper 2016-08-28 13:44:16 -06:00
Ian Bell
1d64b31fa0 Update setup.py for new location of cppformat 2016-08-28 00:51:02 -06:00
Ian Bell
f6b8467249 A few improvements to consistency plots 2016-08-23 22:54:44 -06:00
Ian Bell
47bd64343a Add some more debugging to consistency plots, disable psuedo-pure in two-phase region 2016-08-23 22:32:18 -06:00
Ian Bell
57584a7254 Merge VTPR (#1195)
* Added first working version of VTPR;

* Get VTPR building hopefully

* Remove more constant iterators

* Make VTPR accessible through factory

* One last const iterator

* Fix a_alpha bug and make sqrt(2) into sqrt(2.0)

* Added analytic first derivative for VTPR

* Fix another set of sqrt(2) -> sqrt(2.0)

* Add some info on the derivatives for VTPR

Looks less hopeless than I had feared

* gE/RT needs to be multiplied by RT; closes #1161

* Added first working version of VTPR;

* Get VTPR building hopefully

* Remove more constant iterators

* Make VTPR accessible through factory

* One last const iterator

* Fix a_alpha bug and make sqrt(2) into sqrt(2.0)

* Added analytic first derivative for VTPR

* Fix another set of sqrt(2) -> sqrt(2.0)

* Add some info on the derivatives for VTPR

Looks less hopeless than I had feared

* gE/RT needs to be multiplied by RT; closes #1161

* Add VTPR code from @JonWel (#1194)

* 1rst draft to implement a simple volume translation to cubics

* A bit more of VT

* Derivatives for volume translation

* Better cm initialisation

* Solves the cubic equation with volume translation

* Correct the volume translation analytic development
Looks good now

* Update VTPR to be able to use volume translation

* Unprotect cm_term
This allows it to be used from the VTPR backend

* Update CoolPropLib.def

* Better derrivative of PI_12

The expression is simpler this way

* Solves #1176
Thanks @ibell

* Change the way the volume translation parrameter is set

* Start the bm derivatives for VTPR

* Correct one derivative

* Small bug

* Better bm derivatives for VTPR

* Add am and bm component derivatives for VTPR
@ibell I did not check yet the component derivatives of this commit, bu I checked the other ones with your code.
I'll have to addapt your code to also check these ones.

I separate the `am_term` and `bm_term` as the `am_bm_term` function was called twice. This reduce the call to the am_term part as this part ends up being called only once, and this helped writing the component derivatives.

The tau derivative is done numerically untill we find time to develop the analytical one.

The `am_bm_term` function started with a `set_temperature()`. I did not checked yet why this is needed and put this set temperature at the beginning of each of the `am_term` component derivatives.

I'll try to addapt the checking code tomorow.

* tab to spaces

* Re-writing of cubic coefficients
Introducing 3 intermediary varriables that simplify the cubic's coefficient with the volume translation.

* 1rst draft to implement a simple volume translation to cubics

* A bit more of VT

* Derivatives for volume translation

* Better cm initialisation

* Solves the cubic equation with volume translation

* Correct the volume translation analytic development
Looks good now

* Update VTPR to be able to use volume translation

* Unprotect cm_term
This allows it to be used from the VTPR backend

* Update CoolPropLib.def

* Better derrivative of PI_12

The expression is simpler this way

* Solves #1176
Thanks @ibell

* Change the way the volume translation parrameter is set

* Start the bm derivatives for VTPR

* Correct one derivative

* Small bug

* Better bm derivatives for VTPR

* Add am and bm component derivatives for VTPR
@ibell I did not check yet the component derivatives of this commit, bu I checked the other ones with your code.
I'll have to addapt your code to also check these ones.

I separate the `am_term` and `bm_term` as the `am_bm_term` function was called twice. This reduce the call to the am_term part as this part ends up being called only once, and this helped writing the component derivatives.

The tau derivative is done numerically untill we find time to develop the analytical one.

The `am_bm_term` function started with a `set_temperature()`. I did not checked yet why this is needed and put this set temperature at the beginning of each of the `am_term` component derivatives.

I'll try to addapt the checking code tomorow.

* tab to spaces

* Re-writing of cubic coefficients
Introducing 3 intermediary varriables that simplify the cubic's coefficient with the volume translation.
2016-08-21 12:34:55 -06:00
Ian Bell
ee040062c7 Add 4th order alphar derivatives to python; closes #1184 2016-08-11 21:42:47 -06:00
Ian Bell
2c598fe33a Add mole fractions to phase envelopes in python and C++; closes #1164 2016-08-10 19:54:20 -06:00
Jeff Henning
97d536fcd9 Updates to the Excel Wrapper and Files (#1173)
* Updates to the Excel Wapper and Files

- Added README.rst with updated Installation and Build Instructions
- Fixed PhaseSI() function in CoolProp.xlam
- Removed Deprecated Props() function in CoolProp.xlam
- Added get_global_param_string() function in CoolProp.xlam
- General overhaul of the TestExcel.xlsx example file

* Minor edit to README.rst

* Unprotect Example wkbk and rename VBA to CoolProp
2016-08-02 08:00:51 -06:00
JonWel
75da119182 Export set_config_string, closes #1160 (#1163) 2016-07-19 08:08:38 -06:00
Ian Bell
ab744e1c0d Add evaluation of excess properties in python; closes #1071 2016-07-12 19:46:05 -06:00
Jorrit Wronski
89cac55f86 Removing a single unused import fixes #1094 2016-07-12 16:32:40 +02:00
Ian Bell
ccc4568cbd Re-implement fundamental derivative of gas dynamics; closes #1145 2016-07-09 17:13:44 -06:00
JonWel
61146d02bc Update CoolPropLib.def (#1135)
* Update CoolPropLib.def

* Update julia wrapper
Correct type specification for Array inputs.

* Update Julia wrapper
Improves type possibilities for Array functions.
It is interesting to notice that the wrapper makes use of the linear indexing feature. Matrices can be send, and will simply be processed as a vector.
2016-06-24 17:08:48 -06:00
JonWel
579bba98c4 Export specify_phase() to the library, closes #1133 (#1134)
* Cubic calc_molar_mass, closes #1124

* Add simplified update and output functions
This allows simpler use of the low level interface by using the strings name instead of the parameter number.
The parameter number version stays and will be faster for more than one call with the same parameter.

* Add AbstractState_update_and_1_out

* Export specify_phase() to the library

* small correction
Safer to only accept an array of real numbers here.

* Small correction
Specifying the type of the array to avoid any convertion
2016-06-22 21:57:13 -06:00
Mike Kaganski
1f1bf52f77 Change names of dlls copied to SMath wrapper: use underscore instead of dot (#1113)
This is required in order to remove ".dll" extension from the library
name in .NET DllImport. And that, in turn, is intended to enable
cross-platform use of SMath wrapper on other OSes, like Linux (that is
supported by both CoolProp and SMath).
As explained at
http://www.mono-project.com/docs/advanced/pinvoke/, it's recommended to
omit the library extension to allow mono to find native libraries.
2016-06-21 08:31:43 -06:00
Jorrit Wronski
3632f76e9a handling of the critical point for the plots seems to done, closes #1118 2016-06-09 16:45:51 +02:00
Jorrit Wronski
209474a7e2 Bug in the copy operation for mixtures 2016-06-09 16:18:39 +02:00
Jorrit Wronski
af5104a830 Bug in the copy operation for mixtures 2016-06-09 16:18:38 +02:00
Jorrit Wronski
1a0259a744 Change the factory method to accept more strings, closes #1120 2016-06-09 16:18:38 +02:00
Jorrit Wronski
7c0d3ebe37 Included a manual copy of the abstract state object and exposed the backend name to Python 2016-06-09 16:18:38 +02:00
Jorrit Wronski
809998aecb Added a real state object for the critical state 2016-06-09 16:18:38 +02:00
JonWel
87fd90af84 Correct AbstractState_set_binary_interaction_double in shared library (#1117)
* Correct AbstractState_set_binary_interaction_double

Convert `i` and `j` to `size_t` when calling `AbstractState_set_binary_interaction_double`

* Addapt Julia wrapper to c16a4b6

Now `AbstractState_set_binary_interaction_double` needs `long` for `i` and `j`
2016-06-09 07:51:49 -06:00
JonWel
afeca6a8b2 Export set_binary_interaction_double + Julia wrapper improvement (#1114)
* Precompiling of Julia Wrapper only for Julia 0.4+
Should allow to keep compatibility with Julia 0.3

* Export set_binary_interaction_double
to the shared library and add it to Julia Wrapper

* Correct comment in previous commit

* Change tab to spaces in precendent commit

* Add update_and_*_out functions

Add `AbstractState_update_and_common_out` and `AbstractState_update_and_5_out` to the wrapper

* Update .gitignore
2016-06-08 07:19:14 -06:00
Mike Kaganski
9a0851c5dd Improvements to SMath wrapper error handling and some small tweaks (#1111)
* Improve SMath wrapper error handling

1. Make CoolProp errors visible to SMath immediately, calling
get_global_param_string("errstring").
2. Use System.Exception with message instead of SMath own exceptions
where possible (to show the required message instead of irrelevant SMath
unconfigurable one); only retain SMath exceptions where it's necessary.

* Remove redundant text from release_readme.rst.txt; fixes #1105
2016-06-07 19:34:23 -06:00
Davide Carpi
569a4152ad Update AssemblyInfo.cs.template (#1109)
Copyright year updated #1108
2016-06-07 08:43:23 -06:00
Mike Kaganski
6d21a6cc65 Allow cmake properly build SMath wrapper (#1100)
* Allow cmake properly build SMath wrapper

Integrate c# project into solution; allow usual cmake --build . --config
Release to build SMath wrapper.
Remove obsolete build.bat and coolprop_wrapper.sln files:
cmake-generated solution already includes everything.
Use build subdirectory wrappers/SMath for all generated files (both by
cmake, including csproj file itself, and by build process), thus no
dirty tree anymore.

Please note: this change requires cmake version 2.8.9 (because of
include_external_msproject TYPE).

* Tentative patch for buildbot

Unfortunately, I cannot test the buildbot, neither I know about it much.
I suppose that this is a sensible patch to be able to work with previous
changes to SMath build process.

* Update SMath wrapper help
2016-06-06 08:05:46 -06:00
JonWel
a9d5c9639e Add error handling to some functions, see #1096 (#1101)
Adapt Julia Wrapper to #1097 as discussed in #1096
Also enlarge buffer size as discussed in #1093.
2016-06-06 07:53:14 -06:00
Ian Bell
8c9b1a5e9b Added Helmholtz energy throughout the API as output parameter; closes #1086 2016-06-05 15:56:37 -06:00
Mike Kaganski
f7ef611f50 Set error string in get_parameter_information_string() : fixes #1096 (#1097)
Set error string in get_parameter_information_string() and fix SMath wrapper : fixes #1096
2016-06-05 14:54:42 -06:00
JonWel
a858417397 Revert part of 763d4ce to solve #1077 (#1093)
* Revert part of #763d4ce to solve #974

* Addapt Julia wrapper to dfbb3a4

May be better in the future to use a second argument and insert it to the buffer, but I don't know yet how to do properly the conversion.
So for now, will always return the "long" option.

* "long" in byte array literal

* Enhance get_parameter_information_string

as discussed in #1093

I however have a strange behavior during my testing, sometimes the parameter gets correctly recognised and I have the correct output, but sometimes it answer "parameter is invalid: parametername", whereas I send the exact same commend in Julia side...

* Terminate string with 0 when instering in the buffer

As discussed in #1093

* Better error handling for get_parameter_information_string

Now there is a distinction between error in `param` or in `Output`.

* Update CoolProp.jl

Closes #1077
2016-06-03 08:36:37 -06:00
Ian Bell
758c5e0177 Merge branch 'master' of https://github.com/coolprop/coolprop 2016-06-01 20:30:05 -06:00
Ian Bell
e8c90e40e3 Fix typo in python wrapper of acentric factor; closes #1084 2016-06-01 20:29:14 -06:00
Jorrit Wronski
6d669dc607 make the manylinux scripts executable 2016-05-27 13:38:56 +02:00
Jorrit Wronski
272003fff3 Fixed a conflict of Bash variable names 2016-05-27 11:33:39 +02:00
Jorrit Wronski
08fd0997aa Changed the docker scripts 2016-05-27 10:25:21 +02:00
Jorrit Wronski
662e10f8fe Fixed the manylinux builder, closes #1061 2016-05-25 20:40:20 +02:00
Jorrit Wronski
c647124f0e Added the bitness and tags for the docker images 2016-05-25 19:56:30 +02:00
Jorrit Wronski
ade143f664 Added the mass and mole fraction setters to the plotting routines 2016-05-23 16:39:05 +02:00
Jorrit Wronski
0540419251 Replacing the old functions 2016-05-23 12:45:06 +02:00
Jorrit Wronski
be3d6a2a9f Fixed a couple of coding style issues 2016-05-23 09:40:32 +02:00
Jorrit Wronski
dbe7d101c1 More plotting examples 2016-05-23 09:05:02 +02:00
Jorrit Wronski
7df74b5f1a Fixed a couple of minor plotting issues 2016-05-23 00:38:25 +02:00
Jorrit Wronski
82f12a35ee Was this the unicode issue? 2016-05-22 20:52:36 +02:00
Jorrit Wronski
030fbd1c97 It might work without unicode_literals in the plotting package 2016-05-22 20:28:06 +02:00
Jorrit Wronski
f79a63d194 Rearranged the Python imports in the package 2016-05-22 19:38:56 +02:00
Jorrit Wronski
8485d3fcee Tested the examples and they seem to work 2016-05-22 18:29:57 +02:00
Jorrit Wronski
d514530627 Restructured the cycle calculations and split the Python modules 2016-05-22 17:26:05 +02:00
Jorrit Wronski
4bd78fb0de Added a cycle example 2016-05-22 17:26:04 +02:00