00001
00009 #ifndef _solar_H
00010 #define _solar_H
00011
00012 #include <stdarg.h>
00013 #include "../powerflow/powerflow_object.h"
00014
00015 #include "gridlabd.h"
00016
00017 class solar
00018 {
00019 private:
00020
00021
00022
00023 protected:
00024
00025 public:
00026
00027 set phases;
00028 enum GENERATOR_MODE {CONSTANT_V=1, CONSTANT_PQ=2, CONSTANT_PF=4, SUPPLY_DRIVEN=5} gen_mode_v;
00029
00030 enum GENERATOR_STATUS {OFFLINE=1, ONLINE=2} gen_status_v;
00031 enum POWER_TYPE{DC=1, AC=2} power_type_v;
00032 enum PANEL_TYPE{SINGLE_CRYSTAL_SILICON=1, MULTI_CRYSTAL_SILICON=2, AMORPHOUS_SILICON=3, THIN_FILM_GA_AS=4, CONCENTRATOR=5} panel_type_v;
00033
00034
00035
00036
00037
00038
00039 double NOCT;
00040 double Tcell;
00041 double Tambient;
00042 double Insolation;
00043 double Rinternal;
00044 double Rated_Insolation;
00045 complex V_Max;
00046 complex Voc;
00047 complex Voc_Max;
00048 double area;
00049
00050 double efficiency;
00051 double *pTout;
00052
00053 double *pRhout;
00054 double *pSolar;
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068 double Max_P;
00069 double Min_P;
00070
00071
00072 double Rated_kVA;
00073
00074
00075
00076
00077
00078 complex *pCircuit_V;
00079 complex *pLine_I;
00080
00081
00082 complex V_Out;
00083
00084
00085
00086
00087
00088 complex I_Out;
00089
00090
00091
00092
00093
00094
00095
00096
00097 complex VA_Out;
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113 public:
00114
00115 solar(MODULE *module);
00116 int create(void);
00117 int init(OBJECT *parent);
00118 void derate_panel(double Tamb, double Insol);
00119 void calculate_IV(double Tamb, double Insol);
00120 int init_climate(void);
00121
00122 TIMESTAMP presync(TIMESTAMP t0, TIMESTAMP t1);
00123 TIMESTAMP sync(TIMESTAMP t0, TIMESTAMP t1);
00124 TIMESTAMP postsync(TIMESTAMP t0, TIMESTAMP t1);
00125
00126 complex *get_complex(OBJECT *obj, char *name);
00127 public:
00128 static CLASS *oclass;
00129 static solar *defaults;
00130 #ifdef OPTIONAL
00131 static CLASS *pclass;
00132 TIMESTAMPP plc(TIMESTAMP t0, TIMESTAMP t1);
00133 #endif
00134 };
00135
00136 #endif
00137
00147 #ifndef _solar_H
00148 #define _solar_H
00149
00150 #include <stdarg.h>
00151 #include "gridlabd.h"
00152
00153 class solar {
00154 private:
00155
00156 protected:
00157
00158 public:
00159
00160 public:
00161
00162 solar(MODULE *module);
00163 int create(void);
00164 int init(OBJECT *parent);
00165 TIMESTAMP presync(TIMESTAMP t0, TIMESTAMP t1);
00166 TIMESTAMP sync(TIMESTAMP t0, TIMESTAMP t1);
00167 TIMESTAMP postsync(TIMESTAMP t0, TIMESTAMP t1);
00168 public:
00169 static CLASS *oclass;
00170 static solar *defaults;
00171 #ifdef OPTIONAL
00172 static CLASS *pclass;
00173 TIMESTAMPP plc(TIMESTAMP t0, TIMESTAMP t1);
00174 #endif
00175 };
00176
00177 #endif
00178