npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@embr-modules/thermo

v0.1.5

Published

An Ignition module containing scripting and expression functions for computing properties of steam via an IF97 implementation.

Downloads

77

Readme

Embr Thermodynamics Module

An Ignition module containing scripting and expression functions for computing properties of steam via an IF97 implementation.

Getting Started

  1. Download the latest version from releases.
  2. Install the module through the Ignition Gateway web interface.

Module Documentation


IAPWS-IF97

IAPWS (The International Association for the Properties of Water and Steam) is an international non-profit association of national organizations concerned with the properties of water and steam, particularly thermophysical properties, cycle chemistry guidelines, and other aspects of high-temperature steam, water and aqueous mixtures relevant to thermal power cycles and other industrial and scientific applications.

This formulation (IAPWS-IF97) is recommended for industrial use (primarily the steam power industry) for the calculation of thermodynamic properties of ordinary water in its fluid phases, including vapor-liquid equilibrium. The formulation is a close approximation to the IAPWS-IF95 formulation for general and scientific use, but is designed for much greater computational speed.

The range of validity is divided into several regions (with close tolerances for consistency at region boundaries), each of which is represented by a different fundamental equation. Appropriate combinations of derivatives from this equation can produce any thermodynamic property desired (density or specific volume, sound speed, heat capacity, enthalpy, entropy, etc.). The formulation is valid from 273.15 K to 1073.15 K at pressures to 100 MPa, and there is a high-temperature region extending to 2273.15 K at pressures to 50 MPa. There is also a separate equation for metastable steam at pressures up to 10 MPa.

Valid Regions

if97 regions

Supported Properties and Parameters

| Property | Symbol | Units | (p, T) | (p, h) | (p, s) | (h, s) | (T, s) | (ρ, T) | (p, x) | (T, x) | |--------------------------------------------|--------|-------------|--------|--------|--------|--------|--------|--------|--------|--------| | Absolute pressure | p | Pa | | | | ✓ | | | ✓ | ✓ sat. | | Density | ρ | kg/m³ | ✓ | ✓ | ✓ | ✓ | | | ✓ | ✓ | | Dielectric constant | ε | - | ✓ | ✓ | ✓ | ✓ | | ✓ | | | | Dynamic viscosity | η | Pa·s | ✓ | ✓ | ✓ | ✓ | | ✓ | | | | Isobaric cubic expansion coefficient | αv | 1/K | ✓ | ✓ | ✓ | ✓ | | | | | | Isothermal compressibility | κT | 1/Pa | ✓ | ✓ | ✓ | ✓ | | | | | | Kinematic viscosity | ν | m²/s | ✓ | ✓ | ✓ | ✓ | | ✓ | | | | Prandtl number | Pr | - | ✓ | ✓ | ✓ | ✓ | | | | | | Refractive index | n | - | ✓ | ✓ | ✓ | ✓ | | ✓ | | | | Specific enthalpy | h | J/kg | ✓ | | ✓ | | | | ✓ | ✓ | | Specific entropy | s | J/(kg·K) | ✓ | ✓ | | | | | ✓ | ✓ | | Specific Gibbs free energy | g | J/kg | ✓ | | | | | | | | | Specific internal energy | u | J/kg | ✓ | ✓ | ✓ | ✓ | | | | | | Specific isobaric heat capacity | cp | J/(kg·K) | ✓ | ✓ | ✓ | ✓ | | | | | | Specific isochoric heat capacity | cv | J/(kg·K) | ✓ | ✓ | ✓ | ✓ | | | | | | Specific volume | v | m³/kg | ✓ | ✓ | ✓ | ✓ | | | ✓ | ✓ | | Speed of sound | w | m/s | ✓ | ✓ | ✓ | ✓ | | | | | | Surface tension | σ | N/m | | | | | | | ✓ | ✓ | | Temperature | T | K | | ✓ | ✓ | ✓ | | | ✓ sat. | | | Thermal conductivity | λ | W/(m·K) | ✓ | ✓ | ✓ | ✓ | | ✓ | | | | Thermal diffusivity | κ | m²/s | ✓ | ✓ | ✓ | ✓ | | | | | | Vapour fraction | x | - | | ✓ | ✓ | ✓ | ✓ | | | | | Wavelength of light | λL | m | | | | | | | | |

Scripting Functions

The following scripting functions are available in all Ignition scopes.

Each scripting function has a variety of overloads to match the Table of Supported Properties. The designer scripting hints also list the accepted parameters sets.

system.thermo.if97.compressibility(h, p, s, t)
system.thermo.if97.compressionFactor(p, t)
system.thermo.if97.density(h, p, s, t, x)
system.thermo.if97.dielectricConstant(h, p, rho, s, t)
system.thermo.if97.heatCapacityRatio(h, p, s, t)
system.thermo.if97.isentropicExponent(h, p, s, t)
system.thermo.if97.isobaricCubicExpansionCoefficient(h, p, s, t, x)
system.thermo.if97.isobaricHeatCapacity(h, p, s, t)
system.thermo.if97.isochoricHeatCapacity(h, p, s, t)
system.thermo.if97.kinematicViscosity(h, p, rho, s, t)
system.thermo.if97.prandtl(h, p, s, t)
system.thermo.if97.pressure(h, s)
system.thermo.if97.refractiveIndex(h, l, p, rho, s, t)
system.thermo.if97.saturationPressure(h, s, t)
system.thermo.if97.saturationTemperature(h, p, s)
system.thermo.if97.specificEnthalpy(p, s, t, x)
system.thermo.if97.specificEnthalpySaturatedLiquid(p, t)
system.thermo.if97.specificEnthalpySaturatedVapor(p, t)
system.thermo.if97.specificEntropy(h, p, t, x)
system.thermo.if97.specificEntropySaturatedLiquid(p, t)
system.thermo.if97.specificEntropySaturatedVapor(p, t)
system.thermo.if97.specificGibbsFreeEnergy(p, t)
system.thermo.if97.specificInternalEnergy(h, p, s, t, x)
system.thermo.if97.specificInternalEnergySaturatedLiquid(p, t)
system.thermo.if97.specificInternalEnergySaturatedVapor(p, t)
system.thermo.if97.specificVolume(h, p, s, t, x)
system.thermo.if97.specificVolumeSaturatedLiquid(p, t)
system.thermo.if97.specificVolumeSaturatedVapor(p, t)
system.thermo.if97.speedOfSound(h, p, s, t)
system.thermo.if97.vaporFraction(h, p, s, t)

Expression Functions

Because expression functions do not support operator overloading (and adding functions to cover all possibilities of parameters is impractical), this module provides a single expression function for accessing all if97 properties.

property is case-insensitive and parameters can be specified in any order.

// Usage
if97(property, [[parameter], [value]...])
    
// Examples
if97("specificEntropy", "p", 200000, "t", 400)
if97("saturationPressure", "t", 500)
if97("vaporFraction", "p", 110000, "t", 1150000)

Changelog

The changelog is regularly updated to reflect what's changed in each new release.

Copyright and Licensing

Copyright (C) 2024 Musson Industrial

Free use of this software is granted under the terms of the MIT License.