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

start_time

datetime.datetime

Simulation start time

time_res

datetime.timedelta

Simulation time resolution

duration

datetime.timedelta

Simulation duration

hpxml_file

string

Path to HPXML file

weather_file or weather_path

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

name

string

ochre

Name of the simulation (used for output file names)

hpxml_schedule_file

string

None

Path to schedule input file

initialization_time

datetime.timedelta

None (no initialization)

Runs a “warm up” simulation to improve initial temperature values [2]

time_zone

string

None (no time zone modeled)

Include time zone in timestamps [3]

verbosity

int

3

Verbosity of the time series results, from 0-9. See Outputs and Analysis for details.

metrics_verbosity

int

3

Verbosity of the output metrics, from 0-9. See All Metrics for details.

output_path

string

HPXML file or equipment schedule file directory

Path to save output files

output_to_parquet

boolean

False

Save time series files as parquet files (default saves as csv files)

export_res

datetime.timedelta

None (saves files at end of simulation only)

Saves intermediate time series results to files at the given simulation interval

save_results

boolean

True if verbosity > 0

Save results files, including time series files, metrics file, OCHRE schedule file, and status file

save_args_to_json

boolean

False

Save all input arguments to json file, including user defined arguments

save_status

boolean

True if save_results is True

Save status file to indicate whether the simulation completed or failed

save_schedule_columns

list of strings

Empty list

List of time series input names to save to OCHRE schedule file

schedule

pandas.DataFrame

None

Time series schedule with equipment and weather data that overrides the hpxml_schedule_file and weather_file [4]

seed

int or string

output_path

Random seed for setting initial temperatures and EV event data

modify_hpxml_dict

dict

Empty dict

Dictionary that directly modifies values from HPXML file

Occupancy

dict

Empty dict

Includes arguments for the building occupancy

Envelope

dict

Empty dict

Includes arguments for the building envelope

Equipment

dict

Empty dict

Includes equipment-specific arguments

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

initial_temp_setpoint

number

Random temperature within HVAC deadband

Initial temperature for Indoor zone. It is set before the initialization time

linearize_infiltration

boolean

FALSE

Linearizes infiltration heat pathways and incorporates in state space matrices

external_radiation_method

string

full

Calculation method for external boundary radiation [5]

internal_radiation_method

string

full

Calculation method for internal boundary radiation [6]

reduced_states

integer

None

Number of states for envelope model reduction

reduced_min_accuracy

number

None

Minimum accuracy to determine number of states for envelope model reduction

save_matrices

boolean

FALSE

Saves envelope state space matrices to files

save_matrices_time_res

datetime.timedelta

None

Time resolution for discretizing saved matrices. If None, saves continuous time matrices

zones

dict of dicts

Empty dict

Includes arguments for individual zones

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

enable_humidity

boolean

True for Indoor zone, else False

If True, OCHRE models humidity in the given zone

Thermal Mass Multiplier

number

7

Multiplier for zone’s thermal mass (i.e., capacitance)

Volume (m^3)

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

start_time

datetime.datetime

Simulation start time

time_res

datetime.timedelta

Simulation time resolution

duration

datetime.timedelta

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

name

string

ochre

Name of the simulation

initialization_time

datetime.timedelta

None (no initialization)

Runs a “warm up” simulation to improve initial temperature values [7]

verbosity

int

3

Verbosity of the outputs, from 0-9. See Outputs and Analysis for details

output_path

string

HPXML file or equipment schedule file directory

Path to save output files

output_to_parquet

boolean

False

Save time series files as parquet files (default saves as csv files)

export_res

datetime.timedelta

None (saves files at end of simulation only)

Time resolution to save time series results to files

save_results

boolean

True if verbosity > 0

Save results files, including time series files, metrics file, schedule output file, and status file

save_args_to_json

boolean

False

Save all input arguments to json file, including user defined arguments

save_status

boolean

True if save_results is True

Save status file to indicate whether the simulation completed or failed

save_ebm_results

boolean

False

Include equivalent battery model data in results

save_schedule_columns

list of strings

Empty list

List of time series input names to save to schedule output file

equipment_class

ochre.Equipment subclass

Depends on equipment name [8]

Class used to model equipment. Required to run EventDataLoad models

zone_name

string

None

Name of Envelope zone if envelope model exists

envelope_model

