Jump to content

Measurement:Unit Identifiers: Difference between revisions

From AOWIS
Created page with "== Unit Representation Model == AOWIS defines a canonical set of unit identifiers used in all system interfaces, storage formats, APIs, and inter-system data exchanges. All unit identifiers MUST be ASCII-only strings and MUST NOT contain Unicode characters, superscripts, or typographic symbols. Units are machine-readable tokens and are not intended to represent typographic or human-rendered SI notation. == General Rules == * All unit identifiers MUST be ASCII-only...."
 
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Unit Representation Model ==
 
* Part of: [[Measurement:Main_Page]]
* Related to: [[Measurement:Units]]


AOWIS defines a canonical set of unit identifiers used in all system interfaces, storage formats, APIs, and inter-system data exchanges.
AOWIS defines a canonical set of unit identifiers used in all system interfaces, storage formats, APIs, and inter-system data exchanges.


All unit identifiers MUST be ASCII-only strings and MUST NOT contain Unicode characters, superscripts, or typographic symbols.
All unit identifiers MUST be lower-case ASCII-only strings and MUST NOT contain Unicode characters, superscripts, or typographic symbols.


Units are machine-readable tokens and are not intended to represent typographic or human-rendered SI notation.
Units are machine-readable tokens and are not intended to represent typographic or human-rendered SI notation.
Line 9: Line 11:
== General Rules ==
== General Rules ==


* All unit identifiers MUST be ASCII-only.
* All unit identifiers MUST be lower-case ASCII-only.
* Unit identifiers MUST be unambiguous and consistent across all AOWIS-compliant systems.
* Unit identifiers MUST be unambiguous and consistent across all AOWIS-compliant systems.
* Each physical quantity MUST map to exactly one canonical unit.
* Each physical quantity MUST map to exactly one canonical unit.
Line 15: Line 17:
* Units MUST be stable identifiers suitable for JSON, databases, and file formats.
* Units MUST be stable identifiers suitable for JSON, databases, and file formats.


== Canonical Unit Identifiers ==
== Requirements ==
 
<pre>
REQ-MEAS-UNI-001: Unit identifiers MUST be ASCII-only strings.
 
REQ-MEAS-UNI-002: Unit identifiers MUST NOT contain Unicode characters, superscripts, or typographic symbols.


=== Length and Spatial Quantities ===
REQ-MEAS-UNI-003: Each physical quantity in AOWIS MUST map to exactly one canonical unit identifier.


* length → m
REQ-MEAS-UNI-004: Units MUST be used consistently across all AOWIS system interfaces and storage formats.
* elevation → m
* distance → m
* position_offset → m


=== Area and Volume ===
REQ-MEAS-UNI-005: Units MUST NOT be context-dependent or implementation-defined.


* area → m2
REQ-MEAS-UNI-006: Semantic meaning MUST be derived from the quantity field, not from the unit identifier.
* volume → m3


=== Flow and Transport ===
REQ-MEAS-UNI-007: The "Quantity / Name" field MUST be the canonical machine-readable identifier for a physical quantity and MUST be used as the key in all AOWIS data formats, APIs, databases, and serialized representations.


* volumetric_flow_rate → m3_s
REQ-MEAS-UNI-008: The "Quantity / Name" field MUST be treated as an immutable identifier and MUST NOT be modified, localized, abbreviated, or reinterpreted across implementations.
* mass_flow_rate → kg_s


=== Pressure and Stress ===
REQ-MEAS-UNI-009: Physical quantity semantics MUST be derived exclusively from the "Quantity / Name" field and MUST NOT be inferred from unit identifiers.
</pre>


* pressure → Pa
== Canonical Unit Identifiers ==
* stress → Pa


=== Mass and Force ===
=== Length and Spatial Quantities ===


* mass → kg
{| class="wikitable"
* force → N
! Quantity / Name !! Definition !! Canonical Unit (SI symbol) !! Serialized Unit !! EPANET Mapping
|-
| length || Linear spatial extent || m || m || Pipe/link length (SI-normalized EPANET model)
|-
| elevation || Vertical height relative to datum || m || m || Node elevation (SI-normalized EPANET model)
|-
| distance || Spatial separation between points || m || m || Derived geometric quantity
|-
| position_offset || Relative spatial offset magnitude || m || m || Not explicitly represented in EPANET
|}


=== Time ===
=== Area and Volume ===


* time → s
{| class="wikitable"
* duration → s
! Quantity / Name !! Definition !! Canonical Unit (SI symbol) !! Serialized Unit !! EPANET Mapping
|-
| area || Two-dimensional spatial extent || m² || m2 || Not directly used
|-
| volume || Storage volume || m³ || m3 || Tank volume (SI-normalized EPANET model)
|}


=== Electrical Quantities (if applicable) ===
=== Flow and Transport ===


* current → A
{| class="wikitable"
* voltage → V
! Quantity / Name !! Definition !! Canonical Unit (SI symbol) !! Serialized Unit !! EPANET Mapping
* resistance → ohm
|-
| volumetric_flow_rate || Volume per unit time || m³/s || m3_s || Link flow (SI-normalized EPANET model)
|-
| mass_flow_rate || Mass per unit time || kg/s || kg_s || Not directly represented (derived)
|}


== Quantity vs Unit Semantics ==
=== Pressure and Stress ===


The same unit MAY be used for multiple physical quantities where physically appropriate.
{| class="wikitable"
! Quantity / Name !! Definition !! Canonical Unit (SI symbol) !! Serialized Unit !! EPANET Mapping
|-
| pressure || Force per unit area in fluid system || Pa || pa || Node pressure (SI-normalized EPANET model)
|-
| stress || Internal material stress || Pa || pa || Not represented
|}


For example:
=== Time ===


* time and duration both use unit "s"
{| class="wikitable"
! Quantity / Name !! Definition !! Canonical Unit (SI symbol) !! Serialized Unit !! EPANET Mapping
|-
| time || Simulation or observation time || s || s || Simulation time (EPANET internal time normalized to seconds)
|-
| duration || Time interval length || s || s || Simulation duration / reporting intervals
|}


This does NOT imply equivalence of meaning, only equivalence of unit representation.
=== Electrical Quantities ===


Semantic meaning is defined by the quantity field, not the unit identifier.
{| class="wikitable"
! Quantity / Name !! Definition !! Canonical Unit (SI symbol) !! Serialized Unit
|-
| current || Rate of electric charge flow || A || a
|-
| voltage || Electric potential difference || V || v
|-
| resistance || Opposition to electric current flow || Ω || ohm
|-
| power || Rate of energy transfer || W || w
|-
| energy || Work or transferred electrical energy || J || j
|-
| capacitance || Ability to store electric charge || F || f
|}


== Data Representation Format ==
== Data Representation Format ==
Line 75: Line 121:
   "quantity": "<physical_quantity>",
   "quantity": "<physical_quantity>",
   "value": <numeric_value>,
   "value": <numeric_value>,
   "unit": "<canonical_unit>"
   "unit": "<canonical_unit>",
  "uncertainty": <numeric_value>
}
}
</pre>
</pre>
Line 85: Line 132:
   "quantity": "pipe_length",
   "quantity": "pipe_length",
   "value": 1200,
   "value": 1200,
   "unit": "m"
   "unit": "m",
  "uncertainty": 5
}
}
</pre>
== Requirements ==
<pre>
REQ-MEAS-UNI-001: Unit identifiers MUST be ASCII-only strings.
REQ-MEAS-UNI-002: Unit identifiers MUST NOT contain Unicode characters, superscripts, or typographic symbols.
REQ-MEAS-UNI-003: Each physical quantity in AOWIS MUST map to exactly one canonical unit identifier.
REQ-MEAS-UNI-004: Units MUST be used consistently across all AOWIS system interfaces and storage formats.
REQ-MEAS-UNI-005: Units MUST NOT be context-dependent or implementation-defined.
REQ-MEAS-UNI-006: Semantic meaning MUST be derived from the quantity field, not from the unit identifier.
</pre>
</pre>

Latest revision as of 20:42, 10 June 2026

AOWIS defines a canonical set of unit identifiers used in all system interfaces, storage formats, APIs, and inter-system data exchanges.

