OpenWAM
Tfql.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 //---------------------------------------------------------------------------
30 // OBJETO PARA LA INTERPOLACION DE LEYES DE LIBERACION DE CALOR
31 //
32 // Se deben establecer los parametros que se desean utilizar en el calculo de
33 // angulos de combustion y de la FQL.
34 // En la funcion fql se debe establecer el desfase existente entre cada cilindro
35 // en funcion de su numero y orden de encendido.
36 //
37 // Para validar la base de datos de FQL se dispone del programa CalculaLey.
38 //---------------------------------------------------------------------------
39 //---------------------------------------------------------------------------
40 #ifndef TfqlH
41 #define TfqlH
42 
43 #include <cstring>
44 #include <cstdio>
45 #include <iostream>
46 #ifdef __BORLANDC__
47 #include <vcl.h>
48 #endif
49 #include "Globales.h"
50 
51 class Tfql {
52 
53  private:
54 
55  FILE *Fichfql;
56  int Fnwiebe, Fnley, Fncilin, Fnparametros;
57  double **Flm, **Flc, **Flb, **Fli, **Fla, **Fpar_dist, *Fmax;
58  double ***Flab;
59  double Fang0, Ffinc;
60  bool *Fcombustion;
61 
62  public:
63 
64  Tfql(int ncilin);
65 
66  ~Tfql();
67 
68  double getInicio() {
69  return Fang0;
70  }
71  ;
72  double getFinal() {
73  return Ffinc;
74  }
75  ;
76 
77  int getNumParametros() {
78  return Fnparametros;
79  }
80  ;
81 
82  void lee_leylib(char *Ruta, FILE *fich);
83 
84  void lee_leylib2(FILE *BaseDatos);
85 
86  void calcula_angulos_combustion(double *parametros, int i);
87 
88  double fun_wiebe(double x, double m, double c, double ia, double a0);
89 
90  double fql(double x, int j, int i);
91 
92  double calcula_fql(double *parametros, double x, int i);
93 
94 };
95 //---------------------------------------------------------------------------
96 #endif
97 
Tfql
Definition: Tfql.h:51