ochre.Envelope

None

Envelope model for measuring temperature impacts (required for HVAC equipment)

schedule or schedule_file

pandas.DataFrame or string

None

Time series schedule with equipment and weather data [9]

seed

int or string

output_path

Random seed for setting initial temperatures and EV event data [10]

HVAC Heating and Cooling

OCHRE includes models for the following HVAC equipment:

End Use

Equipment Class

Equipment Name

Description

HVAC Heating

ElectricFurnace

Electric Furnace

HVAC Heating

ElectricBaseboard

Electric Baseboard

HVAC Heating

ElectricBoiler

Electric Boiler

HVAC Heating

GasFurnace

Gas Furnace

HVAC Heating

GasBoiler

Gas Boiler

HVAC Heating

HeatPumpHeater

Heat Pump Heater

Air Source Heat Pump with no electric resistance backup

HVAC Heating

ASHPHeater

ASHP Heater

Air Source Heat Pump, heating only

HVAC Heating

MSHPHeater

MSHP Heater

Minisplit Heat Pump, heating only

HVAC Cooling

AirConditioner

Air Conditioner

Central air conditioner

HVAC Cooling

RoomAC

Room AC

Room air conditioner

HVAC Cooling

ASHPCooler

ASHP Cooler

Air Source Heat Pump, cooling only

HVAC Cooling

MSHPCooler

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

envelope_model

ochre.Envelope

Yes

Envelope model for measuring temperature impacts

use_ideal_capacity

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

Capacity (W)

number or list of numbers

Yes

Taken from HPXML

Rated capacity of equipment. If a list, it is the rated capacity by speed

Minimum Capacity (W)

number

No

0

Minimum equipment capacity for ideal capacity equipment models

Conditioned Space Fraction (-)

number

No

Taken from HPXML file, or 1

Conditioned space fraction, e.g., for Room Air Conditioners

EIR (-)

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

SHR (-)

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

Rated Auxiliary Power (W)

number

Yes

Taken from HPXML file

Rated auxiliary power, including fan or pump power

initial_schedule

dict

Yes

Taken from first row of schedule

Dictionary of initial values in schedule

Ducts

dict

No

Taken from HPXML file, or sets distribution system efficiency to 1

Dictionary of inputs to determine HVAC distribution system efficiency

Basement Airflow Ratio (-)

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

schedule or schedule_file

pandas.DataFrame or string

Yes

Taken from HPXML schedule file and weather file

Time series schedule with equipment and weather data [11]

Setpoint Temperature (C)

number

No

Taken from HPXML file or schedule

Constant setpoint temperature

Weekday Setpoints (C)

list of 24 numbers

No

Taken from HPXML file or schedule

Hourly weekday setpoint temperatures by hour

Weekend Setpoints (C)

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.

Deadband Temperature (C)

number

No

Taken from HPXML file, or 1

Size of temperature deadband in degC. Can also be specified in the schedule

setpoint_ramp_rate

number

No

0.2 for ASHP Heater, otherwise None

Maximum ramp rate of thermostat setpoint, in degC/min

show_eir_shr

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

Number of Speeds (-)

int

No

Taken from HPXML file, or 1

Number of speeds for multispeed equipment [12]

Rated Efficiency

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

Backup Capacity (W)

number

Only for ASHP Heater

ASHP Heater supplemental heater capacity

Backup EIR (-)

number

No

1

ASHP Heater supplemental heater energy input ratio

Heat Pump Lockout Temperature (C)

number

No

Taken from HPXML file, or -17.78

Minimum ambient temperature to run heat pump for ASHP Heater

Backup Lockout Temperature (C)

number

No

Taken from HPXML file, or 4.44

Maximum ambient temperature to run backup for ASHP Heater

Backup Setpoint Offset (C)

number

No

1.6

Difference between setpoint temperature and when backup turns on for ASHP Heater

Backup Lockout Time (minutes)

number

No

0

Minimum time after setpoint change that backup stays off for ASHP Heater

Backup Soft Lockout Time (minutes)

number

No

Backup Lockout Time (minutes)

Time after setpoint change that backup stays off, unless temperature is dropping, for ASHP Heater

Water Heating

OCHRE includes models for the following Water Heating equipment:

End Use

Equipment Class

Equipment Name

Water Heating

ElectricResistanceWaterHeater

Electric Tank Water Heater

