OpenWAM
TLamina.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 TLaminaH
30 #define TLaminaH
31 
32 #include <cstdio>
33 #ifdef __BORLANDC__
34 #include <vcl.h>
35 #endif
36 //#include <iostream>
37 //#include <cmath>
38 
39 #include "TTipoValvula.h"
40 #include "Globales.h"
41 //#include "interp_1d.h"
42 
43 //---------------------------------------------------------------------------
44 //---------------------------------------------------------------------------
45 
46 enum nmTipoLamina {
47  nmLamina0D = 0, nmLamina1D = 1, nmLamina2D = 2
48 };
49 
50 class TLamina: public TTipoValvula {
51  private:
52 //CONSTANTES INICIALES
53  nmTipoLamina FTipoLamina;
54  int FSentidoLamina;
55  double FDiametroRef;
56 
57  double FMasa;
58  double FDensidad;
59  double FAmortiguamiento;
60  double FArea;
61  double FAnchoPetalo;
62  double FRigidez;
63  double FModuloYoung;
64  double FEspesor;
65  int FNumPestanyas;
66  double FLongitud;
67  double FLongReal;
68 
69  double FKCDE;
70  double FKCDS;
71 
72  int FNumLevCDE;
73  int FNumLevCDS;
74  double FIncrLev;
75  dVector FLiftCDin;
76  dVector FDatosCDEntrada;
77  Hermite_interp *fun_CDin;
78  dVector FLiftCDout;
79  dVector FDatosCDSalida;
80  Hermite_interp *fun_CDout;
81 
82  int FNodosLamina;
83  int FNodosFijos;
84  int FBucle;
85 
86  double FCoefC;
87  double FAreaTrans;
88  double FDeltaX;
89 
90 //VARIABLES DE CALCULO
91  int FValvula;
92 
93  double FLev;
94  double FdLev;
95  double FddLev;
96 
97  double *FFuerza;
98  double *FLev1;
99  double *FLev2;
100  double *FLev3;
101  double FDerivada4;
102 
103  bool FGraficasLam;
104  bool FGrafLev;
105 
106  public:
107 
108  TLamina(TLamina *Origen, int valv);
109 
110  TLamina();
111 
112  ~TLamina();
113 
114  double getLevantamiento() {
115  return FLev;
116  }
117  ;
118 
119  void LeeDatosIniciales(const char *FileWAM, fpos_t &filepos, int norden, bool HayMotor, TBloqueMotor *Engine);
120 
121  void CalculaCD(double deltaP, double deltaT);
122 
123  void LeeDatosGraficas(const char *FileWAM, fpos_t &filepos);
124 
125  void CabeceraGraficaINS(stringstream& insoutput, int lam);
126 
127  void ImprimeGraficaINS(stringstream& insoutput);
128 
129  void GetCDin(double Time);
130 
131  void GetCDout(double Time);
132 
133 };
134 
135 //---------------------------------------------------------------------------
136 //---------------------------------------------------------------------------
137 
138 #endif
TTipoValvula
Definition: TTipoValvula.h:53
Hermite_interp
Definition: Math_wam.h:311
TLamina
Definition: TLamina.h:50
TBloqueMotor
Definition: TBloqueMotor.h:43
dVector
std::vector< double > dVector
Double vector.
Definition: Math_wam.h:70