RD-36-51A_0.xml 29.8 KB
Newer Older
1
<?xml version="1.0" encoding="UTF-8"?>
2 3

<!DOCTYPE system [
4 5
 <!ENTITY IND "0">
 <!ENTITY CONTACT_IND "24">
6
 <!ENTITY U "propulsion/engine[&IND;]">
7
 <!ENTITY CONTACT "gear/unit[&CONTACT_IND;]">
8 9
]>

10 11
<system name="Tu-144 engine: RD-36-51A">

12 13 14
 <!-- FIXME Temporary -->
 <property value="&IND;">&U;/index</property>

15 16

 <!-- XXX Before implementing NK-144, make as much code as possible shared. -->
17
 <!-- FIXME Make electrical generator and pump consume fuel. -->
18

19 20
 <property>&U;/n2-mechanical</property>
 <property>&U;/set-running</property>
21
 <property>&U;/MilThrust</property>
22

23 24 25 26
 <property>&U;/panel/lever/throttle/force-kgf</property>
 <property>&U;/panel/lever/throttle/IMAT-deg_sec</property>
 <property>propulsion/panel/lever/throttle-lock</property>

27 28 29
 <property>&U;/inlet-efficiency-norm</property>
 <property>&U;/inlet-air-temp-degC</property>
 <property>&U;/inlet-air-temp-K</property>
30
 <property>propulsion/inlet[&IND;]/panel/light/fault</property>
31 32 33
 <property>&U;/bleed/power-norm</property><!-- FIXME Move bleed consumer to APD -->
 <property>&U;/elec/gen/command</property>
 <property>&U;/elec/DC27-V</property>
34
 <property>&U;/elec/AC36-V</property>
35 36 37
 <property>&U;/elec/gen/I-A</property>
 <property value="1">&U;/panel/lever/cutoff</property>
 <property>&U;/panel/switch/fuel</property>
38
 <!-- -1: reconnect, 0: neutral, 1: disconnect -->
39
 <property>&U;/panel/switch/accessory-disconnect</property>
40 41
 <property value="1">&U;/panel/switch/instrumentation</property>
 <property>propulsion/panel/switch/noise-abatement</property>
42 43 44 45 46
 <property>&U;/panel/button/relight</property>
 <property>&U;/panel/button/test-lights</property>
 <property>&U;/startup/start</property>
 <property>&U;/startup/abort</property>
 <property>&U;/startup/ignition</property>
47
 <property>&U;/fuel/pressure-kgf_cm2</property>
48 49
 <property>&U;/fuel-flow-rate-t_h</property>

50 51 52 53
 <property>&U;/panel/lever/reverser/pos-deg</property>
 <property>&U;/throttle/reverser-deg</property>
 <property>&U;/reverser/pos-deg</property>

54
 <property value="22.0">&U;/oil/fill-kg</property>
55

56 57 58 59
 <property>&U;/fire/valve</property>
 <property>&U;/fire/KSA-valve</property>
 <property>&U;/fire/extinguishing</property>
 <property>&U;/fire/KSA-extinguishing</property>
60

61

62
 <property>simulation/init</property>
63 64
 <property>simulation/repair</property>
 <property>simulation/refill</property>
65
 <property>simulation/init-hotstart-engines</property>
66

67 68 69 70
 <!-- Target position for init and setting. -->
 <property>&U;/panel/lever/throttle/set-deg</property>
 <!-- Command to set the throttle to the target value, can be used e.g. for copilot/engineer. -->
 <property>&U;/panel/lever/throttle/set</property>
71 72 73


 <property>systems/airframe/damage/break</property>
74 75


76 77 78 79 80
 <!-- BAND-AIDS -->

 <!-- Output for engine file -->
 <!-- Normally, there is no need to do that, but JSBSim authors like to create
      exceptions: you can not define properties in engine file.  -->
81
 <property>&U;/capacity-norm</property>
82 83

 <!-- Table lookup -->
84 85 86 87
 <property>&U;/accessory/n-norm</property>
 <property>&U;/compressor-stall-norm</property>
 <property>&U;/n2</property>
 <property>&U;/n2-mechanical</property>
88
 <property>&U;/damage/damage-norm</property>
89
 <property>&U;/status/noise-abatement</property>
90 91


92 93
 <channel name="Throttle (slow)" execrate="2">

94
  <fcs_function name="&U;/throttle/func/set-kgf">
95 96 97
   <function>
    <product>
     <difference>
98
      <p>&U;/panel/lever/throttle/set-deg</p>
99 100 101 102 103 104
      <p>&U;/panel/lever/throttle/pos-deg</p>
     </difference>
     <v>10.0</v>
    </product>
   </function>
   <clipto>
105 106
    <min>-5.0</min>
    <max>5.0</max>
107 108 109 110 111 112
   </clipto>
  </fcs_function>

 </channel>


113 114
 <channel name="Throttle">

115 116 117 118 119 120 121 122 123 124 125 126
  <switch name="&U;/throttle/force-kgf">
   <default value="&U;/panel/lever/throttle/force-kgf"/>
   <test value="&U;/throttle/func/set-kgf">
    simulation/sim-time-sec LT 1.0
   </test>
   <test logic="AND" value="&U;/throttle/func/set-kgf">
    &U;/panel/lever/throttle/set NE 0
    &U;/panel/lever/throttle/force-kgf GT -1.0
    &U;/panel/lever/throttle/force-kgf LT 1.0
   </test>
  </switch>

127
  <pure_gain name="&U;/throttle/pilot-deg_sec">
