Unable to set refprop path

423 views
Skip to first unread message

Zachary Howard

unread,
Oct 31, 2016, 5:24:11 PM10/31/16
to coolprop-users
Hey,

I'm trying to set the refprop path so that I can use a custom mixture. When I run the following script:

import CoolProp.CoolProp as CP


CP.set_config_string(CP.ALTERNATIVE_REFPROP_PATH, r'c:\Program Files (x86)\REFPROP\\')

print CP.get_config_string(CP.ALTERNATIVE_REFPROP_PATH)


it prints and empty string indicating (I think...) that it did not change the default path. When I follow that with:


print CP.PropsSI("T","P",101325,"Q",0,"REFPROP::Water")


I get the "ValueError: Initialize failed for backend: "REFPROP", fluid: "Water" fractions "[ 1.0000000000 ]"; error: You cannot use the REFPROPMixtureBackend. : PropsSI("T","P",101325,"Q",0,"REFPROP::Water")" error.



Do you guys have any suggestions on how to fix this?


Thanks for any help!


-Zach

Ian Bell

unread,
Oct 31, 2016, 9:53:46 PM10/31/16
to coolpro...@googlegroups.com
That is interesting...  I can confirm that it does not return the string - that is a bug, see: https://github.com/CoolProp/CoolProp/issues/1307

On the other hand, it does seem to be picking up the variable properly, see the code below:

So it seems your refprop configuration has a different problem.  What version of REFPROP and CoolProp do you use?

import CoolProp.CoolProp as CP
CP.set_config_string(CP.ALTERNATIVE_REFPROP_PATH, '/opt/refprop/rp')
print CP.get_config_string(CP.ALTERNATIVE_REFPROP_PATH)
print CP.get_config_as_json_string()

yielding

{
    "NORMALIZE_GAS_CONSTANTS": true,
    "CRITICAL_WITHIN_1UK": true,
    "CRITICAL_SPLINES_ENABLED": true,
    "SAVE_RAW_TABLES": false,
    "ALTERNATIVE_TABLES_DIRECTORY": "",
    "ALTERNATIVE_REFPROP_PATH": "/opt/refprop/rp",
    "ALTERNATIVE_REFPROP_HMX_BNC_PATH": "",
    "REFPROP_DONT_ESTIMATE_INTERACTION_PARAMETERS": false,
    "REFPROP_USE_GERG": false,
    "REFPROP_USE_PENGROBINSON": false,
    "MAXIMUM_TABLE_DIRECTORY_SIZE_IN_GB": 1.0,
    "DONT_CHECK_PROPERTY_LIMITS": false,
    "HENRYS_LAW_TO_GENERATE_VLE_GUESSES": false,
    "PHASE_ENVELOPE_STARTING_PRESSURE_PA": 100.0,
    "R_U_CODATA": 8.3144598,
    "VTPR_UNIFAQ_PATH": ""
}

--
You received this message because you are subscribed to the Google Groups "coolprop-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coolprop-users+unsubscribe@googlegroups.com.
To post to this group, send email to coolprop-users@googlegroups.com.
Visit this group at https://groups.google.com/group/coolprop-users.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages