Commit Graph

592 Commits

Author SHA1 Message Date
Jorrit Wronski
ea318e82ec Merge branch 'master' into feature/trace_isoline 2017-03-10 09:31:45 +01:00
Ian Bell
260ba2489a Fix typo in CoolPropLib.h (#1450) 2017-03-09 19:05:45 -07:00
Jorrit Wronski
f7af136eb1 Added the line tracer to _PropSI_multi 2017-03-09 23:24:01 +01:00
JonWel
78b953e64c UNIFAQ -> UNIFAC, close #1421 (#1423)
* UNIFAQ -> UNIFAC, close #1421

* UNIFAQ -> UNIFAC, close #1421
Also file names
2017-02-10 00:13:04 -07:00
tobias-loew
2672a929c9 set_reference_state for AbstractSate (#1403)
this allows for setting reference state without changing the state of
the JSONLibrary
2017-01-27 07:51:29 -07:00
Ian Bell
3471e910d0 Expose get_fluid_constant to AbstractState and to python; closes #1394 2017-01-18 19:31:56 -07:00
Reza Afzalan
b1451ab4a6 Update CoolPropLib.h (#1383)
* Update CoolPropLib.h , closes #1379

Update CoolPropLib.h , closes #1379

* Update HumidAirProp.cpp

#1379

* Update CoolPropLib.h

#1379
2017-01-03 18:15:22 -07:00
Ian Bell
064585511a Fix endswith function; closes #1372 2017-01-02 14:56:52 -07:00
Ian Bell
149183e87f Allow fluids to be provided (and overwritten) at runtime; closes #1345 (#1366)
* Provide fluids at runtime; closes #1345
2016-12-02 01:20:06 -05:00
Jorrit Wronski
196b27c1a4 Implemented caching of splined properties, closes #1354, accelerates calculations for #870, is related to 7c478a1925 2016-12-01 10:48:18 +01:00
Ian Bell
8f4afd06a3 Make rapidjson shim functions const-correct 2016-11-29 22:14:09 -07:00
Ian Bell
fb82316fcd Allow for cubic transformations in HEOS multi-fluid model (#1359)
* Allow fluids to be used with SRK in multi-fluid model that have a dash in name

* Add ability to use SRK and PengRobinson as one-fluid transformations in multi-fluid models;see #1346

* Changed API for AbstractCubic so T_r and rho_r are settable

* Also add the ability to set to Peng-Robinson; see #1346

* Actually set the cubic EOS in multi-fluid model

* Enable both SRK and PR for cubic transformations in multi-fluid model
2016-11-29 18:19:14 -05:00
Ian Bell
b5df230da5 Add ability to ignore setup errors for REFPROP mixtures via configuration variable (#1347) 2016-11-21 23:08:35 -07:00
Ian Bell
58a3aed22c Fix some issues with the ND Newton-Raphson solver (#1341) 2016-11-18 11:21:17 -07:00
Ian Bell
5d059a5c14 Add set_string function to rapidjson wrappers (#1340) 2016-11-18 10:48:43 -07:00
Ian Bell
2578e7b92e Add the ability to set a standard departure function through the AbstractState (#1339) 2016-11-17 11:45:11 -07:00
Ian Bell
6270db1cee Remove template specialization for Spline class 2016-11-05 13:26:47 -06:00
Ian Bell
722f4bf5de Finally fix phase envelopes again; closes #1321 2016-11-05 12:29:26 -06:00
Ian Bell
3551bb52a9 Remove ununsed functions from DLL header 2016-11-04 22:48:45 -06:00
Ian Bell
669fe8cdb7 Update set_departure_function API in shared library; see #1317 2016-11-04 22:17:21 -06:00
Jeff Henning
8afc55e879 Add Trivial Parameter calls to IF97 Backend (#1308)
* Ignore any build directories that start with the string 'build', i.e. /build, /build15, /buildprime, etc.

* Add trivial parameters to IF97 Backend
2016-11-02 18:05:56 -06:00
JonWel
bc57d1401c Export cubic's alpha functions (#1302)
* Export setting of cubic alpha function
2016-10-31 08:27:55 -06:00
Ian Bell
64694b5beb Export set_config_bool to DLL 2016-10-31 07:53:14 -06:00
Ian Bell
d61c365215 Parse refprop HMX.BNC file and load coefficients (#1304)
* Add parser for HMX.BNC from REFPROP; closes #1294

Also move configuration variables into main pybind11 module

* Add the ability to over-write departure functions and binary interaction parameters
2016-10-30 21:26:05 -06:00
Ian Bell
6335732aa1 Allow fluids to be overwritten; closes #1285 2016-10-27 22:06:10 -06:00
Ian Bell
cd5d9e265b Specify the minimum delta for spinodal tracer as config variable; closes #1295
Uses the key SPINODAL_MINIMUM_DELTA
2016-10-27 21:39:05 -06:00
Ian Bell
0701ca2e4a Try to fix problem with SpinodalData for swig 2016-10-23 11:14:51 -06:00
Ian Bell
2bbb6d068c Also add high-level interface to pybind11 interface 2016-10-21 19:42:23 -06:00
Ian Bell
156b3e5cb9 Export spinodal curves in DLL; closes #1273 2016-10-17 20:06:08 -06:00
Ian Bell
ffbba512da Fix indent 2016-10-17 19:56:08 -06:00
Ian Bell
91704a450b Export critical points in DLL; closes #1274 2016-10-17 19:55:25 -06:00
Ian Bell
797f500307 Use powInt instead of pow(double,int) - seems to save about 30% in speed 2016-10-16 13:13:22 -06:00
Ian Bell
a4a8eaa5ae Rename SpinodalValues to SpinodalData to mirror phase envelope 2016-10-13 20:30:25 -06:00
Ian Bell
b948f44dd8 Implement in C++ the calculation of the spinodal 2016-10-13 20:18:28 -06:00
Ian Bell
c929e92b3d Build/retrieve phase envelope through high-level DLL; closes #1158 2016-10-13 19:35:36 -06:00
Ian Bell
c3184a67f5 Implement set_double_array2D; closes #1252 2016-10-05 21:33:04 -06:00
Ian Bell
84a00830b1 Slightly nicer error message 2016-09-30 00:54:28 -06:00
Ian Bell
5b9e66c2c1 lots of small updates to get VxWorks to build properly 2016-09-30 00:41:24 -06:00
Ian Bell
953e77856a Missing semicolon ... 2016-09-29 22:09:27 -06:00
Ian Bell
51575cd2dd Add inline modifier to old format function 2016-09-29 22:07:15 -06:00
Ian Bell
317e37504c Disable cppformat for VxWorks 2016-09-29 22:03:45 -06:00
Ian Bell
ac8e6df11d Add ability to use Peng-Robinson in REFPROP; closes #1233 2016-09-15 21:01:36 -06:00
Jorrit Wronski
3f3a63f8be Minor compatibility fix for cppformat 2016-09-11 19:41:42 +02:00
Ian Bell
9b129ce950 First cut at adding ODE integrators; closes #1220 2016-09-01 13:24:14 -06:00
Ian Bell
bbcbbf1384 Update cppformat; see #1065 2016-08-28 00:33:00 -06:00
Ian Bell
0dcc97210b Avoid crazy number of calls to set_temperature if possible. 2016-08-27 22:39:05 -06:00
Ian Bell
8f0aa03650 Updates to solvers to store the number of iterations and allow for damped methods; see #985 2016-08-23 20:55:31 -06:00
Ian Bell
6d6c96ef0c Repair the non-cached calculations 2016-08-21 18:54:36 -06:00
Ian Bell
3e9ca1fbf4 Remove non-c types from CoolPropLib.[cpp/h]
@JonWel - watch out for the use of C++ types in C header
2016-08-21 12:45:35 -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