The Scripting module provides access to 3 different toolsets:
- EMS Runtime Scripting tools allow EnergyPlus simulations to be customised at runtime to help you to assess the performance of innovative systems and generate custom outputs.
- C# Scripting tools allow you to write C# code to pre and post-process the model and simulation results at key points in the program execution. An extensive API provides the same deep access to the program and model data that DesignBuilder developers have.
- Python Scripting provides the same pre and post-processing capabilities as the C# scripting tools, but through the popular Python language.
EMS Runtime Scripting
The integrated EMS environment provides all of the required sensors, actuators, variables, outputs etc in easy to use dialogs. These facilties help to make the script writing process straightforward and accessible for any energy modeller with a little coding knowledge. EMS scripts are included in the EnergyPlus IDF input file and execute very quickly at runtime. EMS scripting productivity features include:
- A range of DesignBuilder extensions to the standard EMS syntax allow fully portable scripts to be written. This means that a script written for one project can be reused on other projects or even shared with other users on the public script repository.
- Read building, zone or surface settings from the DesignBuilder model to populate data within the script.
- Load fully formed actuator, sensor, variable, output statements from easy to use dialogs.
- Colour syntax highlighting in the scripting window helps with readability.
Some example EMS applications include:
- Precision control over simulated behaviour for HVAC, natural ventilation, glazing and lighting systems. For example, you can add manufacturer control logic to equipment such as heat pumps or override default EnergyPlus control linkage between economisers and heat recovery.
- Custom shading controls to model advanced facade systems such as multi-state electrochromic and thermochromic glazing.
- Linking one system with another (e.g. link earth tube or solar preheat zone to HVAC inlet).
- Advanced control of natural ventilation actuators based on CO2 or moisture levels within the building.
- Create your own custom outputs not normally provided by EnergyPlus (e.g. CIBSE TM52 outputs).
- Dialogs list 1000s of standard built-in EnergyPlus outputs for selection.
- Researching new building systems or the impact of non-standard occupant behaviour patterns.
EMS is ideal for researchers and more advanced modellers needing to assess the performance of innovative systems that have not been included in the standard EnergyPlus engine.
The C# scripting tools allow you to write standard C# code to process and modify the model, simulation inputs and results at key points in the program execution. An extensive API is provided giving you the same deep access to the program and model data that DesignBuilder developers have.
Some example C# scripting applications include:
- Advanced analysis and optimisation of innovative systems by setting up custom design variables for optimisation, sensitivity and parametric analysis studies.
- Model EnergyPlus component types not yet supported by the DesignBuilder GUI by modifying the standard EnergyPlus IDF input file generated by DesignBuilder. Additional IDF can be included and standard IDF swapped out and replaced with custom changes.
- Create your own custom reports based on model data and/or simulation outputs.
The Python scripting tools provide the same functionality as the C# tools, allowing you to write Python code to process and modify the simulation inputs and results at key points in the program execution. Full access to the DesignBuilder API is available.
The EMS part of the Scripting module also requires the Simulation module.