-
Notifications
You must be signed in to change notification settings - Fork 13
OpenStudio Model Setup
This section focuses on the OpenStudio modeling requirements and describes how to create readable and writeable points in OpenStudio so that Alfalfa can create the ExternalInterface objects. This DOES NOT define how the appropriate tags should be applied to 'type' something. That is TODO.
The following steps should be taken in the OpenStudio model in order to expose readable points from simulation to Alfalfa to acquire ExternalInterface objects needed for co-simulation, as well as Project Haystack points with tags associated with the readable points:
- Create an OutputVariable object for the simulation point whose value you wish to read
- Set the OutputVariable object attributes including name, reporting frequency, and key value as required
- Set the exportToBCVTB method to true
The following steps should be taken in the OpenStudio model in order to expose writeable points in simulation to Alfalfa in order to acquire ExternalInterface objects needed for co-simulation, as well as Project Haystack points and tags associated with the writeable points.
- Create two (2) EnergyManagementSystemGlobalVariable objects for the simulation actuator point you wish to expose
- Set the name of the first object (e.g. “Fan_Mass_Flow”)
- Set the name of the second object the same as the first but include “_enable” (e.g. “Fan_Mass_Flow_enable”)
- Set exportToBCVTB method to true for both The following steps should be taken in the OpenStudio model EnergyManagementSystem Programs and Subroutines that reference this writeable point:
- EnergyPlus EMS Programs and Subroutines should reference the “NAME_enable” variable by String name whose Boolean value (True or False) dictates whether or not EnergyPlus should write the value from Alfalfa to the associated EnergyPlus EMS actuator. For example:
IF Fan_Mass_Flow_enable ==1
SET EMS_fanmassflow_actuator = Fan_Mass_Flow
ELSE,
SET EMS_fanmassflow_actuator = Null
ENDIF,
Where 1 is True and 0 is False.
Assuming that the OpenStudio Model has been set up with the above requirements, an OpenStudio Workflow can easily be implemented. The workflow can be designed using the OpenStudio application or by correctly defining a directory structure with the necessary components. For those familiar with creating workflows, this is the standard directory structure, and is shown in the photo below. It also generally takes the form:
- path/to/my_model.osm
- path/to/my_model/workflow.osw
- path/to/my_model/measures/…[insert measure directories]
- path/to/my_model/files/desired_weather_file.epw
An example of the workflow.osw is also provided below:
Once the workflow has been setup, the model and model directory simply need to be zipped together. For both Windows and macOS, select the model and model directory, then right click, and see photos below for compressing:
This zipped folder can then be directly uploaded to Alfalfa.
- Getting Started with Model Measures Part 1: Creating Inputs and Outputs
- Getting Started with Model Measures Part 2: Creating Actuators
- Getting Started with EnergyPlus Measures Part 1: Creating Inputs and Outputs
- Getting Started with EnergyPlus Measures Part 2: Creating Actuators
- How to Configure an OpenStudio Model
- How to Configure Measures for Use with Alfalfa Ruby Gem
- How to Create Inputs and Outputs With Measures
- How to Run URBANopt Output Models in Alfalfa
- How to Migrate EnergyPlus Python Plugins
- How to Integrate Python based Electric Vehicle Models with OpenStudio Workflows
- How to Locally Test OpenStudio Models
- Required Structure of OpenStudio Workflow
- List of Automatically Generated Energyplus Points
- Alfalfa EnergyPlus Mixin Methods
- Getting Started with Uploading and Running a Model Using Python
- Getting Started with Uploading and Running a Model Using the UI
- How to Install Alfalfa Client
- How to Preprocess and Upload a Model
- How to Step Through a Simulation
- How to View Historical Data in Grafana
- How to Configure an Alias
- How to Troubleshoot Models