Input Files and Arguments¶
Dwelling Input Files¶
Three files are often used to create an OCHRE dwelling model. This section describes these three files.
HPXML File¶
OCHRE uses the Home Performance eXtensible Markup Language, or HPXML, a file format for defining building properties. HPXML provides a standardized format for all the relevant inputs for a building energy model of a residential building. A large advantage to using HPXML is the interoperability it provides, particularly with other NREL building energy modeling tools. The full HPXML schema and a validator tool is available here.
Any OS-HPXML integrated workflow, including ResStock and BEopt, can be used to generate OCHRE input files. This enables more direct comparisons between OCHRE and EnergyPlus. OCHRE has been tested with HPXML files from both workflows, but we note that it does not currently support all of the features of these tools.
HPXML Schedule File¶
An HPXML schedule file is optional but highly recommended. It contains normalized schedule data for many end use loads, including load profiles, hot water usage, occupancy, and temperature setpoints for thermostats and water heaters.
OS-HPXML includes options for simple and detailed schedules. Simple schedules use standardized, average profiles that only vary by hour of the day, month of the year, and weekday/weekend classification. Detailed schedules typically use a stochastic event generator to model more realistic events associated with occupant-driven loads. The detailed schedule is recommended for use in OCHRE as it more realistically models the variability and stochasticity in building energy usage.
The HPXML schedule file is usually generated by ResStock (often named
in.schedules.csv). It can be generated by BEopt (often named
schedules.csv) when selecting stochastic schedules for each end use.
Note
The load profile values in the HPXML schedule file are normalized. OCHRE can save a schedule file after initialization that contains load profiles for each scheduled equipment in units of kW.
Weather File¶
A weather input file is required for simulating a dwelling. OCHRE accepts EnergyPlus and National Solar Radiation Database (NSRDB) weather file formats.
Getting Input Files¶
HPXML and occupancy schedule input files can be downloaded or generated from:
ResStock Datasets: Best for basic users who do not want to generate new building models. Users can view ResStock documentation and metadata files to determine which building ID and upgrade to select. OCHRE includes some code to download input files for a specific building ID and upgrade: (defaults to 2024.2 release):
from ochre import Analysis Analysis.download_resstock_model("bldg0112631", "up00")
BEopt 3.0 or later: Best for users who want to design individual building models. Includes a user interface to select building features. Only works on Windows.
ResStock (via BuildStockBatch): Best for users in need of a large sample of building models with specific features. Due to the complexity in usage, we suggest reviewing the existing models in the ResStock Datasets before running a new sample in ResStock.
Note
When using BEopt, users must specify stochastic occupancy to generate the
schedule file. Once the model is run, the input files you need for OCHRE
(in.xml and schedules.csv) will be automatically generated and are
located in C:/Users/<your_username>/Documents/BEopt_3.0.x/TEMP1/1/run.
BEopt generates several xml files, but the HPXML file is always within the run
directory.
Weather input files can be generated from:
BEopt or EnergyPlus: for TMY weather files in EPW format
NSRDB: for TMY and AMY weather files in NSRDB format
The ResStock dataset: for weather files that align with ResStock-generated HPXML files.
Dwelling Arguments¶
A Dwelling model can be initialized using:
from ochre import Dwelling
house = Dwelling(**dwelling_args)
where dwelling_args is a Python dictionary of Dwelling arguments.
The table below lists the required arguments for creating a Dwelling model.
Argument Name |
Argument Type |
Description |
|---|---|---|
|
|
Simulation start time |
|
|
Simulation time resolution |
|
|
Simulation duration |
|
string |
Path to HPXML file |
|
string |
Path to weather file or to a directory of weather files. [1] |
The table below lists the optional arguments for creating a Dwelling model.
Argument Name |
Argument Type |
Default Value |
Description |
|---|---|---|---|
|
string |
ochre |
Name of the simulation (used for output file names) |
|
string |
None |
Path to schedule input file |
|
|
None (no initialization) |
Runs a “warm up” simulation to improve initial temperature values [2] |
|
string |
None (no time zone modeled) |
Include time zone in timestamps [3] |
|
int |
3 |
Verbosity of the time series results, from 0-9. See Outputs and Analysis for details. |
|
int |
3 |
Verbosity of the output metrics, from 0-9. See All Metrics for details. |
|
string |
HPXML file or equipment schedule file directory |
Path to save output files |
|
boolean |
False |
Save time series files as parquet files (default saves as csv files) |
|
|
None (saves files at end of simulation only) |
Saves intermediate time series results to files at the given simulation interval |
|
boolean |
True if |
Save results files, including time series files, metrics file, OCHRE schedule file, and status file |
|
boolean |
False |
Save all input arguments to json file, including user defined arguments |
|
boolean |
True if |
Save status file to indicate whether the simulation completed or failed |
|
list of strings |
Empty list |
List of time series input names to save to OCHRE schedule file |
|
|
None |
Time series schedule with equipment and weather data that overrides the |
|
int or string |
|
Random seed for setting initial temperatures and EV event data |
|
dict |
Empty dict |
Dictionary that directly modifies values from HPXML file |
|
dict |
Empty dict |
Includes arguments for the building occupancy |
|
dict |
Empty dict |
Includes arguments for the building envelope |
|
dict |
Empty dict |
Includes equipment-specific arguments |
While not required, a 1-day warm up period is recommended. The warm up creates more accurate initial conditions for the simulation.
Can use “DST” for local U.S. time zone with daylight savings, “noDST”
for local U.S. time zone without daylight savings, or any time zone in
pytz.all_timezones.
Uses OCHRE units and naming conventions, see the OCHRE schedule file for an example.
Envelope arguments can be included to modify the default envelope model
that is based on the HPXML file. The table below lists optional arguments for
the Envelope dictionary.
Argument Name |
Argument Type |
Default Value |
Description |
|---|---|---|---|
|
number |
Random temperature within HVAC deadband |
Initial temperature for Indoor zone. It is set before the initialization time |
|
boolean |
FALSE |
Linearizes infiltration heat pathways and incorporates in state space matrices |
|
string |
full |
Calculation method for external boundary radiation [5] |
|
string |
full |
Calculation method for internal boundary radiation [6] |
|
integer |
None |
Number of states for envelope model reduction |
|
number |
None |
Minimum accuracy to determine number of states for envelope model reduction |
|
boolean |
FALSE |
Saves envelope state space matrices to files |
|
|
None |
Time resolution for discretizing saved matrices. If None, saves continuous time matrices |
|
dict of dicts |
Empty dict |
Includes arguments for individual zones |
Options include an iterative, nonlinear calculation method (“full”), a linearized method (“linear”), or no radiation (None). Can’t use “full” method for reduced order models.
Options include an iterative, nonlinear calculation method (“full”), a linearized method (“linear”), or no radiation (None). Can’t use “full” method for reduced order models.
The zones dictionary keys can be Indoor, Attic, Garage, and
Foundation. The table below lists optional arguments for each zone
dictionary.
Argument Name |
Argument Type |
Default Value |
Description |
|---|---|---|---|
|
boolean |
True for Indoor zone, else False |
If True, OCHRE models humidity in the given zone |
|
number |
7 |
Multiplier for zone’s thermal mass (i.e., capacitance) |
|
number |
Taken from HPXML file |
Volume of the given zone |
We note that it is possible, though not recommended, to create an Envelope
object without initializing a Dwelling. This can be done for very simple
Envelope models. As an example, see the run_hvac function in
run_equipment.py.
Equipment-specific Arguments¶
An Equipment model can be initialized in a very similar way to a
Dwelling. For example, to initialize a battery:
from ochre import Battery
equipment = Battery(**equipment_args)
where equipment_args is a Python dictionary of Equipment arguments. This
section lists each equipment name and class and their required and optional
arguments, by end use.
Equipment arguments can also be provided in the Equipment dictionary when
initializing a Dwelling model. Dictionary keys can be the name of the end
use (e.g., HVAC Heating) or the equipment name (e.g., ASHP Heater). By
default, equipment arguments are taken from the dwelling_args dictionary
or the HPXML file. However, most arguments can be overwritten for individual
equipment. For example, this will create a Dwelling model with a
Battery that saves additional results:
from ochre import Dwelling
house = Dwelling(
verbosity=1,
# other dwelling arguments...
Equipment={
"Battery": {
"verbosity": 6,
# other battery arguments...
},
# other equipment...
},
)
Generic Equipment Arguments¶
The table below lists the required arguments for creating any standalone
Equipment model. Some equipment have additional required arguments as
described in the sections below.
Argument Name |
Argument Type |
Description |
|---|---|---|
|
|
Simulation start time |
|
|
Simulation time resolution |
|
|
Simulation duration |
The table below lists the optional arguments for creating any standalone
Equipment model. Some equipment have additional optional arguments as
described in the sections below.
Argument Name |
Argument Type |
Default Value |
Description |
|---|---|---|---|
|
string |
ochre |
Name of the simulation |
|
|
None (no initialization) |
Runs a “warm up” simulation to improve initial temperature values [7] |
|
int |
3 |
Verbosity of the outputs, from 0-9. See Outputs and Analysis for details |
|
string |
HPXML file or equipment schedule file directory |
Path to save output files |
|
boolean |
False |
Save time series files as parquet files (default saves as csv files) |
|
|
None (saves files at end of simulation only) |
Time resolution to save time series results to files |
|
boolean |
True if |
Save results files, including time series files, metrics file, schedule output file, and status file |
|
boolean |
False |
Save all input arguments to json file, including user defined arguments |
|
boolean |
True if |
Save status file to indicate whether the simulation completed or failed |
|
boolean |
False |
Include equivalent battery model data in results |
|
list of strings |
Empty list |
List of time series input names to save to schedule output file |
|
|
Depends on equipment name [8] |
Class used to model equipment. Required to run |
|
string |
None |
Name of Envelope zone if envelope model exists |
|
|
None |
Envelope model for measuring temperature impacts (required for HVAC equipment) |
|
|
None |
Time series schedule with equipment and weather data [9] |
|
int or string |
|
Random seed for setting initial temperatures and EV event data [10] |
While not required, a 1-day warm up period is recommended for thermal equipment. The warm up creates more accurate initial conditions for the simulation.
Defaults to EventBasedLoad for Clothes Washer, Clothes Dryer,
Dishwasher, and Cooking Range. Other appliances, lighting, and
miscellaneous loads default to ScheduledLoad.
Required for some equipment, see below for details. Uses OCHRE units and naming conventions, see the OCHRE schedule file for an example.
If the output path is not specified, the random seed will not be set. This can lead to differences in results for the same set of inputs.
HVAC Heating and Cooling¶
OCHRE includes models for the following HVAC equipment:
End Use |
Equipment Class |
Equipment Name |
Description |
|---|---|---|---|
HVAC Heating |
|
Electric Furnace |
|
HVAC Heating |
|
Electric Baseboard |
|
HVAC Heating |
|
Electric Boiler |
|
HVAC Heating |
|
Gas Furnace |
|
HVAC Heating |
|
Gas Boiler |
|
HVAC Heating |
|
Heat Pump Heater |
Air Source Heat Pump with no electric resistance backup |
HVAC Heating |
|
ASHP Heater |
Air Source Heat Pump, heating only |
HVAC Heating |
|
MSHP Heater |
Minisplit Heat Pump, heating only |
HVAC Cooling |
|
Air Conditioner |
Central air conditioner |
HVAC Cooling |
|
Room AC |
Room air conditioner |
HVAC Cooling |
|
ASHP Cooler |
Air Source Heat Pump, cooling only |
HVAC Cooling |
|
MSHP Cooler |
Minisplit Heat Pump, cooling only |
The table below shows the required and optional equipment-specific arguments for HVAC equipment.
Argument Name |
Argument Type |
Required? |
Default Value |
Description |
|---|---|---|---|---|
|
|
Yes |
Envelope model for measuring temperature impacts |
|
|
boolean |
No |
True if time_res >= 5 minutes or for variable-speed equipment |
Run HVAC in ideal mode (if True) or thermostatic mode if False |
|
number or list of numbers |
Yes |
Taken from HPXML |
Rated capacity of equipment. If a list, it is the rated capacity by speed |
|
number |
No |
0 |
Minimum equipment capacity for ideal capacity equipment models |
|
number |
No |
Taken from HPXML file, or 1 |
Conditioned space fraction, e.g., for Room Air Conditioners |
|
number or list of numbers |
Yes |
Taken from HPXML file, or from Rated Efficiency |
Energy input ratio (i.e., the inverse of the COP). If a list, it is the EIR by speed |
|
number or list of numbers |
No |
Taken from HPXML file, or from Rated Efficiency, or 1 |
Sensible heat ratio. If a list, it is the SHR by speed. Only for HVAC Cooling equipment |
|
number |
Yes |
Taken from HPXML file |
Rated auxiliary power, including fan or pump power |
|
dict |
Yes |
Taken from first row of schedule |
Dictionary of initial values in schedule |
|
dict |
No |
Taken from HPXML file, or sets distribution system efficiency to 1 |
Dictionary of inputs to determine HVAC distribution system efficiency |
|
number |
No |
0.2 for heaters if there is a conditioned basement, otherwise 0 |
Ratio of airflow and HVAC capacity to send to conditioned basement. For heaters only |
|
|
Yes |
Taken from HPXML schedule file and weather file |
Time series schedule with equipment and weather data [11] |
|
number |
No |
Taken from HPXML file or schedule |
Constant setpoint temperature |
|
list of 24 numbers |
No |
Taken from HPXML file or schedule |
Hourly weekday setpoint temperatures by hour |
|
list of 24 numbers |
No |
Taken from HPXML file or schedule |
Hourly weekend setpoint temperatures by hour. Defaults to weekday temperatures if they are included. |
|
number |
No |
Taken from HPXML file, or 1 |
Size of temperature deadband in degC. Can also be specified in the schedule |
|
number |
No |
0.2 for ASHP Heater, otherwise None |
Maximum ramp rate of thermostat setpoint, in degC/min |
|
boolean |
No |
False |
If True, show EIR and SHR in results for all time steps. If False, they will be set to 0 when the equipment is off |
|
int |
No |
Taken from HPXML file, or 1 |
Number of speeds for multispeed equipment [12] |
|
string |
Only if Number of Speeds > 1 |
Taken from HPXML file, or None |
Rated SEER or HSPF. Used to determine the capacity, EIR, and SHR ratios of each speed |
|
number |
Only for ASHP Heater |
ASHP Heater supplemental heater capacity |
|
|
number |
No |
1 |
ASHP Heater supplemental heater energy input ratio |
|
number |
No |
Taken from HPXML file, or -17.78 |
Minimum ambient temperature to run heat pump for ASHP Heater |
|
number |
No |
Taken from HPXML file, or 4.44 |
Maximum ambient temperature to run backup for ASHP Heater |
|
number |
No |
1.6 |
Difference between setpoint temperature and when backup turns on for ASHP Heater |
|
number |
No |
0 |
Minimum time after setpoint change that backup stays off for ASHP Heater |
|
number |
No |
|
Time after setpoint change that backup stays off, unless temperature is dropping, for ASHP Heater |
Schedule for all HVAC equipment must include HVAC Heating Setpoint
(C) or HVAC Cooling Setpoint (C). For AC or heat pumps, must include
Ambient Dry Bulb (C). For heat pump heaters, must include Ambient
Humidity Ratio (-) and Ambient Pressure (kPa).
Options include 1 (single speed), 2 (double speed), 4 (variable speed), or 10 (mini-split HP only)
Water Heating¶
OCHRE includes models for the following Water Heating equipment:
End Use |
Equipment Class |
Equipment Name |
|---|---|---|
Water Heating |
|
Electric Tank Water Heater |
Water Heating |
|
Gas Tank Water Heater |
Water Heating |
|
Heat Pump Water Heater |
Water Heating |
|
Tankless Water Heater |
Water Heating |
|
Gas Tankless Water Heater |
The table below shows the required and optional equipment-specific arguments for Water Heating equipment.
Argument Name |
Argument Type |
Required? |
Default Value |
Description |
|---|---|---|---|---|
|
boolean |
No |
True if time_res >= 5 minutes |
Run water heater in ideal mode (if True) or thermostatic mode if False |
|
int |
No |
12 if Heat Pump Water Heater, 1 if Tankless Water Heater, otherwise 2 |
Number of nodes in water tank model |
|
number |
No |
4500 |
Water heater capacity |
|
number |
No |
1 |
Water heater efficiency (or supplemental heater efficiency for HPWH) |
|
|
Yes |
Taken from HPXML schedule file and weather file |
Time series schedule with equipment and weather data [13] |
|
number |
Yes |
Taken from HPXML file, or 51.67 |
Water heater setpoint temperature. Can be set in schedule |
|
number |
No |
8.17 for Heat Pump Water Heater, otherwise 5.56 |
Water heater deadband size. Can be set in schedule |
|
number |
No |
60 |
Maximum water tank temperature |
|
number |
No |
40.56 |
Hot water temperature for tempered water draws (sinks, showers, and baths) |
|
number |
No |
Setpoint temperature - 10% of deadband temperature |
Initial temperature of the entire tank (before initialization routine) |
|
number |
No |
None |
Maximum rate of change for setpoint temperature |
|
number |
Yes |
Taken from HPXML file |
Size of water tank, in L |
|
number |
Yes |
Taken from HPXML file |
Height of water tank, used to determine surface area |
|
number |
Yes |
Taken from HPXML file |
Heat transfer coefficient of water tank |
|
boolean |
No |
False |
Disable supplemental heater for HPWH |
|
number |
Only for Heat Pump Water Heater |
Coefficient of performance for HPWH |
|
|
number |
No |
500 (for HPWH Power) |
Capacity or rated power for HPWH |
|
number |
No |
1 |
Parasitic power for HPWH |
|
number |
No |
35 |
Fan power for HPWH |
|
number |
No |
0.88 |
Sensible heat ratio for HPWH |
|
number |
No |
0.75 if in Indoor Zone else 1 |
Fraction of HPWH sensible gains to envelope |
|
number |
No |
0.5 |
Fraction of HPWH sensible gains to wall boundary, remainder goes to zone |
|
number |
Only for Gas Water Heater |
Taken from HPXML file |
Water heater energy factor (EF) for getting skin loss fraction |
|
number |
Only for Gas Tankless Water Heater |
Taken from HPXML file |
Parasitic power for Gas Tankless Water Heater |
Schedule for all water heaters must include Water Heating (L/min),
Zone Temperature (C), and Mains Temperature (C).
Electric Vehicle¶
OCHRE includes an electric vehicle (EV) model. The equipment name can be “EV” or “Electric Vehicle”. The table below shows the required and optional equipment-specific arguments for EVs.
Argument Name |
Argument Type |
Required? |
Default Value |
Description |
|---|---|---|---|---|
|
string |
Yes |
BEV, if taken from HPXML file |
EV vehicle type, options are “PHEV” or “BEV” |
|
string |
Yes |
Level 2, if taken from HPXML file |
EV charging type, options are “Level 1” or “Level 2” |
|
number |
Yes |
100 miles if HPXML |
EV battery capacity, in kWh, or range, in miles |
|
number |
No |
0.2-0.9, depending on charging level and capacity |
Ratio of days with at least 1 charging event |
|
number |
No |
Taken from schedule, or 20 C |
Ambient temperature used to estimate EV usage per day |
|
string |
No |
Depends on |
File that contains EV event-based schedule |
Battery¶
OCHRE includes a battery model. The table below shows the required and optional equipment-specific arguments for batteries.
Argument Name |
Argument Type |
Required? |
Default Value |
Description |
|---|---|---|---|---|
|
number |
No |
10 |
Nominal energy capacity of battery, in kWh |
|
number |
No |
5 |
Max power of battery, in kW |
|
number |
No |
0.98 |
Battery discharging efficiency, unitless |
|
number |
No |
0.98 |
Battery charging efficiency, unitless |
|
number |
No |
0.97 |
Inverter efficiency, unitless |
|
string |
No |
advanced |
Efficiency calculation option. Options are “advanced”, “constant”, “curve”, and “quadratic” |
|
number |
No |
0.5 |
Initial state of charge, unitless |
|
number |
No |
0.95 |
Maximum SOC, unitless |
|
number |
No |
0.15 |
Minimum SOC, unitless |
|
boolean |
No |
True |
If True, runs an energy capacity degradation model daily |
|
number |
No |
50.4 |
Initial open circuit voltage, in V. Used for advanced efficiency and degradation models. |
|
number |
No |
3.6 |
Cell voltage, in V. Used for advanced efficiency and degradation models. |
|
number |
No |
70 |
Cell capacity, in Ah. Used for advanced efficiency and degradation models. |
|
number |
No |
0 |
Cell resistance, in ohm. Used for advanced efficiency and degradation models. |
|
boolean |
No |
False |
Only charges from solar (restricts charge from grid) |
|
boolean |
No |
False |
Run in self-consumption mode. Default is to run from the schedule. |
|
number |
No |
0 |
Self-consumption grid import limit, in kW |
|
number |
No |
0 |
Self-consumption grid export limit, in kW |
|
boolean |
No |
True only if zone_name or envelope is specified |
If True, creates 1R-1C thermal model for battery temperature. Temperature is used in degradation model |
|
number |
No |
0.5 |
Thermal resistance, in K/W |
|
number |
No |
90000 |
Thermal mass, in J/K |
|
number |
No |
Zone temperature |
Initial battery temperature for thermal model |
Solar PV¶
OCHRE includes a solar PV model. The table below shows the required and optional equipment-specific arguments for PV.
Argument Name |
Argument Type |
Required? |
Default Value |
Description |
|---|---|---|---|---|
|
number |
Only when running SAM |
N/A |
PV panel capacity, in kW |
|
|
Yes |
Taken from HPXML schedule file and weather file |
Time series schedule with equipment and weather data [14] |
|
number |
No |
Taken from HPXML roof pitch |
Tilt angle from horizontal, in degrees. Used for SAM |
|
number |
No |
Taken from HPXML, south-most facing roof |
Azimuth angle from south, in degrees. Used for SAM |
|
number |
No |
PV.capacity |
Inverter apparent power capacity, in kVA. Used for SAM |
|
number |
No |
Use default from SAM |
Efficiency of the inverter, unitless. Used for SAM |
|
string |
No |
Var |
PV inverter priority. Options are “Var”, “Watt”, or “CPF” (constant power factor) |
|
number |
No |
0.8 |
Inverter minimum power factor, unitless |
PV schedule can include PV (kW) to run a prescribed schedule.
Otherwise it must include weather variables to run SAM
Gas Generator¶
OCHRE includes models for the following gas generator equipment:
End Use |
Equipment Class |
Equipment Name |
|---|---|---|
Gas Generator |
|
Gas Generator |
Gas Generator |
|
Gas Fuel Cell |
The table below shows the required and optional equipment-specific arguments for gas generators.
Argument Name |
Argument Type |
Required? |
Default Value |
Description |
|---|---|---|---|---|
|
number |
No |
6 |
Maximum power, in kW |
|
number |
No |
0.95 |
Discharging efficiency, unitless |
|
string |
No |
curve” if GasFuelCell, otherwise “constant |
Efficiency calculation option. Options are “constant”, “curve”, and “quadratic” |
|
number |
No |
0.1 |
Max ramp rate, in kW/min |
|
number |
No |
0 |
Self-consumption grid import limit, in kW |
|
number |
No |
0 |
Self-consumption grid export limit, in kW |
Other Equipment¶
OCHRE includes basic models for other loads, including appliances, lighting, and miscellaneous electric and gas loads:
End Use |
Equipment Class |
Equipment Name |
|---|---|---|
Lighting |
|
Lighting |
Lighting |
|
Exterior Lighting |
Lighting |
|
Basement Lighting |
Lighting |
|
Garage Lighting |
Other |
|
Clothes Washer |
Other |
|
Clothes Dryer |
Other |
|
Dishwasher |
Other |
|
Refrigerator |
Other |
|
Cooking Range |
Other |
|
MELs |
Other |
|
TV |
Other |
|
Well Pump |
Other |
|
Gas Grill |
Other |
|
Gas Fireplace |
Other |
|
Gas Lighting |
Other |
|
Pool Pump |
Other |
|
Pool Heater |
Other |
|
Spa Pump |
Other |
|
Spa Heater |
Other |
|
Ceiling Fan |
Other |
|
Ventilation Fan |
EV |
|
Scheduled EV |
The table below shows the required and optional equipment-specific arguments for other equipment.
Argument Name |
Argument Type |
Required? |
Default Value |
Description |
|---|---|---|---|---|
|
number |
No |
Taken from HPXML file, or 0 |
Fraction of power consumption that is dissipated through convection into zone |
|
number |
No |
Taken from HPXML file, or 0 |
Fraction of power consumption that is dissipated through radiation into zone |
|
number |
No |
Taken from HPXML file, or 0 |
Fraction of power consumption that is dissipated as latent heat into zone |