Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pressure Unit Reference Data

A small, machine-readable pressure conversion reference for developers, analysts, and technical writers.

The data file stores the number of pascals in one unit. To convert a value from unit A to unit B:

result = value × pascals_per_A ÷ pascals_per_B

Example: 2.5 MPa to bar

2.5 × 1,000,000 ÷ 100,000 = 25 bar

Usage

import { convertPressure } from './convert-pressure.js';

console.log(convertPressure(30, 'psi', 'bar'));
// 2.0684271879504004

Keep full precision during the calculation and round only the final result. Also record whether a measurement is gauge or absolute pressure: changing the unit does not change its reference pressure.

For interactive calculations and unit definitions, use the UnitConv pressure converter.

Reference notes

  • Pascal, kilopascal, megapascal, and bar relationships are exact.
  • Standard atmosphere is exactly 101,325 Pa.
  • Torr is represented as 1/760 of a standard atmosphere.
  • Conventional mercury-column factors depend on standard reference conditions.

For standards-based work, verify the required convention against the current NIST and BIPM documentation used by your organization.

License

MIT

About

Machine-readable pressure conversion factors and JavaScript helper

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages