diff --git a/api/fair_ontology.py b/api/fair_ontology.py index 55577a7..a883c10 100644 --- a/api/fair_ontology.py +++ b/api/fair_ontology.py @@ -31,6 +31,8 @@ QUDT_UNITS: dict[str, str | None] = { "CentiM3-PER-MIN": "VolumeFlowRate", "L-PER-MIN": "VolumeFlowRate", + "M3-PER-SEC": "VolumeFlowRate", + "KiloGM-PER-SEC": "MassFlowRate", "W": "Power", "KiloW": "Power", "MilliW": "Power", @@ -106,6 +108,10 @@ "slpm": "L-PER-MIN", "L/min": "L-PER-MIN", "lpm": "L-PER-MIN", + "m^3/s": "M3-PER-SEC", + "m3/s": "M3-PER-SEC", + "m³/s": "M3-PER-SEC", + "kg/s": "KiloGM-PER-SEC", "W": "W", "watt": "W", "watts": "W", diff --git a/api/tests/test_fair_ontology.py b/api/tests/test_fair_ontology.py index 88b847c..6512fd1 100644 --- a/api/tests/test_fair_ontology.py +++ b/api/tests/test_fair_ontology.py @@ -66,6 +66,16 @@ def test_registration_unit_options(self): ) self.assertEqual(infer_qudt("h")["qudt_unit"], QUDT_UNIT_BASE + "HR") self.assertEqual(infer_qudt("°")["qudt_unit"], QUDT_UNIT_BASE + "DEG") + self.assertEqual( + infer_qudt("kg/s"), + {"qudt_unit": QUDT_UNIT_BASE + "KiloGM-PER-SEC", + "qudt_quantity_kind": QUDT_QK_BASE + "MassFlowRate"}, + ) + self.assertEqual( + infer_qudt("m^3/s"), + {"qudt_unit": QUDT_UNIT_BASE + "M3-PER-SEC", + "qudt_quantity_kind": QUDT_QK_BASE + "VolumeFlowRate"}, + ) def test_ambiguous_and_unknown_units_are_not_guessed(self): self.assertEqual(infer_qudt("A"), {}) diff --git a/web/app/equipment/register/page.tsx b/web/app/equipment/register/page.tsx index 84f93e6..02268c2 100644 --- a/web/app/equipment/register/page.tsx +++ b/web/app/equipment/register/page.tsx @@ -45,6 +45,8 @@ const UNIT_OPTIONS = [ { value: "Pa", label: "Pa" }, { value: "sccm", label: "sccm" }, { value: "SLPM", label: "SLPM" }, + { value: "kg/s", label: "kg/s" }, + { value: "m^3/s", label: "m^3/s" }, { value: "V", label: "V" }, { value: "VDC", label: "VDC" }, { value: "VRMS", label: "VRMS" },