Git Product home page Git Product logo

wsif97's Introduction

License: GPL v3 GitHub R package version CRAN_Status_Badge wsif97 status badge CodeFactor Codecov test coverage

R-package for fast calculation of thermophysical properties of water and steam as formulated by International Association for the Properties of Water and Steam (IAPWS).


⚠ The development and support of this package has been finally discontinued. Use CRAN-package iapws instead.

Intro

The package is inspired by Java IF97 library and python's iapws module and tries to bring similar functionality to R-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.

Installation

For the present only r-universe version can be installed:

install.packages('wsif97', repos = 'https://omega1x.r-universe.dev')

ℹ The package is linked to and imports Rcpp-package as the only dependency.

Usage

The usage of wsif97 package is rather straightforward. Most of thermophysical properties are calculated by direct 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.85294010 831.65754105   0.02532198 184.18016876   0.72225586  43.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

Since Industrial Formulation abandons usage of iteration algorithms we similarly avoid using them in contrast to pythonic iapws. So be ready to meet some inconsistencies when compare those results with wsif97.

wsif97's People

Contributors

omega1x avatar

Watchers

 avatar

wsif97's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.