Skip to content

Discrepancy between properties returned via different methods in 7.0 release #2590

@dallan-keylogic

Description

@dallan-keylogic

When CoolProp 7.0 was released, the CI for the IDAES interface to CoolProp began failing. This failure was not the result of new syntax being introduced, but because of inconsistency in the information returned by get_fluid_param_string and PropsSI.

import json
import CoolProp.CoolProp as CP

prop_str = CP.get_fluid_param_string("benzene", "JSON")
prop_dict = json.loads(prop_str)[0]

print(f"Critical temperature from string: {prop_dict["STATES"]["critical"]["T"]}")
print(f"Critical temperature from PropsSI: {CP.PropsSI("Tcrit","benzene")}")
print(f"Critical pressure from string: {prop_dict["STATES"]["critical"]["p"]}")
print(f"Critical pressure from PropsSI: {CP.PropsSI("Pcrit","benzene")}")
Critical temperature from string: 562.02
Critical temperature from PropsSI: 562.0196911219722
Critical pressure from string: 4894000.0
Critical pressure from PropsSI: 4906288.781088226

This inconsistency isn't that large (about 0.25% in the case of critical pressure), but is still discomfiting. Is this new behavior intended?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions