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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@openmep/hvac-domain

v0.4.0

Published

Deterministic round-duct sizing and supply/return/exhaust network propagation, as a library and a host-free CLI (openmep-hvac).

Readme

@openmep/hvac-domain

Deterministic, dependency-free ESM primitives for equal-friction round-duct sizing and supply, return, exhaust, and outside-air network propagation, plus a CLI that runs them on a JSON network with no editor or host. For agents, @openmep/mcp serves the same engine as MCP tools.

CLI

npx -p @openmep/hvac-domain openmep-hvac size network.json --pretty
npx -p @openmep/hvac-domain openmep-hvac duct --cfm 250 --role main --diameter-in 6
npx -p @openmep/hvac-domain openmep-hvac duct --cfm 900 --airflow return --width-in 14 --height-in 8

size takes a JSON array of NetworkItems (or { "items": [...] }): equipment, fittings, terminals with requiredCfm, and segments linked by connectedItemRefs. A segment may describe its existing section, {"shape":"round","diameterIn":6} or {"shape":"rect","widthIn":14,"heightIn":8}, and is then graded ok, undersized, or oversized by ASHRAE circular equivalent. Each terminal's airflowType (supply, return, exhaust, outside-air) picks the system; its CFM follows same-system or unknown items to equipment and is sized with that system's velocity caps. Output: summary, findings (missing-required-cfm: error for supply, warning for other systems; no-equipment-path, dangling-reference, mixed-system-segment, undersized, oversized), and segments with system, CFM, role, recommended standard diameter, velocity, and friction rate. Exit codes: 0, 1 with --fail-on-findings and error findings, 2 for invalid input (NetworkInputError with a JSON path) or an engine error. See examples/furnace-two-registers.items.json; the same document is what openmep-pascal items emits from a Pascal scene.

Library

import { recommendDuctSegments } from "@openmep/hvac-domain";

const result = recommendDuctSegments(items); // or { airflowTypes: ["supply"] }

sizeRoundDuct uses the ASHRAE friction-chart fit for galvanized round duct at standard air. sizeDuctForAirflow applies role-based velocity caps for supply, return, exhaust, or outside air; sizeSupplyRoundDuct is the supply convenience wrapper. recommendDuctSegments returns sorted arrays suitable for JSON serialization; recommendSupplyDuctSegments restricts it to supply. sizeSingleDuct and sizeNetworkInput are the CLI's two commands as functions.

Engineering basis

The round-duct relation is Δp = 0.109136·Q^1.9/D^5.02, with pressure drop in in. w.g. per 100 ft, airflow in CFM, and diameter in inches. It assumes standard air (0.075 lb/ft³) and galvanized round duct roughness near 0.0003 ft. See the official ASHRAE Duct Design chapter for the standard-air friction chart and the 2025 ASHRAE Handbook—Fundamentals overview for the current volume. Velocity caps are transparent recommendations, not universal engineering limits.

Scope and limitations

  • Network propagation covers terminals with a positive requiredCfm in a classified system. An unknown item is shared by every system; if two systems load the same unclassified segment it is reported, not sized.
  • Recommendations are round. Existing rect and flat-oval sections are graded by ASHRAE circular equivalent; rectangular selection is not included.
  • connectedItemRefs are treated as an undirected graph because port direction is not represented.
  • Each terminal uses one lexically deterministic shortest compatible path to equipment. Loops are not hydraulically balanced and alternate paths do not share flow.
  • The calculation excludes fitting losses, pressure summation, fan selection, diversity, static-regain design, elevation, non-standard air, code compliance, and engineering judgment.

Use the output as a transparent preliminary sizing primitive; validate final designs with a qualified mechanical engineer.

Development

npm run build --workspace @openmep/hvac-domain
npm run test --workspace @openmep/hvac-domain

MIT licensed. See CONTRIBUTING.md and SECURITY.md.