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 🙏

© 2025 – Pkg Stats / Ryan Hefner

id-diagram

v3.0.8

Published

Wet air HVAC calc. Расчет состояний влажного воздуха.

Readme

id-diagram

Install

$ yarn add id-diagram

Documentation

import { TDPoint } from 'id-diagram';

const pointB1 = new TDPoint({ t: 28, fi: 43 });

const h1 = pointB1.getHumidity(); // g/kg
const e1 = pointB1.getEnthalpy(); // kJ/kg
const tWB1 = pointB1.getWBT(); // C
const tR1 = pointB1.getDPT(); // C

Road Map

Параметры точки

  • [x] pointB1.get('t') Температура точки / Point temperature, C
  • [x] pointB1.get('fi') Относительная влажность точки / Relativity, %
  • [x] pointB1.getHumidity() Влагосодержание / Humidity, g/kg dry air
  • [x] pointB1.getEnthalpy() Энтальпия / Enthalpy, kJ/kg
  • [x] pointB1.getDPT() Точка росы / Dew Point Temperature, C
  • [x] pointB1.getWBT() Температура мокрого термометра / Wet Bulb Temperature, C

Если point.hasErrors(), значит что-то пошло не так. -> You can get errors by point.getErrors() as Array.
Точка росы и температура мокрого термометра определяются по линиям.

Вычисление термодинамических процессов (EXPERIMENTAL)

Processes

  • [x] HEATING h= const
// Проверено по диаграмме (есть погрешность по влагосодержанию)
const pointB2 = pointB1.process({
  type: 'heating',
  finalParams: { t: 50 }
});

console.log(pointB2.get('fi'));
// 14.303548169006595 // %

console.log(pointB2.getHumidity());
// 11.030613525086391 // g/kg

console.log(pointB2.getEnthalpy());
// 79.36048832701628 // kJ/kg

console.log(pointB2.processResult);
// { DELTA_H: 0.8795309509888156, WTF?
//   DELTA_E: 25.407626019937837,
//   DELTA_FI: -28.696451830993404 }

// And also, we have access to parent point:
console.log(pointB2.parentPoint.get('t'));
// 28 // C
  • [x] COOLING
// ---
// CASE 1: Без конденсации (проверено по диаграмме)
// ---
const pointB3 = pointB1.process({
  type: 'cooling',
  finalParams: { t: 25 }
});

const t3 = pointB3.get('t');
const fi3 = pointB3.get('fi');
const h3 = pointB3.getHumidity();
const e3 = pointB3.getEnthalpy();
const resultB1B3 = pointB3.processResult;

console.log(t3); // 25 // С
console.log(fi3); // 51.307066576678906 // %
console.log(h3); // 10.149613772703198 // g/kg
console.log(e3); // 50.79081480354759 // kJ/kg
console.log(resultB1B3);
// { DELTA_H: -0.0014688013943775502,
//   DELTA_E: -3.1620475035308573,
//   DELTA_FI: 8.307066576678906 }

// ---
// CASE 2: С конденсацией (проверено по диаграмме)
// ---
const pointB5 = pointB1.process({
  type: 'cooling',
  finalParams: { t: 10 }
});

const t5 = pointB5.get('t');
const fi5 = pointB5.get('fi');
const h5 = pointB5.getHumidity();
const e5 = pointB5.getEnthalpy();
const resultB4B5 = pointB5.processResult;
const resultB1B4 = resultB4B5.processResult;

console.log(t5); // 10 // С
console.log(fi5); // 100.03540745962107 // %
console.log(h5); // 7.630926160310488 // g/kg
console.log(e5); // 28.866936028559984 // kJ/kg
console.log(resultB4B5);
// Разница относительно предпоследнего процесса (прохождения через температуру
// точки росы):
// { DELTA_H: -2.516293286721109,
//   DELTA_E: -10.617290172969213,
//   DELTA_FI: 0.051985222719508783 }
  • [ ] ADIABATIC (NOT COMPLETED!) e= const
// ---
// CASE 1: Известна конечная температура
// ---
// [x] 1.1: Конечная температура ниже, чем tWB.
// Кстати, уменьшение температуры по линии энтальпии не может быть ниже
// температуры мокрого термометра - будет возвращена точка tWB, соответствующая
// минимально возможной температуре при изоэнтальпийном процессе.
// Результаты проверены по диаграмме.
const pointB6 = pointB1.process({
  type: 'adiabatic',
  finalParams: { t: 10 }
});

console.log(pointB6.get('t'));
// 19.030956508469423 // C

console.log(pointB6.get('fi'));
// 100 // %

console.log(pointB6.getHumidity());
// 13.82407829328307 // g/kg

console.log(pointB6.getEnthalpy());
// 53.66738700175793 // kJ/kg

console.log(pointB6.processResult);
// { DELTA_H: 3.6729957191854954,
//   DELTA_E: -0.28547530532051724,
//   DELTA_FI: 57 }

// [ ] FAILED! 1.2: Конечная температура выше исходной.
const pointB7 = pointB1.process({
  type: 'adiabatic',
  finalParams: { t: 40 }
});

console.log(pointB7.get('t'));
// 40 // C

console.log(pointB7.get('fi'));
// 21.0247699557539 // %

console.log(pointB7.getHumidity());
// 9.677198625202468 // g/kg

console.log(pointB7.getEnthalpy());
// 65.39190185806618 // kJ/kg

console.log(pointB7.processResult);
// { DELTA_H: -0.4738839488951072,
//   DELTA_E: 11.43903955098773,
//   DELTA_FI: -21.9752300442461 }

// ---
// CASE 2: Известна конечная влажность
// ---
// [x] 2.1: Влажность ниже исходной (есть погрешность)
const pointB8 = pointB1.process({
  type: 'adiabatic',
  finalParams: { fi: 85 }
});

console.log(pointB8.get('t'));
// 21.391231111503785 // C

console.log(pointB8.get('fi'));
// 85 // %

console.log(pointB8.getHumidity());
// 13.593025403474082 // g/kg

console.log(pointB8.getEnthalpy());
// 55.59186936444388 // kJ/kg (WTF? 54 по диаграмме)

console.log(pointB8.processResult);
// { DELTA_H: 3.441942829376506,
//   DELTA_E: 1.6390070573654327,
//   DELTA_FI: 42 }

// [ ] FAILED! 2.2: Влажность выше исходной
const pointB9 = pointB1.process({
  type: 'adiabatic',
  finalParams: { fi: 25 }
});

console.log(pointB9.get('t'));
// 30.832329523641235 // C

console.log(pointB9.get('fi'));
// 25 // %

console.log(pointB9.getHumidity());
// 6.912574036124484 // g/kg

console.log(pointB9.getEnthalpy());
// 48.89727121058972 // kJ/kg

console.log(pointB9.processResult);
// { DELTA_H: -3.2385085379730914,
//   DELTA_E: -5.055591096488726,
//   DELTA_FI: -18 }
  • [ ] Others

To be continued...

Commands

  • npm run clean - Remove lib/ directory
  • npm test - Run tests with linting and coverage results.
  • npm test:only - Run tests without linting or coverage.
  • npm test:watch - You can even re-run tests on file changes!
  • npm test:prod - Run tests with minified code.
  • npm run test:examples - Test written examples on pure JS for better understanding module usage.
  • npm run lint - Run ESlint with airbnb-config
  • npm run cover - Get coverage report for your code.
  • npm run build - Babel will transpile ES6 => ES5 and minify the code.
  • npm run prepublish - Hook for npm. Do all the checks before publishing your module.

License

MIT © Den Pol