128
   <input>&U;/throttle/force-kgf</input>
129 130 131 132 133 134 135
   <gain>9.0</gain>
  </pure_gain>

  <switch name="&U;/throttle/input-deg_sec">
   <default value="&U;/panel/lever/throttle/IMAT-deg_sec"/>
   <test logic="OR" value="&U;/throttle/pilot-deg_sec">
    <!-- = 6.0 / 3 [ABSU 3 p. 4] -->
136 137
    &U;/throttle/force-kgf LE -1.0
    &U;/throttle/force-kgf GE 1.0
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
    fcs/status/standby EQ 0
   </test>
  </switch>

  <summer name="&U;/throttle/c1-max">
   <bias>90.0</bias>
   <input>-&U;/panel/lever/throttle/pos-deg</input>
  </summer>

  <switch name="&U;/throttle/c1">
   <default value="&U;/throttle/c1-max"/>
   <test value="0.0">
    propulsion/panel/lever/throttle-lock NE 0
   </test>
   <test value="&U;/panel/lever/throttle/pos-deg">
    &U;/throttle/input-deg_sec LT 0.0
   </test>
   <clipto>
    <min>0.0</min>
    <max>1.0</max>
   </clipto>
  </switch>

  <integrator name="&U;/panel/lever/throttle/pos-deg">
   <input>&U;/throttle/input-deg_sec</input>
   <c1>&U;/throttle/c1</c1>
   <clipto>
    <min>0.0</min>
    <max>90.0</max>
   </clipto>
  </integrator>

  <switch name="&U;/throttle/throttle-deg">
   <default value="&U;/panel/lever/throttle/pos-deg"/>
172 173
   <test value="&U;/throttle/reverser-deg">
    &U;/panel/lever/throttle/pos-deg LT 0.1
174 175 176 177 178 179
   </test>
  </switch>

 </channel>


180
 <channel name="Startup" execrate="4">
181

182 183 184 185
  <switch name="&U;/starter">
   <output>propulsion/air/as[0]/starter-norm[&IND;]</output>
   <output>propulsion/air/APD/starter[&IND;]</output>
   <default value="&U;/starter"/>
186
   <test logic="OR" value="0">
187 188 189 190
    &U;/status/standby EQ 0
    &U;/bleed/power-norm LT 0.75
    &U;/set-running NE 0
    &U;/startup/abort NE 0
191
   </test>
192 193
   <!-- Dry motoring stop. -->
   <test logic="AND" value="0">
194 195
    &U;/ignition EQ 0
    &U;/n2-mechanical GE 17.0
196
   </test>
197 198
   <!-- Startup failure. -->
   <test logic="AND" value="0">
199
    &U;/cutoff NE 0
200
    &U;/n2 GE 25.0
201 202
   </test>
   <test value="1">
203
    &U;/startup/start NE 0
204 205 206
   </test>
  </switch>

207 208
  <switch name="&U;/ignition">
   <default value="&U;/ignition"/>
209
   <test value="1">
210
    &U;/set-running NE 0
211
   </test>
212 213
   <test logic="AND" value="&U;/status/ignition-ok">
    &U;/startup/ignition NE 0
214
    &U;/startup/start NE 0
215 216 217
   </test>
  </switch>

218 219
  <switch name="&U;/relight">
   <default value="&U;/relight"/>
220
   <test logic="OR" value="0">
221 222
    &U;/status/standby EQ 0
    &U;/set-running NE 0
223
    &U;/n2-mechanical LT 15.0
224
    &U;/status/ignition-ok EQ 0
225 226
   </test>
   <test logic="AND" value="1">
227
    &U;/panel/button/relight NE 0
228 229 230
   </test>
  </switch>

231 232
  <switch name="&U;/cutoff">
   <default value="&U;/cutoff"/>
233
   <test value="0">
234
    simulation/init-hotstart-engines NE 0
235
   </test>
236
   <test value="1">
237
    &U;/n2 LT 15.0
238 239
   </test>
   <test logic="OR" value="1">
240 241
    &U;/panel/lever/cutoff NE 0
    &U;/ignition EQ 0
242
    &U;/fuel/pressure-firevalve-kgf_cm2 LT 1.0
243
   </test>
244
   <test logic="AND" value="0">
245 246
    &U;/starter NE 0
    &U;/status/standby NE 0
247 248
   </test>
   <test logic="AND" value="0">
249 250
    &U;/relight NE 0
    &U;/status/standby NE 0
251
   </test>
Михаил Данилов's avatar
Михаил Данилов committed
252
<!--
253
   <test logic="OR" value="1">
254 255
    &U;/set-running EQ 0
    &U;/compressor-stall-norm EQ 1.0
256
   </test>
Михаил Данилов's avatar
Михаил Данилов committed
257
-->
258 259 260 261 262
  </switch>

 </channel>


263
 <channel name="Inlet communication" execrate="2">
264

265
  <pure_gain name="propulsion/inlet[&IND;]/n2">
266
   <gain>1.0</gain>
267
   <input>&U;/n2</input>
268 269 270 271 272
  </pure_gain>

 </channel>


273
 <channel name="Functions" execrate="2">
274 275 276

  <!-- TODO Add a bit of first derivative. -->

277
  <fcs_function name="&U;/n2-mechanical-theoretical">
278 279 280 281
   <!-- Inverse of modified RPM that JSBSim uses. -->
   <!-- Modified RPM N_r = N \sqrt{\frac{T_0}{T}}, T_0 = 288 K [Bliznyuk p. 126]-->
   <function>
    <product>
282
     <p>&U;/n2</p>
