mikekaganski
cc0dc74f5a
Fix Coverity CID 38528
...
iter cannot ever become greater than 100; useless check
2015-03-08 23:53:59 +10:00
mikekaganski
c99805cc79
Fix Coverity CID 38566
2015-03-07 23:04:07 +10: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
mikekaganski
869d1afc71
More ref args
2015-02-27 00:56:38 +10:00
mikekaganski
f94a249895
tidy _HAPropsSI_inputs
...
avoided double lookup for input key (match_input_key + get_input_key);
unified MoleFractionWater call;
if ((key = get_input_key(input_keys, GIVEN_HUMRAT)) && key >= 0) may
give false negatives if get_input_key returns 0;
added throw
2015-02-24 09:26:12 +10:00
Ian Bell
7361d715ef
Refactored HAPropsSI and broke up into inputs and outputs parts; Closes #485
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-02-22 22:57:49 -07:00
Ian Bell
e2110153aa
Finished cleanup of HAPropsSI internal code for now; Closes #468
...
Removed a lot of string comparisons, more can still be removed by making a function _HAPropsSI that takes enum values. Should do this anyway
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-02-21 12:58:10 -07:00
Ian Bell
82277c4f44
Remove unused variable; See #479
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-02-20 21:14:15 -07:00
Ian Bell
4b07026b36
Humid air transport evaluated at T,P for both water and air; Closes #470
2015-02-19 22:30:11 -05:00
Ian Bell
485f296fcd
Fix bug with relative humidity
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-02-19 22:05:54 -05:00
Ian Bell
ff614a923b
Clean up relative humidity function; closes #479
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-02-19 22:02:01 -05:00
Ian Bell
6bf6e27e77
Fix Sda alias in HAPropsSI
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-02-18 20:25:03 -05:00
Ian Bell
e05e64b22d
Fix aliases for Hha and Hda
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-02-17 15:50:10 -07:00
Ian Bell
dedcbbe886
Sanitized return values from HAPropsSI; see #468
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-02-15 10:53:48 -07:00
Ian Bell
70d076afe3
Initialize fluids in HAProps_Aux; Closes #469
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-02-15 10:17:42 -07:00
Ian Bell
f60a76e025
Re-implement CP as output for HAPropsSI; Closes #467
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-02-15 09:57:38 -07:00
Ian Bell
f81ac8fec2
Wetbulb solver T,B,P works better now; Closes #419 and #427
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-02-09 22:03:35 -07:00
Ian Bell
4ebe23ed95
Comment out the HAPropsSI code consistency test
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-01-19 17:28:54 -07:00
Ian Bell
de2105fafb
Add tests for HAPropsSI
...
Also, if an output is the same as the input, return the input directly
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-01-19 16:34:24 -07:00
Ian Bell
0bb60b6ed9
Refactored HAPropsSI to handle better weird inputs
...
Closes #400
Closes #398
Closes #403
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-01-12 23:38:29 -07:00
Ian Bell
5208b32995
Fixed bug with different output for different order of inputs to HAPropsSI; Closes #399
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-01-12 21:58:40 -07:00
Ian Bell
02987937ef
Clean up HAPropsSI
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-01-11 20:07:57 -07:00
Ian Bell
f7cb65305a
Fix bug with humid air properties; Closes #389
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2015-01-07 14:02:34 -07:00
Ian Bell
16ffbed7b0
Fixed bug when relative humidity was input, but T not provided. Closed #320
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-12-09 11:16:27 -05:00
Ian Bell
e0e2591d73
Fixed problems with HAPropsSI when wetbulb is an input by converting call to Brent. Slow but steady.
...
Closes https://github.com/CoolProp/CoolProp/issues/311
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-12-09 00:08:27 -05:00
Ian Bell
4960842476
A better step size in secant solver for low W
...
Closes https://github.com/CoolProp/CoolProp/issues/254
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-12-04 12:09:06 -05:00
Ian Bell
6b98b80d7b
Relaxed convergence criterion for dewpoint.
...
Closes https://github.com/CoolProp/CoolProp/issues/251
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-11-27 14:54:01 -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
9299cb8e07
Re-implements HAProps function at the C++ level.
...
Closes https://github.com/CoolProp/CoolProp/issues/182
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-10-22 21:32:22 +00:00
Ian Bell
540da38842
Fixed problem with S as input for humid air
...
Closes https://github.com/CoolProp/CoolProp/issues/181
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-10-22 21:08:36 +00:00
Ian Bell
7bf4216240
Repaired humid air properties. Validation runs now
...
Closes https://github.com/CoolProp/CoolProp/issues/125
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-09-10 10:14:29 +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
f43a0b792b
Humid air properties now use string instead of char*
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-19 21:55:23 +02:00
Ian Bell
d4e7a6015e
Silenced a few warnings
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-15 15:57:33 +02:00
Ian Bell
e4c8d3f061
Python wrapper is more or less back in action completely. Additional testing is required.
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-12 16:25:33 +02:00
Ian Bell
ebb2434cc2
Fixed test case for Henry's Constant
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-07 20:43:44 +02:00
Ian Bell
abb7344973
More verbose error logging for HAProps tests
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-04 15:12:05 +02:00
Ian Bell
95e5b6f796
Removed unused variables
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-01 10:01:58 +02:00
Ian Bell
7133296b98
Fixed reference state for Air to agree with REFPROP, fixed reference state offsets for humid air
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-07-28 11:14:52 +02:00
Ian Bell
db3515007b
Fixed humid air properties to take into account reference state for air and water to close https://github.com/CoolProp/CoolProp/issues/47
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-07-28 10:49:24 +02:00
Ian Bell
1701f69e49
Fixed humid air errors with wet bulb
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-07-25 14:02:26 -04:00
Ian Bell
d545376efd
Got Javascript wrapper working again - required changing all std::tr1::shared_ptr to shared_ptr
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-06-03 21:59:41 +02:00
Ian Bell
cb497b443c
Added crossplatform_shared_ptr to allow shared_ptr cleanly on all architectures without needing variable namespace definition
2014-06-03 20:58:24 +02:00
Ian Bell
c468339768
Implemented test for GERG 2008 residual term and changed include from <tr1/memory> to <memory>
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-06-01 19:29:09 +02:00
Ian Bell
10aaae4649
Added tr1/memory include for linux compilation
2014-05-30 12:02:32 +02:00
Ian Bell
f93aa76210
ECS conductivity work - nearly works, just need to sort out the conformal state solver.
...
Goodbye to AbstractStateWrapper - can use std::tr1::shared_ptr, much nicer
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-05-28 19:15:34 +02:00