Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

PNNL Example Building 1 Model 2

Example Building 1 is a simplistic, reference tiny office building consisting of a single story with 5 rooms spanning 5 space types.

This reference building was developed for and first described in the journal article “Metadata Schemas and Ontologies for Building Energy Applications: A Critical Review and Use Case Analysis”.

Example Building 1 Model 2 is provided by Pacific Northwest National Laboratory. See NIST Example Building 1 Model 1 for a different modeling approach for the same building.

Schematic view

image

Contents

This model contains a representation of the building architecture and electrical/lighting system.

In addition to the s223 ontology, the model uses the Real Estate Core ontology to describe space types (e.g., rec:EnclosedOffice, rec:OpenPlanOffice) and model furniture (e.g., rec:Desk).

Source

The model was created from source data consisting of a building information model (BIM) created using Autodesk Revit, and exported via a Speckle interface.

Speckle view of rooms and lighting fixtures

image

Model instance data have a prefix that is resolvable to a access-controlled Speckle URL.

For example, the following representative prefix:

@prefix bdg1: <https://app.speckle.systems/projects/uid1/models>

and the following representative luminaire:

bdg1:uid2 a s223:Luminaire

resolves to:

https://app.speckle.systems/projects/uid1/models/uid2)

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.

Queries

DescriptionQuery URL
Select all triples from model.Query Link

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 with OntoEnv and validates with shifty, both of which are self-contained Rust extensions, so there is nothing else to install and no Java is required.

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

# Create a BuildingMOTIF object. This validates with the "pyshifty" SHACL
# engine by default, so there is nothing else to install and no Java required.
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. This page pins the exact copy
# it was built and validated against, so it stays reproducible as the site moves
# on. To run this against the current published model, use the permanent URL:
#
#     model = Model.from_file("https://models.open223.info/pnnl-bdg1-2.ttl")
#
model = Model.from_file("https://raw.githubusercontent.com/open223/models.open223.info/1da4cd1739c0e45f9cd8c06a5c25635654355337/models/pnnl-bdg1-2.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 when validation completed
print(f"Validation run at: {datetime.now(timezone.utc).isoformat(timespec='seconds')}")

# 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())
Validation run at: 2026-09-05T14:52:21+00:00
Model is valid: False
Validation Report
Conforms: False

Violation result in http://data.ashrae.org/standard223#ElectronicDisplay (<https://app.speckle.systems/projects/9e62692a26/models#5fb4425e3c8473acb39417a3140ff3d6>):
  Path: <http://data.ashrae.org/standard223#hasConnectionPoint>
  Severity: Violation
  Value: <https://app.speckle.systems/projects/9e62692a26/models#5fb4425e3c8473acb39417a3140ff3d6>
  Message: at least 1 value(s) matching `instance of <http://data.ashrae.org/standard223#InletConnectionPoint> and ∃[..0] <http://data.ashrae.org/standard223#hasMedium> . ∃[..0] rdf:type/rdfs:subClassOf* . test(<http://data.ashrae.org/standard223#Electricity-Signal>) and not (instance of <http://data.ashrae.org/standard223#InletConnectionPoint> and ∃[..0] <http://data.ashrae.org/standard223#hasMedium> . ∃[..0] rdf:type/rdfs:subClassOf* . @257)` required along <http://data.ashrae.org/standard223#hasConnectionPoint>, found 0

Violation result in http://data.ashrae.org/standard223#ElectronicDisplay (<https://a
https://app.speckle.systems/projects/9e62692a26/models#5fb4425e3c8473acb39417a3140ff3d6
  - <https://app.speckle.systems/projects/9e62692a26/models#5fb4425e3c8473acb39417a3140ff3d6> at least 1 value(s) matching `instance of <http://data.ashrae.org/standard223#InletConnectionPoint> and ∃[..0] <http://data.ashrae.org/standard223#hasMedium> . ∃[..0] rdf:type/rdfs:subClassOf* . test(<http://data.ashrae.org/standard223#Electricity-Signal>) and not (instance of <http://data.ashrae.org/standard223#InletConnectionPoint> and ∃[..0] <http://data.ashrae.org/standard223#hasMedium> . ∃[..0] rdf:type/rdfs:subClassOf* . @257)` required along <http://data.ashrae.org/standard223#hasConnectionPoint>, found 0
https://app.speckle.systems/projects/9e62692a26/models#de2c9a9980301b6952422b3134817636
  - <https://app.speckle.systems/projects/9e62692a26/models#de2c9a9980301b6952422b3134817636> at least 1 value(s) matching `instance of <http://data.ashrae.org/standard223#InletConnectionPoint> and ∃[..0] <http://data.ashrae.org/standard223#hasMedium> . ∃[..0] rdf:type/rdfs:subClassOf* . test(<http://data.ashrae.org/standard223#Electricity-Signal>) and not (instance of <http://data.ashrae.org/standard223#InletConnectionPoint> and ∃[..0] <http://data.ashrae.org/standard223#hasMedium> . ∃[..0] rdf:type/rdfs:subClassOf* . @257)` required along <http://data.ashrae.org/standard223#hasConnectionPoint>, found 0
References
  1. Pritoni, M., Paine, D., Fierro, G., Mosiman, C., Poplawski, M., Saha, A., Bender, J., & Granderson, J. (2021). Metadata Schemas and Ontologies for Building Energy Applications: A Critical Review and Use Case Analysis. Energies, 14(7), 2024. 10.3390/en14072024