Overview
We're excited to announce the release of CoolProp-OOP v1.1.0! This version introduces a major enhancement to the API with a fully object-oriented property-based interface, improved error handling, and better state management.
Key Features
- **New Object-Oriented API**: Fully Pythonic property-based getters and setters replace the previous list-based initialization
- **Comprehensive Property Validation**: Automatic validation of inputs prevents physically impossible states
- **State Constraint Management**: Built-in tracking and management of thermodynamic constraints
- **Advanced Error Handling**: Detailed error messages explain why a state configuration is invalid
- **Improved Performance**: Enhanced property caching reduces calculation overhead
- **New State Information Methods**: Access detailed state information through the `constraints` property
Deprecated Features
- The list-based initialization method (e.g., `StateHA(['P', 101325, 'T', 293.15, 'R', 0.5])`) is now deprecated and will be removed in version 2.0.0
- The `set()` method is deprecated in favor of direct property assignment
Migration Guide
Previous API (Deprecated)
python
Humid Air - Deprecated style
state = StateHA(['P', 101325, 'T', 293.15, 'R', 0.5])
Pure Fluid - Deprecated style
state = StatePROPS(['P', 101325, 'T', 373.15, 'water'])
New API (Recommended)
python
Humid Air - New style
state = StateHA()
state.press = 101325
state.tempc = 20