ASHRAE Guideline 36-2021 A-7 Dual Duct Terminal Unit with Inlet Sensors¶
This component model is an example of the dual duct terminal unit with inlet sensors from Guideline 36-2021, Appendix A, Figure A-7.
Downloads¶
What are these files?
Turtle file (original): This is the original source Turtle file that was provided to
models.open223.info, usually as the output of some model creation tool.Turtle file (compiled): This is the original Turtle file with all inferred relationships and values added through SHACL inference against the 223P ontology and other dependencies. You should use this file for any further processing. It does not contain any of the ontologies.
Turtle file (with all imports): This is the compiled Turtle file with all imports included in the file (223P ontology, QUDT ontology, and others). This is helpful when you do not want to deal with downloading and managing ontology dependencies. It is also much larger than the compiled file.
JSON-LD file (original): This is the original Turtle file converted to the JSON-LD format.
Turtle is a syntax for RDF (Resource Description Framework) that is easy to read and write. It is a popular format for representing linked data. Parsers and serializers are available in many programming languages. JSON-LD is a JSON-based format for linked data that is easy to use with JavaScript and other web technologies.
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.
BuildingMOTIF resolves the ontology’s dependencies and performs SHACL validation and inference
BuildingMOTIF installation
To install the buildingmotif library, you can use the following command:
pip install 'buildingmotif @ git+https://github.com/NREL/buildingmotif.git@gtf-buildingmotif'from buildingmotif import BuildingMOTIF
from buildingmotif.dataclasses import Library, Model
import logging
# Create a BuildingMOTIF object. This validates with the "pyshifty" SHACL engine by default
bm = BuildingMOTIF('sqlite://', 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.
# BuildingMOTIF uses OntoEnv to fetch the ontologies 223P depends on (QUDT, SHACL, ...).
s223 = Library.from_ontology("https://open223.info/223p.ttl", infer_templates=False, run_shacl_inference=False)
# load the model into the BuildingMOTIF instance
model = Model.from_file("https://models.open223.info/guideline36-2021-A-7.ttl")
# a model's manifest lists the libraries it should conform to
model.manifest.add(s223)
# validate the model against its manifest
ctx = model.validate()
# 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: True