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.
| 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 as a library (editable during development):
pip install -e .Or install dependencies only:
pip install -r requirements.txtCopy the environment template and set your values:
cp .env.example .env
# Edit .env and set RDF2EMO_DATA_DIR at minimumThe .env file is gitignored. Alternatively, export the variable in your shell:
export RDF2EMO_DATA_DIR=/path/to/semantic-model-filesOptional environment variables:
export RDF2EMO_LOAD_PROFILE_CSV=occsim_typi.csv
export RDF2EMO_OUTPUT_DIR=/path/to/outputRun all three architecture pipelines:
rdf2emo
# or: python -m rdf2emoRun 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 -> .xlsxSelect design phase (default is cd):
rdf2emo --ac --phase sd # Schematic Design
rdf2emo --ac --phase cd # Construction DocumentGenerated 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.
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")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.
- Anay Waghale
- Karthikeya Devaprasad
- Michael Poplawski