OpenWAM
TTGV.h
1 /*--------------------------------------------------------------------------------*\
2 ==========================|
3  \\ /\ /\ // O pen | OpenWAM: The Open Source 1D Gas-Dynamic Code
4  \\ | X | // W ave |
5  \\ \/_\/ // A ction | CMT-Motores Termicos / Universidad Politecnica Valencia
6  \\/ \// M odel |
7  ----------------------------------------------------------------------------------
8  License
9 
10  This file is part of OpenWAM.
11 
12  OpenWAM is free software: you can redistribute it and/or modify
13  it under the terms of the GNU General Public License as published by
14  the Free Software Foundation, either version 3 of the License, or
15  (at your option) any later version.
16 
17  OpenWAM is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  GNU General Public License for more details.
21 
22  You should have received a copy of the GNU General Public License
23  along with OpenWAM. If not, see <http://www.gnu.org/licenses/>.
24 
25 
26  \*--------------------------------------------------------------------------------*/
27 
28 #ifndef TTGVH
29 #define TTGVH
30 
31 #include <string.h>
32 #include <cstdio>
33 #include <iostream>
34 #ifdef __BORLANDC__
35 #include <vcl.h>
36 #endif
37 //#include <cmath>
38 #include "Globales.h"
39 
40 class TTGV {
41  private:
42 
43 //Variables para la determinacion de la correlacion utilizada en la turbina.
44  FILE *FichTGV;
45  int FNumeroDatos_Regimen;
46  int FNumeroDatos_Mf;
47 
48  double *FVector_Mf_mapa;
49  double *FVector_Regimen_mapa;
50  double **FMapa_PosicionTurbina;
51  double **FMapa_Padmision;
52 
53  double FPresionAdmisionConsigna;
54 //double FPosicionTurbina;
55  double FDistanciaVastago;
56  double *FDistanciasVastago;
57 
58  double FError; // Error en la presion de admision en el instante current
59  double FError_ant; // Error en la presion de admision en el instante anterior
60  double FErrorI; // Integral del error para el control con el PID
61  double FErrorIAnt;
62  double FP;
63  double FI;
64  double FD;
65  double FKc1;
66  double FKi1;
67  double FKd1;
68  double FKc2;
69  double FKi2;
70  double FKd2;
71 
72  double FCorr0;
73  double FCorr1;
74  double FCorr2;
75  double FCorr4;
76  double FCorr6;
77  double FCorr8;
78  double FCorr10;
79  double FCorr12;
80 
81  double FAEstator; // area de referencia del estator en cm2
82  double FARotor; // area de referencia del rotor en cm2
83  double FCDStator;
84  double FCDRotor;
85  double FRendimiento;
86 
87 //double FCierreMaximo;
88 
89  bool FPrimeraVez;
90 
91  public:
92 
93  double getCDStator() {
94  return FCDStator;
95  }
96  ;
97 
98  double getCDRotor() {
99  return FCDRotor;
100  }
101  ;
102 
103  double getRendimiento() {
104  return FRendimiento;
105  }
106  ;
107 
108  double FPosicionTurbina;
109  double getPosicionTurbina() {
110  return FPosicionTurbina;
111  }
112  void PutPosicionTurbina(double valor) {
113  FPosicionTurbina = valor;
114  }
115  ;
116 
117  double FCierreMaximo;
118  double getCierreMaximo() {
119  return FCierreMaximo;
120  }
121  void PutCierreMaximo(double valor) {
122  FCierreMaximo = valor;
123  }
124  ;
125 
126  TTGV();
127 
128  ~TTGV();
129 
130  void LeeDatosEntrada(char *Ruta, FILE *fich);
131 
132  void CalculaTurbina(nmTipoControl TipoControl, double MasaFuel, double Regimen, double PresionAdmision,
133  double RelacionCinematica, double RelExp, double RegTurboCorr, double GastoCorr, double Tiempo);
134 
135 };
136 
137 //---------------------------------------------------------------------------
138 #endif
139 
TTGV
Definition: TTGV.h:40