Ian Bell
5e74610d0e
Fix unexplained crashes with setting of reference state; See #524
2015-03-05 21:47:36 -07:00
Ian Bell
6b6f2dbb29
Removed pEOS and replaced it with EOS() function - reference state works properly; Closes #524
2015-03-05 20:59:46 -07:00
mikekaganski
28691e8e75
const, ref and iterator optimization
...
1. Another set of arguments optimized:
* args-by-val converted to args-by-ref
* in some cases, reverse has been done, if that is better: if the
object's copy is modified in the func, it's better to avoid extra copy
from arg to local var
2. some const functions marked as such (this is just a beginning)
3. iterators were replaced with const_iterators where applicable
4. catches that catch std::exception& changed to catch (...) - that is
safer; if exception handling is restructured, this will have to be
reconsidered anyway
5. removed some basic structures' constructors; changed them to hold
const char*s to avoid unnecessary string constructions;
6. in some places, moved variable declarations to their definitions, to
avoid calling default constructors and then assigning
7. removed some unnecessary shared_pointers in favor of local objects;
8. in FORTRAN-style functions, added const specifiers to input doubles;
9. fixed a place where values were inserted into a map while iterating
through it
10. fixed is_valid_*_derivative: they could accept incorrect values and
throw when upper index is less than lower
2015-03-01 10:51:01 +10:00
mikekaganski
1068b724c3
CoolPropDbl
...
Introduce CoolPropDbl to replace long doubles. This may help to overcome
possible portability problems, and test for efficiency and precision.
2015-02-24 13:24:51 +10:00
Jorrit Wronski
9738503e0c
Moved reference state from fluid to state object, incompressibles do internal caching now.
2015-02-11 14:48:04 +01:00
Ian Bell
6d3181b7f9
Add tests for phase; Closes #80
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-02-02 14:12:31 -05:00
Ian Bell
bdd46a3f4c
Some work on derivatives, drho/dp|h doesn't seem to work
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-01-07 20:18:02 -07:00
Ian Bell
ad978bf294
Expose second derivatives through AbstractState and add test (passes)
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-01-04 00:34:45 -05:00
Ian Bell
9e5c3d6035
Preliminary work on two-phase derivatives and splines
...
Added two-phase derivative, works!
Spline for drho/dh|p works
Spline for drho/dh|p NOT WORKING
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-01-01 22:58:05 -05:00
Ian Bell
884a3ff8ff
Implemented second saturation derivatives with respect to p; Closes #238
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-12-19 17:39:47 -06:00
Ian Bell
bf3cd4a614
Update the ECS solver, all transport tests pass
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-12-10 23:00:28 -05:00
Ian Bell
15755c8ef5
Updated tests
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-12-10 16:59:24 -05:00
Ian Bell
438693962f
Added (failing) tests for transport of xylenes
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-12-10 16:20:11 -05:00
Ian Bell
43c24d66c0
Implemented first saturation derivatives
...
See https://github.com/CoolProp/CoolProp/issues/238
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-12-05 17:59:20 -05:00
Ian Bell
0cb02a3e2f
Predefined mixtures working in PropsSI now
...
Added Catch test
``` python
In [1]: import CoolProp
In [2]: CoolProp.CoolProp.PropsSI('D','P',101325,'T',300,'Air.mix')
Out[2]: 1.1766975266680577
```
Closes https://github.com/CoolProp/CoolProp/issues/287
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-12-05 11:24:29 -05:00
Ian Bell
c62ae83c38
TD flash goes back to checking for quality < 0 and > 1 for single phase solution
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-12-02 22:14:46 -05:00
Ian Bell
7fd8c5ffc4
One more try at PT two-phase
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-12-02 15:42:20 -05:00
Ian Bell
b0b66800cb
Another try at PT sat
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-12-02 13:51:16 -05:00
Ian Bell
1c7512a318
Relax the PT tolerance again for two-phase
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-12-02 12:17:45 -05:00
Ian Bell
37bfd34d23
Update a few tests
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-12-02 01:36:43 -05:00
Ian Bell
5243dd429a
Make some tests give better output
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-12-01 23:37:07 -05:00
Ian Bell
858e75ae5b
Remove PRINT, not used
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-12-01 23:36:36 -05:00
Ian Bell
f0bf588358
Relaxed some more convergence criteria
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-11-29 21:31:03 -05:00
Ian Bell
e306a67f1e
Relax some constraints for testing
...
Skip triple point tests if p < 1mPa
Relax constraint for derivative tests
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-11-29 18:36:34 -05:00
Ian Bell
e9c22523f7
Disable HS tests for now
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-11-29 16:28:09 -05:00
Ian Bell
b92d4b0536
More verbose error messages for REFPROP backwards compatibility tests
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-11-29 15:41:01 -05:00
Ian Bell
09bdf671c7
Added generate_update_pair function to python
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-11-19 13:21:08 -05:00
Ian Bell
8327d54ea2
Replaced all tabs with spaces (finally) in C++ files
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-11-19 12:16:14 -05:00
Ian Bell
ff23d85271
HS works now, for most fluids over the entire single-phase part aside for pseudo-pures which have issues
...
Closes https://github.com/CoolProp/CoolProp/issues/172
Closes https://github.com/CoolProp/CoolProp/issues/121
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-11-11 20:47:16 -05:00
Ian Bell
c69044488f
Added first cut at HS solver - mostly works but some failures still
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-11-07 16:51:01 -05:00
Ian Bell
2bc46bc7b8
Added HS skeleton and tests (most fail for now)
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-10-30 00:24:03 -04:00
Ian Bell
23c1a38b4d
Add tests for the references state for enthalpy and entropy
...
Closes https://github.com/CoolProp/CoolProp/issues/77
Closes https://github.com/CoolProp/CoolProp/issues/76
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-10-28 18:59:39 -04:00
Ian Bell
c8fedbbf30
mass based derivatives (I think) plus test
...
referenced in https://github.com/CoolProp/CoolProp/issues/177
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-10-15 23:09:13 +02:00
Jorrit Wronski
85b2443be3
Fixed the broken reference state setter function
2014-09-24 10:42:38 +02:00
Ian Bell
4acec3807b
Added backwards compatibility layer for REFPROP- and REFPROP-MIX: from version 4 and passing test
...
Closes https://github.com/CoolProp/CoolProp/issues/135
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-09-09 14:48:25 +02:00
Ian Bell
865aee0a6a
Updated REFPROP aliases for all fluids + test to close https://github.com/CoolProp/CoolProp/issues/130
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-09-08 20:48:01 +02:00
Ian Bell
fca950907f
Implemented benzene viscosity correlation of Avgeri et al. from JPCRD, 2014
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-09-02 14:56:04 +01:00
Ian Bell
dafa165dd8
Add note for methanol
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-26 23:15:04 +02:00
Ian Bell
bbc97ac230
Added methanol viscosity correlation to close https://github.com/CoolProp/CoolProp/issues/82
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-26 23:12:16 +02:00
Ian Bell
648c01aee8
Fixed CoolProp-Tests.cpp to not require CoolPropLib.cpp
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-26 15:17:47 +02:00
Ian Bell
c398ea91a7
Added more tests for second derivatives
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-24 20:45:07 +02:00
Ian Bell
799422fe40
Implemented generalized second derivative, seems to work, implemented at PropsSI level too
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-24 17:26:46 +02:00
Ian Bell
4b082029c4
Finally repaired flash routines.
...
Some edge cases remain
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-24 13:40:46 +02:00
Ian Bell
d3261395bf
Replaced all fabs() with std::abs()
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-23 14:56:07 +02:00
Ian Bell
b12042bd8c
Added (failing) tests to check triple point pressures
...
Closes https://github.com/CoolProp/CoolProp/issues/78
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-23 13:27:09 +02:00
Ian Bell
cd8ee9eb52
Added code and tests for saturation ancillaries (p, rho', rho'')
...
Closes https://github.com/CoolProp/CoolProp/issues/75
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-23 13:01:56 +02:00
Ian Bell
b4ff7a8cc5
Implemented viscosity for cyclohexane from Tariq, 2014.
...
Added unit tests, reformulated initial density term
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-21 00:50:57 +02:00
Ian Bell
0dcdf7ef5d
Implemented PQ for pseudo-pure to close https://github.com/CoolProp/CoolProp/issues/92
...
* As a consequence, made update function take CoolProp::input_pairs enum as first input (thanks @jowr for the idea)
* Decoupled the pre_update and post_update functions in order to allow for more creative update functions using guess values, etc.
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-20 21:44:13 +02:00
Ian Bell
e5055d195a
Added conductivity for R134a and test to close https://github.com/CoolProp/CoolProp/issues/101
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-20 17:16:51 +02:00
Ian Bell
b506fb5d26
Tidied up derivative tests
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-19 00:36:08 +02:00