283 284 285
     <sqrt>
      <quotient>
       <max><!-- Sanitised -->
286
        <p>&U;/inlet-air-temp-K</p>
287 288 289 290 291 292 293 294 295
        <v>1</v>
       </max>
       <v>288</v>
      </quotient>
     </sqrt>
    </product>
   </function>
  </fcs_function>

296
  <fcs_function name="&U;/n2-mechanical-limited">
297 298
   <function>
    <min>
299
     <p>&U;/n2-mechanical-theoretical</p>
300
     <table><!-- RPM drop (due to turbine cooling?) -->
301 302
      <independentVar lookup="row">&U;/inlet-air-temp-degC</independentVar>
      <independentVar lookup="column">&U;/n2</independentVar>
303 304 305 306 307 308 309 310 311 312 313
      <tableData>
		40.0	90.0
	54.999	500.0	500.0
	55.0	45.5	95.5
	160.0	43.5	93.5
      </tableData>
     </table>
    </min>
   </function>
  </fcs_function>

314
  <!-- TODO Effect of bypass, bleed, turbine cooling and stall. -->
315 316
  <lag_filter name="&U;/n2-mechanical">
   <output>&U;/panel/gauge/n</output>
317
   <c1>5</c1>
318
   <input>&U;/n2-mechanical-limited</input>
319 320
  </lag_filter>

321
  <fcs_function name="&U;/capacity-norm">
322 323
   <function>
    <product>
324
     <p>&U;/inlet-efficiency-norm</p>
325
     <quotient>
326
      <p>&U;/n2-mechanical-limited</p>
327
       <max><!-- Sanitised -->
328
        <p>&U;/n2-mechanical-theoretical</p>
329 330 331
        <v>0.0001</v>
       </max>
     </quotient>
332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347
     <table>
      <independentVar lookup="row">&U;/reverser/pos-deg</independentVar>
      <independentVar lookup="column">&U;/n2</independentVar>
      <independentVar lookup="table">velocities/mach</independentVar>
      <tableData breakPoint="0.0">
		40.0	90.0
	90.0	1.0	1.0
	135.0	1.0	0.0
      </tableData>
      <tableData breakPoint="0.04">
		40.0	90.0
	90.0	1.0	1.0
	135.0	1.0	1.0
      </tableData>
     </table>

348 349 350 351
    </product>
   </function>
  </fcs_function>

352
  <fcs_function name="&U;/compressor-stall-norm">
353 354
   <function>
    <table>
355 356
     <independentVar lookup="row">&U;/capacity-norm</independentVar>
     <independentVar lookup="column">&U;/n2</independentVar>
357 358 359 360 361 362 363 364 365 366 367
     <tableData>
		40.0	90.0
	0.5	0.0	1.0
	0.75	0.0	0.5
	1.0	0.0	0.0
     </tableData>
    </table>
   </function>
  </fcs_function>

  <!-- TODO Add more resonances -->
368
  <fcs_function name="&U;/vibration-mm_s">
369 370
   <function>
    <table>
371 372
     <independentVar lookup="row">&U;/n2-mechanical</independentVar>
     <independentVar lookup="column">&U;/compressor-stall-norm</independentVar>
373 374
     <independentVar lookup="table">&U;/damage/damage-norm</independentVar>
     <tableData breakPoint="0.65">
375 376 377 378 379 380 381
		0.0	0.75	1.0
	0.0	0.0	0.0	0.0
	25.0	30.0	30.0	30.0
	30.0	95.0	95.0	95.0
	35.0	30.0	30.0	50.0
	95.5	25.0	25.0	150.0
     </tableData>
382 383 384 385 386 387 388 389
     <tableData breakPoint="1.0">
		0.0	0.75	1.0
	0.0	0.0	0.0	0.0
	25.0	30.0	30.0	30.0
	30.0	95.0	95.0	95.0
	35.0	100.0	150.0	200.0
	95.5	100.0	150.0	200.0
     </tableData>
390 391 392 393
    </table>
   </function>
  </fcs_function>

394
  <switch name="&U;/bypass-valves">
395 396
   <default value="1"/>
   <test value="0">
397
    &U;/n2 GE 58.1
398 399 400
   </test>
  </switch>

401
  <switch name="&U;/turbine-cooling">
402 403
   <default value="0"/>
   <test value="1">
404
    &U;/n2 GE 71.0
405 406 407
   </test>
  </switch>

408 409
  <pure_gain name="&U;/n-norm">
   <input>&U;/n2-mechanical</input>
410 411 412
   <gain>0.01047</gain><!-- = 1 / 95.5 -->
  </pure_gain>

413
  <fcs_function name="&U;/thrust-norm">
414 415 416
   <function>
    <product>
     <abs>
417
      <p>&U;/thrust-lbs</p>
418 419 420 421 422
     </abs>
     <v>0.00002267959403526676</v><!-- = 1 / milthrust = 1 / 44092.5, see engine file -->
    </product>
   </function>
  </fcs_function>
423

424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439
  <fcs_function name="&U;/thrust-relative-norm">
   <function>
    <quotient>
     <p>&U;/thrust-norm</p>
     <max>
      <p>&U;/MilThrust</p>
      <v>0.01</v>
     </max>
    </quotient>
   </function>
   <clipto>
    <min>0.0</min>
    <max>1.0</max>
   </clipto>
  </fcs_function>

