Definition at line 14 of file waterheater.h.
Public Types | |
enum | WHLOCATION { INSIDE, GARAGE } |
enum | WHMODEL { ONENODE, TWONODE, NONE } |
enum | WHQFLOW { DEPLETING, RECOVERING, STABLE } |
enum | WHQSTATE { FULL, PARTIAL, EMPTY } |
enum | WRONGMODEL { MODEL_NOT_1ZONE = 0, MODEL_NOT_2ZONE = 1 } |
Public Member Functions | |
double | actual_Q (void) |
int | create () |
double | dhdt (double h) |
double | get_Tambient (WHLOCATION water_heater_location) |
int | init (OBJECT *parent) |
Initialize water heater model properties - randomized defaults for all published variables. | |
double | new_h_2zone (double h0, double delta_t) |
double | new_temp_1node (double T0, double delta_t) |
double | new_time_1node (double T0, double T1) |
double | new_time_2zone (double h0, double h1) |
WHQFLOW | 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 | set_time_to_transition (void) |
Calculate the time to transition from the current state to new state. | |
TIMESTAMP | sync (TIMESTAMP t0, TIMESTAMP t1) |
Water heater synchronization determines the time to next synchronization state and the power drawn since last synch. | |
WHQSTATE | tank_state (void) |
Tank state determined based on the height of the hot water column. | |
void | 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 | update_T_and_or_h (double) |
waterheater (MODULE *mod) | |
Register the class and publish water heater object properties. | |
void | wrong_model (WRONGMODEL msg) |
~waterheater (void) | |
Public Attributes | |
double | area |
tank cross-sectional area [ft^2] | |
double | cur_water_demand |
WHMODEL | current_model |
Discerns which water heater model we need to use. | |
double | Cw |
thermal mass of water [Btu/F] | |
double | h |
boundary between hot and cold water layers [ft from top of tank] | |
bool | heat_needed |
need to maintain this bit of state because of Tstat deadband... | |
double | heating_element_capacity |
rated Q of (each) heating element, input in W, converted to[Btu/hr] | |
double | height |
tank height [ft] | |
complex | kwh_meter |
energy used since start of simulation [kWh] | |
double | last_water_demand |
WHQFLOW | load_state |
Are we filling or draining the tank [enum]. | |
WHLOCATION | location |
location of tank (inside or garage) [enum] | |
double | power_factor |
complex | power_kw |
total power demand [kW] | |
double | tank_diameter |
tank diameter [ft] | |
double | tank_setpoint |
setpoint T of heating element [F] | |
double | tank_UA |
tank UA [BTU/hr-F] | |
double | tank_volume |
tank size [gal] | |
double | thermostat_deadband |
deadband around Tset (half above, half below) [F] | |
double | time_to_transition |
time until next transition [in seconds] | |
double | Tinlet |
default will be set to 60 degF | |
double | Tlower |
temperature in lower zone of tank (for 2-zone model) [F] | |
double | Toff |
cut-out temperature [F] | |
double | Ton |
cut-in temperature [F] | |
double | Tset_curtail |
lower limit before we cancel curtailment [F] | |
double | Tupper |
temperature in upper zone of tank (for 2-zone model) [F] | |
double | Tw |
water temperature [F] | |
double | Twater |
temperature of whole tank (for 1-node model) [F] | |
double | water_demand |
water draw rate [gpm] | |
Static Public Attributes | |
static waterheater * | defaults = NULL |
static CLASS * | oclass = NULL |
Definition at line 30 of file waterheater.h.
enum waterheater::WHMODEL |
ONENODE | tank model uses a single zone |
TWONODE | tank model uses two zones |
NONE | tank model zoning isn't defined |
Definition at line 20 of file waterheater.h.
enum waterheater::WHQFLOW |
DEPLETING | tank heat is dropping fast |
RECOVERING | tank heat is rising fast |
STABLE | tank heat is relatively stable |
Definition at line 25 of file waterheater.h.
Definition at line 34 of file waterheater.h.