Skip to content

pnnl/RDF2EMO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rdf2emo

RDF2EMO is a python library that semi-automatically creates Modelica simulation models of whole-building electrical systems from RDF semantic models using the TBEEAM Modelica library. RDF2EMO and TBEEAM enable users without significant Modelica or software development expertise to create whole-building simulation models.

Structure

Path Purpose
.env.example Template — copy to .env and set required/optional environment variables
src/rdf2emo/cli.py CLI entry point (rdf2emo command)
src/rdf2emo/config.py All file paths and settings (reads environment variables)
src/rdf2emo/helpers.py Shared string-builder functions (converters, loads)
src/rdf2emo/ac_coupled_architecture.py Architecture 1: AC-coupled, AC lights + AC MELs
src/rdf2emo/ac_dc_architecture.py Architecture 2: AC-coupled, DC lights + MELs via PoE (central or local DC)
src/rdf2emo/dc_coupled_architecture.py Architecture 3: DC-coupled, DC lights + MELs via DC2DC step-down
src/rdf2emo/load_profiles.py CSV → Modelica load-profile .txt files
src/rdf2emo/extract_converters.py Post-processing: extract converter names from a record
output/ Generated Modelica data records (.txt) written here

Install

Install as a library (editable during development):

pip install -e .

Or install dependencies only:

pip install -r requirements.txt

Copy the environment template and set your values:

cp .env.example .env
# Edit .env and set RDF2EMO_DATA_DIR at minimum

The .env file is gitignored. Alternatively, export the variable in your shell:

export RDF2EMO_DATA_DIR=/path/to/semantic-model-files

Optional environment variables:

export RDF2EMO_LOAD_PROFILE_CSV=occsim_typi.csv
export RDF2EMO_OUTPUT_DIR=/path/to/output

Usage

Run all three architecture pipelines:

rdf2emo
# or: python -m rdf2emo

Run individual architectures:

rdf2emo --ac                          # Architecture 1: AC lights + MELs
rdf2emo --acdc                        # Architecture 2: central DC bus (default)
rdf2emo --acdc --variant local        # Architecture 2: local DC bus
rdf2emo --dc                          # Architecture 3: DC-coupled
rdf2emo --profiles                    # generate load-profile text files
rdf2emo --extract path/to/record.txt  # extract converter names -> .xlsx

Select design phase (default is cd):

rdf2emo --ac --phase sd   # Schematic Design
rdf2emo --ac --phase cd   # Construction Document

Generated records are written to ./output/ by default. You can override this with RDF2EMO_OUTPUT_DIR. Load profiles use occsim_typi.csv by default. You can override this with RDF2EMO_LOAD_PROFILE_CSV.

Library API

You can also import and call the package directly:

import rdf2emo

rdf2emo.run_ac(phase="cd")
rdf2emo.run_acdc(variant="central", phase="cd")
rdf2emo.run_dc(variant="local", phase="cd")

Configuration

Edit .env (copied from .env.example) to set:

  • RDF2EMO_DATA_DIR (required)
  • RDF2EMO_LOAD_PROFILE_CSV (optional)
  • RDF2EMO_OUTPUT_DIR (optional)

Adjust AC_RECORD_NAME / DC_RECORD_* and power density constants in src/rdf2emo/config.py as needed.

Authors

  • Anay Waghale
  • Karthikeya Devaprasad
  • Michael Poplawski

About

RDF2EMO is a python library that semi-automatically creates Modelica simulation models of whole-building electrical systems from RDF semantic models using the TBEEAM Modelica library. RDF2EMO and TBEEAM enable users without significant Modelica or software development expertise to create whole-building simulation models.

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages