OpenWAM
TCompTubDep.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 //---------------------------------------------------------------------------
29 #ifndef TCompTubDepH
30 #define TCompTubDepH
31 #include "TCompresor.h"
32 
33 //---------------------------------------------------------------------------
34 //---------------------------------------------------------------------------
35 
36 class TTubo;
37 class TDeposito;
38 class TCondicionContorno;
39 
40 class TCompTubDep: public TCompresor {
41 //---------------------------------------------------------------------------
42 //---------------------------------------------------------------------------
43 
44  private:
45 
46  TDeposito *FDeposito;
47  TTubo *FTuboRotor;
48  int FTubRotor;
49  int FTubStator;
50  int FIndiceCC;
51  double FNodoFinTuboSalida;
52  double FNodoFinEntrada;
53  nmCompressorInlet FEntradaCompresor;
54  nmPipeEnd FExtremoTuboRotor;
55  nmCompressorMapFormat FCompressorMapFormat;
56 
57  int FParticionEntrada; // Se pueden borrar.Pedro
58  int FParticionSalida;
59 
60  double FAreaSalComp;
61  nmPipeEnd FExtremoSalida;
62 
63  double *FLanda;
64  double *FBeta;
65  double *FEntro;
66 
67  double FTemperatura20;
68  double FEntropia2;
69  double FTemperatura2;
70  double FVelocidad2;
71  double FDensidad20;
72  double FDensidad2;
73 
74  double FGasto0;
75  double FGasto0Correg;
76  double FGasto1;
77 
78  bool FCambiaReg;
79  double FVariacionRegimen;
80  double FCorrector;
81 
82 // Transporte de especies
83  double FGamma1;
84  double FGamma3;
85  double FGamma4;
86  double FGamma5;
87  double FRAtm; // Valor de R para la composicion atmosferica.
88  double FCvAtm; // Valor de Cv para la composicion atmosferica.
89  double FCpAtm; // Valor de Cp para la composicion atmosferica.
90  double FGammaAtm; // Valor de Gamma para la composicion atmosferica.
91 
92 // Damping
93  double FMass_filt_ant;
94  double FMass_ant;
95  double FDelay;
96 
97  double RC_filt;
98  double RC_filt_ant;
99  double RC_ant;
100 
101 //---------------------------------------------------------------------------
102 //---------------------------------------------------------------------------
103 
104  double CalGastoNuevo(double MasaAire);
105 
106  double RegulaFalsi();
107 
108  void CalculaCompresor(double Theta);
109 
110  int GetTubStator() {
111  return FTubStator;
112  }
113 
114  int GetParticionSalida() {
115  return FParticionSalida;
116  }
117 
118 //---------------------------------------------------------------------------
119 //---------------------------------------------------------------------------
120 
121  public:
122 
123  int getTubStator() {
124  return GetTubStator();
125  }
126  ;
127 
128  int getParticionSalida() {
129  return GetParticionSalida();
130  }
131  ;
132 
133  nmCompressorInlet getEntradaCompresor() {
134  return FEntradaCompresor;
135  }
136  ;
137 
138  TCompTubDep(int i, nmTipoCalculoEspecies SpeciesModel, int numeroespecies, nmCalculoGamma GammaCalculation,
139  bool ThereIsEGR);
140 
141  ~TCompTubDep();
142 
143  void LeeCompresor(const char *FileWAM, fpos_t &filepos);
144 
145  void CondicionCompresor(double Theta, stTuboExtremo *TuboExtremo, double AcumulatedTime, int TuboCalculado);
146 
147  void DatosEntradaCompresor(double AmbientTemperature, double AmbientPressure, TCondicionContorno *BC);
148 
149  void BusquedaEntradaSalida(nmCompressorInlet EntradaCompresor, double AmbientTemperature, int numeroCC,
150  TCondicionContorno **BC, double *AtmosphericComposition);
151 
152 // NO SE UTILIZA EN ESTE TIPO DE COMPRESOR
153  void CalculaGasto(double TrabajoInsTurbina, double TiempoActual) {
154  }
155 
156  void Initialize();
157 
158  double NewDampedSolution(double Mass);
159 
160 };
161 
162 //---------------------------------------------------------------------------
163 //---------------------------------------------------------------------------
164 
165 #endif
TTubo
a Finite differences pipe.
Definition: TTubo.h:116
stTuboExtremo
Definition: Globales.h:730
TCompTubDep
Definition: TCompTubDep.h:40
TCompresor
Definition: TCompresor.h:47
TCondicionContorno
Definition: TCondicionContorno.h:54
TDeposito
Definition: TDeposito.h:44