-
Notifications
You must be signed in to change notification settings - Fork 0
/
freezer.h
67 lines (53 loc) · 1.61 KB
/
freezer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/** $Id: freezer.h,v 1.10 2008/02/13 01:26:12 d3j168 Exp $
Copyright (C) 2008 Battelle Memorial Institute
@file freezer.h
@addtogroup freezer
@ingroup residential
@{
**/
#ifndef _FREEZER_H
#define _FREEZER_H
#include "residential.h"
#include "residential_enduse.h"
class freezer : public residential_enduse
{
public:
typedef enum {
S_OFF=0,
S_ON=1
} MOTORSTATE;
private:
house *pHouse; // reference to the parent house
PROPERTY *pTempProp;
public:
double size; ///< refrigerator volume (cf)
double rated_capacity; ///< rated capacity (Btu/h)
double thermostat_deadband; ///< refrigerator thermostat hysterisys (degF)
double UA;
double UAr; ///< UA of Refrigerator compartment
double UAf; ///< UA of the food-air
double Tair; ///< Refirgerator air temperature (degF)
double Tout; ///< House air temperature
double Tset; ///< Refrigerator control set point temperature (degF)
double Cf; ///< heat capapcity of the food
double Qr; ///< heat rate from the cooling system
double COPcoef; ///< compressor COP
double Tevent; ///< Temperature we will switch the motor on or off. Available for SmartGrid PLC code to nudge.
double power_factor;
enumeration motor_state;
TIMESTAMP last_time, next_time;
public:
static CLASS *oclass, *pclass;
static freezer *defaults;
freezer(MODULE *module);
~freezer();
int create();
int init(OBJECT *parent);
int isa(char *classname);
TIMESTAMP presync(TIMESTAMP t0, TIMESTAMP t1);
void thermostat(TIMESTAMP t0, TIMESTAMP t1);
TIMESTAMP sync(TIMESTAMP t0, TIMESTAMP t1);
TIMESTAMP postsync(TIMESTAMP t0, TIMESTAMP t1);
};
#endif // _FREEZER_H
/**@}**/