diff --git a/CMakeLists.txt b/CMakeLists.txt index f4cd18ab..6944f1a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ project(${project_name}) # Project version set (COOLPROP_VERSION_MAJOR 5) set (COOLPROP_VERSION_MINOR 0) -set (COOLPROP_VERSION_PATCH 6) +set (COOLPROP_VERSION_PATCH 7dev) set (COOLPROP_VERSION ${COOLPROP_VERSION_MAJOR}.${COOLPROP_VERSION_MINOR}.${COOLPROP_VERSION_PATCH}) ####################################### @@ -458,11 +458,6 @@ if (COOLPROP_CSHARP_MODULE) COMMAND 7z a "${CMAKE_CURRENT_BINARY_DIR}/platform-independent.7z" "${CMAKE_CURRENT_BINARY_DIR}/*.cs" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") - # Install all the generated cs files - install( - CODE "file( GLOB _GeneratedCsharpSources \"${CMAKE_CURRENT_BINARY_DIR}/*.cs\" )" - CODE "file( INSTALL \${_GeneratedCsharpSources} DESTINATION ${CMAKE_INSTALL_PREFIX}/Csharp/platform-independent )" - ) install (FILES ${CMAKE_SOURCE_DIR}/Web/coolprop/wrappers/Csharp/Example.cs DESTINATION Csharp) install (FILES "${CMAKE_CURRENT_BINARY_DIR}/platform-independent.7z" DESTINATION ${CMAKE_INSTALL_PREFIX}/Csharp) install (TARGETS ${app_name} DESTINATION Csharp/${CMAKE_SYSTEM_NAME}_${BITNESS}bit) @@ -472,7 +467,7 @@ if (COOLPROP_CSHARP_MODULE) # Copy the shared object to the folder with the executable - no idea like java.library.path in C# install (TARGETS ${app_name} DESTINATION ${CMAKE_SOURCE_DIR}/testing_root/Csharp${BITNESS}) endif() - file(TO_NATIVE_PATH ${CMAKE_INSTALL_PREFIX}/Csharp/platform-independent/*.cs cp_cs_path) + file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/*.cs cp_cs_path) file(TO_NATIVE_PATH ${CMAKE_INSTALL_PREFIX}/Csharp/Example.cs cp_example_path) if (${BITNESS} EQUAL "32") set(CSHARP_PLAT "-platform:x86") @@ -708,13 +703,13 @@ if (COOLPROP_MATLAB_SWIG_MODULE) install (FILES ${CMAKE_CURRENT_BINARY_DIR}/+CoolProp.7z DESTINATION ${CMAKE_INSTALL_PREFIX}/MATLAB) install (FILES ${CMAKE_CURRENT_BINARY_DIR}/SwigRef.m DESTINATION ${CMAKE_INSTALL_PREFIX}/MATLAB) install (TARGETS CoolPropMATLAB_wrap DESTINATION ${CMAKE_INSTALL_PREFIX}/MATLAB) - enable_testing() - add_custom_command(TARGET CoolPropMATLAB_wrap - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/wrappers/MATLAB/test.m ${CMAKE_CURRENT_BINARY_DIR}/.) - add_test(NAME MATLABtest - COMMAND $ENV{MATLAB_ROOT}/bin/matlab -r test -nojvm -nodesktop -nosplash - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") + #enable_testing() + #add_custom_command(TARGET CoolPropMATLAB_wrap + # POST_BUILD + # COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/wrappers/MATLAB/test.m ${CMAKE_CURRENT_BINARY_DIR}/.) + #add_test(NAME MATLABtest + # COMMAND $ENV{MATLAB_ROOT}/bin/matlab -r test -nojvm -nodesktop -nosplash + # WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") endif() if (COOLPROP_MATLAB_MODULE) diff --git a/Web/coolprop/wrappers/Csharp/index.rst b/Web/coolprop/wrappers/Csharp/index.rst index 72a8a777..acf51bb7 100644 --- a/Web/coolprop/wrappers/Csharp/index.rst +++ b/Web/coolprop/wrappers/Csharp/index.rst @@ -6,13 +6,24 @@ C# Wrapper Pre-compiled Binaries ===================== -Pre-compiled release binaries can be downloaded from :sfdownloads:`Csharp`. Development binaries coming from the buildbot server can be found at :sfnightly:`Csharp`. To Use ------ -Copy all the platform-independent .cs files to a folder on your computer you want, here we call it ``platform-independent``. Copy the DLL for your system architecture to the same location. Copy the Example.cs file to the same location. You will need to have a copy of some version of C#. +Pre-compiled binaries can be downloaded from :sfdownloads:`Csharp`. Development binaries coming from the buildbot server can be found at :sfnightly:`Csharp`. +Download the ``platform-independent.7z`` file and expand it to a folder called ``platform-independent`` using 7-zip. Download the special C# shared library for your system architecture to the same location from either :sfdownloads:`Csharp` (release) or :sfnightly:`Csharp` (development). Copy the Example.cs file to the same location. You will need to have a copy of some version of C#. + +When you are finished, you should have a folder layout something like :: + + main + |- CoolProp.dll + |- Example.cs + |- platform-independent + |- AbstractState.cs + |- Configuration.cs + |- ... + Windows ^^^^^^^ @@ -24,7 +35,7 @@ At the command prompt, run:: where you might need to update the path to visual studio depending on your version installed. Use `-platform:x86` to tell C# that your DLL is 32-bit if you are on 32-bit, or `-platform:x64` if you are on 64-bit. -Alternatively, you can add all the .cs files to a visual studio project. +Alternatively, you can add all the .cs files to a visual studio project. If you do that, add the DLL to the project as well, right-click on the DLL, and select the option to copy it to the output directory. Linux/OSX ^^^^^^^^^ @@ -33,6 +44,8 @@ Same idea as windows, but command line is just a bit different:: mcs Example.cs platform-independent/*.cs -platform:x64 ./Example + +Use `-platform:x86` to tell C# that your shared library is 32-bit if you are on 32-bit, or `-platform:x64` if you are on a 64-bit platform. User-Compiled Binaries ====================== diff --git a/Web/coolprop/wrappers/Java/index.rst b/Web/coolprop/wrappers/Java/index.rst index 632ad247..7dd2500a 100644 --- a/Web/coolprop/wrappers/Java/index.rst +++ b/Web/coolprop/wrappers/Java/index.rst @@ -6,7 +6,20 @@ Java Wrapper Pre-compiled Binaries ===================== -Pre-compiled binaries can be downloaded from :sfdownloads:`Java`, which come from :sfnightly:`the nightly snapshots `. + +Pre-compiled binaries can be downloaded from :sfdownloads:`Java`. Development binaries coming from the buildbot server can be found at :sfnightly:`Java`. + +Download the ``platform-independent.7z`` file and expand it to a folder called ``platform-independent`` using 7-zip. Download the special Java shared library for your system architecture to the same location from either :sfdownloads:`Java` (release) or :sfnightly:`Java` (development). Copy the Example.java file to the same location. You will need to have a copy of some version of java. + +When you are finished, you should have a folder layout something like :: + + main + |- CoolProp.dll + |- Example.java + |- platform-independent + |- AbstractState.java + |- Configuration.java + |- ... Usage ----- diff --git a/Web/fluid_properties/Incompressibles.bib b/Web/fluid_properties/Incompressibles.bib index cf9b362f..f9bdf761 100644 --- a/Web/fluid_properties/Incompressibles.bib +++ b/Web/fluid_properties/Incompressibles.bib @@ -27,6 +27,19 @@ Timestamp = {2014.09.17} } +@Article{Huber2009, + Title = {{New International Formulation for the Viscosity of H2O}}, + Author = {M.L. Huber and R.A. Perkins and A. Laesecke and D.G. Friend and J.V. Sengers and M.J Assael and I.M. Metaxa and E. Vogel and R. Mare{\v s} and K. Miyagawa}, + Journal = {J. Phys. Chem. Ref. Data}, + Year = {2009}, + Number = {2}, + Pages = {101-125}, + Volume = {38}, + + Owner = {Belli}, + Timestamp = {2013.04.08} +} + @Manual{Jones2001, Title = {{SciPy}: Open source scientific tools for {Python}}, Author = {Eric Jones and Travis Oliphant and Pearu Peterson and others}, @@ -56,7 +69,7 @@ Pages = {421--426}, Volume = {128}, - Doi = {0.1115/1.2175090}, + Doi = {10.1115/1.2175090}, Owner = {jowr}, Timestamp = {2014.12.16} } diff --git a/dev/buildbot/master/master.cfg b/dev/buildbot/master/master.cfg index 91917f0d..11e805b0 100644 --- a/dev/buildbot/master/master.cfg +++ b/dev/buildbot/master/master.cfg @@ -500,6 +500,7 @@ def excel_slave(gitMode = 'incremental'): # Create the factory to add the actions to factory = getBaseFactory(gitMode=gitMode) # + factory.addStep(MakeDirectory(dir='build/bin/MicrosoftExcel', haltOnFailure = True)) factory.addStep(MakeDirectory(dir=working_folder+'/32bitDLL', haltOnFailure = True)) factory.addStep(MakeDirectory(dir=working_folder+'/64bitDLL', haltOnFailure = True)) factory.addStep(RemoveDirectory(dir="build/install_root", haltOnFailure = True)) diff --git a/dev/incompressible_liquids/CPIncomp/PureFluids.py b/dev/incompressible_liquids/CPIncomp/PureFluids.py index 0946bdc0..b53a270d 100644 --- a/dev/incompressible_liquids/CPIncomp/PureFluids.py +++ b/dev/incompressible_liquids/CPIncomp/PureFluids.py @@ -585,7 +585,7 @@ class Water(PureData): self.TminPsat = np.min(self.temperature.data[~np.isnan(self.saturation_pressure.data)]) self.name = "Water" self.description = "Fit of the subcooled region of the full EOS from 1 bar to 100 bar" - self.reference = "Wagner2002, Transport properties from Huber et. al (2 papers)" + self.reference = "Wagner2002, Huber2009" self.reshapeAll() # Specific heat needs special coefficiencts # self.specific_heat.coeffs = np.zeros((5,7)) diff --git a/dev/incompressible_liquids/json/Water.json b/dev/incompressible_liquids/json/Water.json index e5d0a49a..3c1ec516 100644 --- a/dev/incompressible_liquids/json/Water.json +++ b/dev/incompressible_liquids/json/Water.json @@ -51,7 +51,7 @@ "type": "notdefined" }, "name": "Water", - "reference": "Wagner2002, Transport properties from Huber et. al (2 papers)", + "reference": "Wagner2002, Huber2009", "saturation_pressure": { "coeffs": [ -3.863635e+03, diff --git a/dev/scripts/release.bsh b/dev/scripts/release.bsh index c0ccd305..d51209c6 100755 --- a/dev/scripts/release.bsh +++ b/dev/scripts/release.bsh @@ -5,6 +5,7 @@ # # Things to remember when you make a new release: # +# * Force a new build on all buildbots from the release branch # * Run the script and check the logs # * Make a tag in your git software # * Update the default download on sourceforge to point to the new sources @@ -52,22 +53,25 @@ else exit 1 fi # +# +SFUSER="jorritw" # ibell or jorritw BASEDIR="$HOME/buildbot/server-master/public_html" REPODIR="$HOME/src/CoolPropFull.git" TMPSDIR="$HOME/src/CoolProp.sources" SRCFOLDER="$BASEDIR/$BINFOLDER/source" +DOCFOLDER="$BASEDIR/$BINFOLDER/sphinx" +DOC4FILES="4.2.5/coolpropv425docs.zip" +DOC4FOLDER="$DOCFOLDER/v4" +# # if [ "$2" == "release" ]; then DRYRUN=false else DRYRUN=true fi -DOCFOLDER="$BASEDIR/$BINFOLDER/sphinx" -DOC4FILES="4.2.5/coolpropv425docs.zip" -DOC4FOLDER="$DOCFOLDER/v4" - echo "DRYRUN = $DRYRUN" - +# +# pushd ${BASEDIR} # Change the folder if [ "$DRYRUN" != "false" ]; then printMessage "Dry run detected" @@ -97,7 +101,7 @@ else cd $(basename $TMPSDIR) popd rm -f "$BINFOLDER/README.rst.txt" - if [ "$CPVERSION" = "nightly" ]; then + if [ "$CPVERSION" == "nightly" ]; then RSYNC_OPTS="-a --no-perms -z --stats --delete" rm -rf "$BINFOLDER/docs" CPVERSION="$CPVERSION"/ #$(date +%F) @@ -129,9 +133,13 @@ if [ ${CPVERSION:0:7} != "nightly" ]; then printMessage "Publishing the docs on SourceForge" rsync $RSYNC_DRY_RUN $RSYNC_OPTS "$DOCFOLDER/" frs.sf.net-$SFUSER:/home/project-web/coolprop/htdocs fi +# +if [[ ("$BINFOLDER" == "release") && ("$DRYRUN" == "false") ]]; then + printMessage "Removing release directory" + rm -rf "$BINFOLDER" + mkdir -p "$BINFOLDER" +fi # Change back to where we came from popd -printMessage "Removing release directory" -rm -rf $BINFOLDER printMessage "All done, goodbye." exit 0 diff --git a/src/Backends/REFPROP/REFPROPMixtureBackend.cpp b/src/Backends/REFPROP/REFPROPMixtureBackend.cpp index f5354b9b..5ee4d66e 100644 --- a/src/Backends/REFPROP/REFPROPMixtureBackend.cpp +++ b/src/Backends/REFPROP/REFPROPMixtureBackend.cpp @@ -51,6 +51,7 @@ enum DLLNameManglingStyle{ NO_NAME_MANGLING = 0, LOWERCASE_NAME_MANGLING, LOWERC #include "REFPROPMixtureBackend.h" #include "Exceptions.h" #include "Configuration.h" +#include "CoolProp.h" #include #include @@ -425,22 +426,25 @@ void REFPROPMixtureBackend::set_REFPROP_fluids(const std::vector &f errormessagelength // Length of error message ); - if (ierr <= 0) // Success (or a warning, which is silently squelched for now) + if (static_cast(ierr) <= 0) // Success (or a warning, which is silently squelched for now) { this->Ncomp = N; mole_fractions.resize(N); mole_fractions_liq.resize(N); mole_fractions_vap.resize(N); LoadedREFPROPRef = components_joined_raw; + if (CoolProp::get_debug_level() > 5){ std::cout << format("%s:%d: Successfully loaded REFPROP fluid: %s\n",__FILE__,__LINE__, components_joined.c_str()); } if (dbg_refprop) std::cout << format("%s:%d: Successfully loaded REFPROP fluid: %s\n",__FILE__,__LINE__, components_joined.c_str()); return; } else if (k < number_of_endings-1){ // Keep going + if (CoolProp::get_debug_level() > 5){std::cout << format("REFPROP error/warning [ierr: %d]: %s",ierr, herr) << std::endl;} continue; } else { - throw ValueError(format("Could not load these fluids: %s; error: %s", components_joined_raw.c_str(), herr)); + if (CoolProp::get_debug_level() > 5){std::cout << format("k: %d #endings: %d", k, number_of_endings) << std::endl;} + throw ValueError(format("Could not load these fluids: %s", components_joined_raw.c_str())); } } } @@ -514,21 +518,21 @@ long double REFPROPMixtureBackend::calc_T_critical(){ char herr[255]; double Tcrit, pcrit_kPa, dcrit_mol_L; CRITPdll(&(mole_fractions[0]),&Tcrit,&pcrit_kPa,&dcrit_mol_L,&ierr,herr,255); - if (ierr > 0) { throw ValueError(format("%s",herr).c_str()); } //else if (ierr < 0) {set_warning(format("%s",herr).c_str());} + if (static_cast(ierr) > 0) { throw ValueError(format("%s",herr).c_str()); } //else if (ierr < 0) {set_warning(format("%s",herr).c_str());} return static_cast(Tcrit); }; long double REFPROPMixtureBackend::calc_p_critical(){ long ierr = 0; char herr[255]; double Tcrit, pcrit_kPa, dcrit_mol_L; - CRITPdll(&(mole_fractions[0]),&Tcrit,&pcrit_kPa,&dcrit_mol_L,&ierr,herr,255); if (ierr > 0) { throw ValueError(format("%s",herr).c_str()); } //else if (ierr < 0) {set_warning(format("%s",herr).c_str());} + CRITPdll(&(mole_fractions[0]),&Tcrit,&pcrit_kPa,&dcrit_mol_L,&ierr,herr,255); if (static_cast(ierr) > 0) { throw ValueError(format("%s",herr).c_str()); } //else if (ierr < 0) {set_warning(format("%s",herr).c_str());} return static_cast(pcrit_kPa*1000); }; long double REFPROPMixtureBackend::calc_rhomolar_critical(){ long ierr = 0; char herr[255]; double Tcrit, pcrit_kPa, dcrit_mol_L; - CRITPdll(&(mole_fractions[0]),&Tcrit,&pcrit_kPa,&dcrit_mol_L,&ierr,herr,255); if (ierr > 0) { throw ValueError(format("%s",herr).c_str()); } //else if (ierr < 0) {set_warning(format("%s",herr).c_str());} + CRITPdll(&(mole_fractions[0]),&Tcrit,&pcrit_kPa,&dcrit_mol_L,&ierr,herr,255); if (static_cast(ierr) > 0) { throw ValueError(format("%s",herr).c_str()); } //else if (ierr < 0) {set_warning(format("%s",herr).c_str());} return static_cast(dcrit_mol_L*1000); }; long double REFPROPMixtureBackend::calc_T_reducing(){ @@ -572,7 +576,7 @@ double REFPROPMixtureBackend::calc_melt_Tmax() MELTPdll(&pmax_kPa, &(mole_fractions[0]), &Tmax_melt, &ierr,herr,errormessagelength); // Error message - if (ierr > 0) { throw ValueError(format("%s",herr).c_str()); } + if (static_cast(ierr) > 0) { throw ValueError(format("%s",herr).c_str()); } //else if (ierr < 0) {set_warning(format("%s",herr).c_str());} return Tmax_melt; } @@ -586,7 +590,7 @@ long double REFPROPMixtureBackend::calc_melting_line(int param, int given, long MELTTdll(&_T, &(mole_fractions[0]), &p_kPa, &ierr,herr,errormessagelength); // Error message - if (ierr > 0) { throw ValueError(format("%s",herr).c_str()); } //else if (ierr < 0) {set_warning(format("%s",herr).c_str());} + if (static_cast(ierr) > 0) { throw ValueError(format("%s",herr).c_str()); } //else if (ierr < 0) {set_warning(format("%s",herr).c_str());} return p_kPa*1000; } else if (param == iT && given == iP){ @@ -594,7 +598,7 @@ long double REFPROPMixtureBackend::calc_melting_line(int param, int given, long MELTPdll(&p_kPa, &(mole_fractions[0]), &_T, &ierr,herr,errormessagelength); // Error message - if (ierr > 0) { throw ValueError(format("%s",herr).c_str()); } //else if (ierr < 0) {set_warning(format("%s",herr).c_str());} + if (static_cast(ierr) > 0) { throw ValueError(format("%s",herr).c_str()); } //else if (ierr < 0) {set_warning(format("%s",herr).c_str());} return p_kPa*1000; } else{ @@ -616,7 +620,7 @@ long double REFPROPMixtureBackend::calc_viscosity(void) TRNPRPdll(&_T,&rhomol_L,&(mole_fractions[0]), // Inputs &eta,&tcx, // Outputs &ierr,herr,errormessagelength); // Error message - if (ierr > 0) { throw ValueError(format("%s",herr).c_str()); } + if (static_cast(ierr) > 0) { throw ValueError(format("%s",herr).c_str()); } //else if (ierr < 0) {set_warning(format("%s",herr).c_str());} _viscosity = 1e-6*eta; _conductivity = tcx; @@ -636,7 +640,7 @@ long double REFPROPMixtureBackend::calc_surface_tension(void) SURFTdll(&_T, &rho_mol_L, &(mole_fractions[0]), // Inputs &sigma, // Outputs &ierr, herr, errormessagelength); // Error message - if (ierr > 0) { throw ValueError(format("%s",herr).c_str()); } + if (static_cast(ierr) > 0) { throw ValueError(format("%s",herr).c_str()); } //else if (ierr < 0) {set_warning(format("%s",herr).c_str());} _surface_tension = sigma; return static_cast(_surface_tension); @@ -651,7 +655,7 @@ long double REFPROPMixtureBackend::calc_fugacity_coefficient(int i) FUGCOFdll(&_T, &rho_mol_L, &(mole_fractions[0]), // Inputs &(fug_cof[0]), // Outputs &ierr, herr, errormessagelength); // Error message - if (ierr > 0) { throw ValueError(format("%s",herr).c_str()); } + if (static_cast(ierr) > 0) { throw ValueError(format("%s",herr).c_str()); } //else if (ierr < 0) {set_warning(format("%s",herr).c_str());} return static_cast(fug_cof[i]); } @@ -662,7 +666,7 @@ void REFPROPMixtureBackend::calc_phase_envelope(const std::string &type) char herr[255]; SATSPLNdll(&(mole_fractions[0]), // Inputs &ierr, herr, errormessagelength); // Error message - if (ierr > 0) { throw ValueError(format("%s",herr).c_str()); } + if (static_cast(ierr) > 0) { throw ValueError(format("%s",herr).c_str()); } } long double REFPROPMixtureBackend::calc_cpmolar_idealgas(void) { @@ -701,7 +705,7 @@ void REFPROPMixtureBackend::update(CoolProp::input_pairs input_pair, double valu &rhoLmol_L,&rhoVmol_L,&(mole_fractions_liq[0]),&(mole_fractions[0]), // Saturation terms &q,&emol,&hmol,&smol,&cvmol,&cpmol,&w, &ierr,herr,errormessagelength); // - if (ierr > 0) { throw ValueError(format("PT: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} + if (static_cast(ierr) > 0) { throw ValueError(format("PT: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} // Set all cache values that can be set with unit conversion to SI _p = value1; @@ -723,7 +727,7 @@ void REFPROPMixtureBackend::update(CoolProp::input_pairs input_pair, double valu &rhoLmol_L,&rhoVmol_L,&(mole_fractions_liq[0]),&(mole_fractions_vap[0]), // Saturation terms &q,&emol,&hmol,&smol,&cvmol,&cpmol,&w, &ierr,herr,errormessagelength); - if (ierr > 0) { throw ValueError(format("DmolarT: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} + if (static_cast(ierr) > 0) { throw ValueError(format("DmolarT: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} // Set all cache values that can be set with unit conversion to SI _p = p_kPa*1000; @@ -752,7 +756,7 @@ void REFPROPMixtureBackend::update(CoolProp::input_pairs input_pair, double valu &rhoLmol_L,&rhoVmol_L,&(mole_fractions_liq[0]),&(mole_fractions_vap[0]), // Saturation terms &q,&emol,&hmol,&smol,&cvmol,&cpmol,&w, // Other thermodynamic terms &ierr,herr,errormessagelength); // Error terms - if (ierr > 0) { throw ValueError(format("DmolarP: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} + if (static_cast(ierr) > 0) { throw ValueError(format("DmolarP: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} // Set all cache values that can be set with unit conversion to SI _rhomolar = value1; @@ -782,7 +786,7 @@ void REFPROPMixtureBackend::update(CoolProp::input_pairs input_pair, double valu &rhoLmol_L,&rhoVmol_L,&(mole_fractions_liq[0]),&(mole_fractions_vap[0]), // Saturation terms &q,&emol,&smol,&cvmol,&cpmol,&w, &ierr,herr,errormessagelength); - if (ierr > 0) { throw ValueError(format("DmolarHmolar: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} + if (static_cast(ierr) > 0) { throw ValueError(format("DmolarHmolar: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} // Set all cache values that can be set with unit conversion to SI _p = p_kPa*1000; @@ -812,7 +816,7 @@ void REFPROPMixtureBackend::update(CoolProp::input_pairs input_pair, double valu &rhoLmol_L,&rhoVmol_L,&(mole_fractions_liq[0]),&(mole_fractions_vap[0]), // Saturation terms &q,&emol,&hmol,&cvmol,&cpmol,&w, &ierr,herr,errormessagelength); - if (ierr > 0) { throw ValueError(format("DmolarSmolar: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} + if (static_cast(ierr) > 0) { throw ValueError(format("DmolarSmolar: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} // Set all cache values that can be set with unit conversion to SI _p = p_kPa*1000; @@ -842,7 +846,7 @@ void REFPROPMixtureBackend::update(CoolProp::input_pairs input_pair, double valu &rhoLmol_L,&rhoVmol_L,&(mole_fractions_liq[0]),&(mole_fractions_vap[0]), // Saturation terms &q,&hmol,&hmol,&cvmol,&cpmol,&w, &ierr,herr,errormessagelength); - if (ierr > 0) { throw ValueError(format("DmolarUmolar: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} + if (static_cast(ierr) > 0) { throw ValueError(format("DmolarUmolar: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} // Set all cache values that can be set with unit conversion to SI _p = p_kPa*1000; @@ -871,7 +875,7 @@ void REFPROPMixtureBackend::update(CoolProp::input_pairs input_pair, double valu &rhoLmol_L,&rhoVmol_L,&(mole_fractions_liq[0]),&(mole_fractions_vap[0]), // Saturation terms &q,&emol,&smol,&cvmol,&cpmol,&w, // Other thermodynamic terms &ierr,herr,errormessagelength); // Error terms - if (ierr > 0) { throw ValueError(format("HmolarPmolar: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} + if (static_cast(ierr) > 0) { throw ValueError(format("HmolarPmolar: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} // Set all cache values that can be set with unit conversion to SI _p = value2; @@ -901,7 +905,7 @@ void REFPROPMixtureBackend::update(CoolProp::input_pairs input_pair, double valu &q,&emol,&hmol,&cvmol,&cpmol,&w, // Other thermodynamic terms &ierr,herr,errormessagelength); // Error terms - if (ierr > 0) { throw ValueError(format("PSmolar: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} + if (static_cast(ierr) > 0) { throw ValueError(format("PSmolar: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} // Set all cache values that can be set with unit conversion to SI _p = value1; @@ -932,7 +936,7 @@ void REFPROPMixtureBackend::update(CoolProp::input_pairs input_pair, double valu &q,&hmol,&smol,&cvmol,&cpmol,&w, // Other thermodynamic terms &ierr,herr,errormessagelength); // Error terms - if (ierr > 0) { throw ValueError(format("PUmolar: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} + if (static_cast(ierr) > 0) { throw ValueError(format("PUmolar: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} // Set all cache values that can be set with unit conversion to SI _p = value1; @@ -961,7 +965,7 @@ void REFPROPMixtureBackend::update(CoolProp::input_pairs input_pair, double valu &q,&emol,&cvmol,&cpmol,&w, // Other thermodynamic terms &ierr,herr,errormessagelength); // Error terms - if (ierr > 0) { throw ValueError(format("HmolarSmolar: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} + if (static_cast(ierr) > 0) { throw ValueError(format("HmolarSmolar: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} // Set all cache values that can be set with unit conversion to SI _p = p_kPa*1000; // 1000 for conversion from kPa to Pa @@ -992,7 +996,7 @@ void REFPROPMixtureBackend::update(CoolProp::input_pairs input_pair, double valu &q,&smol,&cvmol,&cpmol,&w, // Other thermodynamic terms &ierr,herr,errormessagelength); // Error terms - if (ierr > 0) { throw ValueError(format("SmolarUmolar: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} + if (static_cast(ierr) > 0) { throw ValueError(format("SmolarUmolar: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} // Set all cache values that can be set with unit conversion to SI _p = p_kPa*1000; // 1000 for conversion from kPa to Pa @@ -1031,7 +1035,7 @@ void REFPROPMixtureBackend::update(CoolProp::input_pairs input_pair, double valu &q,&emol,&hmol,&cvmol,&cpmol,&w, // Other thermodynamic terms &ierr,herr,errormessagelength); // Error terms - if (ierr > 0) { throw ValueError(format("SmolarT: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} + if (static_cast(ierr) > 0) { throw ValueError(format("SmolarT: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} // Set all cache values that can be set with unit conversion to SI _p = p_kPa*1000; // 1000 for conversion from kPa to Pa @@ -1069,7 +1073,7 @@ void REFPROPMixtureBackend::update(CoolProp::input_pairs input_pair, double valu &q,&emol,&smol,&cvmol,&cpmol,&w, // Other thermodynamic terms &ierr,herr,errormessagelength); // Error terms - if (ierr > 0) { throw ValueError(format("HmolarT: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} + if (static_cast(ierr) > 0) { throw ValueError(format("HmolarT: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} // Set all cache values that can be set with unit conversion to SI _p = p_kPa*1000; // 1000 for conversion from kPa to Pa @@ -1107,7 +1111,7 @@ void REFPROPMixtureBackend::update(CoolProp::input_pairs input_pair, double valu &q,&hmol,&smol,&cvmol,&cpmol,&w, // Other thermodynamic terms &ierr,herr,errormessagelength); // Error terms - if (ierr > 0) { throw ValueError(format("TUmolar: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} + if (static_cast(ierr) > 0) { throw ValueError(format("TUmolar: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} // Set all cache values that can be set with unit conversion to SI _p = p_kPa*1000; // 1000 for conversion from kPa to Pa @@ -1145,7 +1149,7 @@ void REFPROPMixtureBackend::update(CoolProp::input_pairs input_pair, double valu &emol,&hmol,&smol,&cvmol,&cpmol,&w, // Other thermodynamic terms &ierr,herr,errormessagelength); // Error terms - if (ierr > 0) { throw ValueError(format("PQ: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} + if (static_cast(ierr) > 0) { throw ValueError(format("PQ: %s",herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());} // Set all cache values that can be set with unit conversion to SI _p = value1; @@ -1176,7 +1180,7 @@ void REFPROPMixtureBackend::update(CoolProp::input_pairs input_pair, double valu &emol,&hmol,&smol,&cvmol,&cpmol,&w, // Other thermodynamic terms &ierr,herr,errormessagelength); // Error terms - if (ierr > 0) { + if (static_cast(ierr) > 0) { throw ValueError(format("TQ(%s): %s",LoadedREFPROPRef.c_str(), herr).c_str()); }// TODO: else if (ierr < 0) {set_warning(format("%s",herr).c_str());