Skip to content

Commit

Permalink
Add gauge pressure sensors (#569)
Browse files Browse the repository at this point in the history
* add gauge pressure sensors

* add gauge pressure

* fix spelling h20 -> h2o

* updates
  • Loading branch information
gtfierro authored Jan 16, 2024
1 parent e627996 commit 78bcda6
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 1 deletion.
3 changes: 3 additions & 0 deletions bricksrc/definitions.csv
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ https://brickschema.org/schema/Brick#Chilled_Water_Differential_Pressure_Step_Pa
https://brickschema.org/schema/Brick#Chilled_Water_Differential_Temperature_Sensor,Measures the difference in temperature between the entering water to the chiller or other water cooling device and leaving water from the same chiller or other water cooling device,
https://brickschema.org/schema/Brick#Chilled_Water_Flow_Sensor,Measures the rate of flow in a chilled water circuit,
https://brickschema.org/schema/Brick#Chilled_Water_Flow_Setpoint,Sets the target flow rate of chilled water,
https://brickschema.org/schema/Brick#Chilled_Water_Gauge_Pressure_Sensor,Sensor measuring the gauge pressure (zero-referenced against ambient air pressure) of chilled water,
https://brickschema.org/schema/Brick#Chilled_Water_Loop,A collection of equipment that transport and regulate chilled water among each other,
https://brickschema.org/schema/Brick#Chilled_Water_Meter,A meter that measures the usage or consumption of chilled water,
https://brickschema.org/schema/Brick#Chilled_Water_Pump,A pump that performs work on chilled water; typically part of a chilled water system,
Expand Down Expand Up @@ -489,6 +490,7 @@ https://brickschema.org/schema/Brick#Gas_Pressure_Regulator_Valve,Valve designed
https://brickschema.org/schema/Brick#Gas_Sensor,Measures gas concentration (other than CO2),
https://brickschema.org/schema/Brick#Gasoline,Petroleum derived liquid used as a fuel source,
https://brickschema.org/schema/Brick#Gatehouse,The standalone building used to manage the entrance to a campus or building grounds,
https://brickschema.org/schema/Brick#Gauge_Pressure_Sensor,Pressure sensor which is zero-referenced against ambient air pressure,
https://brickschema.org/schema/Brick#Generation_Sensor,A sensor measuring how much something has been generated.,
https://brickschema.org/schema/Brick#Generator_Room,"A room for electrical equipment, specifically electrical generators.",
https://brickschema.org/schema/Brick#Grains,,
Expand Down Expand Up @@ -557,6 +559,7 @@ https://brickschema.org/schema/Brick#Hot_Water_Differential_Temperature_Sensor,M
https://brickschema.org/schema/Brick#Hot_Water_Discharge_Temperature_Load_Shed_Status,,
https://brickschema.org/schema/Brick#Hot_Water_Flow_Sensor,Measures the rate of flow in a hot water circuit,
https://brickschema.org/schema/Brick#Hot_Water_Flow_Setpoint,Sets the target flow rate of hot water,
https://brickschema.org/schema/Brick#Hot_Water_Gauge_Pressure_Sensor,Sensor measuring the gauge pressure (zero-referenced against ambient air pressure) of hot water,
https://brickschema.org/schema/Brick#Hot_Water_Loop,A collection of equipment that transport and regulate hot water among each other,
https://brickschema.org/schema/Brick#Hot_Water_Meter,A meter that measures the usage or consumption of hot water,
https://brickschema.org/schema/Brick#Hot_Water_Pump,A pump that performs work on hot water; typically part of a hot water system,
Expand Down
12 changes: 12 additions & 0 deletions bricksrc/quantities.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,18 @@ def all_units():
},
},
},
"Gauge_Pressure": {
QUDT.applicableUnit: [
UNIT["IN_H2O"],
UNIT["LB_F-PER-IN2"],
UNIT["MilliM_H2O"],
UNIT["BAR"],
],
SKOS.definition: Literal("Pressure relative to atmospheric pressure"),
RDFS.isDefinedBy: URIRef(str(BRICK).strip("#")),
RDFS.label: Literal("Gauge_Pressure"),
SKOS.broader: QUDTQK.Pressure,
},
"Static_Pressure": {
BRICK.hasQUDTReference: QUDTQK["StaticPressure"],
SKOS.narrower: {
Expand Down
34 changes: 34 additions & 0 deletions bricksrc/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,10 @@
TAG.Discharge,
],
BRICK.hasQuantity: QUDTQK.VolumeFlowRate,
BRICK.hasSubstance: [
BRICK.Supply_Air,
BRICK.Discharge_Air,
],
"aliases": [BRICK["Discharge_Air_Flow_Sensor"]],
"subclasses": {
"Average_Supply_Air_Flow_Sensor": {
Expand Down Expand Up @@ -955,6 +959,10 @@
],
"aliases": [BRICK["Discharge_Air_Humidity_Sensor"]],
BRICK.hasQuantity: QUDTQK.RelativeHumidity,
BRICK.hasSubstance: [
BRICK.Supply_Air,
BRICK.Discharge_Air,
],
},
"Zone_Air_Humidity_Sensor": {
"tags": [
Expand Down Expand Up @@ -1034,6 +1042,32 @@
"tags": [TAG.Point, TAG.Sensor, TAG.Pressure],
BRICK.hasQuantity: BRICK.Pressure,
"subclasses": {
"Gauge_Pressure_Sensor": {
"tags": [TAG.Point, TAG.Sensor, TAG.Pressure, TAG.Gauge],
BRICK.hasQuantity: BRICK.Gauge_Pressure,
"subclasses": {
"Chilled_Water_Gauge_Pressure_Sensor": {
"tags": [
TAG.Point,
TAG.Sensor,
TAG.Chilled,
TAG.Water,
TAG.Gauge,
TAG.Pressure,
],
},
"Hot_Water_Gauge_Pressure_Sensor": {
"tags": [
TAG.Point,
TAG.Sensor,
TAG.Hot,
TAG.Water,
TAG.Gauge,
TAG.Pressure,
],
},
},
},
"Air_Pressure_Sensor": {
"tags": [TAG.Point, TAG.Sensor, TAG.Pressure, TAG.Air],
BRICK.hasSubstance: BRICK.Air,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ def test_deprecation(brick_with_imports):
?res sh:value <urn:ex#fan> .
}"""
)
assert len(list(res)) == 1, "Should have a warning for deprecation"
assert len(set(res)) == 1, "Should have a warning for deprecation"

0 comments on commit 78bcda6

Please sign in to comment.