- Notifications
You must be signed in to change notification settings - Fork0
omega1x/wsif97
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
R-package for fast calculation of thermophysical properties of water and steam as formulated byInternational Association for the Properties of Water and Steam (IAPWS).
⚠ The development and support of this package has been finally discontinued. UseCRAN-packageiapws instead.
The package is inspired byJava IF97 library andpython'siapws module and tries to bring similar functionality toR-community without unwanted external dependencies. At present the package grows in functionality smoothly as needed in conjunction with analytic requirements of the author's company.
For the present onlyr-universe version can be installed:
install.packages('wsif97',repos='https://omega1x.r-universe.dev')
ℹ The package is linked to and importsRcpp-package as the only dependency.
The usage ofwsif97 package is rather straightforward. Most of thermophysical properties are calculated bydirect vectorized functions of appropriate arguments:
## Calculate density (kg/m^3) of ordinary water at different temperatures## and pressures:>t<- c(300,500,300,700,1500,1500,2000)# [K]>p<- c(3,3,.35e-2,30,.5,30,30)# [MPa]>density<- tpr(t,p)# [kg/m^3]> print(density)[1]997.85294010831.657541050.02532198184.180168760.7222558643.33482271[7]32.11456228
For the present time the next thermophysical properties can be calculated.
Property | Designation | Units | (T-p)-space |
---|---|---|---|
Temperature | T | K | - |
Pressure | p | MPa | - |
Specific volume | v | m³/kg | tpv |
Specific internal energy | u | kJ/kg | tpu |
Specific entropy | s | kJ/kg/K | tps |
Specific enthalpy | h | kJ/kg | tph |
Specific isobaric heat capacity | cp | kJ/kg/K | tpcp |
Specific isohoric heat capacity | cv | kJ/kg/K | tpcv |
Speed of sound | w | m/s | tpw |
Isobaric cubic expansion coefficient | αv | 1/K | tpe |
Isothermal compressibility | KT | 1/MPa | tpi |
Mass density | ρ | kg/m³ | tpr |
SinceIndustrial Formulation abandons usage of iteration algorithms we similarly avoid using them in contrast topythoniciapws. So be ready to meet some inconsistencies when compare those results withwsif97.