Musson Industrial's Thermodynamics Module

Embr-Thermodynamics

Musson Industrial is excited to announce the release of embr-thermodynamics, an Ignition module containing scripting and expression functions for computing properties of steam via an IF97 implementation.

Who is this for?

Anyone needing to calculate steam properties between 273.15 K to 1073.15 K at pressures up to 100 MPa.

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)

Sponsorship

If you benefit from this module for commercial use, we ask you to consider sponsoring our efforts through GitHub sponsors . Your support will allow us to continue development of open-source modules and tools that benefit the entire community (plus there are some bonuses for sponsors :slightly_smiling_face:).

14 Likes

Updates

  • First major release (1.0.0), to coincide with the publishing of documentation.
  • No functional changes from 0.1.6.

Documentation

Module documentation is now published at docs.mussonindustrial.com.
Check it out! :tada:

Download

Embr-Thermodynamics-1.0.0.modl

4 Likes