This commit is contained in:
Ian Bell
2014-08-07 20:15:24 +02:00
3 changed files with 16 additions and 8 deletions

View File

@@ -17,7 +17,7 @@ propane (R290):
from CoolProp.Plots.Plots import Ts
Ts('R290', show=True)
Ts('R290', show=False)
The following example can be used to create a Pressure-Enthalpy plot for R410A:
@@ -26,7 +26,7 @@ The following example can be used to create a Pressure-Enthalpy plot for R410A:
from CoolProp.Plots.Plots import Ph
Ph('R410A', show=True)
Ph('R410A', show=False)
The available plots are:
@@ -52,7 +52,7 @@ Pressure-Enthalpy plot.
Ph('R410A')
SimpleCycle('R410A', 250, 300, 5, 5, 0.7)
pyplot.show()
#pyplot.show()
A more advanced example using built-in functions to draw lines of constant
properties is given below. Note the different ways to invoke drawIsoLines:
@@ -71,4 +71,4 @@ properties is given below. Note the different ways to invoke drawIsoLines:
isobars = drawIsoLines(Ref, 'Ts', 'P', [100, 2000], num=5, axis=ax)
isochores = drawIsoLines(Ref, 'Ts', 'D', [2, 600], num=7, axis=ax)
#isenthalps = drawIsoLines(Ref, 'Ts', 'H', [100, 300], num=5, axis=ax)
pyplot.show()
#pyplot.show()

View File

@@ -6,8 +6,16 @@
// Based on the platform and compiler, include the necessary header to give access to std::tr1::shared_ptr directly as shared_ptr
#if defined(__ISLINUX__) && (defined(__llvm__) || defined(__clang__)) // CLANG
#include <memory>
using std::shared_ptr;
#if __has_include(<tr1/memory>)
// CLANG and -stdlib=libstdc++
// See also http://stackoverflow.com/questions/13445742/apple-and-shared-ptr
#include <tr1/memory>
using namespace std::tr1;
#else
// CLANG and -stdlib=libc++
#include <memory>
using std::shared_ptr;
#endif
#elif defined(__ISLINUX__) // GCC
#include <tr1/memory>
using namespace std::tr1;

View File

@@ -728,7 +728,7 @@ void REFPROPMixtureBackend::update(long input_pair, double value1, double value2
hmol=_HUGE,emol=_HUGE,smol=_HUGE,cvmol=_HUGE,cpmol=_HUGE,
w=_HUGE,q=_HUGE, mm=_HUGE, p_kPa = _HUGE;
long ierr;
char herr[255];
char herr[256];
clear();
@@ -1224,7 +1224,7 @@ void REFPROPMixtureBackend::update(long input_pair, double value1, double value2
// Use flash routine to find properties
TQFLSHdll(&_T,&_Q,&(mole_fractions[0]),&kq,&p_kPa,&rho_mol_L,
&rhoLmol_L,&rhoVmol_L,&(mole_fractions_liq[0]),&(mole_fractions_vap[0]), // Saturation terms
&rhoLmol_L,&rhoVmol_L,&(mole_fractions_liq[0]),&(mole_fractions_vap[0]), // Saturation terms
&emol,&hmol,&smol,&cvmol,&cpmol,&w, // Other thermodynamic terms
&ierr,herr,errormessagelength); // Error terms