OpenWAM
TWasteGate.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 TWasteGateH
30 #define TWasteGateH
31 
32 #include <cstdio>
33 #ifdef __BORLANDC__
34 #include <vcl.h>
35 #endif
36 #include <iostream>
37 //#include <cmath>
38 #include "Globales.h"
39 
40 #include "TTipoValvula.h"
41 
42 //---------------------------------------------------------------------------
43 //---------------------------------------------------------------------------
44 
45 class TTubo;
46 
47 class TWasteGate: public TTipoValvula {
48  private:
49 // CONSTANTES INICIALES
50  TTubo *FTuboAdm;
51 
52  int FTuboControl;
53  double FDistancia;
54  double FPresCapMando;
55  double FCoefC1;
56  double FCoefC2;
57  double FMasa;
58  double FAmortiguamiento;
59  double FRigidez;
60  double FPrecarga;
61  double FAreaDiaf;
62  double FAreaPlato;
63  double FDiametroRef;
64  double FSentidoWG;
65  double FDist;
66  double FNodoAdm;
67 
68 //VARIABLES DE CALCULO
69  double FFuerza;
70  double FX;
71  double FdX;
72  double FddX;
73 
74  int FValvula;
75 
76  bool FGraficasWG;
77  bool FGrafLev;
78 
79  public:
80 
81  TWasteGate(TWasteGate *Origen, int valv);
82 
83  TWasteGate();
84 
85  ~TWasteGate();
86 
87  double getDistancia() {
88  return FDistancia;
89  }
90  ;
91  int getTuboControl() {
92  return FTuboControl;
93  }
94  ;
95  double getNodoAdm() {
96  return FNodoAdm;
97  }
98  ;
99  TTubo* getTuboAdm() {
100  return FTuboAdm;
101  }
102  ;
103  double getDist() {
104  return FDist;
105  }
106  ;
107 
108  void LeeDatosIniciales(const char *FileWAM, fpos_t &filepos, int norden, bool HayMotor, TBloqueMotor *Engine);
109 
110  void CalculoNodoAdm(TTubo **Pipe);
111 
112  void CalculaCD(double Padm, double PTubo, double PDeposito, double deltaT);
113 
114  void LeeDatosGraficas(const char *FileWAM, fpos_t &filepos);
115 
116  void CabeceraGraficaINS(stringstream& insoutput, int lam);
117 
118  void ImprimeGraficaINS(stringstream& insoutput);
119 
120  void GetCDin(double Time);
121 
122  void GetCDout(double Time);
123 };
124 
125 //---------------------------------------------------------------------------
126 //---------------------------------------------------------------------------
127 #endif
TTubo
a Finite differences pipe.
Definition: TTubo.h:116
TTipoValvula
Definition: TTipoValvula.h:53
TWasteGate
Definition: TWasteGate.h:47
TBloqueMotor
Definition: TBloqueMotor.h:43