440 441 442 443 444 445 446 447 448 449 450 451 452 453 454
  <fcs_function name="&U;/exhaust-noise-norm">
   <function>
    <product>
     <p>&U;/thrust-norm</p>
    <table>
     <independentVar lookup="row">&U;/status/noise-abatement</independentVar>
     <tableData>
	0	1.0
	1	0.5
     </tableData>
    </table>
    </product>
   </function>
  </fcs_function>

455 456 457
 </channel>


458
 <channel name="Accessory drive" execrate="4">
459

460 461
  <switch name="systems/hydr/source/engine[&IND;]/running">
   <default value="&U;/set-running"/>
462 463
  </switch>

464 465
  <switch name="&U;/accessory/disconnect">
   <default value="&U;/accessory/disconnect"/>
466
   <test value="0">
467
    simulation/repair NE 0
468
   </test>
469 470 471 472
   <test logic="AND" value="0">
    &U;/status/standby NE 0
    &U;/panel/switch/accessory-disconnect EQ -1
   </test>
473
   <test logic="AND" value="1">
474
    &U;/status/standby NE 0
475
    &U;/panel/switch/accessory-disconnect EQ 1
476 477 478
   </test>
  </switch>

479
  <switch name="&U;/accessory/connected">
480
   <default value="1"/>
481 482
   <test value="&U;/accessory/connected">
    &U;/status/standby EQ 0
483 484
   </test>
   <test logic="OR" value="0">
485 486 487
    &U;/starter NE 0
    &U;/relight NE 0
    &U;/accessory/disconnect NE 0
488
    &U;/fire/KSA-valve EQ 0
489 490 491
   </test>
  </switch>

492
  <fcs_function name="&U;/accessory/src-n">
493 494
   <function>
    <table>
495 496
     <independentVar lookup="row">&U;/n2-mechanical</independentVar>
     <independentVar lookup="column">&U;/accessory/connected</independentVar>
497 498 499
     <tableData>
		0	1
        0.0     0.0	0.0
500 501 502
        30.0    0.0	95.5
        95.5    0.0	95.6
        100.0   0.0	95.9
503 504 505 506 507
     </tableData>
    </table>
   </function>
  </fcs_function>

508 509 510
  <lag_filter name="&U;/accessory/n">
   <output>&U;/panel/gauge/accessory-n</output>
   <input>&U;/accessory/src-n</input>
511 512 513
   <c1>2</c1>
  </lag_filter>

514 515
  <aerosurface_scale name="&U;/accessory/n-norm">
   <input>&U;/accessory/n</input>
516 517 518 519 520 521 522
   <domain><min>0.0</min><max>95.5</max></domain>
   <range><min>0.0</min><max>1.0</max></range>
  </aerosurface_scale>

 </channel>


523
 <channel name="Nozzle" execrate="4">
524

525
  <fcs_function name="&U;/nozzle/target-deg">
526 527
   <function>
    <table>
528 529
     <independentVar lookup="row">&U;/n2</independentVar>
     <independentVar lookup="column">&U;/reverser/pos-deg</independentVar>
530
     <tableData>
531 532 533 534
		1.0	10.0
	59.4	105.0	105.0
	71.0	20.0	105.0
	95.5	0.0	105.0
535 536 537 538 539
     </tableData>
    </table>
   </function>
  </fcs_function>

540 541
  <lag_filter name="&U;/nozzle/pos-deg">
   <input>&U;/nozzle/target-deg</input>
542 543 544
   <c1>5</c1>
  </lag_filter>

545 546
  <aerosurface_scale name="&U;/nozzle/pos-norm">
   <input>&U;/nozzle/pos-deg</input>
547 548 549 550 551 552 553
   <domain><min>0.0</min><max>105.0</max></domain>
   <range><min>0.0</min><max>1.0</max></range>
  </aerosurface_scale>

 </channel>


554
 <channel name="Status" execrate="4">
555

556 557
  <switch name="&U;/status/standby">
   <output>propulsion/air/APD/standby[&IND;]</output>
558 559
   <default value="0"/>
   <test value="1">
560
    &U;/elec/DC27-V GE 20.0
561 562 563
   </test>
  </switch>

564 565 566 567 568 569 570
  <switch name="&U;/status/ignition-ok">
   <default value="0"/>
   <test value="&U;/status/standby">
    &U;/elec/AC36-V GE 18.0
   </test>
  </switch>

571 572 573 574 575 576 577 578 579 580 581 582 583 584 585
  <switch name="&U;/status/on">
   <default value="&U;/panel/switch/instrumentation"/>
   <test value="0">
    &U;/status/standby EQ 0
   </test>
  </switch>

  <switch name="&U;/status/noise-abatement">
   <default value="propulsion/panel/switch/noise-abatement"/>
   <test logic="OR" value="0">
    &U;/status/standby EQ 0
    &U;/reverser/pos-deg GT 1.0
   </test>
  </switch>

586 587 588
 </channel>


589
 <channel name="Electric consumers" execrate="4">
590

591
  <fcs_function name="&U;/elec/DC27-A">
592 593 594
   <function>
    <sum>
     <product>
595
      <p>&U;/elec/DC27-V</p>
596 597
      <sum>
       <product>
598
        <p>&U;/status/on</p>
599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627
        <!-- 100W on 24V, assumed -->
        <v>0.174</v>
       </product>
      </sum>
     </product>
    </sum>
   </function>
  </fcs_function>

  <!-- Трансформатор зажигания ТСЗ-0,75 -->
  <fcs_function name="&U;/elec/AC36-A">
   <function>
    <sum>
     <product>
      <p>&U;/elec/AC36-V</p>
      <sum>
       <product>
        <p>&U;/status/ignition-ok</p>
        <p>&U;/starter</p>
        <gt>
         <p>&U;/n2-mechanical</p>
         <v>17.0</v>
        </gt>
        <lt>
         <p>&U;/n2-mechanical</p>
         <v>25.0</v>
        </lt>
        <!-- 0.75A on 36V, assumed -->
        <v>0.0208</v>
