ASHRAE Guideline 36-2021 A-4 Parallel Fan-Powered Terminal Unit, Variable Volume Fan

ASHRAE Guideline 36-2021 A-4 Parallel Fan-Powered Terminal Unit, Variable Volume Fan#

This component model is an example of the parallel fan-powered terminal unit with variable volume fan from Guideline 36-2021, Appendix A, Figure A-4.

Downloads#

Model Components#

Load and Validate Model#

This code uses the BuildingMOTIF library to load the 223P ontology and the model file into a temporary in-memory instance. It then validates the model against the ontology. If the model is invalid, it will print the validation report.

To run this code, you need to have Java installed on your system. If you do not have Java installed, you can remove the shacl_engine='topquadrant' parameter from the BuildingMOTIF constructor. Be warned that without the shacl_engine='topquadrant' parameter, the validation process will be slower.

from buildingmotif import BuildingMOTIF
from buildingmotif.dataclasses import Library, Model
import logging

# Create a BuildingMOTIF object. If you do not have Java installed, remove the "shacl_engine" parameter
bm = BuildingMOTIF('sqlite://', shacl_engine='topquadrant', log_level=logging.ERROR)

# load 223P library. We will load a recent copy from the models.open223.info
# git repository; later, we will load this from the location of the actual standard
s223 = Library.load(ontology_graph="https://github.com/open223/models.open223.info/raw/main/ontologies/223p.ttl")

# load the model into the BuildingMOTIF instance
model = Model.create("urn:guideline36-2021-A-4")
model.graph.parse("https://models.open223.info/guideline36-2021-A-4.ttl")

# validate the model against 223P ontology
ctx = model.validate([s223.get_shape_collection()], error_on_missing_imports=False)

# print the validation result
print(f"Model is valid: {ctx.valid}")

# if the model is invalid, print the validation report
if not ctx.valid:
    print(ctx.report_string[:1000]) # first 1000 characters of the report

# BuildingMOTIF can also interpret the report to provide recommendations on fixes
for focus_node, diffs in ctx.get_reasons_with_severity("Violation").items():
    if len(diffs) == 0:
        continue
    print(focus_node)
    for diff in diffs:
        print("  - " + diff.reason())
Model is valid: 0
@prefix ns1: <http://data.ashrae.org/standard223#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

[] a sh:ValidationReport ;
    sh:conforms false ;
    sh:result [ a sh:ValidationResult ;
            sh:focusNode <urn:ex/reheat-coil-water-in> ;
            sh:resultMessage "s223: A ConnectionPoint must be associated with exactly one Substance-Medium using the relation hasMedium." ;
            sh:resultPath ns1:hasMedium ;
            sh:resultSeverity sh:Violation ;
            sh:sourceConstraintComponent sh:ClassConstraintComponent ;
            sh:sourceShape <urn:well-known/89192fdc> ;
            sh:value ns1:Medium-Water ],
        [ a sh:ValidationResult ;
            sh:focusNode <urn:ex/fan> ;
            sh:resultMessage "Less than 1 values have shape <urn:well-known/96a62680>" ;
            sh:resultPath ns1:hasConnectionPoint ;
            sh:resultSeverity sh:Violation ;
            sh:sourceConstraintComponent sh:Qualif
urn:ex/fan
  - urn:ex/fan needs between 1 and None instances of http://data.ashrae.org/standard223#OutletConnectionPoint on path http://data.ashrae.org/standard223#hasConnectionPoint
  - urn:ex/fan needs between 1 and None instances of http://data.ashrae.org/standard223#InletConnectionPoint on path http://data.ashrae.org/standard223#hasConnectionPoint
urn:ex/reheat-coil-valve-actuator
  - urn:ex/reheat-coil-valve-actuator needs between 1 and None instances of http://data.ashrae.org/standard223#ActuatableProperty on path http://data.ashrae.org/standard223#actuatedByProperty
urn:ex/return-air-from-plenum-in-connection
  - urn:ex/return-air-from-plenum-in-connection needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/reheat-coil
  - urn:ex/reheat-coil needs between 1 and None instances of http://data.ashrae.org/standard223#OutletConnectionPoint on path http://data.ashrae.org/standard223#hasConnectionPoint
  - urn:ex/reheat-coil needs between 1 and None instances of http://data.ashrae.org/standard223#InletConnectionPoint on path http://data.ashrae.org/standard223#hasConnectionPoint
urn:ex/junction
  - urn:ex/junction needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/duct-after-reheat-coil
  - urn:ex/duct-after-reheat-coil needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/junction-in-2
  - urn:ex/junction-in-2 needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/reheat-coil-water-in
  - urn:ex/reheat-coil-water-in needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/parallel-fan-powered-terminal-unit-variable-volume-fan
  - urn:ex/parallel-fan-powered-terminal-unit-variable-volume-fan needs between 1 and None instances of http://data.ashrae.org/standard223#OutletConnectionPoint on path http://data.ashrae.org/standard223#hasConnectionPoint
  - urn:ex/parallel-fan-powered-terminal-unit-variable-volume-fan needs between 1 and None instances of http://data.ashrae.org/standard223#InletConnectionPoint on path http://data.ashrae.org/standard223#hasConnectionPoint
urn:ex/duct-before-damper
  - urn:ex/duct-before-damper needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/duct-after-damper
  - urn:ex/duct-after-damper needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/duct-before-reheat-coil
  - urn:ex/duct-before-reheat-coil needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/reheat-coil-water-out
  - urn:ex/reheat-coil-water-out needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/reheat-coil-air-out
  - urn:ex/reheat-coil-air-out needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/damper-actuator
  - urn:ex/damper-actuator needs between 1 and None instances of http://data.ashrae.org/standard223#ActuatableProperty on path http://data.ashrae.org/standard223#actuatedByProperty
urn:ex/pipe-hot-water-return-after-valve
  - urn:ex/pipe-hot-water-return-after-valve needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/pipe-hot-water-supply
  - urn:ex/pipe-hot-water-supply needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/supply-air-in-connection
  - urn:ex/supply-air-in-connection needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/pipe-hot-water-return-before-valve
  - urn:ex/pipe-hot-water-return-before-valve needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/damper-out
  - urn:ex/damper-out needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/out-connection
  - urn:ex/out-connection needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/out
  - urn:ex/out needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/junction-out
  - urn:ex/junction-out needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/damper
  - urn:ex/damper needs between 1 and None instances of http://data.ashrae.org/standard223#OutletConnectionPoint on path http://data.ashrae.org/standard223#hasConnectionPoint
  - urn:ex/damper needs between 1 and None instances of http://data.ashrae.org/standard223#InletConnectionPoint on path http://data.ashrae.org/standard223#hasConnectionPoint
urn:ex/return-air-from-plenum-in
  - urn:ex/return-air-from-plenum-in needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/reheat-coil-in
  - urn:ex/reheat-coil-in needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/reheat-coil-valve-out
  - urn:ex/reheat-coil-valve-out needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/fan-out
  - urn:ex/fan-out needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/supply-air-in
  - urn:ex/supply-air-in needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/junction-in-1
  - urn:ex/junction-in-1 needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/reheat-coil-valve-in
  - urn:ex/reheat-coil-valve-in needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/fan-in
  - urn:ex/fan-in needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/damper-in
  - urn:ex/damper-in needs to be a http://data.ashrae.org/standard223#Substance-Medium
urn:ex/duct-after-fan
  - urn:ex/duct-after-fan needs to be a http://data.ashrae.org/standard223#Substance-Medium