Water Heating

GasWaterHeater

Gas Tank Water Heater

Water Heating

HeatPumpWaterHeater

Heat Pump Water Heater

Water Heating

TanklessWaterHeater

Tankless Water Heater

Water Heating

GasTanklessWaterHeater

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

use_ideal_mode

boolean

No

True if time_res >= 5 minutes

Run water heater in ideal mode (if True) or thermostatic mode if False

water_nodes

int

No

12 if Heat Pump Water Heater, 1 if Tankless Water Heater, otherwise 2

Number of nodes in water tank model

Capacity (W)

number

No

4500

Water heater capacity

Efficiency (-)

number

No

1

Water heater efficiency (or supplemental heater efficiency for HPWH)

schedule or schedule_file

pandas.DataFrame or string

Yes

Taken from HPXML schedule file and weather file

Time series schedule with equipment and weather data [13]

Setpoint Temperature (C)

number

Yes

Taken from HPXML file, or 51.67

Water heater setpoint temperature. Can be set in schedule

Deadband Temperature (C)

number

No

8.17 for Heat Pump Water Heater, otherwise 5.56

Water heater deadband size. Can be set in schedule

Max Tank Temperature (C)

number

No

60

Maximum water tank temperature

Mixed Delivery Temperature (C)

number

No

40.56

Hot water temperature for tempered water draws (sinks, showers, and baths)

Initial Temperature (C)

number

No

Setpoint temperature - 10% of deadband temperature

Initial temperature of the entire tank (before initialization routine)

Max Setpoint Ramp Rate (C/min)

number

No

None

Maximum rate of change for setpoint temperature

Tank Volume (L)

number

Yes

Taken from HPXML file

Size of water tank, in L

Tank Height (m)

number

Yes

Taken from HPXML file

Height of water tank, used to determine surface area

Heat Transfer Coefficient (W/m^2/K) or UA (W/K)

number

Yes

Taken from HPXML file

Heat transfer coefficient of water tank

hp_only_mode

boolean

No

False

Disable supplemental heater for HPWH

HPWH COP (-)

number

Only for Heat Pump Water Heater

Coefficient of performance for HPWH

HPWH Capacity (W) or HPWH Power (W)

number

No

500 (for HPWH Power)

Capacity or rated power for HPWH

HPWH Parasitics (W)

number

No

1

Parasitic power for HPWH

HPWH Fan Power (W)

number

No

35

Fan power for HPWH

HPWH SHR (-)

number

No

0.88

Sensible heat ratio for HPWH

HPWH Interaction Factor (-)

number

No

0.75 if in Indoor Zone else 1

Fraction of HPWH sensible gains to envelope

HPWH Wall Interaction Factor (-)

number

No

0.5

Fraction of HPWH sensible gains to wall boundary, remainder goes to zone

Energy Factor (-)

number

Only for Gas Water Heater

Taken from HPXML file

Water heater energy factor (EF) for getting skin loss fraction

Parasitic Power (W)

number

Only for Gas Tankless Water Heater

Taken from HPXML file

Parasitic power for Gas Tankless Water Heater

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

vehicle_type

string

Yes

BEV, if taken from HPXML file

EV vehicle type, options are “PHEV” or “BEV”

charging_level

string

Yes

Level 2, if taken from HPXML file

EV charging type, options are “Level 1” or “Level 2”

capacity or range

number

Yes

100 miles if HPXML Annual EV Energy < 1500 kWh, otherwise 250 miles

EV battery capacity, in kWh, or range, in miles

event_day_ratio

number

No

0.2-0.9, depending on charging level and capacity

Ratio of days with at least 1 charging event

ambient_ev_temp

number

No

Taken from schedule, or 20 C

Ambient temperature used to estimate EV usage per day

equipment_event_file

string

No

Depends on vehicle_type and range

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

capacity_kwh

number

No

10

Nominal energy capacity of battery, in kWh

capacity

number

No

5

Max power of battery, in kW

efficiency

number

No

0.98

Battery discharging efficiency, unitless

efficiency_charge

number

No

0.98

Battery charging efficiency, unitless

efficiency_inverter

number

No

0.97

Inverter efficiency, unitless

efficiency_type

string

No

advanced

Efficiency calculation option. Options are “advanced”, “constant”, “curve”, and “quadratic”

soc_init