628 629 630 631 632 633 634 635 636 637
       </product>
      </sum>
     </product>
    </sum>
   </function>
  </fcs_function>

 </channel>


638
 <channel name="Electric generators" execrate="4">
639

640
  <fcs_function name="&U;/elec/gen/U-V">
641 642
   <function>
    <product>
643
     <p>&U;/status/standby</p>
644
     <abs><p>&U;/elec/gen/command</p></abs>
645
     <p>&U;/accessory/n-norm</p>
646
     <table>
647 648
      <independentVar lookup="row">&U;/elec/gen/I-A</independentVar>
      <independentVar lookup="column">&U;/elec/DC27-V</independentVar><!-- Excitation -->
649
      <tableData>
650
		0.0	16.0
651 652 653
	0.0	0.0	210.0
	110.0	0.0	202.0
	1100.0	0.0	0.0
654 655 656 657 658 659 660 661 662
      </tableData>
     </table>
    </product>
   </function>
  </fcs_function>

 </channel>


663
 <channel name="Hydraulic pumps" execrate="4">
664 665 666

  <!-- NP89 pumps (type assumed from Tu-154) -->
  <!-- Both use the same var -->
667

668
  <pure_gain name="&U;/hydr/capacity-coeff">
669
   <!-- Looped perf: 50 l/min at 150 kgf/cm^2 [Flight Manual] -->
670 671
   <output>systems/hydr/source/engine[&IND;]/capacity-coeff</output>
   <input>&U;/accessory/n-norm</input>
672 673
   <gain>0.0139</gain><!-- = 50/(210-150)^2 -->
  </pure_gain>
674 675 676 677

 </channel>


678
 <channel name="Bleed" execrate="4">
679

680 681
  <fcs_function name="&U;/bleed/source/capacity-norm">
   <output>propulsion/air/source/engine[&IND;]/capacity-norm</output>
682 683
   <function>
    <table>
684
     <independentVar lookup="row">&U;/n2</independentVar>
685
     <tableData>
686 687 688
	0.0	0.0
	40.0	1.0
	53.0	2.0
689 690 691 692 693 694 695 696
     </tableData>
    </table>
   </function>
  </fcs_function>

 </channel>


697
 <channel name="EGT" execrate="4">
698

699
  <fcs_function name="&U;/egt/running-degC">
700 701 702 703
   <function>
    <sum>
     <!-- SIC Dry motoring already accounted for: the table is zero for its RPM (~25%) -->
     <table>
704
      <independentVar lookup="row">&U;/n2-mechanical</independentVar>
705 706 707
      <tableData>
	28.0	645.0
        36.0    445.0
708
        95.5    890.0
709 710 711
      </tableData>
     </table>
     <product>
712
      <p>&U;/bypass-valves</p>
713 714 715
      <v>15.0</v>
     </product>
     <product>
716
      <p>&U;/turbine-cooling</p>
717 718
      <v>30.0</v>
     </product>
719
     <product>
720
      <p>&U;/compressor-stall-norm</p>
721 722
      <v>100.0</v>
     </product>
723 724 725 726
    </sum>
   </function>
  </fcs_function>

727 728 729 730 731
  <switch name="&U;/egt/degC">
   <default value="&U;/inlet-air-temp-degC"/>
   <test logic="AND" value="&U;/egt/running-degC">
    &U;/set-running NE 0
    &U;/n2-mechanical GE 28.0
732
   </test>
733 734 735
   <test logic="AND" value="&U;/egt/running-degC">
    &U;/starter NE 0
    &U;/n2-mechanical GE 28.0
736 737 738 739 740 741
   </test>
  </switch>

 </channel>


742 743 744 745 746 747 748 749 750 751
 <channel name="Fuel" execrate="4">

  <pure_gain name="&U;/fuel/pressure-firevalve-kgf_cm2">
   <input>&U;/fuel/pressure-kgf_cm2</input>
   <gain>&U;/fire/valve</gain>
  </pure_gain>

 </channel>


752
 <channel name="Oil" execrate="4">
753

754
  <!-- Oil-fuel heat exchanger. -->
755
  <fcs_function name="&U;/oil/temp-TMR-degC">
756
   <function>
757
    <max>
758
     <p>&U;/inlet-air-temp-degC</p>
759 760 761 762 763 764 765 766 767 768 769 770 771 772
     <product>
      <p>&U;/set-running</p>
      <table>
       <independentVar lookup="row">&U;/n2</independentVar>
       <independentVar lookup="column">velocities/mach</independentVar>
       <tableData>
	0.0	2.3
0.0	0.0	0.0
40.0	75.0	165.0
90.0	110.0	155.0
       </tableData>
      </table>
     </product>
    </max>
773 774 775
   </function>
  </fcs_function>

776
  <switch name="&U;/oil/temp-c1">
777 778 779 780 781 782
   <default value="0.01"/>
   <test value="1.0">
    simulation/init NE 0
   </test>
  </switch>

783 784 785
  <lag_filter name="&U;/oil/temp-degC">
   <input>&U;/oil/temp-TMR-degC</input>
   <c1>&U;/oil/temp-c1</c1>
786 787
  </lag_filter>

788
  <fcs_function name="&U;/oil/burn_n-kg_s">
789
   <function>
