The house only includes the heating/cooling system and the power panel. All other end-uses must be explicitly defined and attached to the panel using the house::attach() method.
Residential panels use a split secondary transformer:
-----)||(------------------ 1 <-- 120V )||( 120V ^ 1puV )||(----------- 3(N) 240V <-- 0V )||( 120V v -----)||(------------------ 2 <-- 120V
120V objects are assigned alternatively to circuits 1-3 and 2-3 in the order in which they call attach. 240V objects are assigned to circuit 1-2
Circuit breakers will open on over-current with respect to the maximum current given by load when house::attach() was called. After a breaker opens, it is reclosed within an average of 5 minutes (on an exponential distribution). Each time the breaker is reclosed, the breaker failure probability is increased. The probability of failure is always 1/N where N is initially a large number (e.g., 100). N is progressively decremented until it reaches 1 and the probability of failure is 100%.
The house model considers the following four major heat gains/losses that contribute to the building heating/cooling load:
1. Conduction through exterior walls, roof and fenestration (based on envelope UA)
2. Air infiltration (based on specified air change rate)
3. Solar radiation (based on CLTD model and using tmy data)
4. Internal gains from lighting, people, equipment and other end use objects.
The heating/cooling load is calculated as below:
Q = U x A x 
where
Q = cooling load for roof, wall or fenestration (Btu/h)
U = overall heat transfer coefficient for roof, wall or fenestration 
A = area of wall, roof or fenestration 
= corrected cooling load temperature difference (degF)

where
CLTD = temperature difference based on construction types (taken from ASHRAE Handbook)
LM = correction for latitude based on tables from ASHRAE Handbook
= room air temperature (degF)
= average outdoor air temperature on a design day (degF)
The Equivalent Thermal Parameter (ETP) approach is used to model the residential loads and energy consumption. Solving the ETP model simultaneously for T_{air} and T_{mass}, the heating/cooling loads can be obtained as a function of time.
In the current implementation, the HVAC equipment is defined as part of the house and attached to the electrical panel with a 50 amp/220-240V circuit.
Classes | |
| class | house |
| struct | s_circuit |
| struct | s_panel |
Defines | |
| #define | N_SOLAR_SURFACES 9 |
Typedefs | |
| typedef s_circuit | CIRCUIT |
| circuit definition | |
| typedef s_panel | PANEL |
| panel definition | |
Enumerations | |
| enum | BREAKERSTATUS { BRK_OPEN = 0, BRK_CLOSED = 1, BRK_FAULT = -1 } |
| enum | CIRCUITTYPE { X12 = 0, X23 = 1, X13 = 2 } |
| enum | ORIENTATION { HORIZONTAL, NORTH, NORTH_EAST, EAST, SOUTH_EAST, SOUTH, SOUTH_WEST, WEST, NORTH_WEST } |
Functions | |
| CIRCUIT * | house::attach (OBJECT *obj, double limit, int is220=false) |
| Attaches an end-use object to a house panel The attach() method automatically assigns an end-use load to the first appropriate available circuit. | |
| int | house::create () |
| EXPORT int | create_house (OBJECT **obj, OBJECT *parent) |
| complex * | house::get_complex (OBJECT *obj, char *name) |
| double | house::get_Tsolar (int hour, int month, double Tair, double Tout) |
| This function calculates the solar air temperature based on the envelope construction, reflectivity of the color of envelope surface (assumed to be 0.75) and latitude adjustment factor based on time of day. | |
| house::house (MODULE *module) | |
| House object constructor: Registers the class and publishes the variables that can be set by the user. | |
| int | house::init (OBJECT *parent) |
| Map circuit variables to meter. | |
| int | house::init_climate (void) |
| Checks for climate object and maps the climate variables to the house object variables. | |
| EXPORT int | init_house (OBJECT *obj) |
| EXPORT TIMESTAMP | plc_house (OBJECT *obj, TIMESTAMP t0) |
| TIMESTAMP | house::presync (TIMESTAMP t0, TIMESTAMP t1) |
| Updates the aggregated power from all end uses, calculates the HVAC kWh use for the next synch time. | |
| int | house::set_Eigen_values () |
| TIMESTAMP | house::sync (TIMESTAMP t0, TIMESTAMP t1) |
| Updates the total internal gain and synchronizes with the hvac equipment load. | |
| EXPORT TIMESTAMP | sync_house (OBJECT *obj, TIMESTAMP t0, PASSCONFIG pass) |
| TIMESTAMP | house::sync_hvac_load (TIMESTAMP t0, double nHours) |
| HVAC load synchronizaion is based on the equipment capacity, COP, solar loads and total internal gain from end uses. | |
| TIMESTAMP | house::thermostat (TIMESTAMP t0, TIMESTAMP t1) |
| The PLC control code for house thermostat. | |
Variables | |
| static house * | house::defaults = NULL |
| static CLASS * | house::oclass = NULL |
| enum BREAKERSTATUS |
| enum CIRCUITTYPE |
| enum ORIENTATION |
Attaches an end-use object to a house panel The attach() method automatically assigns an end-use load to the first appropriate available circuit.
| obj | object to attach |
| breaker_amps | breaker capacity (in Amps) |
| is220 | 0 for 120V, 1 for 240V load |
Definition at line 349 of file house.cpp.
References BRK_CLOSED, s_panel::circuits, get_complex(), gl_error, s_circuit::id, s_circuit::max_amps, s_circuit::next, s_circuit::pS, s_circuit::pV, s_circuit::status, s_circuit::tripsleft, s_circuit::type, X12, X13, and X23.
Referenced by waterheater::init(), refrigerator::init(), range::init(), plugload::init(), microwave::init(), lights::init(), init(), dishwasher::init(), and clotheswasher::init().
| double house::get_Tsolar | ( | int | hour, | |
| int | month, | |||
| double | Tair, | |||
| double | Tout | |||
| ) | [inherited] |
This function calculates the solar air temperature based on the envelope construction, reflectivity of the color of envelope surface (assumed to be 0.75) and latitude adjustment factor based on time of day.
Definition at line 724 of file house.cpp.
References s_object_list::latitude, and OBJECTHDR.
Referenced by sync_hvac_load().
| house::house | ( | MODULE * | mod | ) | [inherited] |
House object constructor: Registers the class and publishes the variables that can be set by the user.
Sets default randomized values for published variables.
Definition at line 96 of file house.cpp.
References airchange_per_hour, aspect_ratio, ceiling_height, s_panel::circuits, cooling_COP, cooling_setpoint, defaults, design_cooling_capacity, design_heating_capacity, envelope_UA, floor_area, gl_publish_variable, gl_register_class, GL_THROW, glazing_shgc, gross_wall_area, heating_COP, heating_setpoint, s_panel::max_amps, oclass, PADDR, PC_BOTTOMUP, PC_PRETOPDOWN, power_kw, PT_complex, PT_double, Tair, thermostat_deadband, total_internal_gain, and window_wall_ratio.
| int house::init | ( | OBJECT * | parent | ) | [inherited] |
Map circuit variables to meter.
Initalize house and HVAC model properties, and internal gain variables.
Definition at line 221 of file house.cpp.
References air_density, air_heat_capacity, air_mass, air_thermal_mass, airchange_per_hour, aspect_ratio, attach(), ceiling_height, cooling_setpoint, COP_coeff, design_cooling_capacity, design_heating_capacity, envelope_UA, FALSE, floor_area, get_complex(), gl_error, gl_random_uniform, gl_warning, glazing_shgc, gross_wall_area, heat_cool_mode, heating_setpoint, house_content_heat_transfer_coeff, house_content_thermal_mass, hvac_rated_power, s_object_list::id, s_object_list::latitude, s_class_list::name, OBJECTHDR, s_object_list::oclass, OFF, over_sizing_factor, set_Eigen_values(), Tair, thermostat_deadband, Tmaterials, TRUE, volume, and window_wall_ratio.
Referenced by init_house().
| int house::init_climate | ( | void | ) | [inherited] |
Checks for climate object and maps the climate variables to the house object variables.
Currently Tout, RHout and solar flux data from TMY files are used. If no climate object is linked, then Tout will be set to 59 degF, RHout is set to 75% and solar flux will be set to zero for all orientations.
Definition at line 167 of file house.cpp.
References FL_NEW, FT_CLASS, FT_END, GETADDR, gl_find_next, gl_find_objects, gl_get_property, gl_set_dependent, gl_warning, s_findlist::hit_count, OBJECTHDR, pRhout, pSolar, pTout, s_object_list::rank, and SAME.
Referenced by init_house().
Updates the total internal gain and synchronizes with the hvac equipment load.
Also synchronizes the voltages and current in the panel with the meter.
Definition at line 450 of file house.cpp.
References BRK_CLOSED, BRK_FAULT, BRK_OPEN, s_panel::circuits, clotheswasher_heat_energy, dishwasher_heat_energy, gl_debug, gl_random_bernoulli, gl_random_exponential, GL_THROW, gl_tohours, I, s_circuit::id, s_object_list::id, lights_heat_energy, LOCK_OBJECT, s_circuit::max_amps, microwave_heat_energy, s_class_list::name, s_circuit::next, OBJECTHDR, occupantload_heat_energy, s_object_list::oclass, s_object_list::parent, plugload_heat_energy, s_circuit::pS, s_circuit::pV, range_heat_energy, s_circuit::reclose, s_circuit::status, sync_hvac_load(), total_internal_gain, s_circuit::tripsleft, TS_NEVER, TS_SECOND, s_circuit::type, UNLOCK_OBJECT, waterheater_heat_energy, X12, X13, and X23.
Referenced by sync_house().
HVAC load synchronizaion is based on the equipment capacity, COP, solar loads and total internal gain from end uses.
The modeling approach is based on the Equivalent Thermal Parameter (ETP) method of calculating the air and mass temperature in the conditioned space. These are solved using a dual decay solver to obtain the time for next state change based on the thermostat set points. This synchronization function updates the HVAC equipment load and power draw.
Definition at line 562 of file house.cpp.
References COOL, cooling_COP, cooling_setpoint, design_cooling_capacity, design_heating_capacity, floor_area, get_Tsolar(), gl_error, gl_localtime, glazing_shgc, gross_wall_area, HEAT, heat_cool_mode, heating_COP, heating_setpoint, s_datetime::hour, hvac_kWh_use, hvac_rated_capacity, hvac_rated_power, s_datetime::month, power_kw, pSolar, pTout, solar_load, Tair, thermostat_deadband, Tmaterials, total_internal_gain, TS_NEVER, TS_SECOND, Tsolar, and window_wall_ratio.
Referenced by sync().
The PLC control code for house thermostat.
The heat or cool mode is based on the house air temperature, thermostat setpoints and deadband.
Definition at line 401 of file house.cpp.
References COOL, cooling_setpoint, gl_error, HEAT, heat_cool_mode, heating_setpoint, OFF, Tair, thermostat_deadband, TS_INVALID, and TS_NEVER.
Referenced by plc_house().