Commit Graph

222 Commits

Author SHA1 Message Date
Ian Bell
354c924ca6 Excess is header only completion
Fixed bug with init of Q for phase envelope construction

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-09-06 16:10:12 +02:00
Ian Bell
ee6d6ecadc Excess is now header-only
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-09-06 15:47:46 +02:00
Ian Bell
8fdd1fddaf Refactor of mixing parameters successful
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-09-06 15:41:33 +02:00
Ian Bell
f7d639db51 Phase envelope construction working now for Ethane/Propane for a range of mole fractions
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-09-05 12:03:52 +01:00
Ian Bell
905fec810d Phase envelope code and data structures set up
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-09-05 10:09:36 +01:00
Ian Bell
f5ad4c9595 Updated flash routines at low temperature to close https://github.com/CoolProp/CoolProp/issues/124
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-09-03 18:32:42 +01:00
Ian Bell
b7b502ef81 Changed the cast for benzene higher-order viscosity
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-09-03 17:39:02 +01:00
Ian Bell
0c38f2600c Remove std::size_t cast in ReducingFunctions
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-09-03 17:38:13 +01: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
5e470617c9 Newton-raphson works for mixtures
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-30 19:19:10 +02:00
Ian Bell
d539f5cde8 Yes!! Composition derivatives working almost entirely. 2014-08-28 21:52:25 +02:00
Ian Bell
e7aa3df917 Implemented the x_N dependent form of the composition derivatives. Mostly working but derivatives with respect to x_N DO NOT work
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-28 01:22:10 +02:00
Ian Bell
b518684404 Squashed MSVC errors about pow functions
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-27 16:33:02 +02:00
Ian Bell
e062e0dbf6 Ancillary saturation solver works a bit better, still some issues.
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-26 23:20:24 +02:00
Ian Bell
29170cd44c Tidy derivatives
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-26 23:13:55 +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
5316a1fd93 Added a bunch of mixture derivative tests (all passing).
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-26 21:00:45 +02:00
Ian Bell
e0e0b1e234 First cut at new NR solver for bubble/dew points with mixtures. Sort of works, seems like there is a problem with one of the derivatives
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-26 13:47:34 +02:00
Ian Bell
07cc87b8b2 A partial resolution of https://github.com/CoolProp/CoolProp/issues/107
All internal values are molar, so the error message is only truly useful if you are using molar units

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-26 13:44:49 +02:00
Ian Bell
f6a4f7e239 Added tests for new outputs
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-26 13:30:41 +02:00
Ian Bell
12d62b076b Added critical point values for REFPROP to close https://github.com/CoolProp/CoolProp/issues/117
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-26 13:14:17 +02:00
Ian Bell
289c1b3b61 Mixture derivatives now use std::size_t instead of int everywhere
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-25 18:36:47 +02:00
Ian Bell
a6850b8f19 Successive substitution is working again
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-25 15:37:30 +02:00
Ian Bell
9435b2d136 Moved mixture derivatives into their own file and more functions take references rather than pointers
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-25 13:32:25 +02:00
Ian Bell
d9ef19a3a8 Improved docs for mixture derivatives
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-25 11:34:33 +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
16251c4fb1 Fixed sat_T at very low pressures
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-23 16:54:27 +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
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
69bbdc693b Reimplemented critical region splines all the way from scripts to build to C++ code
Closes https://github.com/CoolProp/CoolProp/issues/94

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-22 22:14:48 +02:00
Ian Bell
5bb399b22d Fixed bug with REFPROP fluid loading (REFPROP bug?) 2014-08-22 09:13:16 +02:00
Ian Bell
ab98aae25d Added cross-references for transport flags 2014-08-21 01:17:54 +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
b58e3cbe70 Fixed bug in https://github.com/CoolProp/CoolProp/issues/93
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-19 01:14:05 +02:00
Ian Bell
881a6c4616 Added handling for first partial derivative as a string - added tests - they pass
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-19 00:34:26 +02:00
Ian Bell
569ebc43ac First derivatives are calculated by gridded tabular backend
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-18 22:00:25 +02:00
Ian Bell
e3fba36d81 Gridded table builds
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-18 19:28:54 +02:00
Ian Bell
dd71b1ac22 Really this time un-specify the phase
More logical debug output for invalid phases

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-18 19:26:31 +02:00
Ian Bell
99da465b06 Unspecify the phase after the HP solver with Brent - test added
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-18 18:52:06 +02:00
Ian Bell
f7464fcaa2 Implemented Eigen solution for all() function, speed testing next
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-17 21:09:27 +02:00
Ian Bell
fc2e618fb7 Speed optimizations for saturation routines
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-16 17:50:04 +02:00
Ian Bell
4041e88a5e Fully implemented, but a lot slower, why?
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-16 16:13:03 +02:00
Ian Bell
29632c72e6 Transition complete to generalized exponential term
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-15 22:03:40 +02:00
Ian Bell
2270f9f076 Helmholtz derivatives are all calculated using parallel code - next step is to remove classes from Helmholtz
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-15 21:16:41 +02:00
Ian Bell
61bc24e7b1 phases is now an enum, added (non-working) critical region VLE solver
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-15 17:13:00 +02:00
Ian Bell
3e0864e620 Ncomp is now a std::size_t
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-15 17:11:25 +02:00
Ian Bell
2136f417b9 Updated codelite and added Tabular backend structure
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-15 15:44:55 +02:00