790
    <table>
791 792
     <independentVar lookup="row">&U;/n2-mechanical</independentVar>
     <independentVar lookup="column">&U;/set-running</independentVar>
793 794
     <independentVar lookup="table">&U;/damage/damage-norm</independentVar>
     <tableData breakPoint = "0.0">
795 796 797 798
		0	1
	0.0	0.0	0.0
	100.0	0.0000417	0.000417
     </tableData>
799
     <tableData breakPoint = "0.5">
800 801
		0	1
	0.0	0.0	0.0
802 803 804 805 806 807
	100.0	0.0000834	0.000834
     </tableData>
     <tableData breakPoint = "0.9">
		0	1
	0.0	0.0417	0.0417
	100.0	0.0417	0.417
808 809
     </tableData>
    </table>
810 811 812
   </function>
  </fcs_function>

813 814 815
  <switch name="&U;/oil/burn-kg_s">
   <default value="&U;/oil/burn_n-kg_s"/>
   <test value="-&U;/oil/used-kg">
816
    simulation/refill NE 0
817 818 819
   </test>
   <test logic="OR" value="0.0">
    &U;/oil/level-kg LE 0.0
820
    &U;/damage/func/fire/valve-sec GT 15.0
821 822 823
   </test>
  </switch>

824 825
  <integrator name="&U;/oil/used-kg">
   <input>&U;/oil/burn-kg_s</input>
826 827 828
   <c1>1.0</c1>
  </integrator>

829 830 831
  <summer name="&U;/oil/level-kg">
   <input>&U;/oil/fill-kg</input>
   <input>-&U;/oil/used-kg</input>
832 833
  </summer>

834
  <fcs_function name="&U;/oil/pressure-kgf_cm2">
835
   <function>
836 837
    <sum>
     <table>
838 839
      <independentVar lookup="row">&U;/n2-mechanical</independentVar>
      <independentVar lookup="column">&U;/oil/level-kg</independentVar>
840
      <tableData>
841 842 843
		0.0	10.0
	0.0	0.0	0.00
	30.0	0.0	3.10
844 845 846 847 848 849 850
	95.5	0.0	5.0
      </tableData>
     </table>
     <!-- Change with acceleration: ~ 1 kgf/g. -->
     <p>accelerations/Nz</p>
     <v>-1.0</v>
    </sum>
851
   </function>
852 853 854 855
   <clipto>
    <min>0.0</min>
    <max>20.0</max>
   </clipto>
856 857
  </fcs_function>

858
  <switch name="&U;/seized_">
859
   <default value="0"/>
860
   <test logic="OR" value="1">
861
    &U;/oil/level-kg LT 0.1
862
    &U;/damage/structural NE 0
863 864 865
   </test>
  </switch>

866 867 868
 </channel>


869
 <channel name="Gauges" execrate="4">
870

871 872
  <pure_gain name="&U;/panel/gauge/egt-degC">
   <input>&U;/egt/degC</input>
873
   <gain>&U;/status/on</gain>
874
  </pure_gain>
875

876
  <pure_gain name="propulsion/instr/UIZ/fuel-pressure-kgf_cm2[&IND;]">
877
   <input>&U;/fuel/pressure-firevalve-kgf_cm2</input>
878
   <gain>&U;/status/on</gain>
879
  </pure_gain>
880

881 882
  <pure_gain name="propulsion/instr/UIZ/oil-pressure-kgf_cm2[&IND;]">
   <input>&U;/oil/pressure-kgf_cm2</input>
883
   <gain>&U;/status/on</gain>
884
  </pure_gain>
885

886 887
  <pure_gain name="propulsion/instr/UIZ/oil-temp-degC[&IND;]">
   <input>&U;/oil/temp-degC</input>
888
   <gain>&U;/status/on</gain>
889
  </pure_gain>
890

891 892 893 894 895 896
  <switch name="&U;/panel/gauge/nozzle-pos-deg">
   <default value="&U;/nozzle/pos-deg"/>
   <test value="&U;/panel/gauge/nozzle-pos-deg">
    &U;/status/on EQ 0
   </test>
  </switch>
897

898
  <switch name="&U;/panel/gauge/throttle-pos-deg">
899
   <default value="&U;/panel/lever/throttle/pos-deg"/>
900 901 902
   <test value="&U;/panel/gauge/throttle-pos-deg">
    &U;/status/on EQ 0
   </test>
903 904 905
   <test value="-&U;/panel/lever/reverser/pos-deg">
    &U;/panel/lever/throttle/pos-deg LT 0.1
   </test>
906 907
  </switch>

908 909 910 911 912 913
  <switch name="&U;/panel/gauge/oil-kg">
   <default value="&U;/oil/level-kg"/>
   <test value="&U;/panel/gauge/oil-kg">
    &U;/status/on EQ 0
   </test>
  </switch>
914 915 916 917

 </channel>


918
 <channel name="Lights" execrate="4">
919

920 921 922 923 924 925 926 927
  <switch name="&U;/panel/light/cutoff">
   <default value="0"/>
   <test logic="OR" value="&U;/status/standby">
    &U;/panel/lever/cutoff NE 0
    &U;/panel/button/test-lights NE 0
   </test>
  </switch>

928 929 930 931 932 933 934 935
  <switch name="&U;/panel/light/relight">
   <default value="0"/>
   <test logic="OR" value="&U;/status/standby">
    &U;/relight NE 0
    &U;/panel/button/test-lights NE 0
   </test>
  </switch>

936
  <switch name="&U;/panel/light/stall-protection">
937
   <default value="0"/>
