Skip to content

cheminfo/fluid-properties

Repository files navigation

fluid-properties

NPM version build status Test coverage npm download

Calculate thermodynamic properties of molecular fluids. Translation of Daniele Ongari's package

Installation

$ npm i fluid-properties

Usage

import { MolecularFluid, getProperties } from 'fluid-properties';

MolecularFluid.fromName('methane');
const res = getProperties(methane, 290, { pressure: 100 });

// {
//     temperature: 290,
//     pressure: 100,
//     phaseProperties: [
//         {
//         fugacityCoefficient: 0.8071942852537269,
//         fugacity: 80.71942852537269,
//         residualEnthalpy: -0.7670409991968398,
//         residualEntropy: -0.5528501095136379,
//         residualGibbsEnergy: -0.21419088968320188,
//         compressibilityFactor: 0.8168115913954548,
//         molarDensity: 5.077735676091721,
//         density: 0.08145959489464415
//         }
//     ],
//     zList: [ 0.8168115913954548 ],
//     inPhase: 0
//     }

License

MIT