Ladybug Tools Dragonfly

0.13.7 · active · verified Thu Apr 16

lbt-dragonfly is a collection of core Python libraries for creating and analyzing urban climate and energy models, including geometric modeling, weather data handling, and simulation setup for building performance analysis. It is part of the Ladybug Tools suite. The current version is 0.13.7, and it typically sees frequent patch releases and minor updates.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to create basic geometric and energy model components using `lbt-dragonfly`. It shows the creation of a `Room`, a `Building`, and an `EnergyModel` linked to the building.

from dragonfly.model import Room, Building
from dragonfly.energy import EnergyModel

# 1. Create a simple Room object
room = Room.from_rectangular_floor_plan(
    name='OfficeRoom',
    width=5, depth=4, height=3
)

# 2. Create a Building object from rooms
building = Building(rooms=[room], name='MyOfficeBuilding')

# 3. Create an EnergyModel for the building
energy_model = EnergyModel(building=building)

# You can access properties of the created objects
print(f"Created Room: {room.name} with area {room.floor_area:.2f} m²")
print(f"Created Building: {building.name} with {len(building.rooms)} rooms")
print(f"EnergyModel created for building: {energy_model.building.name}")

# Note: To run simulations, you'd typically need a weather file
# and potentially OpenStudio or EnergyPlus installed, which is beyond this quickstart.

view raw JSON →