Skip to content

merlresearch/SimpleRefrigerantProperties.jl

Repository files navigation

SimpleRefrigerantProperties.jl

SimpleRefrigerantProperties.jl provides lightweight models for evaluating thermodynamic properties of refrigerant fluids in Julia. The package is designed for quick integration into larger thermodynamic or system models where simple, fast property evaluations are sufficient.

Brief Technical Details

Thermodynamic properties are parameterized using pressure (Pa) and specific enthalpy (J/kg).

The models are constructed using 2-D interpolation over precomputed reference datasets. Property values are evaluated using bilinear interpolation over trapezoidal cells in the pressure–enthalpy (P–h) space. All interpolation routines are implemented directly within the package to minimize dependencies on external libraries.

The reference datasets are generated by sampling property data from REFPROP [1] on a non-uniform grid in P–h space. The sampled datasets are then processed to remove outliers, fill missing values, and reduce numerical noise [2]. This preprocessing ensures that the resulting property surfaces remain smooth and numerically stable for interpolation.

References:

[1] Lemmon, E. W., Bell, I. H., Huber, M. L., & McLinden, M. O. (2018). NIST Standard Reference Database 23: Reference Fluid Thermodynamic and Transport Properties (REFPROP), Version 10.0. National Institute of Standards and Technology. https://doi.org/10.18434/T4/1502528

[2] Laughman, Christopher, Deshpande, Vedang, Chakrabarty, Ankush, and Qiao, Hongtao (2024). Enhancing Thermodynamic Data Quality for Refrigerant Mixtures: Domain-Informed Anomaly Detection and Removal. International Refrigeration and Air Conditioning Conference. Paper 2595. https://docs.lib.purdue.edu/iracc/2595

Intended Use and Limitations

This package is intended as a simple surrogate property model for applications such as rapid development of thermodynamic system models (e.g., vapor compression cycle simulations), or situations where property evaluation is needed but is not the primary focus of the work. The property functions defined in this package rely on lookup tables and interpolation, which means the approximation accuracy may be limited. In particular, regions near saturation curves may exhibit higher interpolation errors. Therefore, this package may not be suitable for applications that are sensitive to thermodynamic property accuracy.

Currently supported thermodynamic properties include:

  1. Density
  2. Temperature
  3. Bubble enthalpy
  4. Dew enthalpy

Supported refrigerants:

  1. R32
  2. R410A

Additional refrigerants and properties may be added in future releases.

Requirements

This package requires Julia 1.8 or later. See Project.toml for all package dependencies.

Installation

SimpleRefrigerantProperties.jl is not yet available through the Julia package registry.

To install:

Add SimpleRefrigerantProperties.jl to your environment from the GitHub repository using the Julia package manager:

using Pkg
Pkg.add(url="https://github.com/merlresearch/SimpleRefrigerantProperties.jl")

Alternatively,

  1. Clone the repository or download the source code.
  2. Copy path to the SimpleRefrigerantProperties.jl directory.
  3. Add SimpleRefrigerantProperties.jl to your environment:
using Pkg
Pkg.add(path="/path/to/SimpleRefrigerantProperties.jl")

Usage

using SimpleRefrigerantProperties

# Check available refrigerants
available_refrigerants()

# Check if a particular refrigerant is available
has_refrigerant("R410A") # true

# Load refrigerant data
data = load_refrigerant("R410A")

# Query point
Pquery = 3.0e6   # Pa
hquery = 400e3   # J/kg

# Density and partial derivatives
ρ, dρdP, dρdh = DerDensity_Ph(Pquery, hquery, data)

# Temperature and partial derivatives
T, dTdP, dTdh = DerTemperature_Ph(Pquery, hquery, data)

# Saturation enthalpies
bub_h = BubbleEnthalpy_P(Pquery, data)
dew_h = DewEnthalpy_P(Pquery, data)

Tests

To verify that the package is installed correctly:

  1. Set the SimpleRefrigerantProperties.jl directory as your working directory.
  2. Run the test suite:
using Pkg
Pkg.activate(".")
Pkg.test()

Contributing

See CONTRIBUTING.md for our policy on contributions.

License

The SimpleRefrigerantProperties.jl is released under MIT License, as found in the LICENSE.md file.

All files:

Copyright (c) 2026 Mitsubishi Electric Research Laboratories (MERL).

SPDX-License-Identifier: MIT

Citing

If you use SimpleRefrigerantProperties.jl in your research or publications, please cite the software repository.

@software{SimpleRefrigerantPropertiesjl,
  title   = {SimpleRefrigerantProperties.jl: Interpolation-based Thermodynamic Property Models in Julia},
  author  = {Vedang M. Deshpande and Christopher Laughman},
  year    = {2026},
  url     = {https://github.com/merlresearch/SimpleRefrigerantProperties.jl}
}

Contact

For questions or bugs, contact Vedang M. Deshpande (Email: [email protected])

About

A lightweight Julia package for evaluating refrigerant thermodynamic properties

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages