Ian Bell
cd8d23b8a9
Add more precision to the calculations (very slow), but maybe can still be of use somehow
2019-04-21 15:19:26 -06:00
Ian Bell
c4a1cc3344
Also return a value; see #1815
2019-04-06 11:47:43 -06:00
Ian Bell
590cc7c817
Fix resetting of mole mass; closes #1815
2019-04-06 11:30:47 -06:00
Jorrit Wronski
b9ba76c436
Added limits to the humid air properties, closes #1811 ( #1813 )
2019-04-01 21:17:20 -06:00
Ian Bell
3748093806
Avoid infinite loop in integration
2019-02-25 16:29:13 -07:00
Ian Bell
cb8cb0be62
Make ND solver capable of being relaxed
2019-02-21 10:17:02 -07:00
Jeff Henning
b493de51a4
Set _phase in REFPROP backend and return it in calc_phase() ( #1797 )
...
* Set _phase in REFPROP backend and return it in calc_phase()
* Comment touch-up
* Throw error from REFPROPMixtureBackend::calc_phase() for mixtures
* Remove redundant qualifier on GetRPphase() in REFPROPMixtureBackend.h
2019-02-09 23:09:51 -07:00
Ian Bell
ba4feaa539
Allow the ability to skip limit checking for QT flash
2019-01-22 21:08:25 -07:00
Jorrit Wronski
75c32a5153
Added isentropic expansion coefficient ( #1791 )
2019-01-15 10:09:06 -07:00
Ian Bell
b4b2bae981
Fix errors identified by Xcode static analysis
2019-01-12 21:47:22 -07:00
Ian Bell
5ce0b4ef97
Fix bug with name with incomp backend; closes #1707
2019-01-12 17:06:30 -07:00
Ian Bell
aabca1275d
Another missing include
2019-01-11 20:30:16 -07:00
Ian Bell
93a1729ff7
Fix bug with conditional
2019-01-11 18:58:28 -07:00
Ian Bell
277d86b9c0
A little tolerance for the melting line
2019-01-10 22:24:15 -07:00
Ian Bell
5e900a8310
Fix typo with Householder call
2019-01-10 20:46:15 -07:00
Ian Bell
30b0aea348
Add some more pure-virtual destructors
2019-01-10 14:58:13 -07:00
Ian Bell
900b3c9bae
A real virtual destructor this time
2019-01-10 14:34:02 -07:00
Ian Bell
957f7c6191
Added virtual destructor to silence warnings
2019-01-10 14:33:31 -07:00
Ian Bell
4990c934ea
Fix typo
2019-01-10 13:28:31 -07:00
Ian Bell
76c4f05cba
Fallback to /opt/refprop by default on non-windows
2019-01-10 13:25:24 -07:00
Ian Bell
477b9db463
Also print out the REFPROP loading error
2019-01-10 13:17:01 -07:00
Ian Bell
1c6497a92f
Fix a lot of failures in humid air code. So far all tests seem to pass:
...
``` python
import CoolProp.CoolProp as CP
import numpy as np
import itertools
from multiprocessing import Pool
def generate_values(TR,P=101325):
T,R = TR
psi_w = CP.HAPropsSI('psi_w','T',T,'R',R,'P',P)
other_output_keys = ['T_wb','T_dp','Hda','Sda','Vda','Omega']
outputs = {'psi_w':psi_w,'T':T,'P':P,'R':R}
for k in other_output_keys:
outputs[k] = CP.HAPropsSI(k,'T',T,'R',R,'P',P)
return outputs
def get_supported_input_pairs():
good_ones = []
inputs = generate_values((300, 0.5))
for k1, k2 in itertools.product(inputs.keys(), inputs.keys()):
if 'P' in [k1,k2] or k1==k2:
continue
args = 'psi_w',k1,inputs[k1],k2,inputs[k2],'P',inputs['P']
try:
psi_w_new = CP.HAPropsSI(*args)
good_ones.append((k1,k2))
except BaseException as BE:
pass
if 'currently at least one of' in str(BE) or 'cannot provide two inputs' in str(BE):
pass
else:
print(BE)
good_ones.append((k1,k2))
return good_ones
def calculate(inputs):
errors = []
supported_pairs = get_supported_input_pairs()
for k1, k2 in supported_pairs:
psi_w_input = inputs['psi_w']
args = 'psi_w',k1,inputs[k1],k2,inputs[k2],'P',inputs['P']
try:
psi_w_new = CP.HAPropsSI(*args)
except BaseException as BE:
errors.append((str(BE),args, inputs))
return errors
if __name__ == '__main__':
TR = itertools.product(np.linspace(240, 360, 31), np.linspace(0, 1, 31))
with Pool(processes=2) as pool:
input_values = pool.map(generate_values, TR)
errors = pool.map(calculate, input_values)
for err in itertools.chain.from_iterable(errors):
print(err)
2019-01-09 09:30:10 -07:00
Ian Bell
b469e42248
Fix typos in humid air code
2019-01-09 09:28:55 -07:00
Ian Bell
b462ce0179
Don't allow two water content inputs
2019-01-09 09:02:32 -07:00
Jeff Henning
de465e1cf6
Disambiguate IF97 Fluid Names - Water only ( #1770 )
2018-12-19 22:55:42 -05:00
Jeff Henning
76fa3b0807
Patch PropsSI for INCOMP fluid with zero mass fraction ( #1765 )
2018-12-07 20:42:35 -05:00
Jeff Henning
4b1ace160e
Throw sensible error message for single-phase surface tension ( #1755 )
2018-10-29 09:08:54 +01:00
Jorrit Wronski
db6ad8d435
Force unloading of REFPROP upon path change ( #1738 )
2018-10-24 20:04:03 +02:00
Ian Bell
ede27edc38
Fix some ;); bugs in Catch tests that clang doesn't like
2018-10-11 18:49:03 +02:00
Jorrit Wronski
514ee59e27
Updated external submodules ( #1727 )
...
This change is somewhat related to #1604 .
* Catch is now at v2.3.0
* Eigen is now at v3.3.5
* FindMathemaica is now at v3.2.4
* fmtlib (formerly cppformat) is now at v4.1.0 (v5.x.x is not compatible with our code).
* msgpack-c is now at v3.0.1
* pybind11 is now at v2.2.3
* All the other submodules have been moved to the latest master commit
* All submodules are sorted alphabetically
2018-08-30 10:36:27 +02:00
luzpaz
93f4a986e2
Misc. typos ( #1726 )
...
Found via `codespell -i 3 -w -I ../coolprop-word-whitelist.txt` whereby whitelist consists of:
```
cas
formate
hel
nd
te
tim
ue
uint
```
2018-08-14 23:06:49 -06:00
Ian Bell
b9b215194a
Fix secretly hidden overload
2018-04-17 19:12:39 -06:00
Ian Bell
8b7fb6abd4
Implement get/set_fluid_parameter_double in C++ and python
2018-03-25 17:09:56 -06:00
Ian Bell
ca1bf35073
Also copy Fij matrix
2018-03-17 13:28:05 -06:00
Ian Bell
a2d72e5f7d
I think that setting of departure functions for copied states works properly, but more testing needed
2018-03-17 13:13:50 -06:00
Ian Bell
f874299c55
Fix final step for ODE integration; closes #1672
2018-03-17 10:51:07 -06:00
Ian Bell
8f3b3a9b85
Maybe make the compiler happier?
2018-03-11 19:02:11 -06:00
Ian Bell
ac84d0ddaf
Remove explicit need for locale, just use the punctuation character
2018-03-11 18:33:37 -06:00
Ian Bell
3574641434
Fix DQ inputs for pure fluids; closes #1652
2018-03-11 14:19:14 -06:00
Ian Bell
8d728719cf
Clear reducing state for REFPROP backend when fractions set; closes #1659
2018-03-10 18:41:38 -07:00
Ian Bell
774ee0c567
Make string->float conversion aware of the locale ( #1666 )
...
* Make string->float conversion aware of the locale as specified by configuration variable.
Cannot use the system-default locale because some things (matplotlib) change the system locale and it cannot be relied upon to be stable.
* Also add locale header
* Also requires the use of c_str, std::string overload is c++11
2018-03-10 13:48:24 -07:00
Jeff Henning
dd8ac47688
Patches PropsSI imposed phase for backends other than HEOS ( #1665 )
2018-03-08 22:30:43 -07:00
Jeff Henning
abcd91a9a7
Update PropsSI() to Parse Imposed Phase Strings on Input Keys ( #1660 )
...
* PropsSI enhancement to allow imposed phase on Input key string
* Update PropsSI documentation for imposing phase [skip ci]
2018-03-07 21:51:41 -07:00
Ian Bell
0de443435d
Fixes chemical potential of pure fluids; see #1653
2018-02-23 21:47:37 -07:00
Ian Bell
64215fdee2
Fix crash when set_mole_fractions() not called; closes #1393
2018-02-23 20:49:02 -07:00
Ian Bell
44d8a9ecb0
Allow abiliy to always reload library; closes #1648
2018-02-15 21:53:35 -07:00
Jeff Henning
489cf13898
Fixes Logic Bugs When Imposing Phase on TTSE and HEOS Input Pairs ( #1625 )
...
* Allow imposed two-phase update() to TTSE without failing
* Fixes HEOS DP, ST, DT input pairs when phase is imposed
2018-02-12 21:16:13 -07:00
Jeff Henning
4550317ac3
Provide error string from PhaseSI() if phase can't be determined. ( #1645 )
2018-02-11 18:44:44 -07:00
Ian Bell
0d23a3101d
Fix bug with copying of states and their reducing functions
2018-01-28 12:47:58 -07:00
Jeff Henning
d394aa1968
Parse out zero mole fraction components in PropsSI() ( #1628 )
...
* Parse out zero mole fraction components in PropsSI()
* PropsSI() smallest mixture fraction to ignore = 10*DBL_EPSILON
2018-01-07 14:58:27 -05:00