00001
00009 #ifndef _microturbine_H
00010 #define _microturbine_H
00011
00012 #include <stdarg.h>
00013 #include "../powerflow/powerflow_object.h"
00014
00015 #include "gridlabd.h"
00016
00017
00018 class microturbine
00019 {
00020 private:
00021
00022
00023
00024 protected:
00025
00026 public:
00027
00028 set phases;
00029 enum GENERATOR_MODE {CONSTANT_V=1, CONSTANT_PQ=2, CONSTANT_PF=4, SUPPLY_DRIVEN=5} gen_mode_v;
00030
00031 enum GENERATOR_STATUS {OFFLINE=1, ONLINE=2} gen_status_v;
00032 enum POWER_TYPE{DC=1, AC=2} power_type_v;
00033
00034
00035
00036
00037
00038
00039 double Rinternal;
00040 double Rload;
00041 complex V_Max;
00042 complex I_Max;
00043
00044 double frequency;
00045 double Max_Frequency;
00046 double Min_Frequency;
00047 double Fuel_Used;
00048 double Heat_Out;
00049 double KV;
00050 double Power_Angle;
00051
00052 double Max_P;
00053 double Min_P;
00054
00055 double Max_Q;
00056 double Min_Q;
00057 double Rated_kVA;
00058
00059
00060 double efficiency;
00061
00062 complex E_A_Internal;
00063 complex E_B_Internal;
00064 complex E_C_Internal;
00065
00066 complex phaseA_V_Out;
00067 complex phaseB_V_Out;
00068 complex phaseC_V_Out;
00069
00070
00071
00072 complex phaseA_I_Out;
00073 complex phaseB_I_Out;
00074 complex phaseC_I_Out;
00075
00076
00077
00078 complex power_A_Out;
00079 complex power_B_Out;
00080 complex power_C_Out;
00081
00082 complex VA_Out;
00083
00084 double pf_Out;
00085
00086 complex *pCircuit_V_A;
00087 complex *pCircuit_V_B;
00088 complex *pCircuit_V_C;
00089
00090 complex *pLine_I_A;
00091 complex *pLine_I_B;
00092 complex *pLine_I_C;
00093
00094
00095 public:
00096
00097 microturbine(MODULE *module);
00098 int create(void);
00099 int init(OBJECT *parent);
00100 double determine_power_angle (complex power_out);
00101 complex determine_source_voltage(complex voltage_out, double r_internal, double r_load);
00102 double determine_frequency(complex power_out);
00103 double calculate_loss(double frequency_out);
00104 double determine_heat(complex power_out, double heat_loss);
00105
00106 TIMESTAMP presync(TIMESTAMP t0, TIMESTAMP t1);
00107 TIMESTAMP sync(TIMESTAMP t0, TIMESTAMP t1);
00108 TIMESTAMP postsync(TIMESTAMP t0, TIMESTAMP t1);
00109
00110 complex *get_complex(OBJECT *obj, char *name);
00111 public:
00112 static CLASS *oclass;
00113 static microturbine *defaults;
00114 #ifdef OPTIONAL
00115 static CLASS *pclass;
00116 TIMESTAMPP plc(TIMESTAMP t0, TIMESTAMP t1);
00117 #endif
00118 };
00119
00120 #endif
00121
00131 #ifndef _microturbine_H
00132 #define _microturbine_H
00133
00134 #include <stdarg.h>
00135 #include "gridlabd.h"
00136
00137 class microturbine {
00138 private:
00139
00140 protected:
00141
00142 public:
00143
00144 public:
00145
00146 microturbine(MODULE *module);
00147 int create(void);
00148 int init(OBJECT *parent);
00149 TIMESTAMP presync(TIMESTAMP t0, TIMESTAMP t1);
00150 TIMESTAMP sync(TIMESTAMP t0, TIMESTAMP t1);
00151 TIMESTAMP postsync(TIMESTAMP t0, TIMESTAMP t1);
00152 public:
00153 static CLASS *oclass;
00154 static microturbine *defaults;
00155 #ifdef OPTIONAL
00156 static CLASS *pclass;
00157 TIMESTAMPP plc(TIMESTAMP t0, TIMESTAMP t1);
00158 #endif
00159 };
00160
00161 #endif
00162