31 #include "TNewMapComp.h"
34 TNewMapComp::TNewMapComp() {
38 TNewMapComp::~TNewMapComp() {
42 void TNewMapComp::ReadMap(FILE *fich,
int correct) {
44 double speed = 0., mass = 0., pres = 0., eff = 0.;
52 fscanf(fich,
"%lf %lf", &FPresionRef, &FTempRef);
53 fscanf(fich,
"%d ", &filas);
54 FPresionRef = __units::BarToPa(FPresionRef);
61 locSpeed.resize(i + 1);
62 locMass.resize(i + 1);
66 for(
int k = 0; k < filas; k++) {
67 fscanf(fich,
"%lf %lf %lf %lf", &speed, &mass, &pres, &eff);
69 if(speed != locSpeed[i][j - 1]) {
72 locSpeed.resize(i + 1);
73 locMass.resize(i + 1);
77 locSpeed[i].push_back(speed);
78 locMass[i].push_back(mass);
79 locPre[i].push_back(pres);
80 locEff[i].push_back(eff);
89 double r1 = sqrt((
pow2(FRadHub) +
pow2(FRadTip)) / 2);
93 for(
Uint k = 0; k < locSpeed.size(); k++) {
97 MassExtra[0] = FGastoMin;
98 MassExtra[1] = -0.0001;
100 PreExtra[0] = locPre[k][0];
101 PreExtra[1] = pow(1 + 1 / (__Gamma::Cp_x2 * (FTempRef)) *
pow2(__units::RPMToRad_s(locSpeed[k][0])) * (
pow2(
102 FRadWheel) -
pow2(r1)), __Gamma::G_9);
103 PreExtra[2] = pow(1 + 1 / (__Gamma::Cp_x2 * (FTempRef)) *
pow2(__units::RPMToRad_s(locSpeed[k][0])) * (
pow2(
104 FRadWheel) -
pow2(r1)), __Gamma::G_9);
105 EffExtra[0] = locEff[k][0];
106 EffExtra[1] = locEff[k][0];
107 EffExtra[2] = locEff[k][0];
108 it = locMass[i].begin();
109 locMass[i].insert(it, MassExtra.begin(), MassExtra.end());
110 it = locPre[i].begin();
111 locPre[i].insert(it, PreExtra.begin(), PreExtra.end());
112 it = locEff[i].begin();
113 locEff[i].insert(it, EffExtra.begin(), EffExtra.end());
118 #pragma package(smart_init)