OpenWAM
TCCCompresor.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 TCCCompresorH
30 #define TCCCompresorH
31 
32 #include "TCondicionContorno.h"
33 
34 #include <cstdio>
35 #include <iostream>
36 
37 // ---------------------------------------------------------------------------
38 // ---------------------------------------------------------------------------
39 
40 class TCompresor;
41 
42 class TDeposito;
43 
45  private:
46 
47  nmCompressorInlet FEntradaCompresor;
48  nmPipeEnd FExtremoTuboRotor;
49 
50  int FNumeroCompresor;
51  int FNumeroDeposito;
52  int FNumeroDepositoRot;
53  int FNumeroDepositoEst;
54 
55  TDeposito *FDeposito;
56  TDeposito *FDepositoRot;
57  TDeposito *FDepositoEst;
58 
59  TCompresor *FCompresor;
60 
61  TTubo *FTuboRotor;
62 
63  int FTuboActual; // Identifica el tubo que se esta calculando para el caso de Compressor de 2 tubos.
64  int *FNumeroTubo;
65 
66  double FPamb;
67  double FTamb;
68 
69  double FTheta;
70  // double FTiempoActual;
71 
72  public:
73 
74  int getNumeroCompresor() {
75  return FNumeroCompresor;
76  }
77  ;
78 
79  TCompresor* getCompressor() {
80  return FCompresor;
81  }
82  ;
83 
84  TDeposito* getPlenum() {
85  return FDeposito;
86  }
87  ;
88 
89  TTubo* getTuboRotor() {
90  return FTuboRotor;
91  }
92  ;
93 
94  nmPipeEnd getExtremoTuboRotor() {
95  return FExtremoTuboRotor;
96  }
97  ;
98 
99  int getNumeroDeposito() {
100  return FNumeroDeposito;
101  }
102  ;
103 
104  int getNumeroDepositoRot() {
105  return FNumeroDepositoRot;
106  }
107  ;
108 
109  int getNumeroDepositoEst() {
110  return FNumeroDepositoEst;
111  }
112  ;
113 
114  double FTiempoActual;
115 
116  double getInstanteCalculo() {
117  return FTiempoActual;
118  }
119 
120  void PutInstanteCalculo(double valor) {
121  FTiempoActual = valor;
122  }
123  ;
124 
125  nmCompressorInlet getEntradaCompresor() {
126  return FEntradaCompresor;
127  }
128  ;
129 
130  TCCCompresor(nmTypeBC TipoCC, int numCC, nmTipoCalculoEspecies SpeciesModel, int numeroespecies,
131  nmCalculoGamma GammaCalculation, bool ThereIsEGR);
132 
133  ~TCCCompresor();
134 
135  void LeeNumeroCompresor(const char *FileWAM, fpos_t &filepos);
136 
137  void AsignacionDatos(TCompresor **Compressor, TDeposito **Plenum, const char *FileWAM, fpos_t &filepos,
138  int NumberOfPipes, TTubo **Pipe, TCondicionContorno **BC, int numCC, double AmbientTemperature, double AmbientPressure,
139  double *AtmosphericComposition);
140 
141  void ObtencionValoresInstantaneos(double Theta, double tiempoactual);
142 
143  void CalculaCondicionContorno(double Time);
144 
145  void TuboCalculandose(int TuboActual);
146 
147  void ReadCompressorData(const char *FileWAM, fpos_t &filepos, TCompresor **Compressor);
148 
149  void AsignData(TDeposito **Plenum, int NumberOfPipes, TTubo **Pipe, TCondicionContorno **BC, int numCC,
150  double *AtmosphericComposition, TCompresor **Compressor, double AmbientTemperature, double AmbientPressure);
151 };
152 
153 #endif
TTubo
a Finite differences pipe.
Definition: TTubo.h:116
TCompresor
Definition: TCompresor.h:47
TCondicionContorno
Definition: TCondicionContorno.h:54
TDeposito
Definition: TDeposito.h:44
TCCCompresor
Definition: TCCCompresor.h:44