31 #include "TEstatorTurbina.h"
35 TEstatorTurbina::TEstatorTurbina() :
43 TEstatorTurbina::~TEstatorTurbina() {
50 TEstatorTurbina::TEstatorTurbina(
TEstatorTurbina *Origen,
int Valvula) :
53 FTipoEstator = Origen->FTipoEstator;
54 FCDEInicial = Origen->FCDEInicial;
55 FCDSInicial = Origen->FCDSInicial;
56 FDiametroRef = Origen->FDiametroRef;
57 FNumeroOrden = Origen->FNumeroOrden;
61 FDiamRef = FDiametroRef;
63 FCDTubVol = FCDEInicial;
64 FCDVolTub = FCDSInicial;
72 void TEstatorTurbina::LeeDatosIniciales(
const char *FileWAM, fpos_t &filepos,
int norden,
bool HayMotor,
77 FILE *fich = fopen(FileWAM,
"r");
78 fsetpos(fich, &filepos);
80 FNumeroOrden = norden;
82 fscanf(fich,
"%lf %lf %lf ", &FCDEInicial, &FCDSInicial, &FDiametroRef);
84 fgetpos(fich, &filepos);
87 }
catch(exception &N) {
88 std::cout <<
"ERROR: LeeDatosIniciales StatorTurbine" << std::endl;
98 void TEstatorTurbina::TipodeEstator(nmTipoEstator TipoEstator) {
101 FTipoEstator = TipoEstator;
103 }
catch(exception &N) {
104 std::cout <<
"ERROR: TEstatorTurbina::TipodeEstator " << std::endl;
113 void TEstatorTurbina::CalculaCD() {
115 switch(FTipoEstator) {
117 FCDTubVol = FCDEInicial * FSectionRatio;
118 FCDVolTub = FCDSInicial * FSectionRatio;
121 FCDTubVol = FAreaEff / __geom::Circle_area(FDiamTubo);
122 FCDVolTub = FAreaEff / __geom::Circle_area(FDiamTubo);
125 FCDTubVol = FCDVbl * FSectionRatio;
126 FCDVolTub = FCDVbl * FSectionRatio;
131 }
else if(FCDTubVol <= 0) {
136 }
else if(FCDVolTub <= 0) {
139 }
catch(exception &N) {
140 std::cout <<
"ERROR: CalculaCD StatorTurbine" << std::endl;
147 void TEstatorTurbina::GetCDin(
double Time) {
149 switch(FTipoEstator) {
151 FCDTubVol = FCDEInicial * FSectionRatio;
154 FCDTubVol = FAreaEff / __geom::Circle_area(FDiamTubo);
157 FCDTubVol = FCDVbl * FSectionRatio;
162 }
else if(FCDTubVol <= 0) {
167 void TEstatorTurbina::GetCDout(
double Time) {
169 switch(FTipoEstator) {
171 FCDVolTub = FCDSInicial * FSectionRatio;
174 FCDVolTub = FAreaEff / __geom::Circle_area(FDiamTubo);
177 FCDVolTub = FCDVbl * FSectionRatio;
183 }
else if(FCDVolTub <= 0) {
191 void TEstatorTurbina::AsignaTurbina(
double NTurb,
double NEntr) {
192 FNumeroTurbina = NTurb;
193 FNumeroEntrada = NEntr + 1;
195 #pragma package(smart_init)