938
   <test value="&U;/status/on">
939
    &U;/panel/button/test-lights NE 0
940 941 942
   </test>
  </switch>

943
  <switch name="&U;/panel/light/oil-low">
944
   <default value="0"/>
945
   <test value="&U;/status/on">
946
    &U;/oil/level-kg LT 10.0
947
   </test>
948
   <test value="&U;/status/on">
949
    &U;/panel/button/test-lights NE 0
950 951 952
   </test>
  </switch>

953
  <switch name="&U;/panel/light/oil-high">
954
   <default value="0"/>
955
   <test value="&U;/status/on">
956
    &U;/oil/level-kg GT 33.0
957
   </test>
958
   <test value="&U;/status/on">
959
    &U;/panel/button/test-lights NE 0
960 961 962
   </test>
  </switch>

963 964 965
  <switch name="&U;/panel/light/oil-debris">
   <default value="0"/>
   <test value="&U;/status/on">
966
    &U;/damage/damage-norm GT 0.35
967 968 969 970 971 972
   </test>
   <test value="&U;/status/on">
    &U;/panel/button/test-lights NE 0
   </test>
  </switch>

973
  <switch name="&U;/panel/light/stall">
974
   <default value="0"/>
975
   <test value="&U;/status/on">
976
    &U;/compressor-stall-norm GE 0.5
977
   </test>
978
   <test value="&U;/status/on">
979
    &U;/panel/button/test-lights NE 0
980 981 982
   </test>
  </switch>

983
  <switch name="&U;/panel/light/vibration">
984
   <default value="0"/>
985
   <test value="&U;/status/on">
986
    &U;/vibration-mm_s GE 40.0
987
   </test>
988
   <test value="&U;/status/on">
989
    &U;/panel/button/test-lights NE 0
990 991 992
   </test>
  </switch>

993
  <switch name="&U;/panel/light/EGT-critical">
994
   <default value="0"/>
995
   <test value="&U;/status/on">
996
    &U;/egt/degC GE 930.0
997
   </test>
998
   <test logic="AND" value="&U;/status/on">
999 1000
    &U;/turbine-cooling EQ 0
    &U;/egt/degC GE 790.0
1001
   </test>
1002
   <test logic="AND" value="&U;/status/on">
1003 1004
    &U;/starter NE 0
    &U;/egt/degC GE 700.0
1005
   </test>
1006
   <test value="&U;/status/on">
1007
    &U;/panel/button/test-lights NE 0
1008 1009 1010
   </test>
  </switch>

1011
  <switch name="&U;/panel/light/P-fuel">
1012
   <default value="0"/>
1013
   <test value="&U;/status/on">
1014
    &U;/fuel/pressure-firevalve-kgf_cm2 LT 3.0
1015
   </test>
1016
   <test value="&U;/status/on">
1017
    &U;/panel/button/test-lights NE 0
1018 1019 1020
   </test>
  </switch>

1021
  <switch name="&U;/panel/light/fault">
1022
   <default value="0"/>
1023
   <test value="&U;/status/on">
1024
    &U;/set-running EQ 0
1025
   </test>
1026
   <test value="&U;/status/on">
1027
    &U;/panel/button/test-lights NE 0
1028 1029 1030 1031
   </test>
  </switch>


1032
  <switch name="&U;/panel/light/P-oil">
1033
   <default value="0"/>
1034
   <test value="&U;/status/on">
1035
    &U;/oil/pressure-kgf_cm2 LT 3.0
1036
   </test>
1037
   <test value="&U;/status/on">
1038
    &U;/panel/button/test-lights NE 0
1039 1040 1041
   </test>
  </switch>

1042
  <switch name="&U;/panel/light/P-oil-KSA">
1043
   <default value="0"/>
1044
   <test value="&U;/status/on">
1045
    &U;/accessory/n-norm LT 0.25
1046
   </test>
1047
   <test value="&U;/status/on">
1048
    &U;/panel/button/test-lights NE 0
1049 1050 1051
   </test>
  </switch>

1052
  <switch name="&U;/panel/light/RNA-closed">
1053
   <default value="0"/>
1054
   <test value="&U;/status/on">
1055
    &U;/n2 LT 51.6
1056
   </test>
1057
   <test value="&U;/status/on">
1058
    &U;/panel/button/test-lights NE 0
1059 1060 1061
   </test>
  </switch>

1062
  <switch name="&U;/panel/light/bypass-valves">
1063
   <default value="0"/>
1064
   <test value="&U;/status/on">
1065
    &U;/bypass-valves NE 0
1066
   </test>
1067
   <test value="&U;/status/on">
1068
    &U;/panel/button/test-lights NE 0
1069 1070 1071
   </test>
  </switch>

1072
  <switch name="&U;/panel/light/turbine-uncooled">
1073
   <default value="0"/>
1074
   <test value="&U;/status/on">
1075
    &U;/turbine-cooling EQ 0
1076
   </test>
1077
   <test value="&U;/status/on">
1078
    &U;/panel/button/test-lights NE 0
1079 1080 1081
   </test>
  </switch>

1082
  <switch name="&U;/panel/light/check-engine">
1083 1084
   <default value="0"/>
   <test logic="OR" value="1">
1085 1086 1087
    &U;/panel/light/stall-protection NE 0
    &U;/panel/light/stall NE 0
    &U;/panel/light/vibration NE 0
1088 1089
    &U;/panel/light/EGT-critical NE 0
    &U;/panel/light/P-fuel NE 0
1090
    &U;/panel/light/fault NE 0
