00001
00002
00003
00004 #ifndef _TRANSFORMER_H
00005 #define _TRANSFORMER_H
00006
00007 #include "powerflow.h"
00008 #include "link.h"
00009 #include "transformer_configuration.h"
00010
00011 class transformer : public link_object
00012 {
00013 public:
00014 OBJECT *configuration;
00015
00016 OBJECT *climate;
00017 double thermal_capacity;
00018 double K;
00019 double m;
00020 double n;
00021 double R;
00022 double *ptheta_A;
00023 double temp_A;
00024 double amb_temp;
00025 double theta_H;
00026 double theta_TO;
00027 double dtheta_H;
00028 double dtheta_H_i;
00029 double dtheta_H_R;
00030 double dtheta_H_U;
00031 double dtheta_TO;
00032 double dtheta_TO_i;
00033 double dtheta_TO_U;
00034 double t_TOR;
00035 double t_TO;
00036 bool use_thermal_model;
00037
00038 double B_age;
00039 double F_AA;
00040 double F_EQA;
00041 double dt;
00042 double sumdt;
00043 double sumF_AAdt;
00044 double inst_ins_life;
00045 double life_loss;
00046 double transformer_replacements;
00047 TIMESTAMP time_before;
00048 double aging_step;
00049 TIMESTAMP return_at;
00050 double last_temp;
00051
00052 int transformer_inrush_mat_update(void);
00053 int transformer_saturation_update(bool *deltaIsat);
00054 double flux_vals_inst[6];
00055
00056 transformer_configuration *config;
00057
00058 int create(void);
00059 int init(OBJECT *parent);
00060 TIMESTAMP postsync(TIMESTAMP t0);
00061
00062 static CLASS *oclass;
00063 static CLASS *pclass;
00064 int isa(char *classname);
00065
00066 transformer(MODULE *mod);
00067 inline transformer(CLASS *cl=oclass):link_object(cl){};
00068
00069 private:
00070 TIMESTAMP simulation_start_time;
00071 void fetch_double(double **prop, char *name, OBJECT *parent);
00072 double phi_base_Pri;
00073 double phi_base_Sec;
00074 double I_base_Pri;
00075 double I_base_Sec;
00076 };
00077 EXPORT void power_calculation(OBJECT *thisobj);
00078 EXPORT int recalc_transformer_mat(OBJECT *obj);
00079 EXPORT int recalc_deltamode_saturation(OBJECT *obj,bool *deltaIsat);
00080 #endif // _TRANSFORMER_H