The user model (as shown in the image) is a typical medium sized office building with roughly 60%
window-to-wall ratio (WWR) and overhangs on its south facade. The default_hvac_bldg_type
is set to other nonresidential
, and the window to wall ratio and service water heating system building types are both set according to the related category. The building is assumed to be located in New York City. So its climate zone is 4A
.
Download the folder “demo1zip” on your system and extract it in any local folder (*_to be changed based on the method used in the sections below*). The zip folder contains all the files including the model (.osm) and the weather file (.epw) to follow along the demo.
In the following sections, follow the steps to run the demo file based on the method you will be using.
Launch OpenStudio Application (OS App): It should be installed on your system, if not, make sure you have followed all the steps in Use with OS App section.
Load the .osm file: Go to the File menu and select Open. Navigate to the downloaded folder demo 1
and select geometry_demo_model.osm
file. The project inputs like weather file, climate zone and location will load automatically (as shown in the image). If any parameter is missing, add it manually, for example, if the weather file is missing, select the .epw file provided in the folder or any other before moving forward.
Add the measure: Go to the Measures tab in the left menu. Under Whole Building > Space Types, Create ASHRAE 90.1 2019 PRM Model measure should be available. If you don’t see it, revisit the steps in Use with OS App section. Add the measure.
Setting Project Parameters: Click on the measure after adding it, a few project parameters will show up in the Edit menu on the right. Under Inputs, select the following:
Run Simulation: Go to the Run Simulation tab and run the simulation. Once it’s completed, go to the demo1 folder in the system. A new folder geometry_demo_model
would be created containing subfolders for the runs as shown in [Run the measure] section. The generated_files
folder would contain the output .osm files, reports that should reflect the Output shown here.
Setup Local Directory: Set up the files from demo1
folder in a local directory. One such example of the folder structure is shown in Run the measure section.
Edit OSW File: Open the .osw file created initially (Refer to Run the measure section). Update the project inputs and parameters as follows.
Execute: Open Command Prompt as an administrator and type the following command with paths to the openstudio\bin and the OSW directories.
C:\openstudio-3.7.0\bin\openstudio.exe run -w "C:\Users\sample_user\demo1\test.osw"
Output: Once the simulation is run, go to the demo1 folder (or the folder where you had all the files set up in the local directory) to access the output files as shown in Run the measure section. The generated_files
folder would contain the output .osm files, reports that should reflect the Output shown here.
Open the Ruby file created in the Call measure via API section.
Check Project parameters: Check and update the project parameters in the script as follows:
# Project parameters
default_hvac_bldg_type = 'other nonresidential'
default_wwr_bldg_type = 'Office 5,000 to 50,000 sq ft'
default_swh_bldg_type = 'Office'
climate_zone = 'ASHRAE 169-2013-4A'
These default values shall be assigned with correct strings. All these strings shall match exactly to the designed list.
You can find the full list of strings for each project parameter here
Set up Directories: There are four directories that must be setup.
baseline_dir
is the path used by PRM method to save all output files.demo_path
is the parent path for demo folderproposed_geo_model
is the relative path of proposed model. The path shall be relative to the demo_path
user_data_path
is the path to user data folder, which contains all the user data .csv
. # directories - change these two variables
demo_folder = 'demo1'
proposed_model = 'geometry_demo_model.osm'
# You may need to change the paths below based on how the project is setup on your local directory:
# This path points to a directory that saves all baseline generation outputs
baseline_dir = "#{File.dirname(Dir.pwd)}/output"
# This path points to the parent folder that contains demo1, demo2 or demo3 folder.
demo_path = "#{File.dirname(Dir.pwd)}/source"
proposed_geo_model = "/#{demo_folder}/#{proposed_model}"
user_data_path = "#{demo_path}/#{demo_folder}/user_data"
Initialize: Next we will intialize instances for the baseline generation.
```Ruby
# Script begins
translator = OpenStudio::OSVersion::VersionTranslator.new
model = translator.loadModel("#{demo_path}#{proposed_geo_model}").get
# Generate baseline
standard = Standard.build("90.1-PRM-2019")
```
model
is the proposed model loaded by OpenStudio
version translator.
standard
is the 90.1 PRM 2019 instance of the OpenStudio Standard, which will be used for generating the PRM baseline.
Baseline generation: The last step is to generate the baseline. Before calling the function, there are a few more steps to do.
.csv
to .json
and load it into the standard instance.# Run simulation on proposed model
standard.model_run_simulation_and_log_errors(model, run_dir = "#{baseline_dir}/PROP")
# Load User data
json_path = standard.convert_userdata_csv_to_json(user_data_path, "#{baseline_dir}")
standard.load_userdata_to_standards_database(json_path)
create_results = standard.model_create_prm_any_baseline_building(model, '',
climate_zone,
hvac_building_type=default_hvac_bldg_type,
wwr_building_types=default_wwr_bldg_type,
swh_building_types=default_swh_bldg_type,
model_deep_copy = true,
create_proposed_model = true,
custom = nil,
sizing_run_dir = run_dir_baseline,
run_all_orients = false,
unmet_load_hours_check = true,
debug = GENERATE_PRM_LOG)
You can skip running simulation on proposed model by turning the unmet_load_hours_check
flag to true.
After the simulation run, noticeably, the generated baseline model will have smaller windows (31%
WWR) and no overhangs.
Besides geometry, several building system performances are also updated. Table below shows some transformation examples that can be found in the baseline model.
Category | Dependent Variable | Standard Requirement | Baseline Value |
---|---|---|---|
Exterior Wall | Climate Zone 4, nonresidential | U-0.124 (R-8.06) | PRM Steel Framed Exterior Wall R-8.06 |
Roof | Climate Zone 4, nonresidential | U-0.063 (R-15.87) | PRM IEAD Roof R-15.87 |
Window | Climate Zone 4, nonresidential, 30-40% WWR | U-0.57, SHGC-0.39, Vt-0.43 | PRM U 0.57 SHGC 0.39 VT 0.4 Simple Glazing Window |
LPD | Office, whole building | 1.10 W/ft2 | 11.8 W/m2 |
In the next demo, we will show an HVAC transformation example.