Commit Graph

47 Commits

Author SHA1 Message Date
Ian Bell
6cb6b29b81 Fix initialization of cached elements in Helmholtz terms 2015-08-23 21:27:42 -06:00
Ian Bell
c169e12ae0 Clear the Helmholtz cache; closes #770 2015-08-20 16:28:57 -05:00
Ian Bell
a9af0df612 Cache derivative values of helmholtz energy for individual components; see #726 2015-08-06 12:58:22 -04:00
Ian Bell
1c311459f3 Clean up errors in snippets 2015-04-23 10:06:33 -06:00
Ian Bell
4ddd0b93b2 Commenting out Aly-Lee for now (no longer used, terms are converted to generalized Planck-Einstein) 2015-04-16 20:59:03 -06:00
Ian Bell
3dbe3cb291 Finished 4th derivatives of non-analytic term
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-04-16 20:34:17 -06:00
Ian Bell
6ef4b6bda2 Fixed PlanckEinstein through 4th order 2015-04-15 22:35:07 -06:00
Ian Bell
011bac075b Almost done with 4th derivatives, just PlanckEinstein, SAFT, and a bit of NA remain
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-04-15 01:55:39 -06:00
Ian Bell
d818dc6006 Progress on 4th derivatives of non-analytic term (though not correct yet); see #549 2015-04-13 23:44:31 -06:00
Ian Bell
cb59cbcea0 When the reference state is changed, update the fixed points
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-03-10 20:00:48 -06:00
Ian Bell
275adbbb6f Fixed reference states for real; Closes #524 2015-03-10 01:17:44 -06:00
Ian Bell
04145b5c15 Killed off a bunch of order-of-initialization warnings from mingw
Watch out @mkaganski, its not serious, but annoying.

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-03-09 23:30:53 -06:00
mikekaganski
8c08bad4d7 Fix Coverity CID 38540 2015-03-09 19:31:14 +10:00
mikekaganski
ef0df39419 Fix Coverity CID 38548 2015-03-09 17:33:48 +10:00
mikekaganski
544b239843 Fix Coverity CID 38549 2015-03-09 17:30:30 +10:00
mikekaganski
1b7ccca9a3 Fix Coverity CID 38552
Add some const method qualifiers
2015-03-09 17:12:34 +10:00
mikekaganski
02eb288fb3 Fix Coverity CID 38555 2015-03-09 16:41:10 +10:00
Ian Bell
5e74610d0e Fix unexplained crashes with setting of reference state; See #524 2015-03-05 21:47:36 -07:00
Ian Bell
f053de76b1 Kill warning about initialization order in Helmholtz.h 2015-02-28 20:12:59 -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
869d1afc71 More ref args 2015-02-27 00:56:38 +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
Ian Bell
44a4a4d8b5 Improve docs for Helmholtz terms.
Closes https://github.com/CoolProp/CoolProp/issues/277

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-12-03 20:32:53 -05: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
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
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
ad15288c23 Byebye to Armadillo (maybe reconsider later on)
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-18 19:28:00 +02:00
Ian Bell
9293c6355c For posterity's sake, a version using armadillo - not an improvement... slower than Eigen
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-18 09:47:02 +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
9a1a0122e3 Renamed Derivatives to HelmholtzDerivatives; they all check fine
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-16 14:26:25 +02:00
Ian Bell
5cad463158 Parallel derivatives finished for NonAnalytic term
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-16 14:11:27 +02:00
Ian Bell
c1e9455cb2 Reset the values for the Generalized Exponential term
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-16 01:27:38 +02:00
Ian Bell
eee8139306 SAFT has transitioned to parallel evaluation of derivatives, though it isn't truly parallel since there is some duplication
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-15 22:34:24 +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
c3508c3f55 Added parallel evaluation of residual helmholtz terms
Should in the end only slow down by 1.2x, but calculate at least up to second order derivatives all at once, so net speedup of 5 if calculating all first and second order partials !!

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-15 15:42:47 +02:00
Ian Bell
54d3b45584 Resort Helmholtz.h
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-06-30 17:08:39 +02:00
Ian Bell
cf3158fa06 Fixed bug in Aly-Lee extend function (skipped new elements)
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-06-03 15:36:59 +02:00
Ian Bell
44a97e9fcb Added docs for conversion of PlankEinstein and PlanckEinstein2 forms to generalized form
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-06-03 12:25:24 +02:00
Ian Bell
bff7e2afeb PlanckEinstein and PlanckEinstein2 classes replaced with PlanckEinsteinGeneralized. Docs to follow.
Aly-Lee not yet removed.  Next step.

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-06-03 12:04:16 +02:00
Ian Bell
409e2a2d1f Fluids using IIR reference state now all agree with REFPROP
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-06-02 13:03:17 +02:00
Ian Bell
06066c52f0 Reference state can now be set to one of IIR, ASHRAE, NBP or RESET. Still need to allow for default reference state values to agree with REFPROP.
Docs updated.

Still need to implement setting state based on numerical values.

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-06-01 21:43:25 +02:00
Ian Bell
3168f15efc Implemented dDelta3; test passes
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-06-01 19:46:30 +02:00
Ian Bell
873eab5baa Helmholtz derivative testing gives almost 100% coverage - missing HS offset term
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-05-30 17:13:23 +02:00
Ian Bell
7a862f1a77 Air, nitrogen, oxygen and argon conductivity all are working
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-05-26 17:38:13 +02:00
jowr
d830f8a835 Fixed a path typo (Windows, Windows...) 2014-05-16 08:15:27 +02:00
Ian bell
b3847c7522 Initial commit for v5, but this time with the right line endings
Signed-off-by: Ian bell <ian.h.bell@gmail.com>
2014-05-14 12:46:24 +02:00