All unit identifiers MUST be lower-case ASCII-only strings and MUST NOT contain Unicode characters, superscripts, or typographic symbols.

Units are machine-readable tokens and are not intended to represent typographic or human-rendered SI notation.

General Rules

  • All unit identifiers MUST be lower-case ASCII-only.
  • Unit identifiers MUST be unambiguous and consistent across all AOWIS-compliant systems.
  • Each physical quantity MUST map to exactly one canonical unit.
  • Units MUST NOT be context-dependent or system-dependent.
  • Units MUST be stable identifiers suitable for JSON, databases, and file formats.

Requirements

REQ-MEAS-UNI-001: Unit identifiers MUST be ASCII-only strings.

REQ-MEAS-UNI-002: Unit identifiers MUST NOT contain Unicode characters, superscripts, or typographic symbols.

REQ-MEAS-UNI-003: Each physical quantity in AOWIS MUST map to exactly one canonical unit identifier.

REQ-MEAS-UNI-004: Units MUST be used consistently across all AOWIS system interfaces and storage formats.

REQ-MEAS-UNI-005: Units MUST NOT be context-dependent or implementation-defined.

REQ-MEAS-UNI-006: Semantic meaning MUST be derived from the quantity field, not from the unit identifier.

REQ-MEAS-UNI-007: The "Quantity / Name" field MUST be the canonical machine-readable identifier for a physical quantity and MUST be used as the key in all AOWIS data formats, APIs, databases, and serialized representations.

REQ-MEAS-UNI-008: The "Quantity / Name" field MUST be treated as an immutable identifier and MUST NOT be modified, localized, abbreviated, or reinterpreted across implementations.

REQ-MEAS-UNI-009: Physical quantity semantics MUST be derived exclusively from the "Quantity / Name" field and MUST NOT be inferred from unit identifiers.

Canonical Unit Identifiers

Length and Spatial Quantities

Quantity / Name Definition Canonical Unit (SI symbol) Serialized Unit EPANET Mapping
length Linear spatial extent m m Pipe/link length (SI-normalized EPANET model)
elevation Vertical height relative to datum m m Node elevation (SI-normalized EPANET model)
distance Spatial separation between points m m Derived geometric quantity
position_offset Relative spatial offset magnitude m m Not explicitly represented in EPANET

Area and Volume

Quantity / Name Definition Canonical Unit (SI symbol) Serialized Unit EPANET Mapping
area Two-dimensional spatial extent m2 Not directly used
volume Storage volume m3 Tank volume (SI-normalized EPANET model)

Flow and Transport

Quantity / Name Definition Canonical Unit (SI symbol) Serialized Unit EPANET Mapping
volumetric_flow_rate Volume per unit time m³/s m3_s Link flow (SI-normalized EPANET model)
mass_flow_rate Mass per unit time kg/s kg_s Not directly represented (derived)

Pressure and Stress

Quantity / Name Definition Canonical Unit (SI symbol) Serialized Unit EPANET Mapping
pressure Force per unit area in fluid system Pa pa Node pressure (SI-normalized EPANET model)
stress Internal material stress Pa pa Not represented

Time

Quantity / Name Definition Canonical Unit (SI symbol) Serialized Unit EPANET Mapping
time Simulation or observation time s s Simulation time (EPANET internal time normalized to seconds)
duration Time interval length s s Simulation duration / reporting intervals

Electrical Quantities

Quantity / Name Definition Canonical Unit (SI symbol) Serialized Unit
current Rate of electric charge flow A a
voltage Electric potential difference V v
resistance Opposition to electric current flow Ω ohm
power Rate of energy transfer W w
energy Work or transferred electrical energy J j
capacitance Ability to store electric charge F f

Data Representation Format

All AOWIS measurement values MUST use the following structure:

{
  "quantity": "<physical_quantity>",
  "value": <numeric_value>,
  "unit": "<canonical_unit>",
  "uncertainty": <numeric_value>
}

Example:

{
  "quantity": "pipe_length",
  "value": 1200,
  "unit": "m",
  "uncertainty": 5
}