]> git.mxchange.org Git - flightgear.git/blob - src/FDM/JSBSim/FGTurbine.cpp
Fix stall widths for the "auxilliary" (reverse flow) stalls so they
[flightgear.git] / src / FDM / JSBSim / FGTurbine.cpp
1 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
3  Module:       FGTurbine.cpp
4  Author:       David Culp
5  Date started: 03/11/2003
6  Purpose:      This module models a turbine engine.
7
8  ------------- Copyright (C) 2003  David Culp (davidculp2@comcast.net) ---------
9
10  This program is free software; you can redistribute it and/or modify it under
11  the terms of the GNU General Public License as published by the Free Software
12  Foundation; either version 2 of the License, or (at your option) any later
13  version.
14
15  This program is distributed in the hope that it will be useful, but WITHOUT
16  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
18  details.
19
20  You should have received a copy of the GNU General Public License along with
21  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
22  Place - Suite 330, Boston, MA  02111-1307, USA.
23
24  Further information about the GNU General Public License can also be found on
25  the world wide web at http://www.gnu.org.
26
27 FUNCTIONAL DESCRIPTION
28 --------------------------------------------------------------------------------
29
30 This class descends from the FGEngine class and models a turbine engine based
31 on parameters given in the engine config file for this class
32
33 HISTORY
34 --------------------------------------------------------------------------------
35 03/11/2003  DPC  Created
36 09/08/2003  DPC  Changed Calculate() and added engine phases
37
38 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
39 INCLUDES
40 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
41
42 #include <vector>
43 #include <sstream>
44
45 #include "FGTurbine.h"
46
47 namespace JSBSim {
48
49 static const char *IdSrc = "$Id$";
50 static const char *IdHdr = ID_TURBINE;
51
52 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
53 CLASS IMPLEMENTATION
54 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
55
56
57 FGTurbine::FGTurbine(FGFDMExec* exec, FGConfigFile* cfg, int engine_number)
58   : FGEngine(exec, engine_number)
59 {
60   SetDefaults();
61
62   Load(cfg);
63   Debug(0);
64 }
65
66 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
67
68 FGTurbine::~FGTurbine()
69 {
70   unbind();
71   Debug(1);
72 }
73
74 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
75 // The main purpose of Calculate() is to determine what phase the engine should
76 // be in, then call the corresponding function.
77
78 double FGTurbine::Calculate(void)
79 {
80   TAT = (Auxiliary->GetTotalTemperature() - 491.69) * 0.5555556;
81   dt = State->Getdt() * Propulsion->GetRate();
82   ThrottlePos = FCS->GetThrottlePos(EngineNumber);
83   if (ThrottlePos > 1.0) {
84     AugmentCmd = ThrottlePos - 1.0;
85     ThrottlePos -= AugmentCmd;
86   } else {
87     AugmentCmd = 0.0;
88   }
89
90   // When trimming is finished check if user wants engine OFF or RUNNING
91   if ((phase == tpTrim) && (dt > 0)) {
92     if (Running && !Starved) {
93       phase = tpRun;
94       N2 = IdleN2 + ThrottlePos * N2_factor;
95       N1 = IdleN1 + ThrottlePos * N1_factor;
96       OilTemp_degK = 366.0;
97       Cutoff = false;
98       }
99     else {
100       phase = tpOff;
101       Cutoff = true;
102       EGT_degC = TAT;
103       }
104     }
105
106   if (!Running && Cutoff && Starter) {
107      if (phase == tpOff) phase = tpSpinUp;
108      }
109   if (!Running && !Cutoff && (N2 > 15.0)) phase = tpStart;
110   if (Cutoff && (phase != tpSpinUp)) phase = tpOff;
111   if (dt == 0) phase = tpTrim;
112   if (Starved) phase = tpOff;
113   if (Stalled) phase = tpStall;
114   if (Seized) phase = tpSeize;
115
116   switch (phase) {
117     case tpOff:    Thrust = Off(); break;
118     case tpRun:    Thrust = Run(); break;
119     case tpSpinUp: Thrust = SpinUp(); break;
120     case tpStart:  Thrust = Start(); break;
121     case tpStall:  Thrust = Stall(); break;
122     case tpSeize:  Thrust = Seize(); break;
123     case tpTrim:   Thrust = Trim(); break;
124     default: Thrust = Off();
125   }
126
127   // The thruster can modify the thrust, eg. thrust reverser
128   return Thrust = Thruster->Calculate(Thrust);
129 }
130
131 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
132
133 double FGTurbine::Off(void)
134 {
135   double qbar = Auxiliary->Getqbar();
136   Running = false;
137   FuelFlow_pph = Seek(&FuelFlow_pph, 0, 1000.0, 10000.0);
138   N1 = Seek(&N1, qbar/10.0, N1/2.0, N1/2.0);
139   N2 = Seek(&N2, qbar/15.0, N2/2.0, N2/2.0);
140   EGT_degC = Seek(&EGT_degC, TAT, 11.7, 7.3);
141   OilTemp_degK = Seek(&OilTemp_degK, TAT + 273.0, 0.2, 0.2);
142   OilPressure_psi = N2 * 0.62;
143   NozzlePosition = Seek(&NozzlePosition, 1.0, 0.8, 0.8);
144   EPR = Seek(&EPR, 1.0, 0.2, 0.2);
145   Augmentation = false;
146   return 0.0;
147 }
148
149 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
150
151 double FGTurbine::Run(void)
152 {
153   double idlethrust, milthrust, thrust;
154   double N2norm;   // 0.0 = idle N2, 1.0 = maximum N2
155   idlethrust = MilThrust * ThrustTables[0]->TotalValue();
156   milthrust = (MilThrust - idlethrust) * ThrustTables[1]->TotalValue();
157
158   Running = true;
159   Starter = false;
160
161   N2 = Seek(&N2, IdleN2 + ThrottlePos * N2_factor, delay, delay * 3.0);
162   N1 = Seek(&N1, IdleN1 + ThrottlePos * N1_factor, delay, delay * 2.4);
163   N2norm = (N2 - IdleN2) / N2_factor;
164   thrust = idlethrust + (milthrust * N2norm * N2norm);
165   EGT_degC = TAT + 363.1 + ThrottlePos * 357.1;
166   OilPressure_psi = N2 * 0.62;
167   OilTemp_degK = Seek(&OilTemp_degK, 366.0, 1.2, 0.1);
168
169   if (!Augmentation) {
170     double correctedTSFC = TSFC * (0.84 + (1-N2norm)*(1-N2norm));
171     FuelFlow_pph = Seek(&FuelFlow_pph, thrust * correctedTSFC, 1000.0, 100000);
172     if (FuelFlow_pph < IdleFF) FuelFlow_pph = IdleFF;
173     NozzlePosition = Seek(&NozzlePosition, 1.0 - N2norm, 0.8, 0.8);
174     thrust = thrust * (1.0 - BleedDemand);
175     EPR = 1.0 + thrust/MilThrust;
176   }
177
178   if (AugMethod == 1) {
179     if ((ThrottlePos > 0.99) && (N2 > 97.0)) {Augmentation = true;}
180     else {Augmentation = false;}
181   }
182
183   if ((Augmented == 1) && Augmentation && (AugMethod < 2)) {
184     thrust = MaxThrust * ThrustTables[2]->TotalValue();
185     FuelFlow_pph = Seek(&FuelFlow_pph, thrust * ATSFC, 5000.0, 10000.0);
186     NozzlePosition = Seek(&NozzlePosition, 1.0, 0.8, 0.8);
187   }
188
189   if (AugMethod == 2) {
190     if (AugmentCmd > 0.0) {
191       Augmentation = true;
192       double tdiff = (MaxThrust * ThrustTables[2]->TotalValue()) - thrust;
193       thrust += (tdiff * AugmentCmd);
194       FuelFlow_pph = Seek(&FuelFlow_pph, thrust * ATSFC, 5000.0, 10000.0);
195       NozzlePosition = Seek(&NozzlePosition, 1.0, 0.8, 0.8);
196     } else {
197       Augmentation = false;
198     }
199   }
200
201   if ((Injected == 1) && Injection) {
202      thrust = thrust * ThrustTables[3]->TotalValue();
203   }
204
205   ConsumeFuel();
206   if (Cutoff) phase = tpOff;
207   if (Starved) phase = tpOff;
208
209   return thrust;
210 }
211
212 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
213
214 double FGTurbine::SpinUp(void)
215 {
216   Running = false;
217   FuelFlow_pph = 0.0;
218   N2 = Seek(&N2, 25.18, 3.0, N2/2.0);
219   N1 = Seek(&N1, 5.21, 1.0, N1/2.0);
220   EGT_degC = Seek(&EGT_degC, TAT, 11.7, 7.3);
221   OilPressure_psi = N2 * 0.62;
222   OilTemp_degK = Seek(&OilTemp_degK, TAT + 273.0, 0.2, 0.2);
223   EPR = 1.0;
224   NozzlePosition = 1.0;
225   return 0.0;
226 }
227
228 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
229
230 double FGTurbine::Start(void)
231 {
232   if ((N2 > 15.0) && !Starved) {       // minimum 15% N2 needed for start
233     Cranking = true;                   // provided for sound effects signal
234     if (N2 < IdleN2) {
235       N2 = Seek(&N2, IdleN2, 2.0, N2/2.0);
236       N1 = Seek(&N1, IdleN1, 1.4, N1/2.0);
237       EGT_degC = Seek(&EGT_degC, TAT + 363.1, 21.3, 7.3);
238       FuelFlow_pph = Seek(&FuelFlow_pph, IdleFF, 103.7, 103.7);
239       OilPressure_psi = N2 * 0.62;
240       ConsumeFuel();
241       }
242     else {
243       phase = tpRun;
244       Running = true;
245       Starter = false;
246       Cranking = false;
247       }
248     }
249   else {                 // no start if N2 < 15%
250     phase = tpOff;
251     Starter = false;
252     }
253
254   return 0.0;
255 }
256
257 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
258
259 double FGTurbine::Stall(void)
260 {
261   double qbar = Auxiliary->Getqbar();
262   EGT_degC = TAT + 903.14;
263   FuelFlow_pph = IdleFF;
264   N1 = Seek(&N1, qbar/10.0, 0, N1/10.0);
265   N2 = Seek(&N2, qbar/15.0, 0, N2/10.0);
266   ConsumeFuel();
267   if (ThrottlePos < 0.01) phase = tpRun;        // clear the stall with throttle
268
269   return 0.0;
270 }
271
272 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
273
274 double FGTurbine::Seize(void)
275 {
276     double qbar = Auxiliary->Getqbar();
277     N2 = 0.0;
278     N1 = Seek(&N1, qbar/20.0, 0, N1/15.0);
279     FuelFlow_pph = IdleFF;
280     ConsumeFuel();
281     OilPressure_psi = 0.0;
282     OilTemp_degK = Seek(&OilTemp_degK, TAT + 273.0, 0, 0.2);
283     Running = false;
284     return 0.0;
285 }
286
287 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
288
289 double FGTurbine::Trim(void)
290 {
291     double idlethrust, milthrust, thrust, tdiff;
292     idlethrust = MilThrust * ThrustTables[0]->TotalValue();;
293     milthrust = (MilThrust - idlethrust) * ThrustTables[1]->TotalValue();
294     thrust = (idlethrust + (milthrust * ThrottlePos * ThrottlePos))
295           * (1.0 - BleedDemand);
296     if (AugmentCmd > 0.0) {
297       tdiff = (MaxThrust * ThrustTables[2]->TotalValue()) - thrust;
298       thrust += (tdiff * AugmentCmd);
299     } 
300
301     return thrust;
302 }
303
304 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
305
306 double FGTurbine::CalcFuelNeed(void)
307 {
308   return FuelFlow_pph /3600 * State->Getdt() * Propulsion->GetRate();
309 }
310
311 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
312
313 double FGTurbine::GetPowerAvailable(void) {
314   if( ThrottlePos <= 0.77 )
315     return 64.94*ThrottlePos;
316   else
317     return 217.38*ThrottlePos - 117.38;
318 }
319
320 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
321
322 double FGTurbine::Seek(double *var, double target, double accel, double decel) {
323   double v = *var;
324   if (v > target) {
325     v -= dt * decel;
326     if (v < target) v = target;
327   } else if (v < target) {
328     v += dt * accel;
329     if (v > target) v = target;
330   }
331   return v;
332 }
333
334 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
335
336 void FGTurbine::SetDefaults(void)
337 {
338   Name = "Not defined";
339   N1 = N2 = 0.0;
340   Type = etTurbine;
341   MilThrust = 10000.0;
342   MaxThrust = 10000.0;
343   BypassRatio = 0.0;
344   TSFC = 0.8;
345   ATSFC = 1.7;
346   IdleN1 = 30.0;
347   IdleN2 = 60.0;
348   MaxN1 = 100.0;
349   MaxN2 = 100.0;
350   Augmented = 0;
351   AugMethod = 0;
352   Injected = 0;
353   BleedDemand = 0.0;
354   ThrottlePos = 0.0;
355   AugmentCmd = 0.0;
356   InletPosition = 1.0;
357   NozzlePosition = 1.0;
358   Augmentation = false;
359   Injection = false;
360   Reversed = false;
361   Cutoff = true;
362   phase = tpOff;
363   Stalled = false;
364   Seized = false;
365   Overtemp = false;
366   Fire = false;
367   EGT_degC = 0.0;
368 }
369
370 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
371
372 bool FGTurbine::Load(FGConfigFile *Eng_cfg)
373 {
374   string token;
375
376   Name = Eng_cfg->GetValue("NAME");
377   Eng_cfg->GetNextConfigLine();
378   int counter=0;
379
380   while ( ((token = Eng_cfg->GetValue()) != string("/FG_TURBINE")) &&
381           (token != string("/FG_SIMTURBINE")) ) {
382     *Eng_cfg >> token;
383
384     if (token[0] == '<') token.erase(0,1); // Tables are read "<TABLE"
385
386     if      (token == "MILTHRUST") *Eng_cfg >> MilThrust;
387     else if (token == "MAXTHRUST") *Eng_cfg >> MaxThrust;
388     else if (token == "BYPASSRATIO") *Eng_cfg >> BypassRatio;
389     else if (token == "BLEED") *Eng_cfg >> BleedDemand;
390     else if (token == "TSFC") *Eng_cfg >> TSFC;
391     else if (token == "ATSFC") *Eng_cfg >> ATSFC;
392     else if (token == "IDLEN1") *Eng_cfg >> IdleN1;
393     else if (token == "IDLEN2") *Eng_cfg >> IdleN2;
394     else if (token == "MAXN1") *Eng_cfg >> MaxN1;
395     else if (token == "MAXN2") *Eng_cfg >> MaxN2;
396     else if (token == "AUGMENTED") *Eng_cfg >> Augmented;
397     else if (token == "AUGMETHOD") *Eng_cfg >> AugMethod;
398     else if (token == "INJECTED") *Eng_cfg >> Injected;
399     else if (token == "MINTHROTTLE") *Eng_cfg >> MinThrottle;
400     else if (token == "TABLE") {
401       if (counter++ == 0) Debug(2); // print engine specs prior to table read
402       ThrustTables.push_back( new FGCoefficient(FDMExec) );
403       ThrustTables.back()->Load(Eng_cfg);
404     }
405     else cerr << "Unhandled token in Engine config file: " << token << endl;
406     if (token == "EOF") return false;
407   }
408
409   // Pre-calculations and initializations
410
411   delay = 60.0 / (BypassRatio + 3.0);
412   N1_factor = MaxN1 - IdleN1;
413   N2_factor = MaxN2 - IdleN2;
414   OilTemp_degK = (Auxiliary->GetTotalTemperature() - 491.69) * 0.5555556 + 273.0;
415   IdleFF = pow(MilThrust, 0.2) * 107.0;  // just an estimate
416
417   bindmodel();
418   return true;
419 }
420
421 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
422
423 string FGTurbine::GetEngineLabels(string delimeter)
424 {
425   std::ostringstream buf;
426
427   buf << Name << "_N1[" << EngineNumber << "]" << delimeter
428       << Name << "_N2[" << EngineNumber << "]" << delimeter
429       << Thruster->GetThrusterLabels(EngineNumber, delimeter);
430
431   return buf.str();
432 }
433
434 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
435
436 string FGTurbine::GetEngineValues(string delimeter)
437 {
438   std::ostringstream buf;
439
440   buf << N1 << delimeter
441       << N2 << delimeter
442       << Thruster->GetThrusterValues(EngineNumber, delimeter);
443
444   return buf.str();
445 }
446
447 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
448
449 void FGTurbine::bindmodel()
450 {
451   char property_name[80];
452
453   snprintf(property_name, 80, "propulsion/engine[%u]/n1", EngineNumber);
454   PropertyManager->Tie( property_name, &N1);
455   snprintf(property_name, 80, "propulsion/engine[%u]/n2", EngineNumber);
456   PropertyManager->Tie( property_name, &N2);
457   snprintf(property_name, 80, "propulsion/engine[%u]/fuel-flow", EngineNumber);
458   PropertyManager->Tie( property_name, &FuelFlow_pph);
459 }
460
461 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
462
463 void FGTurbine::unbind()
464 {
465   char property_name[80];
466
467   snprintf(property_name, 80, "propulsion/engine[%u]/n1", EngineNumber);
468   PropertyManager->Untie(property_name);
469   snprintf(property_name, 80, "propulsion/engine[%u]/n2", EngineNumber);
470   PropertyManager->Untie(property_name);
471   snprintf(property_name, 80, "propulsion/engine[%u]/fuel-flow", EngineNumber);
472   PropertyManager->Untie( property_name);
473 }
474
475 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
476 //    The bitmasked value choices are as follows:
477 //    unset: In this case (the default) JSBSim would only print
478 //       out the normally expected messages, essentially echoing
479 //       the config files as they are read. If the environment
480 //       variable is not set, debug_lvl is set to 1 internally
481 //    0: This requests JSBSim not to output any messages
482 //       whatsoever.
483 //    1: This value explicity requests the normal JSBSim
484 //       startup messages
485 //    2: This value asks for a message to be printed out when
486 //       a class is instantiated
487 //    4: When this value is set, a message is displayed when a
488 //       FGModel object executes its Run() method
489 //    8: When this value is set, various runtime state variables
490 //       are printed out periodically
491 //    16: When set various parameters are sanity checked and
492 //       a message is printed out when they go out of bounds
493
494 void FGTurbine::Debug(int from)
495 {
496   if (debug_lvl <= 0) return;
497
498   if (debug_lvl & 1) { // Standard console startup message output
499     if (from == 0) { // Constructor
500
501     }
502     if (from == 2) { // called from Load()
503       cout << "\n    Engine Name: "         << Name << endl;
504       cout << "      MilThrust:   "         << MilThrust << endl;
505       cout << "      MaxThrust:   "         << MaxThrust << endl;
506       cout << "      BypassRatio: "         << BypassRatio << endl;
507       cout << "      TSFC:        "         << TSFC << endl;
508       cout << "      ATSFC:       "         << ATSFC << endl;
509       cout << "      IdleN1:      "         << IdleN1 << endl;
510       cout << "      IdleN2:      "         << IdleN2 << endl;
511       cout << "      MaxN1:       "         << MaxN1 << endl;
512       cout << "      MaxN2:       "         << MaxN2 << endl;
513       cout << "      Augmented:   "         << Augmented << endl;
514       cout << "      AugMethod:   "         << AugMethod << endl;
515       cout << "      Injected:    "         << Injected << endl;
516       cout << "      MinThrottle: "         << MinThrottle << endl;
517
518       cout << endl;
519     }
520   }
521   if (debug_lvl & 2 ) { // Instantiation/Destruction notification
522     if (from == 0) cout << "Instantiated: FGTurbine" << endl;
523     if (from == 1) cout << "Destroyed:    FGTurbine" << endl;
524   }
525   if (debug_lvl & 4 ) { // Run() method entry print for FGModel-derived objects
526   }
527   if (debug_lvl & 8 ) { // Runtime state variables
528   }
529   if (debug_lvl & 16) { // Sanity checking
530   }
531   if (debug_lvl & 64) {
532     if (from == 0) { // Constructor
533       cout << IdSrc << endl;
534       cout << IdHdr << endl;
535     }
536   }
537 }
538 }