number

No

0.5

Initial state of charge, unitless

soc_max

number

No

0.95

Maximum SOC, unitless

soc_min

number

No

0.15

Minimum SOC, unitless

enable_degradation

boolean

No

True

If True, runs an energy capacity degradation model daily

initial_voltage

number

No

50.4

Initial open circuit voltage, in V. Used for advanced efficiency and degradation models.

v_cell

number

No

3.6

Cell voltage, in V. Used for advanced efficiency and degradation models.

ah_cell

number

No

70

Cell capacity, in Ah. Used for advanced efficiency and degradation models.

r_cell

number

No

0

Cell resistance, in ohm. Used for advanced efficiency and degradation models.

charge_solar_only

boolean

No

False

Only charges from solar (restricts charge from grid)

self_consumption_mode

boolean

No

False

Run in self-consumption mode. Default is to run from the schedule.

import_limit

number

No

0

Self-consumption grid import limit, in kW

export_limit

number

No

0

Self-consumption grid export limit, in kW

enable_thermal_model

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

thermal_r

number

No

0.5

Thermal resistance, in K/W

thermal_c

number

No

90000

Thermal mass, in J/K

Initial Battery Temperature (C)

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

capacity

number

Only when running SAM

N/A

PV panel capacity, in kW

schedule or schedule_file

pandas.DataFrame or string

Yes

Taken from HPXML schedule file and weather file

Time series schedule with equipment and weather data [14]

tilt

number

No

Taken from HPXML roof pitch

Tilt angle from horizontal, in degrees. Used for SAM

azimuth

number

No

Taken from HPXML, south-most facing roof

Azimuth angle from south, in degrees. Used for SAM

inverter_capacity

number

No

PV.capacity

Inverter apparent power capacity, in kVA. Used for SAM

inverter_efficiency

number

No

Use default from SAM

Efficiency of the inverter, unitless. Used for SAM

inverter_priority

string

No

Var

PV inverter priority. Options are “Var”, “Watt”, or “CPF” (constant power factor)

inverter_min_pf

number

No

0.8

Inverter minimum power factor, unitless

Gas Generator

OCHRE includes models for the following gas generator equipment:

End Use

Equipment Class

Equipment Name

Gas Generator

GasGenerator

Gas Generator

Gas Generator

GasFuelCell

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

capacity

number

No

6

Maximum power, in kW

efficiency

number

No

0.95

Discharging efficiency, unitless

efficiency_type

string

No

curve” if GasFuelCell, otherwise “constant

Efficiency calculation option. Options are “constant”, “curve”, and “quadratic”

ramp_rate

number

No

0.1

Max ramp rate, in kW/min

import_limit

number

No

0

Self-consumption grid import limit, in kW

export_limit

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

LightingLoad

Lighting

Lighting

LightingLoad

Exterior Lighting

Lighting

LightingLoad

Basement Lighting

Lighting

LightingLoad

Garage Lighting

Other

ScheduledLoad

Clothes Washer

Other

ScheduledLoad

Clothes Dryer

Other

ScheduledLoad

Dishwasher

Other

ScheduledLoad

Refrigerator

Other

ScheduledLoad

Cooking Range

Other

ScheduledLoad

MELs

Other

ScheduledLoad

TV

Other

ScheduledLoad

Well Pump

Other

ScheduledLoad

Gas Grill

Other

ScheduledLoad

Gas Fireplace

Other

ScheduledLoad

Gas Lighting

Other

ScheduledLoad

Pool Pump

Other

ScheduledLoad

Pool Heater

Other

ScheduledLoad

Spa Pump

Other

ScheduledLoad

Spa Heater

Other

ScheduledLoad

Ceiling Fan

Other

ScheduledLoad

Ventilation Fan

EV

ScheduledEV

Scheduled EV

The table below shows the required and optional equipment-specific arguments for other equipment.

Argument Name

Argument Type

Required?

Default Value

Description

Convective Gain Fraction (-)

number

No

Taken from HPXML file, or 0

Fraction of power consumption that is dissipated through convection into zone

Radiative Gain Fraction (-)

number

No

Taken from HPXML file, or 0

Fraction of power consumption that is dissipated through radiation into zone

Latent Gain Fraction (-)

number

No

Taken from HPXML file, or 0

Fraction of power consumption that is dissipated as latent heat into zone