Commit Graph

68 Commits

Author SHA1 Message Date
Ian Bell
48fe5b972f Implemented IF97 backend; closes #567 2015-03-31 23:57:25 -06:00
Ian Bell
4cbd76ee75 Calculate triple point temperatures for mixtures with REFPROP as a mole-fraction weighting
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-03-26 23:36:13 -06: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
d9e16a77f3 Merge branch 'master' into tabular
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-03-02 20:20:51 -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
6eaea3e642 Bicubic coefficients are calculated in all cells
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-26 20:54:30 -07:00
Ian Bell
716c5a34d0 Merge branch 'master' into tabular
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-24 20:20:00 -07: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
bea9f8ad6b Merge branch 'master' into tabular 2015-02-22 23:34:39 -07:00
Ian Bell
aff594bb25 Fix reducing state access for REFPROP; closes #487
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-22 23:11:40 -07:00
Ian Bell
a43693de58 Single-phase HmolarP_INPUTS are working with TTSE 2015-02-22 21:08:32 -07:00
Ian Bell
58519d5fbf Good progress on tabular interpolation code - single-phase tables can be constructed and written to file and then reloaded 2015-02-22 02:27:13 -07:00
Ian Bell
cafc269050 Returning Prandtl number works; closes #466
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-15 10:00:56 -07:00
Ian Bell
183868dee2 Implement acentric factor through AbstractState and Props1SI; closes #448
Fix all instances of accentric->acentric in fluid files and codebase.

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-03 17:37:53 -05:00
Jorrit Wronski
5ff28fc302 Clears the cached transport properties and fixes #394 2015-01-07 12:16:00 +01:00
Ian Bell
9c05e93fd6 Refactor AbstractState::factory to take vector of strings
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-12-30 16:06:07 -05:00
Ian Bell
7deaf1ad8e Dmass is now a valid input to get_dT_drho_second_derivatives
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-12-24 14:23:18 -05:00
Ian Bell
1310af00bd Allow access to gas constant through PropsSI/Props1SI; Closes #366
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-12-22 15:30:17 -05:00
Ian Bell
19353c764c Merge branch 'master' into refprop_derivative_support
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-12-10 00:39:00 -05:00
Ian Bell
751a92232a Implemented second partial derivatives in the AbstractState class
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-12-10 00:37:04 -05:00
Ian Bell
fe1e41f0eb Expose fluid names through the AbstractState. Closes #322
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-12-10 00:05:55 -05:00
Ian Bell
1a9f0a4e32 Derivatives are working, seems like a bug in REFPROP PHI0dll function is the only remaining problem
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-12-09 18:55:52 -05:00
Ian Bell
32fa56108d Implemented rhomass_critical function in AbstractState. Closes https://github.com/CoolProp/CoolProp/issues/303
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-12-08 18:22:01 -05:00
Ian Bell
707ee4799a Brought back surface tension support
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-12-04 11:43:44 -05:00
Ian Bell
febe1b5bb6 Expose p_reducing
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-12-02 12:19:20 -05:00
Ian Bell
f706657072 Implemented conformal state solver for ECS
Closes https://github.com/CoolProp/CoolProp/issues/185

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-11-23 23:37:31 -05:00
Ian Bell
cf6f2f0c22 Add T_freeze as an output for incompressibles
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-11-23 20:43:50 -05:00
Ian Bell
383b045bb1 Exposes values for minimum and maximum fractions for incompressibles
Closes https://github.com/CoolProp/CoolProp/issues/233

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-11-23 20:18:39 -05:00
Ian Bell
be78b4b22f Fixed missing trivial parameters to Props1SI
Closes https://github.com/CoolProp/CoolProp/issues/223

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-11-20 14:19:48 -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
da23717368 Fix problem with pmin
Closes https://github.com/CoolProp/CoolProp/issues/189

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-10-25 09:35:42 -04:00
Ian Bell
199ced3f86 Implemented Phase output again
Added PhaseSI function which will return phase for given input - exposed to DLL
PropsSI can also return phase as double if "Phase" is the input

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-10-14 11:21:07 +02:00
Ian Bell
70f737c55d Predefined mixtures are added, can be accessed with a fluid name like R410A.mix
Closes https://github.com/CoolProp/CoolProp/issues/153

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-10-02 09:57:01 +02:00
Ian Bell
92299092a4 Updated python wrappers of both Abstract State and old kSI based state class
Fixed cp0
Works again with PDSim
Closes https://github.com/CoolProp/CoolProp/issues/134

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-09-09 14:30:42 +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
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
baf5a88a8e Added backup saturation_T routine
It actually has exactly the same form as saturation_p. Interesting.  Possibility for optimization?

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-13 12:16:14 +02:00
Ian Bell
a84edcdb57 Implemented saturation P 1D solver for low pressure for some fluids like n-Propane
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-13 11:24:27 +02:00
Ian Bell
8f9c6ca438 Added hs_anchor test (passing) and function get_state to allow to get access to states stored in the backends
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-12 21:17:34 +02:00
Ian Bell
36d601490f Lots more work on melting curves, can now make pretty phase diagram for water including the melting line 2014-08-10 19:28:04 +02:00
Ian Bell
faf530d588 Fixed melting curves, PY flash works for subcritical cases 2014-08-09 11:07:21 +02:00
Ian Bell
8748965c34 AbstractState tests pass properly again
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-08 10:57:43 +02:00
Ian Bell
53c363990f Added tests for P,Y inputs, though the solvers are not done yet
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-07 12:05:22 +02:00
Ian Bell
2c844597c9 Calculate pressure and temperature limits for HEOS and REPFPROP backends
Closes https://github.com/CoolProp/CoolProp/issues/83

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-06 10:23:10 +02:00
Ian Bell
138135f5b7 Added Tmin and Tmax
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-04 18:58:13 +02:00
Ian Bell
79d7a4965a Added triple point temperature
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-03 23:58:16 +02:00
Ian Bell
17458261b5 Modifications to saturation routines (work great now)
Including:
adding critical pressure parameter
Adding relaxation parameter for NR sat_T
Only evaluate correction step if not near critical temp
Fixed bug with fluids like "n-Propane" that was getting interpreted as an incompressible fluid

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-03 23:36:22 +02:00
Ian Bell
a2f45e29da Added functionality for trivial outputs
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-08-03 18:55:52 +02:00
jowr
6360e84a54 Added some new functions to handle volume fractions, hope this does not cause any trouble other places 2014-07-22 17:29:01 +02:00