mikekaganski
2be5f6b4a6
Fix Coverity CID 38597
...
No need to initialize cached_component_string; its default constructor
creates an empty string
2015-03-07 13:05:12 +10:00
mikekaganski
bdeb976f89
Fix Coverity CID 38598
...
Commented out the (seemingly unused and dead) parts that responsible for
derivative.
2015-03-07 12:56:12 +10:00
mikekaganski
53fb1bd75c
Fix Coverity CID 38599
2015-03-07 12:34:07 +10:00
mikekaganski
a4bf9fb3ec
Fix Coverity CID 38601
2015-03-07 12:30:40 +10:00
mikekaganski
cd1443d992
Fix Coverity CID 38603
2015-03-07 12:27:41 +10:00
mikekaganski
358757df84
Fix Coverity CID 38607
2015-03-06 23:38:37 +10:00
mikekaganski
c32f05312a
Fix Coverity CID 38609
2015-03-06 23:14:29 +10:00
mikekaganski
40ebfb5a55
Fix Coverity CID 38611
2015-03-06 23:07:12 +10:00
mikekaganski
94f261975a
Fix Coverity CID 38612
2015-03-06 23:04:25 +10:00
mikekaganski
725f706c6e
Fix Coverity CID 38614
2015-03-06 22:52:20 +10:00
mikekaganski
31e5e6638e
Fix Coverity CID 38621
2015-03-06 22:39:49 +10:00
mikekaganski
a44ac2c7ac
Fix Coverity CID 38623
2015-03-06 22:36:51 +10:00
mikekaganski
0fbed17b50
Fix Coverity CID 38618
2015-03-06 20:08:17 +10:00
mikekaganski
6bd986e979
Fix Coverity CID 38619
2015-03-06 20:06:35 +10:00
mikekaganski
0b96d38859
Fix Coverity CID 38624
2015-03-06 19:09:11 +10:00
mikekaganski
d8c9157e35
Fix Coverity CID 38534
2015-03-06 19:07:56 +10:00
Ian Bell
cd3e6323d2
Enable the ability to set mixture binary pair data from python (I think)
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-03-05 23:46:22 -07:00
Ian Bell
5832505ffc
Make successive substitution a bit more conservative; closes #528
2015-03-05 23:08:14 -07:00
Ian Bell
01dfa4cdf0
Chop off the ends of phase envelopes where one phase is pretty much pure; closes #526
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-03-05 22:44:53 -07:00
Ian Bell
5e74610d0e
Fix unexplained crashes with setting of reference state; See #524
2015-03-05 21:47:36 -07:00
Ian Bell
05d209ee2f
Silence phase envelope stdout; Closes #527
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-03-05 21:03:42 -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
Ian Bell
7a9f98d187
Fix temperature used for ASHRAE reference state
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-03-05 18:14:25 -07:00
Ian Bell
1e9afc0071
Bicubic ph extrapolates all the way to saturation; Closes #519
2015-03-04 21:54:44 -07:00
Ian Bell
c984702f9e
Tabular files are in fact compressed to z and read as z; Closes #516
2015-03-03 23:06:20 -07:00
Ian Bell
6a0dca926e
Support isobaric_expansion_coefficient; Closes #517
2015-03-02 21:32:34 -07:00
Ian Bell
8832b4475a
Allow tabular backends to be disabled by setting NO_TABULAR_BACKENDS macro; closes #507
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-03-02 21:27:46 -07:00
Ian Bell
ac4f01fcd7
Fix wstring on non-windows platform
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-03-02 21:26:07 -07:00
Ian Bell
ceef2cd960
Actually check the size of the directory of tables and warn or error appropriately; Closes #43
2015-03-02 21:17:11 -07:00
Ian Bell
e4d28ecaa0
Fixed problems from faulty merge
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-03-02 20:43:52 -07:00
Ian Bell
d9e16a77f3
Merge branch 'master' into tabular
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-03-02 20:20:51 -07:00
Ian Bell
3e88a3216d
Fixed swig wrapper to repair CoolPropDbl wrapped function
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-03-02 20:13:08 -07:00
Ian Bell
c063a40183
Implement a wrapper of AbstractState that can be called through the shared library
...
Closes #508
Closes #497
Sample code:
```
#include "CoolPropLib.h"
const long buffer_length = 255;
char message_buffer[buffer_length];
long errcode = 0;
const long N = 2;
double fractions[N] = {0.5, 0.5};
long T_param = get_param_index("T");
long PQ = get_input_pair_index("PQ_INPUTS");
long handle = AbstractState_factory("HEOS", "Water&Ethanol", &errcode, message_buffer, buffer_length);
AbstractState_set_fractions(handle, fractions, N, &errcode, message_buffer, buffer_length);
AbstractState_update(handle, PQ, 101325, 0, &errcode, message_buffer, buffer_length);
double Tc = AbstractState_keyed_output(handle, T_param, &errcode, message_buffer, buffer_length);
AbstractState_free(handle, &errcode, message_buffer, buffer_length);
```
2015-03-01 15:30:31 -07:00
mikekaganski
b52a76408f
fix warning about deleting void*
2015-03-01 16:59:06 +10:00
mikekaganski
b288b0c096
undo adding unnecessary header
2015-03-01 16:49:33 +10:00
mikekaganski
212182d95a
Primitive structures simplification attempt 2
2015-03-01 16:39:29 +10:00
Ian Bell
11af811d45
Reverted some C++11 only code
...
@mikekaganski, if you could please try to compile with C++03, that would make my life a lot easier
2015-02-28 20:26:44 -07:00
Ian Bell
ecbeaed8fc
include "crossplatform_shared_ptr.h"
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-02-28 20:12:12 -07:00
Ian Bell
b28583f4b6
Fix for shared_ptr
...
@mikekaganski, different compilers put shared_ptr in different namespaces, which is why we handle things in the way that we do in crossplatform_shared_ptr.h
2015-02-28 20:01:05 -07:00
Ian Bell
c674ff5aa8
Merge pull request #510 from mikekaganski/master
...
const, ref and iterator optimization
2015-02-28 19:55:10 -07:00
Ian Bell
c3026be768
Added compressibility factor for humid air; closes #503
2015-02-28 19:52:37 -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
Ian Bell
09f8976605
Back to PQ for water for humid air visc and conductivity
...
Closes #470
Closes #498
2015-02-28 16:00:04 -07:00
Ian Bell
526a241ccc
Updated docs for Tabular Interpolation; fixed bugs in interpolation code
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-02-28 15:54:27 -07:00
Ian Bell
65543cf26e
Merge branch 'master' into tabular
2015-02-27 22:54:28 -07:00
Ian Bell
2e413d3de4
Allow the user to get the HOME directory through get_global_param_string()
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-02-27 22:16:45 -07:00
Ian Bell
1ac08f5c10
Refactor TTSE to remove duplication in single-phase evaluation
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-02-27 20:36:28 -07:00
Ian Bell
0e73f5bda7
Hmolar is now a valid output; invalid inputs throw error
2015-02-26 22:26:40 -07:00
Ian Bell
2dbd82f490
Fixed up p-T table with bicubic
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-02-26 22:07:00 -07:00
Ian Bell
cf7ea4c49d
Bicubic tables work and are VERY fast
...
Edge cases need handling still
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-02-26 22:00:04 -07:00