用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Soljourner/claude-engineering-skills --skill nist-refprop命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | nist-refprop |
| description | Query high-accuracy thermodynamic properties from NIST REFPROP database (commercial) |
| category | databases |
| domain | fluids |
| complexity | intermediate |
| dependencies | ["ctREFPROP"] |
Query high-accuracy thermodynamic and transport properties using the NIST REFPROP (Reference Fluid Thermodynamic and Transport Properties) database - the gold standard for thermophysical property calculations.
NIST REFPROP is a commercial-grade thermophysical property database developed by the National Institute of Standards and Technology (NIST). It provides:
REFPROP is the industry and research standard for:
COMMERCIAL LICENSE REQUIRED
NIST REFPROP is NOT free or open-source software. You must purchase a license from NIST:
License includes:
Important Notes:
C:\Program Files (x86)\REFPROP\)pip install ctREFPROP
The ctREFPROP package provides a Python interface to REFPROP using ctypes.
The Python wrapper needs to know where REFPROP is installed:
Windows:
# PowerShell
$env:RPPREFIX = "C:\Program Files (x86)\REFPROP\"
# Or set permanently via System Properties > Environment Variables
Linux/Mac:
export RPPREFIX="/path/to/REFPROP/"
Python (alternative):
import os
os.environ['RPPREFIX'] = r'C:\Program Files (x86)\REFPROP'
from ctREFPROP.ctREFPROP import REFPROPFunctionLibrary
# Initialize REFPROP
RP = REFPROPFunctionLibrary(os.environ['RPPREFIX'])
RP.SETPATHdll(os.environ['RPPREFIX'])
# Test query
print(RP.RPVersion())
REFPROP includes 147+ pure fluids organized by class:
See reference.md for complete fluid list.
REFPROP uses different function calls than CoolProp:
from ctREFPROP.ctREFPROP import REFPROPFunctionLibrary
import os
# Initialize
RP = REFPROPFunctionLibrary(os.environ['RPPREFIX'])
RP.SETPATHdll(os.environ['RPPREFIX'])
# Define fluid
MOLAR_BASE_SI = RP.GETENUMdll(0, "MOLAR BASE SI").iEnum
fluid = "WATER"
# Single component
r = RP.REFPROPdll(fluid, "TP", "D;H;S;CP;CV;W;VIS;TCX", MOLAR_BASE_SI, 0, 0, 298.15, 101.325, [1.0])
# Access results
density = r.Output[0] # kg/m³
enthalpy = r.Output[1] # J/kg
entropy = r.Output[2] # J/kg/K
cp = r.Output[3] # J/kg/K
cv = r.Output[4] # J/kg/K
sound_speed = r.Output[5] # m/s
viscosity = r.Output[6] # Pa·s
conductivity = r.Output[7] # W/m/K
| Code | Property | Unit |
|---|---|---|
TP | Temperature, Pressure | K, kPa |
TH | Temperature, Enthalpy | K, J/kg |
TS | Temperature, Entropy | K, J/kg/K |
TD | Temperature, Density | K, kg/m³ |
PH | Pressure, Enthalpy | kPa, J/kg |
PS | Pressure, Entropy | kPa, J/kg/K |
PD | Pressure, Density | kPa, kg/m³ |
TQ | Temperature, Quality | K, - |
PQ | Pressure, Quality | kPa, - |
| Code | Property | Unit |
|---|---|---|
D | Density | kg/m³ |
H | Enthalpy | J/kg |
S | Entropy | J/kg/K |
U | Internal energy | J/kg |
CP | Heat capacity (const P) | J/kg/K |
CV | Heat capacity (const V) | J/kg/K |
W | Speed of sound | m/s |
VIS | Viscosity | Pa·s |
TCX | Thermal conductivity | W/m/K |
KV | Kinematic viscosity | m²/s |
PRANDTL | Prandtl number | - |
STN | Surface tension | N/m |
P | Pressure | kPa |
T | Temperature | K |
Q | Quality (vapor fraction) | - |
Multiple properties can be requested in one call, separated by semicolons: "D;H;S;CP;VIS;TCX"
One of REFPROP's key advantages is sophisticated mixture handling:
# Define mixture by components and mole fractions
fluid = "METHANE;ETHANE;PROPANE"
z = [0.9, 0.07, 0.03] # Mole fractions (must sum to 1.0)
# Query mixture properties
r = RP.REFPROPdll(fluid, "TP", "D;H;S", MOLAR_BASE_SI, 0, 0, 250.0, 5000.0, z)
Mixture Features:
While CoolProp is excellent and free, REFPROP offers:
Use REFPROP when:
Use CoolProp when:
Validation Note: CoolProp is validated against REFPROP, confirming REFPROP as the reference standard.
from ctREFPROP.ctREFPROP import REFPROPFunctionLibrary
import os
# Setup
os.environ['RPPREFIX'] = r'C:\Program Files (x86)\REFPROP'
RP = REFPROPFunctionLibrary(os.environ['RPPREFIX'])
RP.SETPATHdll(os.environ['RPPREFIX'])
MOLAR_BASE_SI = RP.GETENUMdll(0, "MOLAR BASE SI").iEnum
# Query water at 25°C, 1 bar
fluid = "WATER"
T = 298.15 # K
P = 100.0 # kPa
r = RP.REFPROPdll(fluid, "TP", "D;H;S;CP;VIS;TCX", MOLAR_BASE_SI, 0, 0, T, P, [1.0])
print(f"Water at {T} K, {P} kPa:")
print(f" Density: {r.Output[0]:.4f} kg/m³")
print(f" Enthalpy: {r.Output[1]:.2f} J/kg")
print(f" Entropy: {r.Output[2]:.2f} J/kg/K")
print(f" Cp: {r.Output[3]:.2f} J/kg/K")
print(f" Viscosity: {r.Output[4]*1000:.4f} mPa·s")
print(f" Conductivity: W/m/K")
REFPROP returns error codes and messages:
r = RP.REFPROPdll(fluid, "TP", "D", MOLAR_BASE_SI, 0, 0, T, P, z)
if r.ierr > 0:
print(f"Error {r.ierr}: {r.herr}")
elif r.ierr < 0:
print(f"Warning {r.ierr}: {r.herr}")
else:
print(f"Success: {r.Output[0]}")
REFPROP uses different unit conventions than CoolProp:
Default Units (with MOLAR BASE SI):
Unit Systems Available:
NIST REFPROP Website
REFPROP Documentation
REFPROP.pdf in installation directoryctREFPROP Documentation
# Initialize
from ctREFPROP.ctREFPROP import REFPROPFunctionLibrary
RP = REFPROPFunctionLibrary(os.environ['RPPREFIX'])
RP.SETPATHdll(os.environ['RPPREFIX'])
MOLAR_BASE_SI = RP.GETENUMdll(0, "MOLAR BASE SI").iEnum
# Pure fluid
r = RP.REFPROPdll("WATER", "TP", "D;H;S", MOLAR_BASE_SI, 0, 0, 300.0, 101.325, [1.0])
# Mixture
r = RP.REFPROPdll("METHANE;ETHANE", "TP", "D;H;S", MOLAR_BASE_SI, 0, 0, 200.0, 5000.0, [0.9, 0.1])
# Check for errors
if r.ierr != 0:
print(f"Error/Warning: {r.herr}")
NIST REFPROP is the gold standard for thermophysical properties. While it requires a commercial license, the investment is justified for applications requiring the highest accuracy, mixture calculations, or publication-quality results. For open-source alternatives, see the coolprop-db skill.
Query loss coefficients for pipes, valves, fittings in pump systems
基于 SOC 职业分类