measur-tools-suite 1.2.6-beta.3 → 1.2.6-beta.347.2

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/bin/client.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -1,13 +1,17 @@
1
1
  {
2
2
  "name": "measur-tools-suite",
3
- "version": "1.2.6-beta.3",
3
+ "version": "1.2.6-beta.347.2",
4
4
  "engines": {
5
5
  "node": "20.19.4",
6
6
  "npm": "10.8.2"
7
7
  },
8
8
  "scripts": {
9
+ "build:wasm": "bash scripts/build-wasm.sh",
10
+ "check:docs": "node scripts/check-markdown-links.mjs",
9
11
  "test:browser": "karma start",
10
- "tests": "npx karma start --browsers ChromeHeadlessNoSandbox --auto-watch false"
12
+ "tests": "npx karma start --browsers ChromeHeadlessNoSandbox --auto-watch false",
13
+ "verify:types": "tsc --noEmit",
14
+ "verify:wasm": "bash scripts/verify-wasm.sh"
11
15
  },
12
16
  "description": "Oak Ridge National Lab's Industrial Resources calculation library for MEASUR.",
13
17
  "author": "Gina Accawi <accawigk@ornl.gov>",
@@ -34,6 +34,7 @@ export * from "./ts_def_modules/motorDriven/motor/motor";
34
34
  export * from "./ts_def_modules/motorDriven/motor/motorEnum";
35
35
 
36
36
  export * from "./ts_def_modules/motorDriven/pump/pump";
37
+ export * from "./ts_def_modules/motorDriven/pump/pump_head";
37
38
  export * from "./ts_def_modules/motorDriven/pump/pump_valve_power_loss";
38
39
 
39
40
  export * from "./ts_def_modules/motorDriven/pumpFan/pumpFan";
@@ -145,6 +146,7 @@ export type MeasurToolsSuite =
145
146
  import("./ts_def_modules/motorDriven/motor/motor").MotorModule &
146
147
  // motorDriven/pump
147
148
  import("./ts_def_modules/motorDriven/pump/pump").PumpModule &
149
+ import("./ts_def_modules/motorDriven/pump/pump_head").PumpHeadModule &
148
150
  import("./ts_def_modules/motorDriven/pump/pump_valve_power_loss").PumpValvePowerLossModule &
149
151
  // motorDriven/pumpFan
150
152
  import("./ts_def_modules/motorDriven/pumpFan/pumpFan").PumpFanModule &
@@ -5,130 +5,9 @@ import { PumpStyle, SpecificSpeed } from "../pumpFan/pumpFan";
5
5
  /**
6
6
  * Pump calculations.
7
7
  *
8
- * Provides pump head tools and pump-system result calculators for baseline
9
- * and modified operating conditions.
8
+ * Provides pump-system result calculators for baseline and modified operating conditions.
10
9
  */
11
10
 
12
- /**
13
- * Result object returned by head tool calculations.
14
- */
15
- export declare class HeadToolOutput {
16
- /**
17
- * Constructor for HeadToolOutput
18
- * @param differentialElevationHead Differential elevation head, units ft.
19
- * @param differentialPressureHead Differential pressure head, units ft.
20
- * @param differentialVelocityHead Differential velocity head, units ft.
21
- * @param estimatedSuctionFrictionHead Estimated suction friction head, units ft.
22
- * @param estimatedDischargeFrictionHead Estimated discharge friction head, units ft.
23
- * @param pumpHead Total pump head, units ft.
24
- */
25
- constructor(
26
- differentialElevationHead: number,
27
- differentialPressureHead: number,
28
- differentialVelocityHead: number,
29
- estimatedSuctionFrictionHead: number,
30
- estimatedDischargeFrictionHead: number,
31
- pumpHead: number
32
- );
33
-
34
- /** Differential elevation head, units ft */
35
- differentialElevationHead: number;
36
- /** Differential pressure head, units ft */
37
- differentialPressureHead: number;
38
- /** Differential velocity head, units ft */
39
- differentialVelocityHead: number;
40
- /** Estimated suction friction head, units ft */
41
- estimatedSuctionFrictionHead: number;
42
- /** Estimated discharge friction head, units ft */
43
- estimatedDischargeFrictionHead: number;
44
- /** Total pump head, units ft */
45
- pumpHead: number;
46
-
47
- /** Frees the underlying resource; must be called when finished with the instance */
48
- delete(): void;
49
- }
50
-
51
- /**
52
- * Head tool model for systems with a suction tank.
53
- */
54
- export declare class HeadToolSuctionTank {
55
- /**
56
- * @param specificGravity double, specific gravity, dimensionless (unitless)
57
- * @param flowRate double, flow rate in gpm
58
- * @param suctionPipeDiameter Suction pipe diameter, units ft.
59
- * @param suctionTankGasOverPressure double, suction tank gas over pressure in psig
60
- * @param suctionTankFluidSurfaceElevation double, suction tank fluid surface elevation in ft
61
- * @param suctionLineLossCoefficients double, suction line loss coefficients (unitless)
62
- * @param dischargePipeDiameter Discharge pipe diameter, units ft.
63
- * @param dischargeGaugePressure double, discharge gauge pressure in psig
64
- * @param dischargeGaugeElevation Discharge gauge elevation, units ft.
65
- * @param dischargeLineLossCoefficients double, discharge line loss coefficients (unitless)
66
- */
67
- constructor(
68
- specificGravity: number,
69
- flowRate: number,
70
- suctionPipeDiameter: number,
71
- suctionTankGasOverPressure: number,
72
- suctionTankFluidSurfaceElevation: number,
73
- suctionLineLossCoefficients: number,
74
- dischargePipeDiameter: number,
75
- dischargeGaugePressure: number,
76
- dischargeGaugeElevation: number,
77
- dischargeLineLossCoefficients: number
78
- );
79
-
80
- /**
81
- * Calculates the operating pump head
82
- * @returns HeadToolOutput
83
- */
84
- calculate(): HeadToolOutput;
85
-
86
- /** Frees the underlying resource; must be called when finished with the instance */
87
- delete(): void;
88
- }
89
-
90
- /**
91
- * Head tool model for systems without a suction tank.
92
- */
93
- export declare class HeadTool {
94
- /**
95
- * Constructor for HeadTool with no Suction Tank, all inputs specified
96
- *
97
- * @param specificGravity double, specific gravity, dimensionless - unitless
98
- * @param flowRate double, flow rate in gpm (gallons per minute)
99
- * @param suctionPipeDiameter double, diameter of suction pipe in feet
100
- * @param suctionGaugePressure double, gauge pressure of suction in psig (pounds per square inch guage)
101
- * @param suctionGaugeElevation double, gauge elevation of suction in feet
102
- * @param suctionLineLossCoefficients double, line loss coefficients of suction - unitless
103
- * @param dischargePipeDiameter double, diameter of discharge pipe in feet
104
- * @param dischargeGaugePressure double, gauge pressure of discharge in psig (pounds per square inch guage)
105
- * @param dischargeGaugeElevation double, gauge elevation of discharge in feet
106
- * @param dischargeLineLossCoefficients double, line loss coefficients of discharge - unitless
107
- *
108
- * */
109
- constructor(
110
- specificGravity: number,
111
- flowRate: number,
112
- suctionPipeDiameter: number,
113
- suctionGaugePressure: number,
114
- suctionGaugeElevation: number,
115
- suctionLineLossCoefficients: number,
116
- dischargePipeDiameter: number,
117
- dischargeGaugePressure: number,
118
- dischargeGaugeElevation: number,
119
- dischargeLineLossCoefficients: number
120
- );
121
-
122
- /**
123
- * Calculates the operating pump head
124
- * @returns HeadToolOutput
125
- */
126
- calculate(): HeadToolOutput;
127
-
128
- /** Frees the underlying resource; must be called when finished with the instance */
129
- delete(): void;
130
- }
131
-
132
11
  /**
133
12
  * Input parameters for pump result calculations.
134
13
  */
@@ -166,7 +45,8 @@ export declare class PumpResultInput {
166
45
  * @param stageCount Pump stage count.
167
46
  * @param speed SpecificSpeed, pump specific speed selector
168
47
  * @param specifiedEfficiency Specified optimal efficiency, dimensionless fraction.
169
- * @param differentialPressurePsi Differential pressure for positive-displacement pumps, units psi.
48
+ * @param differentialPressurePsi Operating differential pressure for positive-displacement pump result calculations,
49
+ * units psi.
170
50
  */
171
51
  constructor(
172
52
  style: PumpStyle,
@@ -319,9 +199,6 @@ export declare class PumpResult {
319
199
  }
320
200
 
321
201
  export type PumpModule = {
322
- HeadToolOutput: typeof HeadToolOutput;
323
- HeadToolSuctionTank: typeof HeadToolSuctionTank;
324
- HeadTool: typeof HeadTool;
325
202
  PumpResultInput: typeof PumpResultInput;
326
203
  PumpFieldData: typeof PumpFieldData;
327
204
  PumpResult: typeof PumpResult;
@@ -0,0 +1,87 @@
1
+ /** Inputs for pump-head calculation from suction- and discharge-gauge measurements. */
2
+ export interface PumpHeadSuctionGaugeInput {
3
+ /** Fluid specific gravity, dimensionless. */
4
+ specificGravity: number;
5
+ /** Volumetric flow rate, units gpm. */
6
+ flowRate: number;
7
+ /** Suction-pipe inside diameter, units in. */
8
+ suctionPipeDiameter: number;
9
+ /** Suction gauge pressure, units psig. */
10
+ suctionGaugePressure: number;
11
+ /** Suction-gauge elevation, units ft. */
12
+ suctionGaugeElevation: number;
13
+ /** Aggregate suction-line loss coefficient, dimensionless. */
14
+ suctionLineLossCoefficients: number;
15
+ /** Discharge-pipe inside diameter, units in. */
16
+ dischargePipeDiameter: number;
17
+ /** Discharge gauge pressure, units psig. */
18
+ dischargeGaugePressure: number;
19
+ /** Discharge-gauge elevation, units ft. */
20
+ dischargeGaugeElevation: number;
21
+ /** Aggregate discharge-line loss coefficient, dimensionless. */
22
+ dischargeLineLossCoefficients: number;
23
+ }
24
+
25
+ /** Inputs for pump-head calculation with a pressurized suction tank. */
26
+ export interface PumpHeadSuctionTankInput {
27
+ /** Fluid specific gravity, dimensionless. */
28
+ specificGravity: number;
29
+ /** Volumetric flow rate, units gpm. */
30
+ flowRate: number;
31
+ /** Suction-pipe inside diameter, units in. */
32
+ suctionPipeDiameter: number;
33
+ /** Suction-tank gas overpressure, units psig. */
34
+ suctionTankGasOverPressure: number;
35
+ /** Suction-tank fluid-surface elevation, units ft. */
36
+ suctionTankFluidSurfaceElevation: number;
37
+ /** Aggregate suction-line loss coefficient, dimensionless. */
38
+ suctionLineLossCoefficients: number;
39
+ /** Discharge-pipe inside diameter, units in. */
40
+ dischargePipeDiameter: number;
41
+ /** Discharge gauge pressure, units psig. */
42
+ dischargeGaugePressure: number;
43
+ /** Discharge-gauge elevation, units ft. */
44
+ dischargeGaugeElevation: number;
45
+ /** Aggregate discharge-line loss coefficient, dimensionless. */
46
+ dischargeLineLossCoefficients: number;
47
+ }
48
+
49
+ /** Component heads and total operating pump head returned as a plain object. */
50
+ export interface PumpHeadResult {
51
+ /** Discharge-minus-suction elevation head, units ft. */
52
+ differentialElevationHead: number;
53
+ /** Discharge-minus-suction pressure head, units ft. */
54
+ differentialPressureHead: number;
55
+ /** Discharge-minus-suction velocity head, units ft. */
56
+ differentialVelocityHead: number;
57
+ /** Estimated suction-line friction head, units ft. */
58
+ estimatedSuctionFrictionHead: number;
59
+ /** Estimated discharge-line friction head, units ft. */
60
+ estimatedDischargeFrictionHead: number;
61
+ /** Total operating pump head, units ft. */
62
+ pumpHead: number;
63
+ }
64
+
65
+ /**
66
+ * Calculates operating pump head from suction- and discharge-gauge measurements.
67
+ * @param input Flow, pipe, pressure, elevation, and loss-coefficient inputs in U.S. customary units.
68
+ * @returns Component heads and total operating pump head, units ft.
69
+ */
70
+ export declare function calculatePumpHeadFromSuctionGauge(
71
+ input: PumpHeadSuctionGaugeInput
72
+ ): PumpHeadResult;
73
+
74
+ /**
75
+ * Calculates operating pump head for a system supplied from a pressurized suction tank.
76
+ * @param input Flow, pipe, tank, discharge, and loss-coefficient inputs in U.S. customary units.
77
+ * @returns Component heads and total operating pump head, units ft.
78
+ */
79
+ export declare function calculatePumpHeadFromSuctionTank(
80
+ input: PumpHeadSuctionTankInput
81
+ ): PumpHeadResult;
82
+
83
+ /** Runtime exports contributed by the pump-head binding. */
84
+ export type PumpHeadModule = {
85
+ calculatePumpHeadFromSuctionGauge: typeof calculatePumpHeadFromSuctionGauge;
86
+ calculatePumpHeadFromSuctionTank: typeof calculatePumpHeadFromSuctionTank;
87
+ };