How usnistgov/refprop-wrappers works
This repository provides language-specific interfaces for calling NIST REFPROP, a compiled thermophysical-property library. The typical workflow is to provide fluid and state inputs through a host-language wrapper, invoke REFPROP calculations, and receive property values or errors. The sampled SWIG and Mathcad sources show setup and calculation calls; the Python ctypes wrapper shows native-library loading and argument conversion. The README documents additional language wrappers, but their runtime wiring is not established by the sampled files, so those connections are omitted.
Main entry points: REFPROP_lib.h Native function ABI · ctREFPROP.py ctypes wrapper · REFPROP.h SWIG API · REFPROP.cpp SWIG implementation
Components 17
Python interface
- ctypes wrapper
wrappers/python/ctypes/ctREFPROP/ctREFPROP.py
Native interfaces
- SWIG API
wrappers/swig/REFPROP.h - SWIG implementation
wrappers/swig/REFPROP.cpp - Native function ABI
wrappers/LabWindows/REFPROP_lib.h - LabWindows interface
wrappers/LabWindows/REFPROP_Main.c - C# interface
wrappers/Csharp/IRefProp/IRefProp64.cs - C# example app
wrappers/Csharp/RefProp_cs_Examples/Program.cs - Fortran wrappers
wrappers/FORTRAN/shared
Scientific clients
- Mathcad functions
wrappers/Mathcad/includes/rp_REFPROP.h - Mathcad add-in
wrappers/Mathcad/src/Refprop.cpp - MATLAB declarations
wrappers/MATLAB/legacy/REFPROP.h - Excel wrappers
- LabVIEW wrappers
- Other documented wrappers
REFPROP runtime
- Manager library
- REFPROP library
Other components
- Application user
Connections 19
- Application user → ctypes wrapper: supplies inputs
- ctypes wrapper → Manager library: loads library
- Manager library → REFPROP library: dispatches calls
- Application user → SWIG API: calls API
- SWIG API → SWIG implementation: defines interface
- SWIG implementation → Native function ABI: calls functions
- Native function ABI → REFPROP library: dispatches calls
- Application user → LabWindows interface: uses interface
- LabWindows interface → Native function ABI: uses declarations
- Application user → C# example app: uses example
- C# example app → C# interface: starts interface
- Application user → Mathcad add-in: uses add-in
- Mathcad add-in → Mathcad functions: exposes functions
- Mathcad functions → REFPROP library: calls functions
- Application user → MATLAB declarations: calls declarations
- Application user → Fortran wrappers: uses wrapper
- Application user → Excel wrappers: uses wrapper
- Application user → LabVIEW wrappers: uses wrapper
- Application user → Other documented wrappers: uses wrapper