去年の9月に調べていたOF+熱物性値ライブラリ関連を放置していたけど、μORCシステムを真面目に設計するため、再調査してみる。
使えそうなライブラリ
freesteam 2.1: 国際標準IAPWSを利用した水・水蒸気熱物性値ライブラリ(C/C++) http://freesteam.sourceforge.net/
CoolProp 5.1.0: オープンソース熱物性値ライブラリ(C/C++/Fortran/C#ほか多数, prerequisites: cmake/git/python/c++compiler/7zip)
https://github.com/CoolProp/CoolProp
NIST Refprop 9.1:NIST提供(有償)熱物性ライブラリ
http://www.nist.gov/srd/nist23.cfm
NIST Refpropのダイナミックライブラリ化
Refpropのダイナミックライブラリ化を行っているプロジェクト
https://github.com/jowr/librefprop.so
CoolPropのダイナミックライブラリ化
バイナリファイルはこちらにあるようだ。
http://sourceforge.net/projects/coolprop/files/CoolProp/5.1.0/shared_library/Linux/64bit/
自前でビルドするなら、
OF23の環境になってから
# Check out the sources for CoolProp
git clone https://github.com/CoolProp/CoolProp --recursive(-recursiveをつけないとexternals以下が不完全です。)
# Move into the folder you just created
cd CoolProp
# Make a build folder
mkdir build && cd build
# Generate builder
cmake .. -DCOOLPROP_SHARED_LIBRARY=ON
# Build
cmake --build .→ libCoolProp.soができる。bitは指定しなければ、OSと同じ。
# Installation
OFとの連携を考えるのであれば、上記の.soファイルをケースフォルダなどに入れておけば良い。
FreeSteamライブラリとOF(>2.2)との連携
https://github.com/romansCode/IAPWS-IF97-OF
git clone https://github.com/romansCode/IAPWS-IF97-OF.git
cd IAPWS-IF97-OF
wclean && wmake libso※ OF-2.3.xでもビルドOKでした。
Usage:
- add libIAPWSRangeThermo.so and libfreesteam.so to the libraries in controlDict libs {"libIAPWSRangeThermo.so" "libfreesteam.so" }
- use the thermophysicalProperties file provided in example folder