Waterheater

waterheater - Residential waterheater (explicit model)

Synopsis
class waterheater { parent residential_enduse; class residential_enduse { loadshape shape; enduse load; // the enduse load description complex energy[kVAh]; // the total energy consumed since the last meter reading complex power[kVA]; // the total power consumption of the load complex peak_demand[kVA]; // the peak power consumption since the last meter reading double heatgain[Btu/h]; // the heat transferred from the enduse to the parent double heatgain_fraction[pu]; // the fraction of the heat that goes to the parent double current_fraction[pu]; // the fraction of total power that is constant current double impedance_fraction[pu]; // the fraction of total power that is constant impedance double power_fraction[pu]; // the fraction of the total power that is constant power double power_factor; // the power factor of the load complex constant_power[kVA]; // the constant power portion of the total load complex constant_current[kVA]; // the constant current portion of the total load complex constant_admittance[kVA]; // the constant admittance portion of the total load double voltage_factor[pu]; // the voltage change factor double breaker_amps[A]; // the rated breaker amperage set {IS220=1} configuration; // the load configuration options enumeration {OFF=4294967295, NORMAL=0, ON=1} override; enumeration {ON=1, OFF=0, UNKNOWN=4294967295} power_state; } 	double tank_volume[gal]; // the volume of water in the tank when it is full double tank_UA[Btu]; // the UA of the tank (surface area divided by R-value) double tank_diameter[ft]; // the diameter of the water heater tank double water_demand[gpm]; // the hot water draw from the water heater double heating_element_capacity[kW]; // the power of the heating element double inlet_water_temperature[degF]; // the inlet temperature of the water tank enumeration {GASHEAT=1, ELECTRIC=0} heat_mode; // the energy source for heating the water heater enumeration {GARAGE=1, INSIDE=0} location; // whether the water heater is inside or outside double tank_setpoint[degF]; // the temperature around which the water heater will heat its contents double thermostat_deadband[degF]; // the degree to heat the water tank, when needed double temperature[degF]; // the outlet temperature of the water tank double height[ft]; // the height of the hot water column within the water tank double demand[gpm]; // the water consumption double actual_load[kW]; // the actual load based on the current voltage across the coils double previous_load[kW]; // the actual load based on current voltage stored for use in controllers complex actual_power[kVA]; // the actual power based on the current voltage across the coils double is_waterheater_on; // simple logic output to determine state of waterheater (1-on, 0-off) }