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

jasali

v2.2.0

Published

Library to estimate thermodynamic and transport properties of pure gas specie and gas mixtures

Downloads

38

Readme

1. Installation

JaSali is part of the ASALI project and it is a JavaScript library to estimate thermodynamic and transport properties of gas mixtures.
Its npm package can be installed as follow:

npm i jasali

2. Examples - JaSali is based on International System of Units

JaSali allows the estimation of thermodynamic and trasport properties of pure gas species and gas mixtures, as shown in the following examples.

2.1 Pure gas specie: O2

import {
  GasState,
  GasSpecie
} from "jasali"

//Generate gas state object
let state = GasState({
  temperature: 393.15,
  pressure: 4e05
})

//Generate specie object
let specie = GasSpecie({
  name: "O2",
  gasState: state
})

//Extract properties from the specie object
let name = specie.getName()
let molecularWeight = specie.getMolecularWeight()
let viscosity = specie.getViscosity()

2.2 Gas mixture: AIR

import {
  GasState,
  GasMixture
} from "jasali"

//Generate gas state object
let state = GasState({
  temperature: 298.15,
  pressure: 101325
})

//Generate mixture object
let mixture = GasMixture({
  mixtureComposition: {
    "O2": 0.21,
    "N2": 0.78,
    "AR": 0.01
  },
  gasState: state,
  compositionType: "mole"
})

//Extract properties from the mixture object
let density = mixture.getDensity()
let molecularWeight = mixture.getMolecularWeight()
let viscosity = mixture.getViscosity()

2.3 Gas mixture: Chemical equilibrium at constant temperature and pressure

import {
  GasState,
  GasMixture
} from "jasali"

//Generate gas state object
let state = GasState({
  temperature: 3000,
  pressure: 4e05
})

//Generate mixture object
let mixture = GasMixture({
  mixtureComposition: {
    "CO": 0.1,
    "CO2": 0.2,
    "O2": 0.7
  },
  gasState: state,
  compositionType: "mole"
})

//Extract chemical equilibrium composition
let x = mixture.calculateChemicalEquilibriumTP()

2.4 HTML frontend

This examples shows how to use JaSali from a pure frontend HTML file:

<script type="text/javascript" src="./jasali.js"></script>

<script>
function gasMixtureProperties()
{
  //Generate gas state object
  let state = jasali.GasState({
    temperature: 3000,
    pressure: 4e05
  })

  //Generate mixture object
  let mixture = jasali.GasMixture({
    mixtureComposition: {
      "CO": 0.1,
      "CO2": 0.2,
      "O2": 0.7
    },
    gasState: state,
    compositionType: "mole"
  })
  
  //Extract properties from the mixture object
  let density = mixture.getDensity()
}
</script>

3. Available thermodynamic and transport properties

Details on the properties estimated by JaSali can be found here.

4. Contacts

If you want to contribute, ask questions, report bugs or just say hello compile the form here