Electric waterheater
[Residential loads (residential)]


Detailed Description

The residential electric waterheater uses a hybrid thermal model that is capable of tracking either a single-mass of water, or a dual-mass with a varying thermocline.

The driving dynamic parameters of the waterheater are


Classes

class  waterheater

Defines

#define HEIGHT_PRECISION   0.01
#define TSTAT_PRECISION   0.01

Functions

double waterheater::actual_Q (void)
int waterheater::create ()
EXPORT int create_waterheater (OBJECT **obj, OBJECT *parent)
double waterheater::dhdt (double h)
double waterheater::get_Tambient (WHLOCATION water_heater_location)
int waterheater::init (OBJECT *parent)
 Initialize water heater model properties - randomized defaults for all published variables.
EXPORT int init_waterheater (OBJECT *obj)
double waterheater::new_h_2zone (double h0, double delta_t)
double waterheater::new_temp_1node (double T0, double delta_t)
double waterheater::new_time_1node (double T0, double T1)
double waterheater::new_time_2zone (double h0, double h1)
EXPORT TIMESTAMP plc_waterheater (OBJECT *obj, TIMESTAMP t0)
WHQFLOW waterheater::set_current_model_and_load_state (void)
 Set the water heater model and tank state based on the estimated temperature differential along the height of the water column when it is full, emplty or partial at the current height, given the current water draw.
void waterheater::set_time_to_transition (void)
 Calculate the time to transition from the current state to new state.
TIMESTAMP waterheater::sync (TIMESTAMP t0, TIMESTAMP t1)
 Water heater synchronization determines the time to next synchronization state and the power drawn since last synch.
EXPORT TIMESTAMP sync_waterheater (OBJECT *obj, TIMESTAMP t0)
WHQSTATE waterheater::tank_state (void)
 Tank state determined based on the height of the hot water column.
void waterheater::thermostat (TIMESTAMP t0, TIMESTAMP t1)
 Water heater plc control code to set the water heater 'heat_needed' state The thermostat set point, deadband, tank state(height of hot water column) and current water temperature are used to determine 'heat_needed' state.
void waterheater::update_T_and_or_h (double)
 waterheater::waterheater (MODULE *mod)
 Register the class and publish water heater object properties.
void waterheater::wrong_model (WRONGMODEL msg)
 waterheater::~waterheater (void)

Variables

static waterheaterwaterheater::defaults = NULL
static CLASSwaterheater::oclass = NULL


Function Documentation

EXPORT TIMESTAMP plc_waterheater ( OBJECT obj,
TIMESTAMP  t0 
)

Todo:
If external plc codes return a timestamp, it will allow sync sooner but not later than water heater time to transition (ticket #147)

Definition at line 688 of file waterheater.cpp.

References s_object_list::clock, OBJECTDATA, thermostat(), and TS_NEVER.


GridLAB-DTM Version 1.0
An open-source project initiated by the US Department of Energy