First simulation
This tutorial will guide you through your first simulation using the Trano library. Trano is a Python library that enables the simulation of building energy systems utilizing the Buildings and IDEAS libraries. All you need is a configuration file and a few lines of code.
This tutorial demonstrates the simplicity of running building energy simulations with Trano and showcases automatically generated results presented in a report.
Input configuration file
The described configuration outlines a building with the following characteristics:
-
Construction Materials: The walls are composed of three layers of identical materials, each with a thermal conductivity of 0.035, density of 2000 kg/m³, and specific heat capacity of 1000 J/(kg·K). The materials likely have good insulation properties due to low thermal conductivity.
-
Windows: The building features a window constructed with a double glazing system (INS2AR2020:001), consisting of two glass layers separated by a layer of air. This setup is designed to improve thermal performance and reduce heat transfer.
-
Air Interface: The use of air as a gas layer suggests it serves as an insulating medium, enhancing energy efficiency.
-
Space and Orientation: The building has a floor area of 100 m², an average room height of 2.5 meters, and has walls oriented primarily to the south (180° azimuth). This orientation can provide advantages for passive solar heating.
Overall, the building appears to be designed for energy efficiency with an emphasis on thermal insulation and effective glazing methods, likely suitable for residential use or low-energy commercial applications.
material:
- id: MATERIAL:001
thermal_conductivity: 0.035
density: 2000.0
specific_heat_capacity: 1000.0
- id: MATERIAL:002
thermal_conductivity: 0.035
density: 2000.0
specific_heat_capacity: 1000.0
- id: MATERIAL:003
thermal_conductivity: 0.035
density: 2000.0
specific_heat_capacity: 1000.0
constructions:
- id: CONSTRUCTION:001
layers:
- material: MATERIAL:001
thickness: 0.1
- material: MATERIAL:002
thickness: 0.1
- material: MATERIAL:003
thickness: 0.1
glass_material:
- density: 2500.0
id: GLASS:001
longwave_emissivity: 0.84
shortwave_emissivity: 0.67
specific_heat_capacity: 840.0
thermal_conductivity: 1.0
gas:
- density: 1.2
id: AIR:001
longwave_emissivity: 0.0
shortwave_emissivity: 0.0
specific_heat_capacity: 1006.0
thermal_conductivity: 0.0256
glazings:
- id: INS2AR2020:001
layers:
- glass: GLASS:001
thickness: 0.006
- gas: AIR:001
thickness: 0.016
- glass: GLASS:001
thickness: 0.006
spaces:
- parameters:
floor_area: 100.0
average_room_height: 2.5
external_boundaries:
external_walls:
- surface: 100.0
azimuth: 180.0
tilt: wall
construction: CONSTRUCTION:001
- surface: 100.0
azimuth: 180.0
tilt: wall
construction: CONSTRUCTION:001
- surface: 200.0
azimuth: 180.0
tilt: wall
construction: CONSTRUCTION:001
floor_on_grounds:
- surface: 1.0
construction: CONSTRUCTION:001
windows:
- surface: 1.0
azimuth: 180.0
tilt: wall
construction: INS2AR2020:001
width: 1.0
height: 1.0
Code
from trano.main import simulate_model
from trano.simulate.simulate import SimulationLibraryOptions
simulate_model(
path_to_yaml_configuration_folder / "first_simulation.yaml",
SimulationLibraryOptions(
start_time=0,
end_time=2 * 3600 * 24 * 7,
),
)
General Explanation
The code snippet simulates a model using a configuration file specified in YAML format. It utilizes options from a simulation library to set the simulation duration.
Description and Parameters
- Function:
simulate_model
- Parameters:
path_to_yaml_configuration_folder / "first_simulation.yaml"
: Path to the YAML configuration file for the simulation.SimulationLibraryOptions
: Options for the simulation.start_time
: The starting point of the simulation (0 in this case).end_time
: The endpoint of the simulation, calculated as 2 weeks in seconds (2 * 3600 * 24 * 7).
Results
Once the simulation is terminated, Trano will generate the following report. It provides a detailed description of the various parameters utilized during the simulation. In addition to the parameters specified in the YAML file, the report also includes all default parameters used in the simulation.
Spaces
hRoo | AFlo | linearizeRadiation | m_flow_nominal | mSenFac | T_start | volume |
---|---|---|---|---|---|---|
2.5 | 100.0 | true | 0.01 | 1.0 | 294.15 | 250.0 |
gain | k | occupancy | name |
---|---|---|---|
[40; 75; 40] | 1/7/3 | 3600*{9, 17} | occupancy_1 |
Name | Azimuth | Construction Name | Surface | Tilt | ||
---|---|---|---|---|---|---|
externalwall_0 | 180.0 | construction_001 | 100.0 | wall | ||
externalwall_1 | 180.0 | construction_001 | 100.0 | wall | ||
externalwall_2 | 180.0 | construction_001 | 200.0 | wall | ||
window_0 | 180.0 | ins2ar2020_001 | 1.0 | wall | ||
flooronground_0 | 90.0 | construction_001 | 1.0 | floor |
Name | c | epsLw | epsSw | k | rho | Thickness |
---|---|---|---|---|---|---|
material_001 | 1000.0 | 0.85 | 0.85 | 0.035 | 2000.0 | 0.1 |
material_002 | 1000.0 | 0.85 | 0.85 | 0.035 | 2000.0 | 0.1 |
material_003 | 1000.0 | 0.85 | 0.85 | 0.035 | 2000.0 | 0.1 |
Name | c | epsLw | epsSw | k | rho | Thickness |
---|---|---|---|---|---|---|
glass_001 | 840.0 | 0.84 | 0.67 | 1.0 | 2500.0 | 0.006 |
air_001 | 1006.0 | 0.0 | 0.0 | 0.0256 | 1.2 | 0.016 |
glass_001 | 840.0 | 0.84 | 0.67 | 1.0 | 2500.0 | 0.006 |