1091 1092
    &U;/panel/light/P-oil NE 0
    &U;/panel/light/P-oil-KSA NE 0
1093
    propulsion/inlet[&IND;]/panel/light/fault NE 0
1094 1095 1096
   </test>
  </switch>

1097
  <switch name="&U;/panel/light/noise-abatement">
1098 1099 1100 1101 1102
   <default value="&U;/status/noise-abatement"/>
   <test value="&U;/status/on">
    &U;/panel/button/test-lights NE 0
   </test>
  </switch>
1103

1104
 </channel>
1105

1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116

 <channel name="Damage" execrate="120">

  <fcs_function name="&U;/damage/func/c1_init-rsec">
   <function>
    <quotient>
     <v>1.0</v>
     <sum>
      <v>300.0</v>
      <product>
       <urandom/>
1117
       <v>240.0</v>
1118 1119 1120 1121 1122 1123 1124 1125 1126
      </product>
     </sum>
    </quotient>
   </function>
  </fcs_function>

  <switch name="&U;/damage/func/c1_init_latch-rsec">
   <default value="&U;/damage/func/c1_init_latch-rsec"/>
   <test logic="OR" value="&U;/damage/func/c1_init-rsec">
1127
    simulation/repair NE 0
1128 1129 1130 1131 1132 1133 1134
    simulation/init NE 0
   </test>
  </switch>

  <switch name="&U;/damage/func/c1-rsec">
   <default value="&U;/damage/func/c1_init_latch-rsec"/>
   <test value="1.0">
1135
    simulation/repair NE 0
1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159
   </test>
  </switch>

  <fcs_function name="&U;/damage/func/input-norm">
   <function>
    <sum>
     <product>
      <max>
       <difference>
        <p>&U;/egt/degC</p>
        <v>930.0</v>
       </difference>
       <v>0.0</v>
      </max>
      <v>0.1</v>
     </product>
     <p>&U;/damage/fire</p>
    </sum>
   </function>
  </fcs_function>

  <switch name="&U;/damage/input-norm">
   <default value="&U;/damage/func/input-norm"/>
   <test logic="OR" value="-&U;/damage/damage-norm">
1160
    simulation/repair NE 0
1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179
   </test>
   <test logic="AND" value="0.0">
    &U;/damage/func/input-norm GT 0.0
    &U;/damage/damage-norm GE 1.0
   </test>
   <test logic="AND" value="0.0">
    &U;/damage/func/input-norm LT 0.0
    &U;/damage/damage-norm LE 0.0
   </test>
  </switch>

  <integrator name="&U;/damage/damage-norm">
   <input>&U;/damage/input-norm</input>
   <c1>&U;/damage/func/c1-rsec</c1>
  </integrator>

  <switch name="&U;/damage/smoke">
   <default value="&U;/damage/smoke"/>
   <test logic="OR" value="0">
1180
    simulation/repair NE 0
1181 1182 1183
    &U;/damage/func/fire/valve-sec GT 300.0
    &U;/fire/KSA-extinguishing NE 0
   </test>
1184 1185
   <test logic="AND" value="1">
    &U;/set-running NE 0
1186 1187 1188 1189
    &U;/damage/damage-norm GT 0.5
   </test>
   <test value="0">
    &U;/damage/func/input-norm LT 0.001
1190
   </test>
1191 1192
   <test logic="AND" value="1">
    &U;/set-running NE 0
1193
    &U;/damage/damage-norm GT 0.4
1194 1195 1196
   </test>
  </switch>

1197
  <switch name="&U;/damage/func/fire/valve-start-sec">
1198
   <default value="simulation/sim-time-sec"/>
1199 1200
   <test value="&U;/damage/func/fire/valve-start-sec">
    &U;/fire/valve EQ 0
1201 1202 1203
   </test>
  </switch>

1204
  <summer name="&U;/damage/func/fire/valve-sec">
1205
   <input>simulation/sim-time-sec</input>
1206
   <input>-&U;/damage/func/fire/valve-start-sec</input>
1207 1208 1209 1210 1211
  </summer>

  <switch name="&U;/damage/fire">
   <default value="&U;/damage/fire"/>
   <test logic="OR" value="0">
1212
    simulation/repair NE 0
1213 1214
    &U;/damage/func/fire/valve-sec GT 60.0
    &U;/fire/extinguishing NE 0
1215
   </test>
1216 1217
   <test logic="AND" value="1">
    &U;/set-running NE 0
1218 1219
    &U;/damage/damage-norm GT 0.8
   </test>
1220 1221 1222
   <test logic="AND" value="1">
    &U;/damage/func/input-norm GT 0.001
    &U;/set-running NE 0
1223
    &U;/damage/damage-norm GT 0.7
1224 1225 1226 1227 1228
   </test>
  </switch>

  <switch name="&U;/damage/structural">
   <default value="&U;/damage/structural"/>
1229
   <test logic="OR" value="0">
1230
    simulation/repair NE 0
1231 1232
    <!-- Because WOW of the contact point is true at startup.. -->
    simulation/init NE 0
1233
   </test>
1234 1235 1236
   <test value="1">
    systems/airframe/damage/break NE 0
   </test>
1237 1238 1239 1240
   <test logic="AND" value="1">
    &U;/thrust-norm GT 0.25
    &U;/damage/damage-norm GT 0.99
   </test>
1241 1242 1243 1244
   <test logic="AND" value="1">
    &U;/set-running NE 0
    &CONTACT;/WOW NE 0
   </test>
1245 1246 1247 1248 1249
  </switch>

 </channel>


1250
</system>