@isentropic/dim-si 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +189 -0
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/almost_equals.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/array_includes.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/assert.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/assertion_error.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/1.0.19/equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/exists.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/fail.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/false.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/greater.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/greater_or_equal.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/instance_of.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/is_error.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/less.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/less_or_equal.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/match.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/mod.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/1.0.19/not_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/not_instance_of.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/not_match.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/not_strict_equals.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/object_match.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/rejects.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/strict_equals.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/string_includes.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/throws.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/unimplemented.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/unreachable.d.ts.map +1 -1
- package/esm/src/absorbed-dose.d.ts +2 -1
- package/esm/src/absorbed-dose.d.ts.map +1 -1
- package/esm/src/absorbed-dose.js +2 -1
- package/esm/src/angular-acceleration.d.ts +23 -0
- package/esm/src/angular-acceleration.d.ts.map +1 -0
- package/esm/src/angular-acceleration.js +18 -0
- package/esm/src/angular-velocity.d.ts +31 -0
- package/esm/src/angular-velocity.d.ts.map +1 -0
- package/esm/src/angular-velocity.js +26 -0
- package/esm/src/area.d.ts +4 -0
- package/esm/src/area.d.ts.map +1 -1
- package/esm/src/area.js +5 -0
- package/esm/src/charge.d.ts +5 -1
- package/esm/src/charge.d.ts.map +1 -1
- package/esm/src/charge.js +6 -0
- package/esm/src/concentration.d.ts +27 -0
- package/esm/src/concentration.d.ts.map +1 -0
- package/esm/src/concentration.js +24 -0
- package/esm/src/current-density.d.ts +23 -0
- package/esm/src/current-density.d.ts.map +1 -0
- package/esm/src/current-density.js +18 -0
- package/esm/src/density.d.ts +30 -0
- package/esm/src/density.d.ts.map +1 -0
- package/esm/src/density.js +30 -0
- package/esm/src/dynamic-viscosity.d.ts +23 -0
- package/esm/src/dynamic-viscosity.d.ts.map +1 -0
- package/esm/src/dynamic-viscosity.js +18 -0
- package/esm/src/electric-field-strength.d.ts +23 -0
- package/esm/src/electric-field-strength.d.ts.map +1 -0
- package/esm/src/electric-field-strength.js +18 -0
- package/esm/src/frequency.d.ts +2 -1
- package/esm/src/frequency.d.ts.map +1 -1
- package/esm/src/frequency.js +2 -1
- package/esm/src/heat-capacity.d.ts +23 -0
- package/esm/src/heat-capacity.d.ts.map +1 -0
- package/esm/src/heat-capacity.js +18 -0
- package/esm/src/kinematic-viscosity.d.ts +23 -0
- package/esm/src/kinematic-viscosity.d.ts.map +1 -0
- package/esm/src/kinematic-viscosity.js +18 -0
- package/esm/src/mass-flow-rate.d.ts +23 -0
- package/esm/src/mass-flow-rate.d.ts.map +1 -0
- package/esm/src/mass-flow-rate.js +18 -0
- package/esm/src/molar-mass.d.ts +27 -0
- package/esm/src/molar-mass.d.ts.map +1 -0
- package/esm/src/molar-mass.js +23 -0
- package/esm/src/momentum.d.ts +23 -0
- package/esm/src/momentum.d.ts.map +1 -0
- package/esm/src/momentum.js +18 -0
- package/esm/src/permeability.d.ts +23 -0
- package/esm/src/permeability.d.ts.map +1 -0
- package/esm/src/permeability.js +18 -0
- package/esm/src/permittivity.d.ts +23 -0
- package/esm/src/permittivity.d.ts.map +1 -0
- package/esm/src/permittivity.js +18 -0
- package/esm/src/pressure.d.ts +2 -0
- package/esm/src/pressure.d.ts.map +1 -1
- package/esm/src/pressure.js +2 -0
- package/esm/src/specific-energy.d.ts +27 -0
- package/esm/src/specific-energy.d.ts.map +1 -0
- package/esm/src/specific-energy.js +22 -0
- package/esm/src/specific-heat-capacity.d.ts +23 -0
- package/esm/src/specific-heat-capacity.d.ts.map +1 -0
- package/esm/src/specific-heat-capacity.js +19 -0
- package/esm/src/specific-volume.d.ts +23 -0
- package/esm/src/specific-volume.d.ts.map +1 -0
- package/esm/src/specific-volume.js +18 -0
- package/esm/src/surface-tension.d.ts +23 -0
- package/esm/src/surface-tension.d.ts.map +1 -0
- package/esm/src/surface-tension.js +18 -0
- package/esm/src/thermal-conductivity.d.ts +23 -0
- package/esm/src/thermal-conductivity.d.ts.map +1 -0
- package/esm/src/thermal-conductivity.js +18 -0
- package/esm/src/torque.d.ts +26 -0
- package/esm/src/torque.d.ts.map +1 -0
- package/esm/src/torque.js +21 -0
- package/esm/src/velocity.d.ts +3 -1
- package/esm/src/velocity.d.ts.map +1 -1
- package/esm/src/velocity.js +4 -0
- package/esm/src/volumetric-flow-rate.d.ts +30 -0
- package/esm/src/volumetric-flow-rate.d.ts.map +1 -0
- package/esm/src/volumetric-flow-rate.js +27 -0
- package/esm/src/wavenumber.d.ts +23 -0
- package/esm/src/wavenumber.d.ts.map +1 -0
- package/esm/src/wavenumber.js +18 -0
- package/package.json +77 -3
- package/esm/deps/jsr.io/@std/assert/1.0.18/equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.18/equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.18/not_equals.d.ts.map +0 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Specific energy units (L²·T⁻²).
|
|
3
|
+
*
|
|
4
|
+
* SI unit: joule per kilogram (J/kg).
|
|
5
|
+
*
|
|
6
|
+
* Note: specific energy shares this dimension with absorbed dose
|
|
7
|
+
* (gray/sievert). This is intentional per SI — the type system
|
|
8
|
+
* cannot distinguish them.
|
|
9
|
+
*
|
|
10
|
+
* @example Creating a specific energy
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { joulePerKilogram } from "@isentropic/dim-si/specific-energy";
|
|
13
|
+
*
|
|
14
|
+
* const lhv = joulePerKilogram(43e6);
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
19
|
+
import { specificEnergy } from "@isentropic/dim-isq";
|
|
20
|
+
import { si } from "./system.js";
|
|
21
|
+
/** Joule per kilogram (J/kg) — SI unit of specific energy. */
|
|
22
|
+
export const joulePerKilogram = si.unit(specificEnergy);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Specific heat capacity units (L²·T⁻²·Θ⁻¹).
|
|
3
|
+
*
|
|
4
|
+
* SI unit: joule per kilogram kelvin (J/(kg·K)).
|
|
5
|
+
*
|
|
6
|
+
* @example Creating a specific heat capacity
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { joulePerKilogramKelvin } from "@isentropic/dim-si/specific-heat-capacity";
|
|
9
|
+
*
|
|
10
|
+
* const water = joulePerKilogramKelvin(4186);
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
import type { SpecificHeatCapacity as SpecificHeatCapacityDim } from "@isentropic/dim-isq";
|
|
16
|
+
import type { Linear } from "@isentropic/dim-unit";
|
|
17
|
+
import type { BaseUnit } from "./types.js";
|
|
18
|
+
import type { Si } from "./system.js";
|
|
19
|
+
/** An SI specific heat capacity quantity. */
|
|
20
|
+
export type SpecificHeatCapacity = Linear<SpecificHeatCapacityDim, Si>;
|
|
21
|
+
/** Joule per kilogram kelvin (J/(kg·K)) — SI unit of specific heat capacity. */
|
|
22
|
+
export declare const joulePerKilogramKelvin: BaseUnit<SpecificHeatCapacityDim>;
|
|
23
|
+
//# sourceMappingURL=specific-heat-capacity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"specific-heat-capacity.d.ts","sourceRoot":"","sources":["../../src/src/specific-heat-capacity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,oBAAoB,IAAI,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAGtC,6CAA6C;AAC7C,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC;AAEvE,gFAAgF;AAChF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,uBAAuB,CACxC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Specific heat capacity units (L²·T⁻²·Θ⁻¹).
|
|
3
|
+
*
|
|
4
|
+
* SI unit: joule per kilogram kelvin (J/(kg·K)).
|
|
5
|
+
*
|
|
6
|
+
* @example Creating a specific heat capacity
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { joulePerKilogramKelvin } from "@isentropic/dim-si/specific-heat-capacity";
|
|
9
|
+
*
|
|
10
|
+
* const water = joulePerKilogramKelvin(4186);
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
import { specificHeatCapacity } from "@isentropic/dim-isq";
|
|
16
|
+
import { si } from "./system.js";
|
|
17
|
+
/** Joule per kilogram kelvin (J/(kg·K)) — SI unit of specific heat capacity. */
|
|
18
|
+
export const joulePerKilogramKelvin = si
|
|
19
|
+
.unit(specificHeatCapacity);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Specific volume units (M⁻¹·L³).
|
|
3
|
+
*
|
|
4
|
+
* SI unit: cubic meter per kilogram (m³/kg).
|
|
5
|
+
*
|
|
6
|
+
* @example Creating a specific volume
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { cubicMeterPerKilogram } from "@isentropic/dim-si/specific-volume";
|
|
9
|
+
*
|
|
10
|
+
* const sv = cubicMeterPerKilogram(0.001);
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
import type { SpecificVolume as SpecificVolumeDim } from "@isentropic/dim-isq";
|
|
16
|
+
import type { Linear } from "@isentropic/dim-unit";
|
|
17
|
+
import type { BaseUnit } from "./types.js";
|
|
18
|
+
import type { Si } from "./system.js";
|
|
19
|
+
/** An SI specific volume quantity. */
|
|
20
|
+
export type SpecificVolume = Linear<SpecificVolumeDim, Si>;
|
|
21
|
+
/** Cubic meter per kilogram (m³/kg) — SI unit of specific volume. */
|
|
22
|
+
export declare const cubicMeterPerKilogram: BaseUnit<SpecificVolumeDim>;
|
|
23
|
+
//# sourceMappingURL=specific-volume.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"specific-volume.d.ts","sourceRoot":"","sources":["../../src/src/specific-volume.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAGtC,sCAAsC;AACtC,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;AAE3D,qEAAqE;AACrE,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,iBAAiB,CAE7D,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Specific volume units (M⁻¹·L³).
|
|
3
|
+
*
|
|
4
|
+
* SI unit: cubic meter per kilogram (m³/kg).
|
|
5
|
+
*
|
|
6
|
+
* @example Creating a specific volume
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { cubicMeterPerKilogram } from "@isentropic/dim-si/specific-volume";
|
|
9
|
+
*
|
|
10
|
+
* const sv = cubicMeterPerKilogram(0.001);
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
import { specificVolume } from "@isentropic/dim-isq";
|
|
16
|
+
import { si } from "./system.js";
|
|
17
|
+
/** Cubic meter per kilogram (m³/kg) — SI unit of specific volume. */
|
|
18
|
+
export const cubicMeterPerKilogram = si.unit(specificVolume);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Surface tension units (M·T⁻²).
|
|
3
|
+
*
|
|
4
|
+
* SI unit: newton per meter (N/m).
|
|
5
|
+
*
|
|
6
|
+
* @example Creating a surface tension
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { newtonPerMeter } from "@isentropic/dim-si/surface-tension";
|
|
9
|
+
*
|
|
10
|
+
* const water = newtonPerMeter(0.0728);
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
import type { SurfaceTension as SurfaceTensionDim } from "@isentropic/dim-isq";
|
|
16
|
+
import type { Linear } from "@isentropic/dim-unit";
|
|
17
|
+
import type { BaseUnit } from "./types.js";
|
|
18
|
+
import type { Si } from "./system.js";
|
|
19
|
+
/** An SI surface tension quantity. */
|
|
20
|
+
export type SurfaceTension = Linear<SurfaceTensionDim, Si>;
|
|
21
|
+
/** Newton per meter (N/m) — SI unit of surface tension. */
|
|
22
|
+
export declare const newtonPerMeter: BaseUnit<SurfaceTensionDim>;
|
|
23
|
+
//# sourceMappingURL=surface-tension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surface-tension.d.ts","sourceRoot":"","sources":["../../src/src/surface-tension.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAGtC,sCAAsC;AACtC,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;AAE3D,2DAA2D;AAC3D,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,iBAAiB,CAEtD,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Surface tension units (M·T⁻²).
|
|
3
|
+
*
|
|
4
|
+
* SI unit: newton per meter (N/m).
|
|
5
|
+
*
|
|
6
|
+
* @example Creating a surface tension
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { newtonPerMeter } from "@isentropic/dim-si/surface-tension";
|
|
9
|
+
*
|
|
10
|
+
* const water = newtonPerMeter(0.0728);
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
import { surfaceTension } from "@isentropic/dim-isq";
|
|
16
|
+
import { si } from "./system.js";
|
|
17
|
+
/** Newton per meter (N/m) — SI unit of surface tension. */
|
|
18
|
+
export const newtonPerMeter = si.unit(surfaceTension);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thermal conductivity units (M·L·T⁻³·Θ⁻¹).
|
|
3
|
+
*
|
|
4
|
+
* SI unit: watt per meter kelvin (W/(m·K)).
|
|
5
|
+
*
|
|
6
|
+
* @example Creating a thermal conductivity
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { wattPerMeterKelvin } from "@isentropic/dim-si/thermal-conductivity";
|
|
9
|
+
*
|
|
10
|
+
* const copper = wattPerMeterKelvin(385);
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
import type { ThermalConductivity as ThermalConductivityDim } from "@isentropic/dim-isq";
|
|
16
|
+
import type { Linear } from "@isentropic/dim-unit";
|
|
17
|
+
import type { BaseUnit } from "./types.js";
|
|
18
|
+
import type { Si } from "./system.js";
|
|
19
|
+
/** An SI thermal conductivity quantity. */
|
|
20
|
+
export type ThermalConductivity = Linear<ThermalConductivityDim, Si>;
|
|
21
|
+
/** Watt per meter kelvin (W/(m·K)) — SI unit of thermal conductivity. */
|
|
22
|
+
export declare const wattPerMeterKelvin: BaseUnit<ThermalConductivityDim>;
|
|
23
|
+
//# sourceMappingURL=thermal-conductivity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thermal-conductivity.d.ts","sourceRoot":"","sources":["../../src/src/thermal-conductivity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,mBAAmB,IAAI,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAGtC,2CAA2C;AAC3C,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAErE,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,sBAAsB,CAE/D,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thermal conductivity units (M·L·T⁻³·Θ⁻¹).
|
|
3
|
+
*
|
|
4
|
+
* SI unit: watt per meter kelvin (W/(m·K)).
|
|
5
|
+
*
|
|
6
|
+
* @example Creating a thermal conductivity
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { wattPerMeterKelvin } from "@isentropic/dim-si/thermal-conductivity";
|
|
9
|
+
*
|
|
10
|
+
* const copper = wattPerMeterKelvin(385);
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
import { thermalConductivity } from "@isentropic/dim-isq";
|
|
16
|
+
import { si } from "./system.js";
|
|
17
|
+
/** Watt per meter kelvin (W/(m·K)) — SI unit of thermal conductivity. */
|
|
18
|
+
export const wattPerMeterKelvin = si.unit(thermalConductivity);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Torque units (M·L²·T⁻²).
|
|
3
|
+
*
|
|
4
|
+
* SI unit: newton meter (N·m).
|
|
5
|
+
*
|
|
6
|
+
* Note: torque shares this dimension with energy (joule). This is
|
|
7
|
+
* intentional per SI — the type system cannot distinguish them.
|
|
8
|
+
*
|
|
9
|
+
* @example Creating a torque
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { newtonMeter } from "@isentropic/dim-si/torque";
|
|
12
|
+
*
|
|
13
|
+
* const tau = newtonMeter(50);
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @module
|
|
17
|
+
*/
|
|
18
|
+
import type { Torque as TorqueDim } from "@isentropic/dim-isq";
|
|
19
|
+
import type { Linear } from "@isentropic/dim-unit";
|
|
20
|
+
import type { BaseUnit } from "./types.js";
|
|
21
|
+
import type { Si } from "./system.js";
|
|
22
|
+
/** An SI torque quantity. */
|
|
23
|
+
export type Torque = Linear<TorqueDim, Si>;
|
|
24
|
+
/** Newton meter (N·m) — SI unit of torque. */
|
|
25
|
+
export declare const newtonMeter: BaseUnit<TorqueDim>;
|
|
26
|
+
//# sourceMappingURL=torque.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"torque.d.ts","sourceRoot":"","sources":["../../src/src/torque.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAGtC,6BAA6B;AAC7B,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;AAE3C,8CAA8C;AAC9C,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,SAAS,CAAmB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Torque units (M·L²·T⁻²).
|
|
3
|
+
*
|
|
4
|
+
* SI unit: newton meter (N·m).
|
|
5
|
+
*
|
|
6
|
+
* Note: torque shares this dimension with energy (joule). This is
|
|
7
|
+
* intentional per SI — the type system cannot distinguish them.
|
|
8
|
+
*
|
|
9
|
+
* @example Creating a torque
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { newtonMeter } from "@isentropic/dim-si/torque";
|
|
12
|
+
*
|
|
13
|
+
* const tau = newtonMeter(50);
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @module
|
|
17
|
+
*/
|
|
18
|
+
import { torque } from "@isentropic/dim-isq";
|
|
19
|
+
import { si } from "./system.js";
|
|
20
|
+
/** Newton meter (N·m) — SI unit of torque. */
|
|
21
|
+
export const newtonMeter = si.unit(torque);
|
package/esm/src/velocity.d.ts
CHANGED
|
@@ -18,10 +18,12 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import type { Velocity as VelocityDim } from "@isentropic/dim-isq";
|
|
20
20
|
import type { Linear } from "@isentropic/dim-unit";
|
|
21
|
-
import type { BaseUnit } from "./types.js";
|
|
21
|
+
import type { BaseUnit, ScaledUnit } from "./types.js";
|
|
22
22
|
import type { Si } from "./system.js";
|
|
23
23
|
/** An SI velocity quantity. */
|
|
24
24
|
export type Velocity = Linear<VelocityDim, Si>;
|
|
25
25
|
/** Meter per second (m/s) — SI unit of velocity. */
|
|
26
26
|
export declare const meterPerSecond: BaseUnit<VelocityDim>;
|
|
27
|
+
/** Kilometer per hour (km/h) — 1/3.6 m/s. */
|
|
28
|
+
export declare const kilometerPerHour: ScaledUnit<VelocityDim>;
|
|
27
29
|
//# sourceMappingURL=velocity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"velocity.d.ts","sourceRoot":"","sources":["../../src/src/velocity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"velocity.d.ts","sourceRoot":"","sources":["../../src/src/velocity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAKtC,+BAA+B;AAC/B,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AAE/C,oDAAoD;AACpD,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAAqB,CAAC;AAEvE,6CAA6C;AAC7C,eAAO,MAAM,gBAAgB,EAAE,UAAU,CAAC,WAAW,CAEpD,CAAC"}
|
package/esm/src/velocity.js
CHANGED
|
@@ -18,5 +18,9 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import { velocity } from "@isentropic/dim-isq";
|
|
20
20
|
import { si } from "./system.js";
|
|
21
|
+
import { kilometer } from "./length.js";
|
|
22
|
+
import { hour } from "./time.js";
|
|
21
23
|
/** Meter per second (m/s) — SI unit of velocity. */
|
|
22
24
|
export const meterPerSecond = si.unit(velocity);
|
|
25
|
+
/** Kilometer per hour (km/h) — 1/3.6 m/s. */
|
|
26
|
+
export const kilometerPerHour = meterPerSecond.scaled(kilometer.scale / hour.scale);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Volumetric flow rate units (L³·T⁻¹).
|
|
3
|
+
*
|
|
4
|
+
* SI unit: cubic meter per second (m³/s).
|
|
5
|
+
*
|
|
6
|
+
* @example Converting between flow rate units
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { cubicMeterPerSecond, literPerMinute, literPerSecond } from "@isentropic/dim-si/volumetric-flow-rate";
|
|
9
|
+
* import { valueIn } from "@isentropic/dim-si/ops";
|
|
10
|
+
*
|
|
11
|
+
* const flow = cubicMeterPerSecond(1);
|
|
12
|
+
* valueIn(flow, literPerSecond); // 1000
|
|
13
|
+
* valueIn(flow, literPerMinute); // 60000
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @module
|
|
17
|
+
*/
|
|
18
|
+
import type { VolumetricFlowRate as VolumetricFlowRateDim } from "@isentropic/dim-isq";
|
|
19
|
+
import type { Linear } from "@isentropic/dim-unit";
|
|
20
|
+
import type { BaseUnit, ScaledUnit } from "./types.js";
|
|
21
|
+
import type { Si } from "./system.js";
|
|
22
|
+
/** An SI volumetric flow rate quantity. */
|
|
23
|
+
export type VolumetricFlowRate = Linear<VolumetricFlowRateDim, Si>;
|
|
24
|
+
/** Cubic meter per second (m³/s) — SI unit of volumetric flow rate. */
|
|
25
|
+
export declare const cubicMeterPerSecond: BaseUnit<VolumetricFlowRateDim>;
|
|
26
|
+
/** Liter per second (L/s) — 10⁻³ m³/s. */
|
|
27
|
+
export declare const literPerSecond: ScaledUnit<VolumetricFlowRateDim>;
|
|
28
|
+
/** Liter per minute (L/min) — 10⁻³/60 m³/s. */
|
|
29
|
+
export declare const literPerMinute: ScaledUnit<VolumetricFlowRateDim>;
|
|
30
|
+
//# sourceMappingURL=volumetric-flow-rate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"volumetric-flow-rate.d.ts","sourceRoot":"","sources":["../../src/src/volumetric-flow-rate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,kBAAkB,IAAI,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAKtC,2CAA2C;AAC3C,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,qBAAqB,EAAE,EAAE,CAAC,CAAC;AAEnE,uEAAuE;AACvE,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,qBAAqB,CAE/D,CAAC;AAEF,0CAA0C;AAC1C,eAAO,MAAM,cAAc,EAAE,UAAU,CAAC,qBAAqB,CACpB,CAAC;AAE1C,+CAA+C;AAC/C,eAAO,MAAM,cAAc,EAAE,UAAU,CAAC,qBAAqB,CACL,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Volumetric flow rate units (L³·T⁻¹).
|
|
3
|
+
*
|
|
4
|
+
* SI unit: cubic meter per second (m³/s).
|
|
5
|
+
*
|
|
6
|
+
* @example Converting between flow rate units
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { cubicMeterPerSecond, literPerMinute, literPerSecond } from "@isentropic/dim-si/volumetric-flow-rate";
|
|
9
|
+
* import { valueIn } from "@isentropic/dim-si/ops";
|
|
10
|
+
*
|
|
11
|
+
* const flow = cubicMeterPerSecond(1);
|
|
12
|
+
* valueIn(flow, literPerSecond); // 1000
|
|
13
|
+
* valueIn(flow, literPerMinute); // 60000
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @module
|
|
17
|
+
*/
|
|
18
|
+
import { volumetricFlowRate } from "@isentropic/dim-isq";
|
|
19
|
+
import { si } from "./system.js";
|
|
20
|
+
import { liter } from "./volume.js";
|
|
21
|
+
import { minute } from "./time.js";
|
|
22
|
+
/** Cubic meter per second (m³/s) — SI unit of volumetric flow rate. */
|
|
23
|
+
export const cubicMeterPerSecond = si.unit(volumetricFlowRate);
|
|
24
|
+
/** Liter per second (L/s) — 10⁻³ m³/s. */
|
|
25
|
+
export const literPerSecond = cubicMeterPerSecond.scaled(liter.scale);
|
|
26
|
+
/** Liter per minute (L/min) — 10⁻³/60 m³/s. */
|
|
27
|
+
export const literPerMinute = cubicMeterPerSecond.scaled(liter.scale / minute.scale);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wavenumber units (L⁻¹).
|
|
3
|
+
*
|
|
4
|
+
* SI unit: reciprocal meter (m⁻¹).
|
|
5
|
+
*
|
|
6
|
+
* @example Creating a wavenumber
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { reciprocalMeter } from "@isentropic/dim-si/wavenumber";
|
|
9
|
+
*
|
|
10
|
+
* const k = reciprocalMeter(100);
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
import type { Wavenumber as WavenumberDim } from "@isentropic/dim-isq";
|
|
16
|
+
import type { Linear } from "@isentropic/dim-unit";
|
|
17
|
+
import type { BaseUnit } from "./types.js";
|
|
18
|
+
import type { Si } from "./system.js";
|
|
19
|
+
/** An SI wavenumber quantity. */
|
|
20
|
+
export type Wavenumber = Linear<WavenumberDim, Si>;
|
|
21
|
+
/** Reciprocal meter (m⁻¹) — SI unit of wavenumber. */
|
|
22
|
+
export declare const reciprocalMeter: BaseUnit<WavenumberDim>;
|
|
23
|
+
//# sourceMappingURL=wavenumber.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wavenumber.d.ts","sourceRoot":"","sources":["../../src/src/wavenumber.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,UAAU,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAGtC,iCAAiC;AACjC,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;AAEnD,sDAAsD;AACtD,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,aAAa,CAAuB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wavenumber units (L⁻¹).
|
|
3
|
+
*
|
|
4
|
+
* SI unit: reciprocal meter (m⁻¹).
|
|
5
|
+
*
|
|
6
|
+
* @example Creating a wavenumber
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { reciprocalMeter } from "@isentropic/dim-si/wavenumber";
|
|
9
|
+
*
|
|
10
|
+
* const k = reciprocalMeter(100);
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
import { wavenumber } from "@isentropic/dim-isq";
|
|
16
|
+
import { si } from "./system.js";
|
|
17
|
+
/** Reciprocal meter (m⁻¹) — SI unit of wavenumber. */
|
|
18
|
+
export const reciprocalMeter = si.unit(wavenumber);
|
package/package.json
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isentropic/dim-si",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Ready-to-use SI units with compile-time dimensional analysis",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"typescript",
|
|
7
|
+
"dimensional-analysis",
|
|
8
|
+
"si",
|
|
9
|
+
"unit-system",
|
|
10
|
+
"isq",
|
|
11
|
+
"quantity-system"
|
|
12
|
+
],
|
|
5
13
|
"repository": {
|
|
6
14
|
"type": "git",
|
|
7
15
|
"url": "git+https://github.com/isentropic-dev/dim.git"
|
|
@@ -107,14 +115,80 @@
|
|
|
107
115
|
},
|
|
108
116
|
"./thermal-conductance": {
|
|
109
117
|
"import": "./esm/src/thermal-conductance.js"
|
|
118
|
+
},
|
|
119
|
+
"./density": {
|
|
120
|
+
"import": "./esm/src/density.js"
|
|
121
|
+
},
|
|
122
|
+
"./specific-volume": {
|
|
123
|
+
"import": "./esm/src/specific-volume.js"
|
|
124
|
+
},
|
|
125
|
+
"./momentum": {
|
|
126
|
+
"import": "./esm/src/momentum.js"
|
|
127
|
+
},
|
|
128
|
+
"./angular-velocity": {
|
|
129
|
+
"import": "./esm/src/angular-velocity.js"
|
|
130
|
+
},
|
|
131
|
+
"./angular-acceleration": {
|
|
132
|
+
"import": "./esm/src/angular-acceleration.js"
|
|
133
|
+
},
|
|
134
|
+
"./torque": {
|
|
135
|
+
"import": "./esm/src/torque.js"
|
|
136
|
+
},
|
|
137
|
+
"./dynamic-viscosity": {
|
|
138
|
+
"import": "./esm/src/dynamic-viscosity.js"
|
|
139
|
+
},
|
|
140
|
+
"./kinematic-viscosity": {
|
|
141
|
+
"import": "./esm/src/kinematic-viscosity.js"
|
|
142
|
+
},
|
|
143
|
+
"./surface-tension": {
|
|
144
|
+
"import": "./esm/src/surface-tension.js"
|
|
145
|
+
},
|
|
146
|
+
"./wavenumber": {
|
|
147
|
+
"import": "./esm/src/wavenumber.js"
|
|
148
|
+
},
|
|
149
|
+
"./heat-capacity": {
|
|
150
|
+
"import": "./esm/src/heat-capacity.js"
|
|
151
|
+
},
|
|
152
|
+
"./specific-heat-capacity": {
|
|
153
|
+
"import": "./esm/src/specific-heat-capacity.js"
|
|
154
|
+
},
|
|
155
|
+
"./specific-energy": {
|
|
156
|
+
"import": "./esm/src/specific-energy.js"
|
|
157
|
+
},
|
|
158
|
+
"./thermal-conductivity": {
|
|
159
|
+
"import": "./esm/src/thermal-conductivity.js"
|
|
160
|
+
},
|
|
161
|
+
"./electric-field-strength": {
|
|
162
|
+
"import": "./esm/src/electric-field-strength.js"
|
|
163
|
+
},
|
|
164
|
+
"./permittivity": {
|
|
165
|
+
"import": "./esm/src/permittivity.js"
|
|
166
|
+
},
|
|
167
|
+
"./permeability": {
|
|
168
|
+
"import": "./esm/src/permeability.js"
|
|
169
|
+
},
|
|
170
|
+
"./current-density": {
|
|
171
|
+
"import": "./esm/src/current-density.js"
|
|
172
|
+
},
|
|
173
|
+
"./volumetric-flow-rate": {
|
|
174
|
+
"import": "./esm/src/volumetric-flow-rate.js"
|
|
175
|
+
},
|
|
176
|
+
"./mass-flow-rate": {
|
|
177
|
+
"import": "./esm/src/mass-flow-rate.js"
|
|
178
|
+
},
|
|
179
|
+
"./concentration": {
|
|
180
|
+
"import": "./esm/src/concentration.js"
|
|
181
|
+
},
|
|
182
|
+
"./molar-mass": {
|
|
183
|
+
"import": "./esm/src/molar-mass.js"
|
|
110
184
|
}
|
|
111
185
|
},
|
|
112
186
|
"scripts": {
|
|
113
187
|
"test": "node test_runner.js"
|
|
114
188
|
},
|
|
115
189
|
"dependencies": {
|
|
116
|
-
"@isentropic/dim-isq": "^0.
|
|
117
|
-
"@isentropic/dim-unit": "^0.
|
|
190
|
+
"@isentropic/dim-isq": "^0.5.0",
|
|
191
|
+
"@isentropic/dim-unit": "^0.5.0"
|
|
118
192
|
},
|
|
119
193
|
"devDependencies": {
|
|
120
194
|
"@types/node": "^20.9.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.18/equal.ts"],"names":[],"mappings":"AA0FA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAgHrD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.18/equals.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QAmBb"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"not_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.18/not_equals.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,QAUtE"}
|